:root {
  --bg: #ffffff;
  --bg-elevated: #f8f9fa;
  --bg-accent: #e8f4f8;
  --text: #2c3e50;
  --text-muted: #7f8c8d;
  --accent: #3498db;
  --accent-dark: #2980b9;
  --accent-dim: rgba(52, 152, 219, 0.1);
  --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --green: #27ae60;
  --green-dim: rgba(39, 174, 96, 0.1);
  --border: #e0e4e8;
  --border-light: #ecf0f1;
  --radius: 8px;
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ── Dark theme ── */
[data-theme='dark'] {
  --bg: #0a0b0d;
  --bg-elevated: #12141a;
  --bg-accent: rgba(52, 152, 219, 0.12);
  --text: #e8eaed;
  --text-muted: #9aa0a6;
  --accent: #4a9eff;
  --accent-dark: #6bb0ff;
  --accent-dim: rgba(74, 158, 255, 0.15);
  --green: #7ecb9a;
  --green-dim: rgba(126, 203, 154, 0.12);
  --border: #2a2d35;
  --border-light: #1e2028;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.45);
}

[data-theme='dark'] .header {
  background: rgba(10, 11, 13, 0.92);
}

[data-theme='dark'] .hero {
  background: linear-gradient(160deg, #121520 0%, #0d1117 45%, #0a0b0d 100%);
}

[data-theme='dark'] .hero-glow {
  background: radial-gradient(
    ellipse at center,
    rgba(118, 75, 162, 0.22) 0%,
    rgba(74, 158, 255, 0.12) 40%,
    transparent 68%
  );
}

[data-theme='dark'] .hero-dots {
  background-image: radial-gradient(circle, rgba(74, 158, 255, 0.12) 1px, transparent 1px);
}

[data-theme='dark'] .logo-brand {
  background: linear-gradient(135deg, #8b9cff 0%, #c4a8e8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

[data-theme='dark'] .logo:hover .logo-brand {
  filter: brightness(1.12);
}

[data-theme='dark'] .btn-secondary {
  background: transparent;
}

[data-theme='dark'] .contact {
  background: linear-gradient(180deg, #0a0b0d 0%, #0d1117 100%);
}

[data-theme='dark'] .footer {
  border-top-color: #1a1d25;
}

[data-theme='dark'] .project-card--volunteer:hover {
  border-left-color: #7ecb9a;
}

[data-theme='dark'] .nav.open {
  background: #12141a;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ── Smooth theme transition ──
   Fade fallback for browsers without View Transitions API.
   Only active after JS marks the page ready (avoids flash on load).
   box-shadow excluded so hover effects respond instantly. */
html.theme-ready *,
html.theme-ready *::before,
html.theme-ready *::after {
  transition:
    background-color 0.7s ease,
    background 0.7s ease,
    color 0.7s ease,
    border-color 0.7s ease,
    fill 0.7s ease,
    stroke 0.7s ease !important;
}

/* ── View Transition ripple (modern browsers) ── */

/* Freeze the old snapshot in place while the new view slides in */
::view-transition-old(root) {
  animation: none;
  mix-blend-mode: normal;
}

/* Expanding circle clip from the toggle button origin */
::view-transition-new(root) {
  animation: theme-ripple-in 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  mix-blend-mode: normal;
}

/* Contracting circle when going back to light */
html[data-theme='light']::view-transition-new(root) {
  animation: theme-ripple-in 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes theme-ripple-in {
  from {
    clip-path: circle(0% at var(--ripple-x, 50%) var(--ripple-y, 50%));
  }
  to {
    clip-path: circle(150% at var(--ripple-x, 50%) var(--ripple-y, 50%));
  }
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── Focus-visible accessibility ── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Section titles with gradient text ── */
.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  padding-bottom: 0.75rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--accent-gradient);
  border-radius: 2px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
}

.section-title.aos-animate::after {
  width: 60%;
}

.section-intro {
  color: var(--text-muted);
  margin: 0 0 2rem;
}

/* ── Gradient section dividers ── */
.proof,
.projects,
.services,
.skills,
.process,
.contact {
  position: relative;
  border-top: none;
}

.proof::before,
.projects::before,
.services::before,
.skills::before,
.process::before,
.contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.4;
  pointer-events: none;
}

/* ── Header ── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  isolation: isolate;
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
  z-index: 101;
  pointer-events: none;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-brand {
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-sub {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.logo:hover {
  text-decoration: none;
}

.logo:hover .logo-brand {
  filter: brightness(1.08) saturate(1.05);
}

.nav {
  display: flex;
  gap: 2rem;
}

/* ── Nav link animated underline ── */
.nav a {
  color: color-mix(in srgb, var(--text) 78%, var(--text-muted));
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s;
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav a:hover::after {
  width: 100%;
}

.nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

@supports not (color: color-mix(in srgb, black, white)) {
  .nav a {
    color: #4a6070;
  }

  [data-theme='dark'] .nav a {
    color: #c5cad3;
  }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease,
    background 0.2s;
  transform-origin: center;
}

/* Hamburger → X animation */
.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Theme toggle ── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--accent-dim);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  color: var(--accent);
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s;
  padding: 0;
  margin-left: 0.5rem;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.theme-toggle .icon-sun {
  display: none;
}

.theme-toggle .icon-moon {
  display: block;
}

[data-theme='dark'] .theme-toggle .icon-sun {
  display: block;
}

[data-theme='dark'] .theme-toggle .icon-moon {
  display: none;
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem;
  overflow: hidden;
  text-align: center;
  background: linear-gradient(160deg, #e8f2ff 0%, #f5f0ff 50%, #ffffff 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 920px;
  width: 100%;
}

/* ── Hero badge shimmer ── */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--bg-accent);
  border: 1px solid rgba(52, 152, 219, 0.25);
  border-radius: 99px;
  padding: 0.35rem 0.9rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.hero-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: translateX(-100%);
  animation: badge-shimmer 4s infinite;
}

@keyframes badge-shimmer {
  0% { transform: translateX(-100%); }
  30% { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

.hero-badge svg {
  color: var(--accent);
}

/* ── Hero H1 with gradient underline ── */
.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  color: var(--text);
  position: relative;
  padding-bottom: calc(0.5rem + 3px);
}

.hero h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 3px;
  background: var(--accent-gradient);
  border-radius: 2px;
  animation: h1-underline 2.2s cubic-bezier(0.4, 0, 0.2, 1) 0.5s both;
}

/* Mouse-following glow on the underline */
.hero h1::before {
  content: '';
  position: absolute;
  bottom: -4px;
  left: var(--glow-x, 50%);
  width: 80px;
  height: 12px;
  background: radial-gradient(ellipse, var(--accent) 0%, transparent 70%);
  border-radius: 50%;
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: -1;
}

.hero h1.glow-active::before {
  opacity: 0.5;
}

@keyframes h1-underline {
  from { width: 0; }
  to { width: 60%; }
}

.hero-sub {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin: 0 auto 2rem;
  max-width: 760px;
  line-height: 1.55;
  text-wrap: balance;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent-gradient);
  background-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-secondary {
  background: var(--bg);
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-secondary:hover {
  background: var(--accent-dim);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

/* ── Hero tech row stagger entrance ── */
.hero-tech-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  opacity: 0.8;
}

.hero-tech-row img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  transition:
    opacity 0.2s,
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.3s;
  animation: tech-stagger-in 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.hero-tech-row img:nth-child(1) { animation-delay: 0.6s; }
.hero-tech-row img:nth-child(2) { animation-delay: 0.65s; }
.hero-tech-row img:nth-child(3) { animation-delay: 0.7s; }
.hero-tech-row img:nth-child(4) { animation-delay: 0.75s; }
.hero-tech-row img:nth-child(5) { animation-delay: 0.8s; }
.hero-tech-row img:nth-child(6) { animation-delay: 0.85s; }
.hero-tech-row img:nth-child(7) { animation-delay: 0.9s; }
.hero-tech-row img:nth-child(8) { animation-delay: 0.95s; }
.hero-tech-row img:nth-child(9) { animation-delay: 1.0s; }

@keyframes tech-stagger-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero-tech-row img:hover {
  opacity: 1;
  transform: scale(1.08);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
}

.hero-visual {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

/* ── Hero glow ambient float ── */
.hero-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 960px;
  height: 520px;
  background: radial-gradient(
    ellipse at center,
    rgba(118, 75, 162, 0.18) 0%,
    rgba(102, 126, 234, 0.12) 42%,
    transparent 68%
  );
  border-radius: 50%;
  filter: blur(48px);
  animation: glow-float 8s ease-in-out infinite;
}

@keyframes glow-float {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -52%) scale(1.03); }
}

.hero-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(52, 152, 219, 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 30%, transparent 100%);
}

/* ── Proof ── */
.proof {
  padding: 4rem 0;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

/* ── Card gradient top-border on hover (proof + service cards) ── */
.proof-card,
.service-card {
  position: relative;
  overflow: hidden;
}

.proof-card::before,
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.proof-card:hover::before,
.service-card:hover::before {
  transform: scaleX(1);
}

.proof-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition:
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.proof-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.proof-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: var(--radius);
  color: var(--accent);
  margin-bottom: 0.75rem;
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.3s;
}

/* ── Proof/service icon micro-rotation on hover ── */
.proof-card:hover .proof-icon {
  transform: rotate(6deg) scale(1.05);
  background: rgba(52, 152, 219, 0.18);
}

.proof-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  color: var(--text);
}

.proof-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Projects ── */
.projects {
  padding: 4rem 0;
  background: var(--bg-elevated);
  content-visibility: auto;
  overflow: hidden;
}

/* Subtle floating gradient orb */
.projects::after {
  content: '';
  position: absolute;
  right: -10%;
  top: 20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(102, 126, 234, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  animation: orb-drift 12s ease-in-out infinite;
}

[data-theme='dark'] .projects::after {
  background: radial-gradient(ellipse, rgba(74, 158, 255, 0.08) 0%, transparent 70%);
}

@keyframes orb-drift {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  transition:
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow-sm);
}

.project-card:hover {
  box-shadow: var(--shadow-hover);
  border-left-color: var(--accent-dark);
  transform: translateY(-3px);
}

.project-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.project-icon-wrap {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: var(--radius);
  color: var(--accent);
}

.project-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.project-tag--volunteer {
  color: var(--green);
}

.project-card--volunteer {
  border-left-color: var(--green);
}

.project-card--volunteer:hover {
  border-left-color: #219a52;
}

.project-card--volunteer .project-outcome-lead {
  background: var(--green-dim);
  border-left-color: var(--green);
}

.project-card--volunteer .project-outcome-link {
  border-color: color-mix(in srgb, var(--green) 30%, transparent);
  background: color-mix(in srgb, var(--green) 12%, white 88%);
  color: var(--green);
  box-shadow: 0 10px 24px rgba(41, 158, 83, 0.14);
}

.project-card--volunteer .project-outcome-link:hover {
  background: color-mix(in srgb, var(--green) 18%, white 82%);
  border-color: color-mix(in srgb, var(--green) 45%, transparent);
  box-shadow: 0 14px 28px rgba(41, 158, 83, 0.18);
}

.project-card--volunteer .project-outcome-lead svg {
  color: var(--green);
}

.project-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
  color: var(--text);
}

.project-problem,
.project-solution {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.project-problem strong,
.project-solution strong {
  color: var(--text);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0;
}

.tech {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.2rem 0.5rem;
  background: var(--accent-dim);
  color: var(--accent-dark);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.tech img {
  display: block;
  border-radius: 2px;
}

.project-outcome {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--accent-dim);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
}

.project-outcome.project-outcome-lead {
  font-size: 0.95rem;
  font-weight: 500;
  background: var(--bg-accent);
  border-left: 4px solid var(--accent);
  margin-bottom: 1.25rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.project-outcome.project-outcome-lead > svg {
  align-self: flex-start;
  margin-top: 0.2rem;
}

.project-outcome-copy {
  flex: 1 1 32rem;
  min-width: 0;
}

.project-outcome-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-left: auto;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, white 90%);
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(27, 135, 214, 0.12);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.project-outcome-link:hover {
  text-decoration: none;
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--accent) 16%, white 84%);
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  box-shadow: 0 14px 28px rgba(27, 135, 214, 0.18);
}

.project-outcome-link:focus-visible {
  outline-offset: 3px;
}

.project-outcome svg {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.project-details {
  margin: 0 0 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.project-details:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.project-details summary {
  list-style: none;
  cursor: pointer;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  user-select: none;
}

.project-details summary::-webkit-details-marker {
  display: none;
}

.project-details summary::after {
  content: '→';
  font-size: 1rem;
  line-height: 1;
  opacity: 0.75;
  transition:
    transform 0.25s ease,
    opacity 0.2s;
}

.project-details[open] summary::after {
  transform: rotate(90deg);
  opacity: 1;
}

.project-details[open] {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: var(--shadow-md);
}

.project-details[open] summary {
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

/* ── Details smooth height animation ── */
.details-body {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
}

/* Override the html.theme-ready * blanket (!important, 0-1-1 specificity)
   with a higher-specificity selector (0-2-1) so grid-template-rows animates. */
html.theme-ready .details-body {
  transition:
    grid-template-rows 0.4s ease-out,
    background-color 0.7s ease,
    color 0.7s ease !important;
}


.project-details[open] .details-body {
  grid-template-rows: 1fr;
}

.details-body > div {
  min-height: 0;
  overflow: hidden;
}

.project-details .details-body .project-problem:first-of-type,
.project-details .details-body .project-solution:first-of-type {
  margin-top: 0;
}

.project-details .details-body .project-problem,
.project-details .details-body .project-solution {
  padding-left: 1rem;
  padding-right: 1rem;
}

.project-details .details-body .project-problem:last-of-type,
.project-details .details-body .project-solution:last-of-type {
  padding-bottom: 1rem;
}

.project-card--volunteer .project-details summary {
  color: var(--green);
}

.project-card--volunteer .project-details:hover {
  border-color: color-mix(in srgb, var(--green) 35%, var(--border));
}

.project-card--volunteer .project-details[open] {
  border-color: color-mix(in srgb, var(--green) 45%, var(--border));
}

/* ── Additional Services ── */
.services {
  padding: 4rem 0;
  content-visibility: auto;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem;
  transition:
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.service-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.service-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 0.65rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .service-icon {
  transform: rotate(6deg) scale(1.05);
}

.service-card h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  color: var(--text);
}

.service-card p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.services-note {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin: 0;
  background: var(--bg-accent);
}

.services-note svg {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Skills ── */
.skills {
  padding: 4rem 0;
  background: var(--bg-elevated);
  content-visibility: auto;
  overflow: hidden;
}

/* Faint dot grid overlay */
.skills::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(52, 152, 219, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 20%, transparent 100%);
}

[data-theme='dark'] .skills::after {
  background-image: radial-gradient(circle, rgba(74, 158, 255, 0.08) 1px, transparent 1px);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.skills-col {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.skills-col:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.skills-col-icon {
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.skills-col h4 {
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: var(--accent-dark);
}

.skills-col p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.tech-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  padding: 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.tech-logos img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  opacity: 0.85;
  transition:
    opacity 0.2s,
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.3s;
}

.tech-logos img:hover {
  opacity: 1;
  transform: scale(1.08);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
}

/* ── Process ── */
.process {
  padding: 4rem 0;
  content-visibility: auto;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.process-step {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.process-step:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.step-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-gradient);
  background-color: var(--accent);
  border-radius: var(--radius);
  color: #ffffff;
  margin-bottom: 0.75rem;
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Process step icon hover glow ── */
.process-step:hover .step-icon {
  box-shadow: 0 0 0 4px var(--accent-dim), 0 0 16px rgba(52, 152, 219, 0.25);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  margin-bottom: 0.35rem;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.process-step h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  color: var(--text);
}

.process-step p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Team ── */
.team {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.hero + .team {
  border-top: none;
}

.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

@media (min-width: 700px) {
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.team-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.team-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.team-card-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.team-card-top > div:last-child {
  min-width: 0;
  flex: 1;
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

/* ── Team photo hover: accent border + glow ring ── */
.avatar-photo {
  object-fit: cover;
  object-position: center 15%;
  border: 2px solid var(--border);
  transition:
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.3s,
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.team-card:hover .avatar-photo {
  border-color: var(--accent);
  filter: brightness(1.05);
  box-shadow: 0 0 0 3px var(--accent-dim), 0 0 12px rgba(52, 152, 219, 0.2);
}

.team-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.1rem;
  color: var(--text);
}

.team-card > p {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.team-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
  margin-top: auto;
}

.team-tags span {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  padding: 0.18rem 0.45rem;
  background: var(--accent-dim);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--accent-dark);
}

.team-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
}

/* ── Contact ── */
.contact {
  position: relative;
  padding: 6rem 0;
  min-height: 320px;
  background: linear-gradient(180deg, #ffffff 0%, #f0f6ff 100%);
  /* no content-visibility: auto — it prevents tsParticles canvas from rendering
     when the section is off-screen during initialization */
}

.contact-intro {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  background: var(--accent-gradient);
  background-color: var(--accent);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.contact-link:hover {
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
  transform: translateY(-1px);
  text-decoration: none;
  color: #ffffff;
}

.contact-link:active {
  transform: scale(0.98);
}

/* ── Contact floating particles ── */
#tsparticles-contact {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 3rem); /* mirrors .container: full width minus 2×1.5rem padding */
  max-width: 960px;         /* matches .container max-width */
  z-index: 0;
  --particle-color: #667eea;
  --particle-opacity: 0.55;
}

[data-theme='dark'] #tsparticles-contact {
  --particle-color: #6bb0ff;
  --particle-opacity: 0.65;
}

.contact .container {
  position: relative;
  z-index: 1;
}

/* ── Footer ── */
.footer {
  background: var(--accent-gradient);
  background-color: var(--accent);
  padding: 1.5rem 0;
  border-top: 3px solid var(--accent-dark);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-flyer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.35rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease;
}

.footer-flyer-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: #ffffff;
}

.footer-flyer-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.footer-brand {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  font-style: italic;
  letter-spacing: 0.3px;
}

.footer p {
  margin: 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Noscript / AOS fallback ── */
html:not(.aos-init) [data-aos] {
  opacity: 1 !important;
  transform: none !important;
}

/* ── Mobile ── */
@media (max-width: 640px) {
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 0 1.5rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition:
      max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.3s ease,
      padding 0.35s ease;
  }

  .nav.open {
    max-height: 400px;
    opacity: 1;
    padding: 1rem 1.5rem;
  }

  .nav a::after {
    display: none;
  }

  .nav.open a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
  }

  .nav.open a:last-child {
    border-bottom: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    min-height: auto;
    padding: 4rem 1.5rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    justify-content: center;
  }

  .proof-grid {
    grid-template-columns: 1fr 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr 1fr;
  }

  .skills-grid {
    grid-template-columns: 1fr 1fr;
  }

  .process-steps {
    grid-template-columns: 1fr 1fr;
  }

  .logo-brand {
    font-size: 0.95rem;
  }

  .logo-sub {
    font-size: 0.6rem;
  }
}

@media (max-width: 540px) {
  .proof-grid,
  .services-grid,
  .skills-grid,
  .process-steps {
    grid-template-columns: 1fr;
  }
}
