/* ==========================================================================
   Sreeshanth Shimji — Portfolio
   Design system: deep navy + warm gold, serif display / grotesk body
   ========================================================================== */

:root {
  --bg: #0a111e;
  --bg-2: #0d1626;
  --surface: #111b2e;
  --surface-2: #16223a;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eeebe3;
  --text-2: #c9cfdb;
  --muted: #8f9bb3;
  --accent: #e2b15a;
  --accent-strong: #f0c677;
  --accent-ink: #1a1306;
  --accent-soft: rgba(226, 177, 90, 0.12);
  --blue: #6f9cf5;
  --green: #5fd3a6;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.6);
  --shadow-sm: 0 8px 24px -12px rgba(0, 0, 0, 0.5);
  --grid: rgba(255, 255, 255, 0.035);
  --header-bg: rgba(10, 17, 30, 0.72);

  --font-display: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 18px;
  --radius-sm: 10px;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f3ec;
  --bg-2: #efebe2;
  --surface: #ffffff;
  --surface-2: #faf8f3;
  --line: rgba(15, 22, 38, 0.09);
  --line-strong: rgba(15, 22, 38, 0.18);
  --text: #0f1626;
  --text-2: #2c3547;
  --muted: #5b6579;
  --accent: #a26d12;
  --accent-strong: #8a5b0b;
  --accent-ink: #ffffff;
  --accent-soft: rgba(162, 109, 18, 0.1);
  --blue: #2f5fc4;
  --green: #17855c;
  --shadow: 0 24px 60px -28px rgba(15, 22, 38, 0.28);
  --shadow-sm: 0 8px 24px -14px rgba(15, 22, 38, 0.25);
  --grid: rgba(15, 22, 38, 0.045);
  --header-bg: rgba(246, 243, 236, 0.78);
  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
em, i, cite, address, dfn, var { font-style: normal; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.12; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
ul, ol.breadcrumb { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: 8px; font-weight: 600;
  transition: top .2s;
}
.skip-link:focus { top: 16px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Background atmosphere ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}
.bg-glow {
  position: fixed; z-index: -1; pointer-events: none;
  width: 720px; height: 720px; border-radius: 50%;
  left: var(--mx, 70%); top: var(--my, 10%);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 60%);
  filter: blur(20px);
  transition: left .8s var(--ease), top .8s var(--ease);
}

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 120;
  transform-origin: 0 50%; transform: scaleX(var(--progress, 0));
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background-color .3s, border-color .3s, transform .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: var(--header-bg);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line);
}
.site-header.is-hidden { transform: translateY(-100%); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 600; letter-spacing: -0.01em; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: var(--accent-ink); font-family: var(--font-display); font-weight: 700; font-size: 17px;
  box-shadow: 0 6px 20px -8px var(--accent);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text small { color: var(--muted); font-weight: 500; font-size: 12px; letter-spacing: .02em; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  position: relative; padding: 8px 14px; border-radius: 999px; font-size: 15px; color: var(--text-2);
  transition: color .2s, background-color .2s;
}
.nav-links a:hover { color: var(--text); background: var(--line); }
.nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent); transform: translateX(-50%);
}
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--text-2);
  transition: border-color .2s, color .2s, transform .2s;
}
.icon-btn:hover { border-color: var(--line-strong); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }
.menu-btn { display: none; }
.menu-btn span { display: block; width: 18px; height: 1.5px; background: currentColor; transition: transform .3s var(--ease), opacity .2s; }
.menu-btn span + span { margin-top: 5px; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-nav {
  position: fixed; inset: 74px 0 0 0; z-index: 99; padding: 24px var(--gutter) 40px;
  background: var(--bg); display: flex; flex-direction: column; gap: 4px;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
}
.menu-open .mobile-nav { opacity: 1; visibility: visible; transform: none; }
.mobile-nav a {
  font-family: var(--font-display); font-size: 32px; padding: 10px 0; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
}
.mobile-nav a svg { width: 22px; height: 22px; flex: none; }
.mobile-nav .btn svg { width: 16px; height: 16px; }
.mobile-nav a[aria-current="page"] { color: var(--accent); }
.mobile-nav .btn { margin-top: 24px; font-family: var(--font-body); font-size: 16px; justify-content: center; border-bottom: 0; }
.menu-open { overflow: hidden; }

/* ---------- Buttons ---------- */
.btn {
  --b: var(--line-strong);
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid var(--b); white-space: nowrap;
  transition: transform .25s var(--ease), background-color .25s, border-color .25s, color .25s, box-shadow .25s;
  will-change: transform;
}
.btn svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 10px 30px -12px var(--accent); }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-ghost:hover { border-color: var(--text); }
.btn-sm { padding: 9px 16px; font-size: 14px; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.display { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.03em; }
.display em { font-style: normal; color: var(--accent); font-weight: inherit; }
.lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--text-2); line-height: 1.6; max-width: 62ch; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }

/* ---------- Sections ---------- */
main { display: block; }
.section { padding: clamp(72px, 10vw, 128px) 0; position: relative; }
.section-tight { padding: clamp(48px, 7vw, 88px) 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: grid; gap: 18px; margin-bottom: clamp(40px, 6vw, 64px); max-width: 760px; }
.section-head h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(34px, 4.6vw, 56px); letter-spacing: -0.03em; }
.section-head h2 em { font-style: normal; color: var(--accent); font-weight: inherit; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; justify-items: center; }
.split-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(40px, 6vw, 64px); }
.split-head .section-head { margin-bottom: 0; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: calc(74px + clamp(56px, 9vw, 120px)) 0 clamp(48px, 7vw, 88px); position: relative; }
.page-hero h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(44px, 7vw, 92px); letter-spacing: -0.035em; margin: 18px 0 24px; max-width: 16ch; }
.page-hero h1 em { font-style: normal; color: var(--accent); font-weight: inherit; }
.breadcrumb { display: flex; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; opacity: .5; }

/* ---------- Home hero ---------- */
.hero { min-height: 100svh; display: flex; align-items: center; padding: calc(74px + 48px) 0 72px; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.status-pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-size: 14px; color: var(--text-2);
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); position: relative; }
.status-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; background: var(--green); opacity: .35; animation: ping 2s infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: .5; } 100% { transform: scale(2); opacity: 0; } }
.hero h1 { font-size: clamp(48px, 7.4vw, 104px); margin: 28px 0 20px; }
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span { display: inline-block; transform: translateY(105%); animation: rise 1s var(--ease) forwards; }
.hero h1 .line:nth-child(2) > span { animation-delay: .12s; }
@keyframes rise { to { transform: none; } }
.role-rotator {
  font-size: clamp(20px, 2.2vw, 26px); color: var(--text-2); margin-bottom: 22px; min-height: 1.5em;
  display: flex; flex-wrap: wrap; gap: .35em; align-items: baseline;
}
.role-rotator .typed { color: var(--accent); font-weight: 600; }
.role-rotator .caret { display: inline-block; width: 2px; height: 1.05em; background: var(--accent); transform: translateY(3px); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 36px; }
.hero-meta { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 44px; color: var(--muted); font-size: 14px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 16px; height: 16px; color: var(--accent); }

.portrait-wrap { position: relative; justify-self: center; width: min(100%, 440px); }
.portrait {
  position: relative; border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 5;
  border: 1px solid var(--line-strong); box-shadow: var(--shadow); background: var(--surface);
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .5s var(--ease);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; filter: grayscale(1) contrast(1.05); transition: transform .8s var(--ease); }
.portrait:hover img { transform: scale(1.03); }
.portrait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(10,17,30,.55)); }
.portrait-ring {
  position: absolute; inset: -18px; border-radius: 36px; border: 1px dashed var(--line-strong); z-index: -1;
}
.portrait-ring::before {
  content: ""; position: absolute; width: 120px; height: 120px; right: -40px; top: -40px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%); opacity: .35; filter: blur(10px);
}
.float-card {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-sm); font-size: 14px; line-height: 1.25;
  animation: float 6s ease-in-out infinite;
}
.float-card strong { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--text); }
.float-card small { color: var(--muted); }
.float-card .fc-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.float-card .fc-icon svg { width: 18px; height: 18px; }
.float-card.fc-1 { left: -36px; bottom: 64px; }
.float-card.fc-2 { right: -28px; top: 48px; animation-delay: -3s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.scroll-cue {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%);
  width: 24px; height: 38px; border: 1.5px solid var(--line-strong); border-radius: 14px;
}
.scroll-cue::after { content: ""; position: absolute; left: 50%; top: 8px; width: 3px; height: 7px; border-radius: 2px; background: var(--accent); transform: translateX(-50%); animation: cue 1.8s infinite; }
@keyframes cue { 0% { opacity: 0; transform: translate(-50%, 0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 12px); } }

/* ---------- Marquee ---------- */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: 22px 0; background: var(--bg-2);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 32px); color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 48px; }
.marquee-track span::after { content: "✦"; font-size: .5em; color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.stat { padding: clamp(24px, 3.5vw, 40px); border-right: 1px solid var(--line); position: relative; }
.stat:last-child { border-right: 0; }
.stat-num { font-family: var(--font-display); font-size: clamp(40px, 5vw, 64px); font-weight: 500; letter-spacing: -0.03em; line-height: 1; color: var(--text); }
.stat-num .suffix { color: var(--accent); }
.stat-label { margin-top: 12px; color: var(--muted); font-size: 15px; line-height: 1.45; }

/* ---------- Cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(24px, 3vw, 34px); overflow: hidden;
  transition: border-color .3s, transform .4s var(--ease), box-shadow .4s var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(400px circle at var(--cx, 50%) var(--cy, 0%), var(--accent-soft), transparent 60%);
}
.card:hover { border-color: var(--line-strong); transform: translateY(-4px); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }
.card-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 22px; }
.card-icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 21px; margin-bottom: 10px; letter-spacing: -0.01em; }
.card p { color: var(--muted); font-size: 16px; margin: 0; }
.card .num { position: absolute; top: 24px; right: 28px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; font-size: 13.5px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); font-weight: 500;
  transition: border-color .2s, color .2s, transform .2s;
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.accent { background: var(--accent-soft); border-color: transparent; color: var(--accent); }

/* ---------- Featured projects (home) ---------- */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center;
  padding: clamp(28px, 4vw, 48px); border: 1px solid var(--line); border-radius: 24px; background: var(--surface);
  margin-bottom: 20px; transition: border-color .3s;
}
.feature:hover { border-color: var(--line-strong); }
.feature h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(28px, 3.4vw, 42px); letter-spacing: -0.025em; margin: 14px 0 16px; }
.feature p { color: var(--text-2); }
.feature .chips { margin: 22px 0 28px; }
.feature-visual { position: relative; border-radius: 18px; background: var(--bg-2); border: 1px solid var(--line); padding: 22px; min-height: 300px; overflow: hidden; }
.feature:nth-child(even) .feature-visual { order: -1; }
.kpis { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 6px; }
.kpi strong { display: block; font-family: var(--font-display); font-size: 30px; font-weight: 500; color: var(--accent); line-height: 1.1; }
.kpi span { font-size: 13.5px; color: var(--muted); }

/* ---------- Terminal / code ---------- */
.terminal { background: #070c16; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; overflow: hidden; font-family: var(--font-mono); font-size: 13.5px; color: #c7d0e0; box-shadow: var(--shadow); }
.terminal-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.06); background: rgba(255,255,255,.02); }
.terminal-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.terminal-bar i:nth-child(2) { background: #febc2e; }
.terminal-bar i:nth-child(3) { background: #28c840; }
.terminal-bar span { margin-left: 10px; color: #6b7891; font-size: 12px; }
.terminal pre { margin: 0; padding: 18px 20px; white-space: pre-wrap; word-break: break-word; line-height: 1.75; min-height: 240px; }
.tk-k { color: #ff8f6b; } .tk-f { color: #7fb4ff; } .tk-s { color: #a5e3a0; } .tk-c { color: #5b6880; } .tk-d { color: #e2b15a; } .tk-n { color: #d3a6ff; }

/* ---------- Flow diagram ---------- */
.flow { display: grid; gap: 10px; }
.flow-node {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); position: relative;
  opacity: .35; transform: translateX(-6px); transition: opacity .5s var(--ease), transform .5s var(--ease), border-color .5s;
}
.flow-node.is-on { opacity: 1; transform: none; border-color: var(--accent); }
.flow-node .fn-idx { font-family: var(--font-mono); font-size: 12px; color: var(--accent); width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); flex: none; }
.flow-node b { font-weight: 600; font-size: 15px; display: block; line-height: 1.3; }
.flow-node small { color: var(--muted); font-size: 13px; line-height: 1.4; display: block; }
.flow-link { height: 14px; width: 2px; margin-left: 28px; background: linear-gradient(var(--accent), transparent); opacity: .5; }

/* Queue visual */
.queue { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.queue-slot { aspect-ratio: 1; border-radius: 12px; border: 1px dashed var(--line-strong); display: grid; place-items: center; font-size: 11px; font-family: var(--font-mono); color: var(--muted); text-align: center; padding: 6px; transition: all .5s var(--ease); line-height: 1.3; }
.queue-slot.filled { border-style: solid; border-color: transparent; background: var(--accent-soft); color: var(--text); }
.queue-slot.done { background: rgba(95, 211, 166, .14); color: var(--green); }
.queue-slot.live { background: rgba(111, 156, 245, .14); color: var(--blue); }

/* ---------- Skills ---------- */
.skills-wrap { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; }
.skill-tabs { display: grid; gap: 6px; position: sticky; top: 100px; }
.skill-tab {
  text-align: left; padding: 14px 18px; border-radius: 12px; border: 1px solid transparent; color: var(--muted);
  display: flex; justify-content: space-between; align-items: center; font-weight: 500; transition: all .25s;
}
.skill-tab:hover { color: var(--text); background: var(--surface); }
.skill-tab[aria-selected="true"] { color: var(--text); background: var(--surface); border-color: var(--line-strong); }
.skill-tab[aria-selected="true"] .count { background: var(--accent); color: var(--accent-ink); }
.skill-tab .count { font-family: var(--font-mono); font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--line); }
.skill-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 40px); min-height: 360px; }
.skill-panel[hidden] { display: none; }
.skill-panel h3 { font-family: var(--font-display); font-weight: 500; font-size: 30px; margin-bottom: 8px; }
.skill-panel > p { color: var(--muted); margin-bottom: 28px; }
.skill-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 28px; }
.skill-item { display: grid; gap: 8px; }
.skill-item .row { display: flex; justify-content: space-between; font-size: 15px; font-weight: 500; }
.skill-item .row span:last-child { color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
.bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-strong)); border-radius: 4px; transition: width 1.2s var(--ease); }
.skill-panel.is-active .bar i { width: var(--w); }
.panel-anim > * { animation: panelIn .5s var(--ease) both; }
@keyframes panelIn { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 48px; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline-progress { position: absolute; left: 11px; top: 8px; width: 2px; height: calc(var(--tp, 0) * (100% - 16px)); background: linear-gradient(var(--accent), var(--accent-strong)); }
.t-item { position: relative; padding-bottom: clamp(40px, 6vw, 72px); }
.t-item:last-child { padding-bottom: 0; }
.t-dot { position: absolute; left: -48px; top: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-strong); display: grid; place-items: center; transition: border-color .4s, box-shadow .4s; }
.t-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); transition: background .4s; }
.t-item.is-visible .t-dot { border-color: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }
.t-item.is-visible .t-dot::after { background: var(--accent); }
.t-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3.4vw, 40px); }
.t-head { display: flex; justify-content: space-between; align-items: start; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.t-company { font-family: var(--font-display); font-size: clamp(26px, 3vw, 36px); font-weight: 500; letter-spacing: -0.02em; }
.t-loc { color: var(--muted); font-size: 15px; margin-top: 4px; }
.t-badge { font-family: var(--font-mono); font-size: 12.5px; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.roles { display: grid; gap: 10px; margin-bottom: 24px; }
.role { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 12px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.role b { font-weight: 600; }
.role span { color: var(--muted); font-size: 14.5px; font-family: var(--font-mono); }
.bullets { display: grid; gap: 12px; }
.bullets li { position: relative; padding-left: 26px; color: var(--text-2); font-size: 16px; }
.bullets li::before { content: ""; position: absolute; left: 0; top: .65em; width: 12px; height: 1.5px; background: var(--accent); }
.t-foot { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.t-foot h4 { font-size: 13px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; font-weight: 500; }
.t-projects { display: flex; flex-wrap: wrap; gap: 10px; }
.t-projects a { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); transition: border-color .2s, color .2s; }
.t-projects a:hover { border-color: var(--accent); color: var(--accent); }
.t-projects svg { width: 14px; height: 14px; }

/* ---------- Projects grid ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter {
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; font-weight: 500; color: var(--text-2);
  transition: all .25s;
}
.filter:hover { border-color: var(--line-strong); color: var(--text); }
.filter[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.p-card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  overflow: hidden; transition: transform .45s var(--ease), border-color .3s, box-shadow .45s var(--ease), opacity .4s;
  transform-style: preserve-3d;
}
.p-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.p-card.is-hidden { display: none; }
.p-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.p-cover svg { width: 100%; height: 100%; transition: transform .8s var(--ease); }
.p-card:hover .p-cover svg { transform: scale(1.05); }
.p-tag { position: absolute; top: 14px; left: 14px; font-family: var(--font-mono); font-size: 11.5px; padding: 5px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--text-2); }
.p-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.p-meta { font-size: 13px; color: var(--muted); font-family: var(--font-mono); margin-bottom: 10px; }
.p-body h3 { font-size: 21px; letter-spacing: -0.015em; margin-bottom: 10px; }
.p-body p { color: var(--muted); font-size: 15.5px; flex: 1; }
.p-body .chips { margin-top: 8px; }
.p-body .chip { font-size: 12.5px; padding: 4px 10px; }
.p-link { margin-top: 20px; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: var(--accent); }
.p-link svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.p-card:hover .p-link svg { transform: translateX(4px); }
.other-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.other-list a { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; padding: 26px 4px; border-bottom: 1px solid var(--line); transition: padding .3s var(--ease), color .2s; }
.other-list a:hover { padding-left: 16px; color: var(--accent); }
.other-list h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(22px, 2.6vw, 30px); }
.other-list p { color: var(--muted); margin: 6px 0 0; font-size: 15px; }
.other-list svg { width: 22px; height: 22px; }

/* ---------- Project detail ---------- */
.pd-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-top: 40px; }
.pd-meta div { padding: 20px 24px; border-right: 1px solid var(--line); }
.pd-meta div:last-child { border-right: 0; }
.pd-meta dt { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.pd-meta dd { margin: 0; font-weight: 600; font-size: 15.5px; }
.pd-layout { display: grid; grid-template-columns: 1fr 340px; gap: clamp(32px, 5vw, 72px); align-items: start; }
.prose h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(28px, 3.2vw, 38px); margin: 56px 0 20px; letter-spacing: -0.025em; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--text-2); font-size: 17.5px; }
.steps { counter-reset: step; display: grid; gap: 14px; }
.steps li { counter-increment: step; position: relative; padding: 20px 22px 20px 70px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); }
.steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 22px; top: 20px; font-family: var(--font-mono); font-size: 14px; color: var(--accent); }
.pd-aside { position: sticky; top: 100px; display: grid; gap: 16px; }
.aside-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.aside-card h3 { font-size: 13px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 16px; font-weight: 500; }
.aside-kpis { display: grid; gap: 18px; }
.aside-kpis strong { display: block; font-family: var(--font-display); font-weight: 500; font-size: 34px; color: var(--accent); line-height: 1.1; }
.aside-kpis span { color: var(--muted); font-size: 14px; }
.pd-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
.pd-nav a { padding: 24px 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .3s, transform .3s var(--ease); }
.pd-nav a:hover { border-color: var(--accent); transform: translateY(-3px); }
.pd-nav small { color: var(--muted); font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.pd-nav b { display: block; font-family: var(--font-display); font-weight: 500; font-size: 22px; margin-top: 6px; }
.pd-nav a:last-child { text-align: right; }
.pd-visual { margin: 48px 0 0; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.about-photo { position: sticky; top: 110px; }
.about-photo .portrait { aspect-ratio: 4/5; }
.about-photo figcaption { margin-top: 16px; color: var(--muted); font-size: 14px; display: flex; justify-content: space-between; }
.quote { font-family: var(--font-display); font-size: clamp(24px, 3vw, 36px); line-height: 1.3; letter-spacing: -0.02em; font-weight: 400; border-left: 2px solid var(--accent); padding-left: 28px; margin: 0 0 40px; }
.quote em { color: var(--accent); }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 40px; }
.facts div { background: var(--surface); padding: 20px 24px; }
.facts dt { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
.facts dd { margin: 0; font-weight: 600; }
.principles { counter-reset: pr; }
.principles .card { counter-increment: pr; }
.principles .card::after { content: counter(pr, decimal-leading-zero); position: absolute; top: 26px; right: 28px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); }

/* ---------- Qualifications ---------- */
.edu-card { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: start; }
.edu-year { font-family: var(--font-mono); font-size: 13px; color: var(--accent); white-space: nowrap; padding-top: 6px; }
.edu-card h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(22px, 2.4vw, 28px); margin-bottom: 6px; letter-spacing: -0.02em; }
.edu-list { display: grid; gap: 16px; }
.award {
  position: relative; padding: clamp(28px, 4vw, 44px); border-radius: 22px; overflow: hidden;
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%); border: 1px solid var(--line);
}
.award::after { content: ""; position: absolute; width: 260px; height: 260px; right: -80px; top: -80px; border-radius: 50%; background: radial-gradient(circle, var(--accent-soft), transparent 70%); }
.award-medal { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-strong)); color: var(--accent-ink); margin-bottom: 26px; box-shadow: 0 12px 30px -12px var(--accent); position: relative; z-index: 1; }
.award-medal svg { width: 28px; height: 28px; }
.award .year { font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
.award h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(26px, 3vw, 34px); margin: 6px 0 4px; letter-spacing: -0.02em; position: relative; z-index: 1; }
.award .org { color: var(--muted); margin-bottom: 16px; }
.award p { color: var(--text-2); margin: 0; position: relative; z-index: 1; }
.lang-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.lang { padding: 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.lang b { display: block; font-family: var(--font-display); font-weight: 500; font-size: 22px; }
.lang span { color: var(--muted); font-size: 14px; }
.lang .dots { display: flex; gap: 5px; margin-top: 14px; }
.lang .dots i { width: 22px; height: 4px; border-radius: 3px; background: var(--line-strong); }
.lang .dots i.on { background: var(--accent); }

/* ---------- Contact ---------- */
.contact-hero h1 { max-width: 14ch; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.contact-card { display: flex; flex-direction: column; gap: 6px; padding: clamp(26px, 3vw, 36px); border-radius: 22px; background: var(--surface); border: 1px solid var(--line); transition: border-color .3s, transform .4s var(--ease); position: relative; overflow: hidden; }
.contact-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.contact-card .card-icon { margin-bottom: 18px; }
.contact-card small { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.contact-card b { font-size: 18px; font-weight: 600; word-break: break-word; }
.contact-card .go { margin-top: 18px; display: inline-flex; gap: 8px; align-items: center; color: var(--accent); font-weight: 600; font-size: 15px; }
.contact-card .go svg { width: 16px; height: 16px; }
.copy-btn { position: absolute; top: 20px; right: 20px; font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); transition: all .2s; z-index: 2; }
.copy-btn:hover { color: var(--text); border-color: var(--line-strong); }
.copy-btn.copied { color: var(--green); border-color: var(--green); }
.engage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; border-radius: 28px; padding: clamp(40px, 7vw, 88px); overflow: hidden; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px circle at 50% 0%, var(--accent-soft), transparent 70%); }
.cta-band > * { position: relative; }
.cta-band h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(34px, 5vw, 64px); letter-spacing: -0.03em; max-width: 18ch; margin: 18px auto 18px; }
.cta-band h2 em { font-style: normal; color: var(--accent); font-weight: inherit; }
.cta-band p { color: var(--text-2); max-width: 56ch; margin: 0 auto 34px; }
.cta-band .hero-ctas { justify-content: center; margin-top: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 64px 0 36px; margin-top: clamp(72px, 10vw, 128px); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-grid h4 { font-size: 13px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 16px; font-weight: 500; }
.footer-grid ul { display: grid; gap: 10px; }
.footer-grid a { color: var(--text-2); transition: color .2s; }
.footer-grid a:hover { color: var(--accent); }
.footer-about p { color: var(--muted); max-width: 40ch; margin-top: 16px; font-size: 15px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.to-top { display: inline-flex; align-items: center; gap: 8px; }
.to-top svg { width: 14px; height: 14px; }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* Page transition */
.page-veil { position: fixed; inset: 0; z-index: 300; background: var(--bg); pointer-events: none; opacity: 0; animation: veil-out .5s var(--ease) both; transition: opacity .28s var(--ease); }
@keyframes veil-out { from { opacity: 1; } to { opacity: 0; } }
.is-leaving .page-veil { animation: none; opacity: 1; }

/* 404 */
.nf { min-height: 80svh; display: grid; place-items: center; text-align: center; padding-top: 74px; }
.nf .big { font-family: var(--font-display); font-size: clamp(120px, 22vw, 260px); line-height: 1; color: var(--accent); letter-spacing: -0.05em; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav-links, .nav-actions .btn { display: none; }
  .menu-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .pd-layout { grid-template-columns: 1fr; }
  .pd-aside { position: static; grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .hero { min-height: auto; padding-top: calc(74px + 40px); }
  .hero-grid, .about-grid, .feature { grid-template-columns: 1fr; }
  .feature:nth-child(even) .feature-visual { order: 0; }
  .portrait-wrap { width: min(80%, 380px); margin-top: 24px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .grid-3, .contact-grid, .engage { grid-template-columns: 1fr 1fr; }
  .skills-wrap { grid-template-columns: 1fr; }
  .skill-tabs { position: static; display: flex; overflow-x: auto; gap: 8px; padding-bottom: 6px; scrollbar-width: none; }
  .skill-tabs::-webkit-scrollbar { display: none; }
  .skill-tab { flex: none; gap: 10px; border-color: var(--line); }
  .about-photo { position: static; max-width: 420px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
  .lang-list { grid-template-columns: repeat(2, 1fr); }
  .pd-meta { grid-template-columns: repeat(2, 1fr); }
  .pd-meta div:nth-child(2) { border-right: 0; }
  .pd-meta div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .scroll-cue { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .grid-3, .grid-2, .project-grid, .contact-grid, .engage, .skill-list, .facts { grid-template-columns: 1fr; }
  .pd-aside, .pd-nav { grid-template-columns: 1fr; }
  .pd-nav a:last-child { text-align: left; }
  .float-card { padding: 10px 12px; }
  .float-card strong { font-size: 18px; }
  .float-card .fc-icon { display: none; }
  .float-card.fc-1 { left: -12px; bottom: 32px; }
  .float-card.fc-2 { right: -12px; top: 24px; }
  .portrait-wrap { width: 88%; }
  .stat { padding: 22px 18px; }
  .edu-card { grid-template-columns: 1fr; gap: 10px; }
  .edu-card .card-icon { display: none; }
  .timeline { padding-left: 34px; }
  .timeline::before, .timeline-progress { left: 7px; }
  .t-dot { left: -34px; width: 16px; height: 16px; }
  .t-dot::after { width: 6px; height: 6px; }
  .brand-text small { display: none; }
  .hero-ctas .btn { flex: 1 1 auto; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .queue { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .queue-slot { font-size: 9.5px; }
  .other-list a { grid-template-columns: 1fr; }
  .other-list svg { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .hero h1 .line > span { transform: none; }
  .flow-node { opacity: 1; transform: none; }
}

@media print {
  .site-header, .bg-grid, .bg-glow, .progress, .page-veil, .site-footer, .scroll-cue { display: none !important; }
  body { background: #fff; color: #000; }
}
