/* ==========================================================================
   HRIS & Enterprise Digital Portfolio — Design System
   Dark-first (Linear / shadcn / cvKit inspired) + Crisp Light Mode
   Zero external font or CDN dependencies for instant Mainland China loading
   ========================================================================== */

:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #08090f;
  --bg-tinted: #0b0d17;
  --surface: rgba(18, 21, 35, 0.74);
  --surface-solid: #111423;
  --surface-elevated: rgba(26, 30, 48, 0.84);
  --surface-hover: rgba(34, 40, 66, 0.78);
  --surface-subtle: rgba(255, 255, 255, 0.028);
  --border: rgba(255, 255, 255, 0.085);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f3f5fc;
  --text-secondary: #b6bfd6;
  --text-muted: #7f8aa6;

  --accent: #8b7dff;
  --accent-strong: #6d5dfc;
  --accent-cyan: #38bdf8;
  --accent-soft: rgba(139, 125, 255, 0.14);
  --accent-border: rgba(139, 125, 255, 0.34);
  --gradient-brand: linear-gradient(135deg, #c4b5fd 0%, #818cf8 45%, #38bdf8 100%);
  --gradient-btn: linear-gradient(135deg, #7c66ff 0%, #5b5cf6 52%, #3b82f6 100%);

  --emerald: #34d399;
  --emerald-soft: rgba(52, 211, 153, 0.14);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.14);
  --rose: #fb7185;
  --rose-soft: rgba(251, 113, 133, 0.14);

  --grid-line: rgba(255, 255, 255, 0.042);
  --orb-1: rgba(124, 102, 255, 0.22);
  --orb-2: rgba(56, 189, 248, 0.16);
  --shadow-card: 0 24px 60px -24px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --shadow-glow: 0 0 0 1px rgba(139, 125, 255, 0.28), 0 18px 46px -14px rgba(109, 93, 252, 0.45);
  --nav-bg: rgba(8, 9, 15, 0.72);
  --phone-bezel: #0f1320;
  --phone-border: rgba(255, 255, 255, 0.14);

  --font-sans: "Segoe UI Variable", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", system-ui, -apple-system, sans-serif;
  --font-mono: "Cascadia Code", "Cascadia Mono", "SF Mono", Menlo, Consolas, "Microsoft YaHei UI", monospace;
  --container: min(1160px, calc(100% - 48px));
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f8f9fc;
  --bg-tinted: #f1f4fa;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --surface-elevated: rgba(255, 255, 255, 0.96);
  --surface-hover: #f4f6fc;
  --surface-subtle: rgba(15, 23, 42, 0.035);
  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.17);
  --text: #0f172a;
  --text-secondary: #3f4b66;
  --text-muted: #64718f;

  --accent: #5b4ee6;
  --accent-strong: #4c3fd8;
  --accent-cyan: #0284c7;
  --accent-soft: rgba(91, 78, 230, 0.09);
  --accent-border: rgba(91, 78, 230, 0.26);
  --gradient-brand: linear-gradient(135deg, #5b4ee6 0%, #3b82f6 58%, #0284c7 100%);
  --gradient-btn: linear-gradient(135deg, #5b4ee6 0%, #4355eb 55%, #2563eb 100%);

  --emerald: #059669;
  --emerald-soft: rgba(5, 150, 105, 0.11);
  --amber: #b45309;
  --amber-soft: rgba(217, 119, 6, 0.12);
  --rose: #e11d48;
  --rose-soft: rgba(225, 29, 72, 0.1);

  --grid-line: rgba(15, 23, 42, 0.045);
  --orb-1: rgba(91, 78, 230, 0.12);
  --orb-2: rgba(14, 165, 233, 0.1);
  --shadow-card: 0 20px 50px -24px rgba(15, 23, 42, 0.14), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 14px 36px -12px rgba(79, 70, 229, 0.35);
  --nav-bg: rgba(248, 249, 252, 0.8);
  --phone-bezel: #181f33;
  --phone-border: rgba(15, 23, 42, 0.15);
}

/* Base Reset */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  margin: 0;
  min-width: 300px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background-color 240ms ease, color 240ms ease;
}
h1, h2, h3, h4, p, figure, dl, dd, ul, ol { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
picture { display: block; width: 100%; height: 100%; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.icon-sprite { position: absolute; width: 0; height: 0; pointer-events: none; }
svg:not(.skill-radar):not(.demo-trend-svg) { fill: none; stroke: currentColor; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }

.container { width: var(--container); margin-inline: auto; position: relative; z-index: 1; }
.mono-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--text-muted); }
.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent-strong);
  color: #fff;
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform 180ms ease;
}
.skip-link:focus { transform: none; }

/* Ambient Architectural Grid + Orbs */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.ambient-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 15%, #000 35%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 15%, #000 35%, transparent 100%);
}
.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
}
.orb-1 {
  width: 680px;
  height: 520px;
  top: -180px;
  left: -120px;
  background: var(--orb-1);
}
.orb-2 {
  width: 580px;
  height: 460px;
  top: 120px;
  right: -160px;
  background: var(--orb-2);
}

/* ==========================================================================
   Sticky Glassmorphic Navbar
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid transparent;
  transition: background-color 220ms ease, border-color 220ms ease, backdrop-filter 220ms ease;
}
.scroll-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--gradient-brand);
  pointer-events: none;
  transition: width 80ms linear;
}
.navbar.is-scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}
.navbar-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}
.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--gradient-btn);
  color: #fff;
  box-shadow: 0 8px 20px -6px rgba(109, 93, 252, 0.55);
}
.brand-icon svg { width: 18px; height: 18px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; gap: 2px; }
.brand-text strong { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; }
.brand-text small { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); letter-spacing: 0.06em; }

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
}
.nav-desktop a {
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 160ms ease, background-color 160ms ease;
}
.nav-desktop a:hover { color: var(--text); background: var(--surface-hover); }
.nav-desktop a.is-active {
  color: var(--text);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-border);
  font-weight: 600;
}

.nav-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-hover); }
.icon-btn svg { width: 17px; height: 17px; }

[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }

.mobile-menu-btn { display: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn-primary {
  background: var(--gradient-btn);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.07); }
.btn-secondary {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(10px);
}
.btn-secondary:hover { background: var(--surface-hover); border-color: var(--accent-border); transform: translateY(-1px); }
.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-hover); }

/* Mobile Drawer */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(5, 7, 14, 0.62);
  backdrop-filter: blur(4px);
}
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(300px, 84vw);
  z-index: 65;
  background: var(--surface-solid);
  border-left: 1px solid var(--border);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.mobile-drawer-head { display: flex; align-items: center; justify-content: space-between; }
.mobile-drawer-links { display: flex; flex-direction: column; gap: 6px; }
.mobile-drawer-links a {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
}
.mobile-drawer-links a:hover { background: var(--accent-soft); color: var(--text); }

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  padding: 64px 0 80px;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.94fr);
  align-items: center;
  gap: 54px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  backdrop-filter: blur(10px);
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse-ring 2.2s infinite;
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.hero-title {
  margin-top: 22px;
  font-size: clamp(38px, 4.8vw, 58px);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.03em;
}
.hero-headline-tagline {
  display: block;
  margin-top: 10px;
  font-size: clamp(22px, 2.7vw, 34px);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.02em;
}

.role-rotator {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 4px 12px;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
}
.role-prefix { color: var(--accent); font-weight: 700; }
.role-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  transition: opacity 220ms ease, transform 220ms ease;
}
.role-text.is-fading { opacity: 0; transform: translateY(4px); }

.hero-desc {
  margin-top: 20px;
  max-width: 550px;
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--text-secondary);
}
.hero-desc strong { color: var(--text); font-weight: 600; }

.hero-cta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-chips {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 470px;
}
.hero-chip {
  padding: 13px 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column-reverse;
  gap: 3px;
}
.hero-chip dt { font-size: 12px; color: var(--text-muted); }
.hero-chip dd {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.hero-chip dd span { font-size: 13px; font-weight: 600; color: var(--accent); margin-left: 2px; }

/* Right Hero 3D Interactive Stage Card */
.hero-stage { perspective: 1200px; }
.tilt-card {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: var(--surface-elevated);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), border-color 220ms ease;
}
.tilt-card:hover { border-color: var(--accent-border); }
.tilt-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(360px circle at var(--gx, 50%) var(--gy, 50%), rgba(139, 125, 255, 0.2), transparent 65%);
  transition: opacity 260ms ease;
}
.tilt-card:hover .tilt-glare { opacity: 1; }

.stage-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
}
.window-dots { display: flex; gap: 6px; }
.window-dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.window-dots span:nth-child(1) { background: #fb7185; opacity: 0.78; }
.window-dots span:nth-child(2) { background: #fbbf24; opacity: 0.78; }
.window-dots span:nth-child(3) { background: #34d399; opacity: 0.78; }
.stage-file { font-size: 11px; color: var(--text-muted); }
.stage-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

.stage-body { padding: 22px; display: flex; flex-direction: column; gap: 18px; }

.stage-identity { display: flex; align-items: center; gap: 18px; }
.stage-emblem {
  position: relative;
  width: 68px;
  height: 68px;
  flex: none;
  display: grid;
  place-items: center;
}
.stage-emblem.has-avatar {
  width: 106px;
  height: 106px;
  padding: 3px;
  border-radius: 50%;
  background: var(--gradient-brand);
  box-shadow: 0 14px 34px -10px rgba(109, 93, 252, 0.55);
}
.stage-emblem.has-avatar .avatar-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: block;
  border: 3px solid var(--surface-solid);
  background: #f1f4f9;
}
.stage-emblem.has-avatar .avatar-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 18px rgba(15, 23, 42, 0.22);
  pointer-events: none;
}
.stage-emblem.has-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
.tilt-card:hover .stage-emblem.has-avatar img { transform: scale(1.045); }
.emblem-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px dashed var(--accent-border);
  animation: spin-slow 24s linear infinite;
}
.ring-inner {
  inset: 8px;
  border-style: solid;
  border-color: transparent var(--accent-cyan) transparent var(--accent);
  animation: spin-slow 14s linear infinite reverse;
}
.emblem-core {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient-btn);
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 0 24px rgba(109, 93, 252, 0.45);
}
@keyframes spin-slow { to { transform: rotate(360deg); } }

.stage-kicker { color: var(--accent); font-size: 11px; }
.stage-id-copy h2 { font-size: 19px; font-weight: 700; line-height: 1.3; margin-top: 2px; }
.stage-id-copy p { font-size: 13px; color: var(--text-muted); margin-top: 3px; line-height: 1.5; }

.stage-pipeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.pipe-node {
  padding: 11px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}
.pipe-node.is-lit,
.pipe-node:hover {
  border-color: var(--accent-border);
  background: var(--accent-soft);
}
.pipe-node:hover { transform: translateY(-1px); }
.pipe-idx { font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: var(--accent); }
.pipe-node strong { display: block; font-size: 13px; line-height: 1.3; }
.pipe-node span { display: block; font-size: 11px; color: var(--text-muted); line-height: 1.4; }
.stage-pipe-detail {
  padding: 8px 11px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.stage-builds { display: flex; flex-direction: column; gap: 8px; }
.mini-build {
  display: grid;
  grid-template-columns: auto minmax(0, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  transition: border-color 160ms ease, transform 160ms ease, background-color 160ms ease;
}
.mini-build:hover {
  border-color: var(--accent-border);
  background: var(--surface-hover);
  transform: translateX(3px);
}
.mini-dot { width: 7px; height: 7px; border-radius: 50%; }
.dot-live { background: var(--emerald); box-shadow: 0 0 8px var(--emerald); }
.dot-wip { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.dot-tool { background: var(--accent-cyan); box-shadow: 0 0 8px var(--accent-cyan); }
.mini-name { font-weight: 600; color: var(--text); }
.mini-meta { font-size: 12px; color: var(--text-muted); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-build svg { width: 14px; height: 14px; color: var(--text-muted); }
.mini-build:hover svg { color: var(--accent); }

.stage-hint { margin-top: 12px; text-align: center; font-size: 11px; }

/* ==========================================================================
   Common Section & Surface Styles
   ========================================================================== */
.section { padding: 84px 0; position: relative; }
.section-tinted {
  background: var(--bg-tinted);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head { margin-bottom: 36px; }
.section-kicker { color: var(--accent); font-weight: 600; margin-bottom: 10px; }
.section-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.025em;
}
.section-sub {
  max-width: 440px;
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.65;
}

.glass-panel {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-card);
}

.spotlight-card {
  position: relative;
  overflow: hidden;
  transition: border-color 200ms ease, transform 200ms ease;
}
.spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), var(--accent-soft), transparent 70%);
  transition: opacity 220ms ease;
}
.spotlight-card:hover { border-color: var(--accent-border); }
.spotlight-card:hover::before { opacity: 1; }

/* ==========================================================================
   01 · Bento Stats & Principles
   ========================================================================== */
.bento-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.bento-card {
  padding: 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bento-accent {
  background: linear-gradient(155deg, var(--accent-soft), var(--surface) 70%);
  border-color: var(--accent-border);
}
.bento-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  margin-bottom: 4px;
}
.bento-icon svg { width: 18px; height: 18px; }
.bento-num {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}
.bento-num small { font-size: 14px; font-weight: 600; color: var(--accent); margin-left: 5px; }
.bento-card h3 { font-size: 15px; font-weight: 700; }
.bento-card p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

.principles-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.principle-card {
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
}
.principle-num {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 12px;
}
.principle-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.principle-card p { font-size: 13.5px; color: var(--text-secondary); line-height: 1.75; }

/* ==========================================================================
   02 · Capabilities: SVG Radar + Filterable Skill Matrix
   ========================================================================== */
.capabilities-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 20px;
  align-items: stretch;
}
.radar-panel,
.skills-panel { padding: 24px; display: flex; flex-direction: column; }

.panel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.panel-hint { font-size: 12px; color: var(--text-muted); }

.radar-wrap {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 6px 0;
}
.skill-radar { width: 100%; max-width: 440px; height: auto; overflow: visible; }
.radar-grid-poly { fill: none; stroke: var(--border-strong); stroke-width: 1; }
.radar-axis { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 3; }
.radar-area {
  fill: url(#radarFill);
  stroke: var(--accent);
  stroke-width: 2.2;
  transition: all 240ms ease;
}
.radar-halo {
  fill: var(--accent-soft);
  stroke: var(--accent-border);
  stroke-width: 1;
  transition: cx 220ms ease, cy 220ms ease;
  pointer-events: none;
}
.radar-dot {
  fill: var(--surface-solid);
  stroke: var(--accent-cyan);
  stroke-width: 2.5;
  cursor: pointer;
  transition: r 160ms ease, fill 160ms ease;
}
.radar-dot.is-active,
.radar-dot:hover { fill: var(--accent); }
.radar-label {
  fill: var(--text-secondary);
  stroke: none;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: fill 160ms ease;
}
.radar-label.is-active,
.radar-label:hover { fill: var(--accent); font-weight: 700; }

.radar-readout {
  margin-top: 8px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
}
.readout-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.readout-head strong { font-size: 14px; }
.readout-score { color: var(--accent); font-weight: 700; }
.readout-bar {
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--border-strong);
  overflow: hidden;
  margin-bottom: 8px;
}
.readout-bar span {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--gradient-brand);
  transition: width 260ms ease;
}
.radar-readout p { font-size: 13px; color: var(--text-secondary); line-height: 1.65; }

.skill-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.filter-pill {
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 160ms ease;
}
.filter-pill:hover { border-color: var(--border-strong); color: var(--text); }
.filter-pill.is-active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--text);
  font-weight: 600;
}
.pill-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
}

.skill-groups {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.skill-group h3 { margin-bottom: 10px; color: var(--accent); font-weight: 600; }
.skill-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-chips span {
  padding: 6px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 13px;
  color: var(--text-secondary);
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.skill-chips span:hover {
  border-color: var(--accent-border);
  color: var(--text);
  transform: translateY(-1px);
}

/* ==========================================================================
   03 · Featured Projects
   ========================================================================== */
.project-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.project-card + .project-card { margin-top: 28px; }

.project-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}
.badge-index { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-border); }
.badge-date { background: var(--bg); color: var(--text-secondary); border: 1px solid var(--border-strong); }
.badge-ai { background: rgba(56, 189, 248, 0.13); color: var(--accent-cyan); border: 1px solid rgba(56, 189, 248, 0.3); }
.badge-live { background: var(--emerald-soft); color: var(--emerald); border: 1px solid rgba(52, 211, 153, 0.3); }
.badge-wip { background: var(--amber-soft); color: var(--amber); border: 1px solid rgba(251, 191, 36, 0.32); }
.badge-tool { background: var(--surface-hover); color: var(--text-secondary); border: 1px solid var(--border-strong); }

.project-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 32px;
  align-items: center;
}
.project-header h3,
.scrm-info h3 {
  font-size: clamp(22px, 2.5vw, 29px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.project-tagline {
  margin-top: 12px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
}

.project-metric-pills {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.project-metric-pills div {
  padding: 11px 12px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg);
}
.project-metric-pills strong { display: block; font-size: 13px; color: var(--text); }
.project-metric-pills span { display: block; font-size: 11.5px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }

.tech-row {
  margin-top: 20px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tech-row li {
  padding: 4px 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
}

/* Browser Showcase Mockup */
.showcase-browser {
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  overflow: hidden;
  box-shadow: 0 26px 64px -26px rgba(0, 0, 0, 0.65);
}
.browser-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
}
.browser-url {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.browser-tag {
  font-size: 11px;
  color: var(--accent);
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.media-frame,
.phone-screen-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  text-align: left;
}
.media-frame img { width: 100%; transition: transform 320ms ease; }
.media-frame:hover img { transform: scale(1.015); }
.media-zoom-pill {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  background: rgba(8, 9, 15, 0.84);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  transition: background-color 180ms ease, transform 180ms ease;
}
.media-zoom-pill svg { width: 14px; height: 14px; }
.media-frame:hover .media-zoom-pill,
.phone-screen-btn:hover .media-zoom-pill { background: var(--accent-strong); transform: translateY(-1px); }

/* Case Study Pillars */
.case-pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.case-pillar {
  padding: 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
}
.case-pillar h4 { color: var(--accent); font-weight: 700; margin-bottom: 8px; }
.case-pillar p { font-size: 13.5px; color: var(--text-secondary); line-height: 1.75; }
.case-pillar code,
.joeditor-highlights code {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
}

.project-footer-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.inline-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}
.inline-action svg { width: 16px; height: 16px; transition: transform 160ms ease; }
.inline-action:hover svg { transform: translateX(3px); }

/* SCRM Mobile Showcase */
.scrm-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 36px;
  align-items: center;
}
.scrm-pillars {
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 20px;
  padding-top: 0;
  border-top: 0;
}

.scrm-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.phone-tabs {
  display: inline-flex;
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg);
  gap: 4px;
}
.phone-tabs button {
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 160ms ease;
}
.phone-tabs button:hover { color: var(--text); }
.phone-tabs button[aria-selected="true"] {
  background: var(--gradient-btn);
  color: #fff;
  box-shadow: 0 6px 16px -4px rgba(91, 92, 246, 0.55);
}

.phone-mockup {
  width: min(100%, 340px);
  padding: 12px 12px 14px;
  border-radius: 34px;
  background: var(--phone-bezel);
  border: 1px solid var(--phone-border);
  box-shadow: 0 28px 60px -24px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.phone-notch {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}
.phone-notch span {
  width: 84px;
  height: 16px;
  border-radius: var(--radius-pill);
  background: #06080f;
}
.phone-panel { display: flex; flex-direction: column; gap: 10px; }
.phone-screen-btn {
  height: 470px;
  border-radius: 22px;
  background: #f5f6f8;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.phone-screen-btn::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 76px;
  background: linear-gradient(to top, rgba(15, 19, 32, 0.42), transparent);
  pointer-events: none;
}
.phone-screen-btn .media-zoom-pill { z-index: 2; }
.phone-screen-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.phone-panel figcaption {
  padding: 2px 6px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #e6ebfa;
}
.phone-panel figcaption strong { font-size: 13px; }
.phone-panel figcaption span { font-size: 11.5px; color: #9aa5c4; }

/* Compact 10-Year Delivery Milestone Track */
.milestone-panel {
  margin-top: 28px;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.milestone-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.milestone-kicker { color: var(--accent); font-weight: 600; margin-bottom: 6px; }
.milestone-head h3 {
  font-size: clamp(20px, 2.2vw, 25px);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.milestone-sub {
  max-width: 460px;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
}
.milestone-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.milestone-row {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr) minmax(0, 235px);
  gap: 12px 24px;
  align-items: start;
  padding: 16px 12px;
  border-radius: 12px;
  border-bottom: 1px solid var(--border);
  transition: background-color 160ms ease;
}
.milestone-row:last-child { border-bottom: 0; }
.milestone-row:hover { background: var(--surface-subtle); }
.milestone-date {
  padding-top: 3px;
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}
.milestone-title-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
}
.milestone-main h4 {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}
.milestone-org {
  font-size: 12px;
  color: var(--text-muted);
}
.milestone-main p {
  margin-top: 5px;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.68;
}
.milestone-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 2px;
}
.milestone-metrics span {
  padding: 4px 9px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ==========================================================================
   04 · Interactive HR Budget Variance Demo
   ========================================================================== */
.demo-workbench {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.demo-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.demo-control-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.control-label { font-weight: 600; color: var(--text-muted); }

.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  gap: 3px;
}
.seg-btn {
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 150ms ease;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent-border);
}

.demo-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.demo-kpi {
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kpi-label { font-size: 12px; color: var(--text-muted); }
.kpi-val {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}
.kpi-driver { font-size: 18px; }
.kpi-sub { font-size: 12px; color: var(--text-muted); }
.is-over { color: var(--rose); }
.is-under { color: var(--emerald); }

.demo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 16px;
}
.demo-panel {
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.demo-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.demo-panel-head h3 { font-size: 15px; font-weight: 700; }
.demo-panel-head p { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.chart-legend { display: flex; gap: 12px; font-size: 11.5px; color: var(--text-muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.leg-bar { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); display: inline-block; }
.leg-line { width: 14px; height: 2px; border-top: 2px dashed var(--accent-cyan); display: inline-block; }

.demo-chart-wrap { position: relative; flex: 1; display: grid; align-items: center; }
.demo-trend-svg { width: 100%; height: auto; overflow: visible; }
.chart-grid-line { fill: none; stroke: var(--border); stroke-width: 1; }
.chart-axis-text { fill: var(--text-muted); stroke: none; font-size: 11px; font-family: var(--font-mono); }
.chart-bar { stroke: none; cursor: pointer; transition: opacity 160ms ease; }
.chart-bar:hover { opacity: 0.85; }
.chart-budget-line { fill: none; stroke: var(--accent-cyan); stroke-width: 2.2; stroke-dasharray: 5 4; }
.chart-budget-dot { fill: var(--bg); stroke: var(--accent-cyan); stroke-width: 2.2; }

.chart-tooltip {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid var(--accent-border);
  background: var(--surface-solid);
  font-size: 12px;
  color: var(--text);
  box-shadow: var(--shadow-card);
  pointer-events: none;
}
.chart-bar.is-selected {
  stroke: var(--text);
  stroke-width: 1.8;
}

.demo-chart-insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.chart-insight {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chart-insight span { font-size: 11px; color: var(--text-muted); }
.chart-insight strong { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }

.driver-currency-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  font-size: 12px;
  color: var(--text-secondary);
}
.hint-jump-btn {
  padding: 4px 10px;
  border-radius: 7px;
  background: var(--accent-strong);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.hint-jump-btn:hover { filter: brightness(1.08); }

.driver-list { display: flex; flex-direction: column; gap: 10px; }
.driver-row {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.driver-row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
}
.driver-name-wrap { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.driver-rank {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}
.driver-name { font-weight: 600; color: var(--text); }
.driver-val { font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.driver-track {
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--border);
  overflow: hidden;
}
.driver-fill { height: 100%; border-radius: var(--radius-pill); transition: width 260ms ease; }
.driver-fill.over { background: linear-gradient(90deg, #f43f5e, #fb7185); }
.driver-fill.under { background: linear-gradient(90deg, #10b981, #34d399); }
.driver-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.demo-footnote {
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 11.5px;
}

/* ==========================================================================
   05 · Experience Timeline & Education
   ========================================================================== */
.timeline {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 22px;
  bottom: 22px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--border) 85%);
}
.timeline-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.timeline-rail { padding-top: 24px; display: flex; justify-content: center; position: relative; z-index: 1; }
.rail-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--surface-solid);
  border: 2px solid var(--accent);
}
.rail-dot.is-current {
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.timeline-card { padding: 26px 28px; }
.timeline-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}
.timeline-role { font-size: 13px; font-weight: 600; color: var(--accent); }
.timeline-card h3 { font-size: 22px; font-weight: 800; margin-top: 2px; }
.timeline-period {
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg);
}
.timeline-intro {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-muted);
}
.timeline-bullets {
  margin-top: 14px;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}
.timeline-bullets strong { color: var(--text); font-weight: 600; }

.edu-grid {
  margin-top: 24px;
  padding-left: 46px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.edu-card {
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.edu-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}
.edu-icon svg { width: 20px; height: 20px; }
.edu-date { font-size: 11px; }
.edu-card h3 { font-size: 16px; font-weight: 700; margin-top: 2px; }
.edu-card p { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ==========================================================================
   06 · Side Project: JoEditor
   ========================================================================== */
.joeditor-card {
  padding: 30px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 32px;
  align-items: center;
}
.joeditor-stage {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.jo-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.jo-mode-tabs {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg);
  gap: 3px;
}
.jo-mode-tabs button {
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 150ms ease;
}
.jo-mode-tabs button:hover { color: var(--text); }
.jo-mode-tabs button.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent-border);
}
.joeditor-shot {
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  overflow: hidden;
  box-shadow: 0 24px 54px -22px rgba(0, 0, 0, 0.65);
}
.joeditor-copy h3 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.joeditor-copy > p { margin-top: 12px; font-size: 14.5px; color: var(--text-secondary); line-height: 1.8; }
.joeditor-highlights {
  margin-top: 16px;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
  color: var(--text-secondary);
}
.joeditor-highlights strong { color: var(--text); }

.joeditor-mockup {
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: #0d101b;
  color: #e4e9f7;
  overflow: hidden;
  box-shadow: 0 24px 54px -22px rgba(0, 0, 0, 0.65);
}
.jo-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}
.jo-size { color: #38bdf8; font-size: 10.5px; }
.jo-body { display: grid; grid-template-columns: 148px minmax(0, 1fr); min-height: 224px; }
.jo-sidebar {
  padding: 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.015);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.jo-month { font-size: 11px; color: #a78bfa; font-weight: 700; }
.jo-cal {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-align: center;
}
.jo-cal span { padding: 3px 0; border-radius: 4px; color: #8c96b3; position: relative; }
.jo-cal .has-note::after {
  content: "";
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #38bdf8;
}
.jo-cal .is-today { background: #6d5dfc; color: #fff; font-weight: 700; }
.jo-todos { border-top: 1px solid rgba(255, 255, 255, 0.07); padding-top: 8px; font-size: 11px; color: #9aa5c4; }
.jo-todos p { margin-top: 4px; }

.jo-editor { display: flex; flex-direction: column; }
.jo-tabs {
  display: flex;
  gap: 2px;
  padding: 6px 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
}
.jo-tabs button {
  padding: 6px 10px;
  border-radius: 6px 6px 0 0;
  color: #7e89a8;
  transition: color 150ms ease, background-color 150ms ease;
}
.jo-tabs button:hover { color: #cbd5f0; }
.jo-tabs button.is-active { background: rgba(139, 125, 255, 0.16); color: #fff; border-top: 2px solid #8b7dff; }
.jo-content { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; }
.jo-note-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.jo-mood { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: rgba(52, 211, 153, 0.15); color: #34d399; }
.jo-line { color: #cbd5f0; font-family: var(--font-mono); font-size: 11.5px; }
.jo-check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #cbd5f0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  cursor: pointer;
}
.jo-check-line input { accent-color: #8b7dff; cursor: pointer; flex: none; margin: 0; }
.jo-check-line input:checked + span { color: #8c96b3; text-decoration: line-through; }
.jo-preview-p { color: #cbd5f0; font-size: 12.5px; line-height: 1.7; }
.jo-preview-p code { color: #38bdf8; font-family: var(--font-mono); font-size: 11.5px; }
.jo-preview-quote {
  margin-top: 2px;
  padding: 8px 10px;
  border-left: 2px solid #8b7dff;
  background: rgba(139, 125, 255, 0.08);
  color: #a5b1d1;
  font-size: 12px;
  line-height: 1.6;
  border-radius: 0 6px 6px 0;
}
.jo-code {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.6;
  color: #cbd5f0;
  overflow-x: auto;
}
.jo-md { color: #a78bfa; font-weight: 700; }
.jo-link { color: #38bdf8; }
.jo-tag { color: #fbbf24; }
.jo-status { margin-top: auto; padding-top: 10px; font-size: 10px; color: #707b99; }

/* ==========================================================================
   07 · Contact & Footer
   ========================================================================== */
.contact-card {
  position: relative;
  overflow: hidden;
  padding: 44px 36px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.contact-glow {
  position: absolute;
  width: 480px;
  height: 220px;
  top: -110px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, var(--orb-1), transparent 72%);
  pointer-events: none;
}
.contact-card h2 {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 600px;
}
.contact-desc {
  margin-top: 12px;
  max-width: 540px;
  font-size: 15px;
  color: var(--text-secondary);
}

.contact-channels {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}
.contact-meta-row,
.contact-actions-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
}
.channel-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  transition: border-color 160ms ease, transform 160ms ease;
}
.channel-pill:hover { border-color: var(--accent-border); transform: translateY(-1px); }
.channel-pill svg { width: 16px; height: 16px; color: var(--accent); }
.contact-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 13px;
  color: var(--text-secondary);
}
.contact-meta-pill strong { color: var(--text); font-weight: 600; }
.contact-meta-pill .meta-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.channel-note {
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px dashed var(--border-strong);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 13px;
  max-width: 600px;
  line-height: 1.7;
}
.channel-note code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--accent-soft);
}

.footer {
  border-top: 1px solid var(--border);
  padding: 26px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.footer-left strong { font-size: 14px; }
.back-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.back-top svg { width: 15px; height: 15px; }
.back-top:hover { color: var(--accent); border-color: var(--accent-border); }

/* ==========================================================================
   Lightbox Dialog
   ========================================================================== */
.lightbox {
  width: min(calc(100% - 28px), 1240px);
  max-width: none;
  max-height: 92dvh;
  padding: 0;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.72);
}
.lightbox.is-portrait { width: min(calc(100% - 28px), 520px); }
.lightbox::backdrop { background: rgba(4, 6, 12, 0.82); backdrop-filter: blur(6px); }
.lightbox-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface-solid);
  border-bottom: 1px solid var(--border);
}
.lightbox-bar h2 { font-size: 14.5px; font-weight: 600; }
.lightbox-body { padding: 14px; background: var(--bg); }
.lightbox-body img { width: 100%; border-radius: 10px; margin-inline: auto; }
body:has(.lightbox[open]) { overflow: hidden; }

/* ==========================================================================
   Scroll Reveal Motion
   ========================================================================== */
.reveal { opacity: 1; transform: none; }
.js-ready .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 560ms cubic-bezier(0.22, 1, 0.36, 1), transform 560ms cubic-bezier(0.22, 1, 0.36, 1);
}
.js-ready .reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .nav-desktop,
  .nav-resume-btn { display: none; }
  .mobile-menu-btn { display: grid; }
  .hero-grid,
  .capabilities-layout,
  .project-top-grid,
  .scrm-layout,
  .demo-grid,
  .joeditor-card { grid-template-columns: 1fr; }
  .hero { padding: 44px 0 60px; }
  .bento-stats,
  .principles-grid,
  .case-pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .milestone-row { grid-template-columns: 140px minmax(0, 1fr); }
  .milestone-metrics { grid-column: 2; justify-content: flex-start; }
}

@media (max-width: 680px) {
  :root { --container: calc(100% - 32px); }
  .section { padding: 58px 0; }
  .bento-stats,
  .principles-grid,
  .case-pillars,
  .project-metric-pills,
  .edu-grid,
  .demo-kpis,
  .demo-chart-insights { grid-template-columns: 1fr; }
  .hero-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .hero-chip { padding: 10px 10px; }
  .hero-chip dd { font-size: 19px; }
  .stage-identity { gap: 14px; }
  .stage-emblem.has-avatar { width: 84px; height: 84px; }
  .stage-pipeline { grid-template-columns: 1fr; }
  .project-card,
  .milestone-panel,
  .demo-workbench,
  .joeditor-card,
  .timeline-card,
  .contact-card { padding: 20px; }
  .milestone-row { grid-template-columns: 1fr; padding: 14px 4px; gap: 8px; }
  .milestone-metrics { grid-column: auto; justify-content: flex-start; }
  .timeline::before { display: none; }
  .timeline-item { grid-template-columns: 1fr; }
  .timeline-rail { display: none; }
  .edu-grid { padding-left: 0; }
  .jo-body { grid-template-columns: 1fr; }
  .jo-sidebar { border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  .phone-screen-btn { height: 420px; }
}

@media (max-width: 360px) {
  .hero-chips { grid-template-columns: 1fr; }
  .mini-meta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse-dot, .emblem-ring { animation: none !important; }
  .js-ready .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}