/* ==========================================================================
   Enggar Ranu Hariawan — Executive Engineering Portfolio
   Design System: dark-first, Linear/Vercel/GitHub-inspired
   ========================================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul, ol { list-style: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Design Tokens ---------- */
:root {
  /* dark (default) */
  --bg: #0B1120;
  --bg-elevated: #0F172A;
  --surface: #141c30;
  --surface-hover: #182036;
  --card: #111827;
  --border: #23304a;
  --text: #F8FAFC;
  --text-secondary: #B6C2D9;
  --text-muted: #64748B;
  --primary: #3B82F6;
  --primary-hover: #60A5FA;
  --primary-soft: rgba(59, 130, 246, 0.12);
  --success: #10B981;
  --success-soft: rgba(16, 185, 129, 0.12);
  --warning: #F59E0B;
  --shadow-color: 220 60% 2%;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-12: 48px;
  --space-16: 64px; --space-20: 80px; --space-24: 96px; --space-32: 128px;

  --radius-sm: 8px; --radius-md: 16px; --radius-lg: 24px; --radius-xl: 32px; --radius-pill: 999px;

  --font-heading: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --container: 1180px;
  --shadow-1: 0 1px 2px rgba(0,0,0,0.24), 0 1px 1px rgba(0,0,0,0.12);
  --shadow-2: 0 8px 24px rgba(0,0,0,0.28), 0 2px 6px rgba(0,0,0,0.2);
  --shadow-3: 0 24px 64px rgba(0,0,0,0.4), 0 8px 16px rgba(0,0,0,0.24);
}

:root[data-theme="light"] {
  --bg: #FAFAFA;
  --bg-elevated: #FFFFFF;
  --surface: #FFFFFF;
  --surface-hover: #F4F4F5;
  --card: #FFFFFF;
  --border: #E5E7EB;
  --text: #111827;
  --text-secondary: #4B5563;
  --text-muted: #9CA3AF;
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-soft: rgba(37, 99, 235, 0.08);
  --success: #059669;
  --success-soft: rgba(5, 150, 105, 0.08);
  --shadow-1: 0 1px 2px rgba(17,24,39,0.06);
  --shadow-2: 0 8px 24px rgba(17,24,39,0.08);
  --shadow-3: 0 24px 64px rgba(17,24,39,0.12);
}

/* ---------- Base ---------- */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--space-8); }
@media (max-width: 767px) { .container { padding-inline: 20px; } }

.section { padding-block: var(--space-24); position: relative; }
@media (max-width: 767px) { .section { padding-block: var(--space-16); } }

.section--alt { background: var(--bg-elevated); border-block: 1px solid var(--border); }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  color: var(--primary); letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: var(--space-4);
}
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px var(--primary-soft); }

.section-title { font-size: clamp(28px, 4vw, 40px); margin-bottom: var(--space-4); }
.section-lede { color: var(--text-secondary); font-size: 18px; max-width: 640px; margin-bottom: var(--space-12); }

.text-gradient {
  background: linear-gradient(120deg, var(--primary) 0%, var(--success) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Scroll Progress Bar ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 110;
  background: linear-gradient(90deg, var(--primary), var(--success));
  transform-origin: 0 50%; transform: scaleX(0);
  pointer-events: none;
}

/* ---------- Toast & Confetti (easter egg) ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 301;
  transform: translate(-50%, 16px); opacity: 0;
  background: var(--card); color: var(--text);
  border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border));
  border-radius: var(--radius-pill); padding: 12px 24px;
  font-weight: 500; font-size: 14.5px; box-shadow: var(--shadow-2);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none; white-space: nowrap;
}
.toast--visible { opacity: 1; transform: translate(-50%, 0); }
.confetti-canvas { position: fixed; inset: 0; z-index: 300; pointer-events: none; }

/* ---------- Skip Link ---------- */
.skip-link {
  position: absolute; top: -100px; left: 16px; z-index: 200;
  background: var(--primary); color: white; padding: 12px 20px; border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}
.skip-link:focus { top: 16px; }

/* ---------- Focus ---------- */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding-block: var(--space-4);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding-block: var(--space-3);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; }
.nav__brand { font-family: var(--font-heading); font-weight: 600; font-size: 18px; display: flex; align-items: center; gap: var(--space-2); }
.nav__brand-mark {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--success));
  color: #fff; font-family: var(--font-mono); font-weight: 700; font-size: 13px;
}
.nav__links { display: flex; align-items: center; gap: var(--space-6); }
.nav__link {
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  position: relative; padding-block: 4px; transition: color 0.2s ease;
}
.nav__link::after {
  content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px;
  background: var(--primary); transition: width 0.25s ease;
}
.nav__link:hover, .nav__link.active { color: var(--text); }
.nav__link.active::after { width: 100%; }
.nav__actions { display: flex; align-items: center; gap: var(--space-3); }
.nav__toggle-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm); display: grid; place-items: center;
  border: 1px solid var(--border); color: var(--text-secondary); transition: all 0.2s ease;
}
.nav__toggle-btn:hover { background: var(--surface-hover); color: var(--text); }
.nav__mobile-toggle { display: none; }

@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__mobile-toggle { display: grid; place-items: center; width: 36px; height: 36px; }
}

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 99; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-6);
  transform: translateY(-100%); transition: transform 0.35s ease;
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu a { font-family: var(--font-heading); font-size: 24px; font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 13px 24px; border-radius: var(--radius-sm); font-weight: 500; font-size: 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn--primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-1); }
.btn--primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn--secondary { border: 1px solid var(--border); color: var(--text); background: var(--surface); }
.btn--secondary:hover { background: var(--surface-hover); border-color: var(--text-muted); transform: translateY(-1px); }
.btn--ghost { color: var(--text-secondary); padding-inline: 12px; }
.btn--ghost:hover { color: var(--text); }
.btn--sm { padding: 9px 16px; font-size: 14px; }

/* ---------- Badges / Chips ---------- */
.chip {
  display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: 13px;
  padding: 6px 12px; border-radius: var(--radius-pill); background: var(--surface);
  border: 1px solid var(--border); color: var(--text-secondary);
}
.chip--accent { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); background: var(--primary-soft); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh; display: flex; align-items: center; position: relative;
  padding-top: 96px; overflow: hidden;
}
.hero__glow {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px circle at 15% 20%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 60%),
    radial-gradient(500px circle at 85% 60%, color-mix(in srgb, var(--success) 12%, transparent), transparent 60%);
}
/* WebGL background canvas: decorative layer only. Sits above the glow
   but below the content (z-index 2 on .container), never captures
   pointer events, and simply isn't there if the scene fails to load —
   the static HTML and gradient remain the source of truth. */
.hero__canvas { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
.hero > .container { position: relative; z-index: 2; }
.scroll-cue { z-index: 2; }
.hero__grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: var(--space-16); align-items: center;
}
@media (max-width: 1023px) { .hero__grid { grid-template-columns: 1fr; gap: var(--space-12); } }

.hero__name { font-size: clamp(38px, 5.5vw, 64px); margin-bottom: var(--space-3); }
.hero__identity { font-size: clamp(18px, 2.4vw, 22px); color: var(--text-secondary); font-weight: 500; margin-bottom: var(--space-6); max-width: 620px; }
.hero__identity strong { color: var(--text); font-weight: 600; }
.hero__summary { font-size: 17px; color: var(--text-secondary); max-width: 560px; margin-bottom: var(--space-8); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-8); }
.hero__badges { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.hero__panel { display: flex; flex-direction: column; gap: var(--space-4); }
.hero-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--space-6); box-shadow: var(--shadow-2);
}
.hero-card__label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--text-muted); text-transform: uppercase; margin-bottom: var(--space-2); }
.hero-card__value { font-family: var(--font-heading); font-size: 34px; font-weight: 700; }
.hero-card__value small { font-size: 15px; color: var(--text-secondary); font-weight: 500; margin-left: 4px; }
.hero-card__desc { color: var(--text-secondary); font-size: 14px; margin-top: 4px; }
.hero-metrics-mini { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.hero-metrics-mini .hero-card__value { font-size: 24px; }
.hero-card--highlight {
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
  background:
    radial-gradient(220px circle at 100% 0%, color-mix(in srgb, var(--primary) 14%, transparent), transparent 70%),
    var(--card);
}
.hero-card--highlight .hero-card__value {
  background: linear-gradient(120deg, var(--primary) 0%, var(--success) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.scroll-cue {
  position: absolute; bottom: var(--space-8); left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--text-muted); font-size: 12px; font-family: var(--font-mono);
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }
@media (max-width: 767px) { .scroll-cue { display: none; } }

/* ---------- Metric Cards (Impact) ---------- */
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }
@media (max-width: 1023px) { .metric-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .metric-grid { grid-template-columns: 1fr; } }

.metric-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: var(--space-6); transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.metric-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.metric-card__category { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--space-3); }
.metric-card__value { font-family: var(--font-heading); font-size: 30px; font-weight: 700; color: var(--primary); }
.metric-card__title { font-weight: 600; margin-top: var(--space-2); margin-bottom: var(--space-2); }
.metric-card__desc { font-size: 14px; color: var(--text-secondary); }

/* ---------- Principles ---------- */
.principle-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
@media (max-width: 767px) { .principle-grid { grid-template-columns: 1fr; } }
.principle-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: var(--space-6); display: flex; gap: var(--space-4);
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.principle-card:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); transform: translateY(-2px); }
.principle-card__num {
  font-family: var(--font-mono); font-weight: 700; font-size: 15px; color: var(--primary);
  width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--primary-soft);
  display: grid; place-items: center; flex-shrink: 0;
}
.principle-card__title { font-family: var(--font-heading); font-weight: 600; font-size: 16px; margin-bottom: 6px; }
.principle-card__statement { font-size: 14px; color: var(--text-secondary); }

/* ---------- Project / Case Study Cards ---------- */
.project-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--space-8); margin-bottom: var(--space-8);
}
.project-card:last-child { margin-bottom: 0; }
.project-card__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: var(--space-4); margin-bottom: var(--space-6); }
.project-card__title { font-size: 24px; margin-bottom: var(--space-2); }
.project-card__summary { color: var(--text-secondary); max-width: 640px; }
.project-card__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); margin-bottom: var(--space-6); }
@media (max-width: 900px) { .project-card__grid { grid-template-columns: 1fr; } }
.project-block {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-5);
}
.project-block__label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--space-3); }
.project-block li { display: flex; gap: var(--space-2); font-size: 14px; color: var(--text-secondary); margin-bottom: var(--space-2); }
.project-block li:last-child { margin-bottom: 0; }
.project-block li::before { content: '▸'; color: var(--primary); flex-shrink: 0; }
.project-card__impact {
  display: flex; flex-wrap: wrap; gap: var(--space-4); padding: var(--space-5);
  background: var(--success-soft); border: 1px solid color-mix(in srgb, var(--success) 30%, var(--border));
  border-radius: var(--radius-md); margin-bottom: var(--space-6);
}
.impact-stat { min-width: 140px; }
.impact-stat__value { font-family: var(--font-heading); font-weight: 700; font-size: 22px; color: var(--success); }
.impact-stat__label { font-size: 13px; color: var(--text-secondary); }
.project-card__footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-4); align-items: flex-start; }
.project-card__lessons { font-size: 14px; color: var(--text-secondary); font-style: italic; max-width: 520px; }
.tech-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* ---------- Architecture Diagram ---------- */
.arch-lifecycle {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); margin-bottom: var(--space-12);
}
@media (max-width: 900px) { .arch-lifecycle { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .arch-lifecycle { grid-template-columns: 1fr; } }
.arch-phase {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-5);
  position: relative;
}
.arch-phase__num { font-family: var(--font-mono); color: var(--primary); font-size: 13px; margin-bottom: var(--space-2); }
.arch-phase__title { font-weight: 600; margin-bottom: var(--space-2); }
.arch-phase__desc { font-size: 13px; color: var(--text-secondary); }
.arch-diagram-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-8); }
.arch-diagram-card__title { font-weight: 600; margin-bottom: var(--space-6); }
.cdc-flow-dash { stroke-dasharray: 6 6; animation: dash 20s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -400; } }

/* ---------- Experience (career timeline + role cards) ---------- */
.exp-banner {
  display: flex; align-items: center; gap: var(--space-10);
  background:
    radial-gradient(480px circle at 0% 0%, color-mix(in srgb, var(--primary) 14%, transparent), transparent 65%),
    radial-gradient(480px circle at 100% 100%, color-mix(in srgb, var(--success) 10%, transparent), transparent 65%),
    var(--card);
  border: 1px solid color-mix(in srgb, var(--primary) 32%, var(--border));
  border-radius: var(--radius-lg); padding: var(--space-8);
  margin-bottom: var(--space-12); box-shadow: var(--shadow-2);
}
.exp-banner__years { display: flex; align-items: center; gap: var(--space-4); flex-shrink: 0; }
.exp-banner__value {
  font-family: var(--font-heading); font-size: clamp(56px, 7vw, 80px); font-weight: 700; line-height: 1;
  background: linear-gradient(120deg, var(--primary) 0%, var(--success) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.exp-banner__label { font-family: var(--font-heading); font-weight: 600; font-size: 17px; line-height: 1.35; }
.exp-banner__divider { align-self: stretch; width: 1px; background: var(--border); }
.exp-banner__facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); flex: 1; }
.exp-banner__fact-value { font-family: var(--font-heading); font-size: 26px; font-weight: 700; color: var(--text); }
.exp-banner__fact-label { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
@media (max-width: 900px) {
  .exp-banner { flex-direction: column; align-items: flex-start; gap: var(--space-6); }
  .exp-banner__divider { width: 100%; height: 1px; align-self: auto; }
  .exp-banner__facts { width: 100%; }
}
@media (max-width: 600px) { .exp-banner__facts { grid-template-columns: 1fr; gap: var(--space-4); } }

.exp-timeline { position: relative; padding-left: var(--space-12); }
.exp-timeline::before {
  content: ''; position: absolute; left: 11px; top: 12px; bottom: 12px; width: 2px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--success) 45%, var(--border) 100%);
}
.exp-timeline__dot {
  position: absolute; left: calc(-1 * var(--space-12) + 3px); top: 38px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg-elevated); border: 3px solid var(--text-muted); z-index: 1;
}
.exp-timeline__dot--current {
  border-color: var(--success); background: var(--success-soft);
  animation: dot-pulse 2.4s ease-out infinite;
}
@keyframes dot-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 40%, transparent); }
  70% { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.exp-card {
  position: relative;
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-8);
  background: var(--card); margin-bottom: var(--space-6);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.exp-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.exp-card:last-child { margin-bottom: 0; }
.exp-card--current { border-color: color-mix(in srgb, var(--success) 35%, var(--border)); }
.exp-card__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-2); }
.exp-card__role { font-size: 20px; font-family: var(--font-heading); font-weight: 600; }
.exp-card__tag { font-size: 11px; vertical-align: middle; margin-left: var(--space-2); }
.exp-card__org { color: var(--primary); font-weight: 500; }
.exp-card__when { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.exp-card__period { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.exp-card__duration {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--primary);
  background: var(--primary-soft); border-radius: var(--radius-pill); padding: 2px 12px;
}
.badge-current {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--success); background: var(--success-soft);
  border: 1px solid color-mix(in srgb, var(--success) 35%, var(--border));
  border-radius: var(--radius-pill); padding: 3px 12px;
}
.badge-current::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--success);
  animation: dot-pulse 2.4s ease-out infinite;
}
.exp-card__mission { color: var(--text-secondary); font-size: 15px; margin-block: var(--space-4); max-width: 680px; }
.exp-card ul { display: grid; gap: var(--space-2); margin-bottom: var(--space-4); }
.exp-card li { display: flex; gap: var(--space-2); font-size: 14.5px; color: var(--text-secondary); }
.exp-card li::before { content: '▸'; color: var(--primary); flex-shrink: 0; }
.exp-card--compact { padding: var(--space-6); }
.exp-card--compact .exp-card__role { font-size: 17px; }
.exp-card--compact ul { margin-bottom: 0; }

@media (max-width: 600px) {
  .exp-timeline { padding-left: var(--space-8); }
  .exp-timeline::before { left: 6px; }
  .exp-timeline__dot { left: calc(-1 * var(--space-8) - 1px); top: 32px; width: 14px; height: 14px; }
  .exp-card__when { flex-direction: row; flex-wrap: wrap; align-items: center; }
}

/* ---------- Leadership ---------- */
.leadership-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
@media (max-width: 900px) { .leadership-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .leadership-grid { grid-template-columns: 1fr; } }
.leadership-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-6); }
.leadership-card__icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--primary-soft);
  color: var(--primary); display: grid; place-items: center; margin-bottom: var(--space-4);
}
.leadership-card__title { font-weight: 600; margin-bottom: var(--space-2); }
.leadership-card__desc { font-size: 14px; color: var(--text-secondary); }

.quote-block {
  border-left: 3px solid var(--primary); padding-left: var(--space-6); margin-block: var(--space-12);
  font-family: var(--font-heading); font-size: clamp(18px, 2.2vw, 24px); font-weight: 500; color: var(--text);
  max-width: 760px;
}
.quote-block cite { display: block; margin-top: var(--space-4); font-family: var(--font-body); font-style: normal; font-size: 14px; font-weight: 500; color: var(--text-muted); }

/* ---------- Tech Stack ---------- */
.stack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
@media (max-width: 900px) { .stack-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .stack-grid { grid-template-columns: 1fr; } }
.stack-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-6); }
.stack-card__title { font-weight: 600; margin-bottom: 4px; }
.stack-card__purpose { font-size: 13px; color: var(--text-secondary); margin-bottom: var(--space-4); }
.stack-card .tech-row { margin: 0; }

/* ---------- Awards & Recognition ---------- */
.award-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
@media (max-width: 900px) { .award-grid { grid-template-columns: 1fr; } }
.award-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.award-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.award-card__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--border); }
.award-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.award-card__media:hover img { transform: scale(1.03); }
.award-card__body { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-2); }
.award-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); }
.award-card__title { font-size: 18px; }
.award-card__issuer { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--text-muted); text-transform: uppercase; }
.award-card__desc { font-size: 14px; color: var(--text-secondary); }

/* ---------- Certifications ---------- */
.cert-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
@media (max-width: 900px) { .cert-grid { grid-template-columns: 1fr; } }
.cert-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-6); display: flex; flex-direction: column; height: 100%; }
.cert-card__title { font-weight: 600; font-size: 16px; margin-bottom: 6px; }
.cert-card__issuer { font-size: 13px; color: var(--text-muted); margin-bottom: var(--space-4); }
.cert-card__link { margin-top: auto; font-size: 13px; color: var(--primary); font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.cert-card__link:hover { color: var(--primary-hover); }

/* ---------- Contact ---------- */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-12); align-items: start; }
@media (max-width: 900px) { .contact-wrap { grid-template-columns: 1fr; gap: var(--space-8); } }
.contact-topics { display: grid; gap: var(--space-3); }
.contact-topic { display: flex; gap: var(--space-4); padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); }
.contact-topic__title { font-weight: 600; font-size: 14.5px; margin-bottom: 2px; }
.contact-topic__desc { font-size: 13.5px; color: var(--text-secondary); }
.contact-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-8); }
.contact-channel { display: flex; align-items: center; justify-content: space-between; padding-block: var(--space-4); border-bottom: 1px solid var(--border); }
.contact-channel:last-child { border-bottom: none; }
.contact-channel__label { font-size: 13px; color: var(--text-muted); }
.contact-channel__value { font-weight: 500; }
.contact-channel__link:hover .contact-channel__value { color: var(--primary); }
.availability-list { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-6); }

/* ---------- Footer ---------- */
.site-footer { padding-block: var(--space-16); border-top: 1px solid var(--border); background: var(--bg-elevated); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--space-10); margin-bottom: var(--space-12); }
@media (max-width: 767px) { .footer-grid { grid-template-columns: 1fr; gap: var(--space-8); } }
.footer-brand__name { font-family: var(--font-heading); font-size: 20px; font-weight: 600; margin-bottom: var(--space-2); }
.footer-brand__roles { color: var(--text-secondary); font-size: 14px; line-height: 1.9; }
.footer-col__title { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--space-4); }
.footer-col a, .footer-col span { display: block; color: var(--text-secondary); font-size: 14px; margin-bottom: var(--space-3); }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-4); padding-top: var(--space-8); border-top: 1px solid var(--border); font-size: 13px; color: var(--text-muted); }
.back-to-top { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); }
.back-to-top:hover { color: var(--primary); }

.footer-updated {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.03em;
  color: var(--text-muted);
}
.footer-updated[hidden] { display: none; }
.footer-updated__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success); box-shadow: 0 0 0 3px var(--success-soft);
  animation: dot-pulse 2.4s ease-out infinite;
}
.footer-updated time { color: var(--text-secondary); font-weight: 500; }

/* ---------- Lenis Smooth Scroll ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- 3D Tilt & Depth Parallax ----------
   html.has-tilt is added by JS only on hover-capable, fine-pointer
   devices with motion allowed — touch devices never pay this cost.
   JS drives the card's rotateX/rotateY inline; these rules provide the
   3D context and float key elements forward on the Z axis. */
html.has-tilt .metric-card,
html.has-tilt .exp-card,
html.has-tilt .hero-card {
  transform-style: preserve-3d;
  will-change: transform;
}
html.has-tilt .metric-card:hover,
html.has-tilt .exp-card:hover { transform: none; } /* JS owns the hover transform */
html.has-tilt .metric-card__value,
html.has-tilt .hero-card__value { transform: translateZ(30px); }
html.has-tilt .metric-card__title { transform: translateZ(16px); }
html.has-tilt .exp-card__role { transform: translateZ(22px); }
html.has-tilt .exp-card__duration,
html.has-tilt .badge-current { transform: translateZ(26px); }

/* ---------- Reveal Animations ---------- */
/* When GSAP ScrollTrigger drives the entrance animations (html.has-gsap),
   the CSS-transition fallback below is disabled so the two never conflict. */
html.has-gsap .reveal,
html.has-gsap .reveal-stagger > * { opacity: 1; transform: none; transition: none; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s cubic-bezier(.16,1,.3,1), transform 0.7s cubic-bezier(.16,1,.3,1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.03s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.09s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.15s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.21s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.27s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.33s; }
.reveal-stagger.is-visible > *:nth-child(7) { transition-delay: 0.39s; }
.reveal-stagger.is-visible > *:nth-child(8) { transition-delay: 0.45s; }

/* ---------- Misc utilities ---------- */
.flex-center { display: flex; align-items: center; }
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.mt-2 { margin-top: var(--space-2); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
