/* =========================================
   Alexis Bonnard — Portfolio
   Dark, editorial, code-forward
   ========================================= */

:root {
  /* palette */
  --bg: #000000;
  --bg-2: #0c0c14;
  --bg-3: #14141d;
  --fg: #f5f5f0;
  --fg-dim: rgba(245, 245, 240, 0.68);
  --fg-mute: rgba(245, 245, 240, 0.42);
  --fg-faint: rgba(245, 245, 240, 0.22);
  --line: rgba(245, 245, 240, 0.08);
  --line-2: rgba(245, 245, 240, 0.16);

  --accent: #c084fc;       /* purple */
  --accent-2: #22d3ee;     /* cyan */
  --accent-3: #f0abfc;     /* magenta */
  --accent-warm: #fbbf24;

  --accent-grad: linear-gradient(90deg, #c084fc 0%, #f0abfc 50%, #22d3ee 100%);

  /* type */
  --font-display: "Space Grotesk", -apple-system, system-ui, sans-serif;
  --font-serif: "Fraunces", "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* accent overrides */
[data-accent="cyan"]   { --accent: #22d3ee; --accent-3: #67e8f9; --accent-grad: linear-gradient(90deg,#22d3ee,#a5f3fc,#c084fc); }
[data-accent="amber"]  { --accent: #fbbf24; --accent-3: #fde68a; --accent-grad: linear-gradient(90deg,#fbbf24,#fde68a,#c084fc); }
[data-accent="lime"]   { --accent: #a3e635; --accent-3: #d9f99d; --accent-grad: linear-gradient(90deg,#a3e635,#d9f99d,#22d3ee); }
[data-accent="rose"]   { --accent: #fb7185; --accent-3: #fda4af; --accent-grad: linear-gradient(90deg,#fb7185,#fda4af,#c084fc); }
[data-accent="white"]  { --accent: #f5f5f0; --accent-3: #d4d4d8; --accent-grad: linear-gradient(90deg,#ffffff,#d4d4d8,#a1a1aa); }

[data-theme="light"] {
  --bg: #f2efe8;
  --bg-2: #faf8f3;
  --bg-3: #ffffff;
  --fg: #0a0a0f;
  --fg-dim: rgba(10, 10, 15, 0.7);
  --fg-mute: rgba(10, 10, 15, 0.45);
  --fg-faint: rgba(10, 10, 15, 0.18);
  --line: rgba(10, 10, 15, 0.1);
  --line-2: rgba(10, 10, 15, 0.2);
}

/* =========================================
   RESET
   ========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }
body {
  font-family: var(--font-display);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 500ms var(--ease-out-expo), color 500ms var(--ease-out-expo);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }

::selection { background: var(--accent); color: var(--bg); }

/* =========================================
   BG: particles canvas + grain + glows
   ========================================= */
.bg-particles {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  opacity: 0.3;
  pointer-events: none;
}
.bg-grain {
  position: fixed; inset: 0;
  z-index: 1; pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
.bg-glow {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
}
.bg-glow::before, .bg-glow::after {
  content: "";
  position: absolute;
  width: 70vw; height: 70vw;
  border-radius: 50%;
  filter: blur(160px);
  opacity: 0.38;
}
.bg-glow::before {
  background: var(--accent);
  top: -30%; left: -25%;
  animation: glowFloatA 22s ease-in-out infinite;
}
.bg-glow::after {
  background: var(--accent-2);
  bottom: -35%; right: -25%;
  animation: glowFloatB 28s ease-in-out infinite;
}
@keyframes glowFloatA {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vw, 4vw) scale(1.15); }
}
@keyframes glowFloatB {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-5vw, -3vw) scale(1.1); }
}
[data-theme="light"] .bg-glow::before,
[data-theme="light"] .bg-glow::after { opacity: 0.18; }

/* =========================================
   LAYOUT PRIMITIVES
   ========================================= */
.shell, .page-shell { position: relative; z-index: 2; }
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 40px;
}
@media (max-width: 720px) { .container { padding: 0 20px; } }

.section {
  position: relative;
  padding: 120px 0 100px;
  min-height: calc(100vh - 80px);
}

/* Home page doesn't add min-height (hero already full-height) */
#about, #experience, #projects, #services, #contact {
  padding-top: 160px;
}
@media (max-width: 720px) { .section { padding: 100px 0 80px; } }

/* Page transitions */
.page-shell {
  opacity: 1;
  transform: none;
  transition: opacity 300ms cubic-bezier(0.16, 1, 0.3, 1), transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}
.page-shell.page-in {
  animation: pageIn 500ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.page-shell.page-out {
  opacity: 0;
  transform: translateY(10px);
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 36px;
}
.section-label .num {
  color: var(--accent);
  font-weight: 600;
}
.section-label .bar {
  width: 48px; height: 1px;
  background: var(--line-2);
}

.section-title {
  font-size: clamp(40px, 6vw, 76px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.02;
  margin-bottom: 22px;
}
.section-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}
.section-lede {
  max-width: 640px;
  font-size: 18px;
  color: var(--fg-dim);
  line-height: 1.55;
}

/* =========================================
   NAV
   ========================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 40px;
  transition: padding 300ms var(--ease-out-expo), background 300ms var(--ease-out-expo), backdrop-filter 300ms;
}
.nav.scrolled {
  padding: 14px 40px;
  background: color-mix(in oklab, var(--bg) 72%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 720px) {
  .nav, .nav.scrolled { padding: 14px 20px; }
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.nav-logo-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
  animation: pulse 2.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dim);
  transition: color 200ms;
  position: relative;
}
.nav-links a::before {
  content: "·";
  margin-right: 6px;
  color: var(--fg-faint);
  opacity: 0;
  transition: opacity 200ms;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--fg);
}
.nav-links a.active::before { opacity: 1; color: var(--accent); }
@media (max-width: 860px) { .nav-links { display: none; } }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fg);
  transition: all 200ms var(--ease-out-expo);
}
.nav-cta:hover {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
  transform: translateY(-1px);
}
.nav-lang {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 12px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--fg-mute);
  background: transparent;
  transition: all 200ms var(--ease-out-expo);
}
.nav-lang:hover { border-color: var(--line-2); color: var(--fg-dim); }
.nav-lang .sep { color: var(--fg-faint); }
.nav-lang .on { color: var(--accent); }

/* =========================================
   HERO
   ========================================= */
.hero {
  min-height: 100vh;
  padding: 140px 0 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-dim);
  margin-bottom: 60px;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: color-mix(in oklab, var(--bg-2) 50%, transparent);
  backdrop-filter: blur(12px);
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 10px #4ade80;
  animation: pulse 2.4s infinite;
}
.hero-meta .divider {
  width: 1px; height: 12px;
  background: var(--line-2);
}

/* Headline */
.hero-headline {
  font-size: clamp(56px, 9.5vw, 156px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 64px;
  max-width: 100%;
  word-break: break-word;
}
.hero-headline .line {
  display: block;
  overflow: hidden;
}
.hero-headline .line-inner {
  display: inline-block;
}
.mask-reveal {
  line-height: inherit;
}
/* Italic ascender/descender clip fix WITHOUT spacing change:
   padding adds room inside the overflow:hidden box, negative margin pulls
   the box back into the same layout slot so neighbouring lines do not move.
   !important defeats any specificity surprise. Targeted via class names AND
   :nth-child(2)/(3) of .hero-headline for redundancy. */
.mask-reveal.mask-reveal--name,
.hero-headline > .mask-reveal:nth-child(2) {
  padding-top: 0.3em !important;
  margin-top: -0.3em !important;
}
.mask-reveal.mask-reveal--verb,
.hero-headline > .mask-reveal:nth-child(3) {
  padding-bottom: 0.3em !important;
  margin-bottom: -0.3em !important;
}
.hero-name {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  /* Solid color (no background-clip:text). Trades the gradient sweep for
     guaranteed text rendering — every ink pixel paints, including italic
     'd' ascenders that extend outside the natural line box. */
  color: var(--accent);
}
@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Verb rotator — italic serif, old design */
.verb {
  /* --verb-step is the per-verb stride (and the .verb's visible-window
     height). It's > 1em so italic descenders ('g'/'p'/'f') fit inside the
     overflow:hidden box. Negative margin-bottom returns the inline-block's
     margin-box to 1em so the surrounding line-flex line height doesn't
     change. JS translateY in hero.jsx must use the same --verb-step. */
  --verb-step: 1.15em;
  display: inline-block;
  position: relative;
  vertical-align: baseline;
  height: var(--verb-step);
  margin-bottom: calc(1em - var(--verb-step));
  line-height: 1;
  overflow: hidden;
  min-width: 2.8em;
}
.verb-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  min-width: 6ch;
}
.line-verb-row {
  display: inline-flex;
  align-items: baseline;
  gap: 0.22em;
  flex-wrap: wrap;
}
.verb-track {
  display: block;
  transition: transform 700ms var(--ease-out-expo);
  will-change: transform;
}
.verb-track > span {
  display: block;
  /* Match .verb's --verb-step so each verb fills exactly one stride. */
  height: var(--verb-step, 1.15em);
  line-height: 1;
  /* overflow:hidden contains each verb's ink to its own slot, so the
     descender of an outgoing verb can't bleed into the next verb's
     visible region during the rotation animation. With span height now
     1.15em (instead of 1em), descenders also fit inside this clipping
     box for the visible verb. */
  overflow: hidden;
  /* Solid color (no background-clip:text) so descenders paint reliably. */
  color: var(--accent);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.verb-italic .verb-track > span {
  font-weight: 300;
}
/* The suffix line ("solutions.") sits below the rotating verb at a smaller
   size so the verb stays visually dominant. */
.verb-suffix-line {
  font-size: 0.6em;
  letter-spacing: -0.02em;
}

/* Hero grid */
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 80px;
  align-items: end;
  margin-bottom: 80px;
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
}
.hero-copy {
  font-size: 19px;
  line-height: 1.55;
  color: var(--fg-dim);
  max-width: 520px;
  margin-bottom: 32px;
}
.hero-copy strong {
  color: var(--fg);
  font-weight: 500;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  transition: all 250ms var(--ease-out-expo);
  white-space: nowrap;
}
.btn-primary {
  background: var(--fg);
  color: var(--bg);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px var(--accent);
}
.btn-ghost {
  border: 1px solid var(--line-2);
  color: var(--fg);
}
.btn-ghost:hover {
  border-color: var(--fg);
  background: var(--bg-2);
  transform: translateY(-2px);
}
.btn-arrow { transition: transform 250ms; }
.btn:hover .btn-arrow { transform: translate(2px, -2px); }

/* Hero side card — code panel */
.code-panel {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 13px;
  box-shadow: 0 30px 80px -40px rgba(0,0,0,0.6);
  position: relative;
}
.code-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg-3) 60%, transparent);
}
.code-dot { width: 10px; height: 10px; border-radius: 50%; }
.code-dot.r { background: #ff5f56; }
.code-dot.y { background: #ffbd2e; }
.code-dot.g { background: #27c93f; }
.code-panel-title {
  margin-left: 10px;
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: 0.05em;
}
.code-body {
  padding: 20px 22px;
  line-height: 1.7;
  color: var(--fg-dim);
}
.code-line { display: block; white-space: pre; }
.code-kw { color: var(--accent); }
.code-str { color: #a5f3fc; }
.code-fn { color: var(--accent-3); }
.code-com { color: var(--fg-mute); font-style: italic; }
.code-num { color: var(--accent-warm); }
.caret { display: inline-block; width: 7px; height: 14px; background: var(--accent); vertical-align: -2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Hero stats */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}
@media (max-width: 720px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 20px;
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: none; }
.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-mute);
}
.stat-value {
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.stat-value .unit {
  font-size: 16px;
  color: var(--fg-mute);
  margin-left: 4px;
}

/* Marquee */
.marquee {
  overflow: hidden;
  padding: 24px 0;
  margin: 48px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex;
  gap: 52px;
  white-space: nowrap;
  animation: marquee 50s linear infinite;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fg-dim);
  letter-spacing: 0.02em;
}
.marquee-item { display: inline-flex; align-items: center; gap: 14px; }
.marquee-sep { color: var(--accent); }
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-mute);
}
.scroll-indicator-line {
  width: 1px; height: 42px;
  background: linear-gradient(to bottom, var(--fg-mute), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-indicator-line::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 14px;
  background: var(--accent);
  animation: scrollDown 2s ease-in-out infinite;
}
@keyframes scrollDown {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(420%); }
}

/* =========================================
   ABOUT
   ========================================= */
/* About section — remove scroll-gradient since it's its own page */
#about { background: transparent; border: none; }
#about::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 60%; height: 60%;
  background: radial-gradient(circle at 20% 30%, color-mix(in oklab, var(--accent) 14%, transparent), transparent 60%);
  opacity: 0.7;
  pointer-events: none;
}
#about .container { position: relative; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 80px;
  align-items: start;
}
@media (max-width: 960px) {
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
}
.about-portrait {
  aspect-ratio: 4 / 5;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-portrait::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, color-mix(in oklab, var(--accent) 30%, transparent), transparent 60%);
  opacity: 0.5;
}
.about-portrait-tag {
  position: absolute;
  bottom: 20px; left: 20px; right: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-mute);
  display: flex;
  justify-content: space-between;
}
.about-portrait-initials {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 140px;
  font-weight: 300;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.05em;
}
.about-portrait-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.15) contrast(1.02);
}
.about-portrait-img + .about-portrait-tag {
  background: linear-gradient(to top, rgba(0,0,0,0.65), transparent);
  padding: 20px;
  bottom: 0; left: 0; right: 0;
  color: rgba(245,245,240,0.85);
}

.about-prose p {
  font-size: 20px;
  line-height: 1.55;
  color: var(--fg-dim);
  margin-bottom: 20px;
}
.about-prose p strong {
  color: var(--fg);
  font-weight: 500;
}
.about-prose em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--accent);
}

.about-facts {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.about-fact {
  padding: 22px 24px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.about-fact-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-mute);
}
.about-fact-value {
  font-size: 16px;
  color: var(--fg);
  font-weight: 500;
}

/* =========================================
   SKILLS — primary pills / soft pills / tool grid
   ========================================= */
.skills-group {
  margin-top: 56px;
}
.skills-group:first-of-type {
  margin-top: 48px;
}
.skills-group-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.skills-group-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-mute);
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}
.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.skill-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--fg-dim);
  background: var(--bg-2);
  transition: all 200ms var(--ease-out-expo);
  position: relative;
}
.skill-pill:hover {
  border-color: var(--line-2);
  color: var(--fg);
  background: var(--bg-3);
  transform: translateY(-1px);
}
.skill-pill.soft {
  color: var(--fg-mute);
}
.skill-pill.soft:hover {
  color: var(--fg-dim);
}
.skill-pill.fav {
  border-color: color-mix(in oklab, var(--accent) 40%, var(--line));
  color: var(--fg);
}
.skill-pill .fav-heart {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1;
  color: var(--bg);
  background: var(--accent);
  border-radius: 999px;
  box-shadow: 0 0 0 2px var(--bg);
}
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.tool-chip {
  background: var(--bg);
  padding: 22px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-dim);
  transition: background 200ms, color 200ms;
  min-height: 72px;
  text-align: center;
}
.tool-chip:hover { background: var(--bg-2); color: var(--fg); }

/* =========================================
   EXPERIENCE — timeline
   ========================================= */
.exp-timeline {
  position: relative;
  margin-top: 40px;
}
.exp-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 40px;
  padding: 36px 0;
  border-top: 1px solid var(--line);
  position: relative;
  transition: padding 400ms var(--ease-out-expo);
}
.exp-item:first-child { border-top: 1px solid var(--line-2); }
.exp-item:last-child { border-bottom: 1px solid var(--line); }
@media (max-width: 720px) {
  .exp-item { grid-template-columns: 1fr; gap: 12px; padding: 28px 0; }
}
.exp-item::before {
  content: "";
  position: absolute;
  left: 0; top: 42px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--fg-faint);
  transform: translateX(-4px);
  transition: background 300ms, transform 300ms;
}
.exp-item:hover::before {
  background: var(--accent);
  transform: translateX(-4px) scale(1.5);
  box-shadow: 0 0 12px var(--accent);
}
.exp-period {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-mute);
  letter-spacing: 0.05em;
  padding-top: 6px;
}
.exp-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.exp-role {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.exp-role .at {
  color: var(--fg-mute);
  font-weight: 300;
  font-style: italic;
  font-family: var(--font-serif);
}
.exp-company {
  color: var(--accent);
  background: var(--accent-grad);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 500;
}
.exp-desc {
  color: var(--fg-dim);
  max-width: 640px;
  line-height: 1.55;
  font-size: 15px;
}
.exp-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.stack-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--fg-dim);
  background: color-mix(in oklab, var(--bg-2) 60%, transparent);
}

/* =========================================
   PROJECTS
   ========================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
  margin-top: 40px;
}
@media (max-width: 860px) { .projects-grid { grid-template-columns: 1fr; } }

.proj {
  grid-column: span 3;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 28px 24px;
  background: var(--bg-2);
  transition: all 350ms var(--ease-out-expo);
  overflow: hidden;
  min-height: 320px;
}
.proj:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
  background: var(--bg-3);
}
.proj.proj-static {
  cursor: default;
}
.proj.proj-static:hover {
  transform: none;
  background: var(--bg-2);
  border-color: var(--line);
}
.proj.proj-static:hover .proj-visual-img {
  transform: none;
  filter: saturate(0.9) contrast(1.02);
}
.proj.wide { grid-column: span 6; flex-direction: row; align-items: stretch; gap: 40px; min-height: 380px; }
.proj.wide .proj-visual { flex: 1; min-height: 300px; }
.proj.wide .proj-body { flex: 1; padding-top: 12px; }
@media (max-width: 860px) {
  .proj, .proj.wide { grid-column: span 1; flex-direction: column; gap: 20px; min-height: 0; }
}

.proj-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 18px;
}
.proj-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-mute);
  letter-spacing: 0.05em;
}
.proj-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 4px 10px;
  border: 1px solid color-mix(in oklab, var(--accent) 40%, transparent);
  border-radius: 999px;
  background: color-mix(in oklab, var(--accent) 8%, transparent);
}

.proj-visual {
  flex: 1;
  min-height: 180px;
  margin-bottom: 20px;
  border-radius: 12px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.proj-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, color-mix(in oklab, var(--accent) 14%, transparent), transparent 60%);
  opacity: 0.5;
  transition: opacity 500ms;
}
.proj:hover .proj-visual::before { opacity: 1; }
.proj-visual-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease-out-expo), filter 400ms;
  filter: saturate(0.9) contrast(1.02);
}
.proj:hover .proj-visual-img { transform: scale(1.03); filter: saturate(1) contrast(1.05); }

.proj-title {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.proj-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
}
.proj-desc {
  color: var(--fg-dim);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 14px;
}
.proj-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: 0.02em;
}
.proj-stack span::after { content: " ·"; color: var(--fg-faint); }
.proj-stack span:last-child::after { content: ""; }

.proj-arrow {
  position: absolute;
  top: 26px; right: 26px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-dim);
  transition: all 300ms var(--ease-out-expo);
}
.proj:hover .proj-arrow {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  transform: rotate(-45deg);
}

/* Project visuals — abstract svg covers */
.viz-glyph {
  width: 70%;
  height: 70%;
  opacity: 0.85;
}

/* =========================================
   SERVICES
   ========================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 40px;
}
@media (max-width: 980px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .services-grid { grid-template-columns: 1fr; } }
.service {
  background: var(--bg);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 300px;
  transition: background 300ms;
  position: relative;
  overflow: hidden;
}
.service:hover { background: var(--bg-2); }
.service-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.service-title {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.service-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
}
.service-desc {
  color: var(--fg-dim);
  font-size: 15px;
  line-height: 1.55;
  flex: 1;
}
.service-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-dim);
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.service-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.service-list li::before {
  content: "→";
  color: var(--accent);
}

/* =========================================
   404 — not found
   ========================================= */
.nf-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
}
.nf-wrap {
  text-align: center;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.nf-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 6px 14px;
  border: 1px solid color-mix(in oklab, var(--accent) 40%, transparent);
  border-radius: 999px;
  background: color-mix(in oklab, var(--accent) 8%, transparent);
  margin-bottom: 32px;
}
.nf-title {
  font-size: clamp(72px, 14vw, 160px);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nf-message {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: 12px;
}
.nf-sub {
  font-size: 15px;
  color: var(--fg-dim);
  line-height: 1.55;
  margin-bottom: 32px;
  max-width: 480px;
}
.nf-cta { font-size: 14px; }

/* =========================================
   UPCOMING — generic doc placeholder for personal projects that aren't documented yet
   ========================================= */
.upcoming-card {
  margin-top: 48px;
  padding: 48px 40px;
  border: 1px dashed color-mix(in oklab, var(--accent) 40%, var(--line));
  border-radius: 18px;
  background: color-mix(in oklab, var(--accent) 5%, var(--bg-2));
  text-align: center;
  max-width: 720px;
}
.upcoming-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--accent) 40%, transparent);
  background: color-mix(in oklab, var(--accent) 12%, transparent);
  margin-bottom: 20px;
}
.upcoming-title {
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 14px;
}
.upcoming-body {
  color: var(--fg-dim);
  font-size: 15px;
  line-height: 1.55;
  margin-bottom: 28px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* =========================================
   SWIFTLLM DOCS — full-doc layout (sidebar + content)
   ========================================= */
.sw-full-page { padding-top: 120px; padding-bottom: 80px; }
@media (max-width: 720px) { .sw-full-page { padding-top: 90px; } }

.sw-full-hero {
  max-width: 900px;
  margin: 0 auto 64px;
  text-align: center;
}
.sw-full-title {
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin-bottom: 24px;
}
.sw-bracket {
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 300;
}
.sw-title-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 4px;
}
.sw-full-desc {
  font-family: var(--font-mono);
  font-size: clamp(14px, 1.8vw, 18px);
  line-height: 1.55;
  color: var(--fg-dim);
  max-width: 720px;
  margin: 0 auto 24px;
}
.sw-free-pill {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border: 1px solid color-mix(in oklab, #22c55e 50%, transparent);
  background: color-mix(in oklab, #22c55e 10%, transparent);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
}
.sw-free-text { color: #4ade80; font-weight: 600; }
.sw-free-sep { color: var(--fg-faint); }
.sw-free-mit { color: var(--fg-dim); }
.sw-free-gh {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sw-free-gh:hover { color: var(--accent); }

.sw-doc-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 980px) {
  .sw-doc-grid { grid-template-columns: 1fr; gap: 32px; }
}

.sw-sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
}
@media (max-width: 980px) {
  .sw-sidebar { position: static; display: none; }
}
.sw-sidebar-inner {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
}
.sw-sidebar-heading {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.sw-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sw-sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-mute);
  transition: all 150ms;
  line-height: 1.25;
}
.sw-sidebar-item:hover { color: var(--fg); background: var(--bg-3); }
.sw-sidebar-item.active {
  color: var(--accent);
  background: color-mix(in oklab, var(--accent) 12%, transparent);
  border-left: 2px solid var(--accent);
  padding-left: 8px;
}
.sw-sidebar-item svg { flex-shrink: 0; opacity: 0.6; }

.sw-doc-content { min-width: 0; }

.sw-doc-section {
  margin-bottom: 80px;
  scroll-margin-top: 100px;
}
.sw-doc-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 24px;
}
.sw-doc-bracket {
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 300;
}
.sw-doc-title-text {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 4px;
}
.sw-doc-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sw-doc-body .sw-sub:first-child { margin-top: 0; }
.sw-doc-body .code-block { margin: 8px 0 16px; }

.sw-free-callout {
  padding: 20px 24px;
  border: 1px solid color-mix(in oklab, #22c55e 30%, transparent);
  border-radius: 12px;
  background: color-mix(in oklab, #22c55e 6%, var(--bg-2));
  margin-bottom: 12px;
}
.sw-free-callout-title {
  color: #4ade80;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 8px;
}
.sw-free-callout-body {
  color: var(--fg-dim);
  font-size: 13px;
  line-height: 1.55;
}

.sw-bullets {
  list-style: none;
  padding: 0;
  margin: 4px 0 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sw-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--fg-dim);
  font-size: 15px;
  line-height: 1.5;
}
.sw-bullets li strong { color: var(--fg); font-weight: 500; }
.sw-bullet-dot {
  color: var(--accent);
  flex-shrink: 0;
  line-height: 1.5;
}

.sw-provider-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
  margin: 16px 0 8px;
}
@media (max-width: 600px) {
  .sw-provider-cards { grid-template-columns: 1fr; }
}
.sw-provider-card {
  padding: 18px 20px;
  border: 1px solid color-mix(in oklab, var(--accent) 20%, var(--line));
  background: color-mix(in oklab, var(--accent) 4%, var(--bg-2));
  border-radius: 12px;
  transition: border-color 200ms;
}
.sw-provider-card:hover { border-color: color-mix(in oklab, var(--accent) 50%, transparent); }
.sw-provider-name {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 16px;
}
.sw-provider-models {
  color: var(--fg-dim);
  font-size: 13px;
  margin-bottom: 10px;
  line-height: 1.45;
}
.sw-provider-k { color: var(--accent-2); }
.sw-provider-card .code-block { margin: 0; }

.sw-env-box {
  margin: 12px 0;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
  font-family: var(--font-mono);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-x: auto;
}
.sw-env-row { display: flex; gap: 2px; white-space: nowrap; }
.sw-env-key { color: var(--accent-2); }
.sw-env-eq { color: var(--fg-faint); margin: 0 2px; }
.sw-env-val { color: var(--accent-3); }

.sw-languages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.sw-lang-card {
  border: 1px solid color-mix(in oklab, var(--accent) 20%, var(--line));
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-2);
  transition: border-color 200ms;
}
.sw-lang-card.open { border-color: color-mix(in oklab, var(--accent) 40%, transparent); }
.sw-lang-header {
  width: 100%;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: color-mix(in oklab, var(--accent) 5%, transparent);
  transition: background 150ms;
}
.sw-lang-header:hover { background: color-mix(in oklab, var(--accent) 10%, transparent); }
.sw-lang-name {
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
}
.sw-lang-chev {
  color: var(--accent);
  transition: transform 200ms;
}
.sw-lang-card.open .sw-lang-chev { transform: rotate(180deg); }
.sw-lang-body {
  padding: 18px;
  border-top: 1px solid color-mix(in oklab, var(--accent) 20%, var(--line));
}
.sw-lang-subheading {
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
  margin-top: 14px;
}
.sw-lang-subheading:first-child { margin-top: 0; }

.sw-frameworks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.sw-fw-card {
  border: 1px solid color-mix(in oklab, var(--accent) 15%, var(--line));
  border-radius: 8px;
  overflow: hidden;
}
.sw-fw-header {
  width: 100%;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: color-mix(in oklab, var(--accent) 5%, transparent);
  transition: background 150ms;
  color: color-mix(in oklab, var(--accent) 70%, var(--fg));
  font-family: var(--font-mono);
  font-size: 13px;
}
.sw-fw-header:hover { background: color-mix(in oklab, var(--accent) 10%, transparent); }
.sw-fw-chev { transition: transform 200ms; color: var(--accent); }
.sw-fw-card.open .sw-fw-chev { transform: rotate(180deg); }
.sw-fw-body {
  padding: 12px;
  border-top: 1px solid color-mix(in oklab, var(--accent) 15%, var(--line));
}
.sw-fw-body .code-block { margin: 0; }

/* =========================================
   SWIFTLLM DOCS — standalone subpage
   ========================================= */
.sw-page { padding-top: 120px; }
@media (max-width: 720px) { .sw-page { padding-top: 90px; } }

.sw-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fg-mute);
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: 40px;
  transition: all 200ms var(--ease-out-expo);
}
.sw-back:hover {
  color: var(--fg);
  border-color: var(--line-2);
  background: var(--bg-2);
  transform: translateX(-2px);
}

.sw-hero { max-width: 820px; margin-bottom: 80px; }
.sw-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.sw-title {
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin-bottom: 18px;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sw-subtitle {
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--fg);
  margin-bottom: 24px;
}
.sw-subtitle em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
}
.sw-desc {
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg-dim);
  margin-bottom: 28px;
}
.sw-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.sw-meta-pill {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-dim);
  background: var(--bg-2);
}
.sw-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.sw-docs-note {
  font-size: 14px;
  color: var(--fg-mute);
  line-height: 1.55;
  padding: 16px 20px;
  border-left: 2px solid var(--accent);
  background: color-mix(in oklab, var(--accent) 5%, transparent);
  border-radius: 0 8px 8px 0;
}

.sw-section {
  margin-top: 80px;
  padding-top: 56px;
  border-top: 1px solid var(--line);
}
.sw-section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.sw-section-lede {
  font-size: 16px;
  color: var(--fg-dim);
  line-height: 1.55;
  margin-bottom: 32px;
  max-width: 680px;
}

.sw-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.sw-overview-item {
  background: var(--bg);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: background 200ms, transform 200ms var(--ease-out-expo);
  position: relative;
}
.sw-overview-item:hover { background: var(--bg-2); }
.sw-overview-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent);
  flex-shrink: 0;
}
.sw-overview-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.sw-overview-label {
  font-size: 14px;
  color: var(--fg);
  font-weight: 500;
}
.sw-overview-desc {
  font-size: 12px;
  color: var(--fg-mute);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  line-height: 1.35;
}
.sw-overview-arrow {
  color: var(--fg-faint);
  transition: transform 200ms, color 200ms;
  flex-shrink: 0;
}
.sw-overview-item:hover .sw-overview-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.sw-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-top: 32px;
  margin-bottom: 10px;
}
.sw-para {
  font-size: 16px;
  color: var(--fg-dim);
  line-height: 1.55;
  margin-bottom: 8px;
  max-width: 720px;
}

.code-block {
  margin: 14px 0 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-2);
}
.code-block-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--line);
}
.code-block-lang {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-mute);
}
.code-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
  background: transparent;
  border: 1px solid transparent;
  transition: all 180ms;
}
.code-copy:hover {
  color: var(--fg);
  background: var(--bg);
  border-color: var(--line);
}
.code-block-body {
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--fg);
  overflow-x: auto;
  white-space: pre;
  margin: 0;
}
.code-block-body code { color: inherit; font-family: inherit; }

.sw-provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.sw-provider {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fg-dim);
  transition: background 200ms, color 200ms;
}
.sw-provider:hover { background: var(--bg-2); color: var(--fg); }
.sw-provider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 18%, transparent);
}

.sw-cta-block {
  text-align: center;
  padding: 64px 40px;
  border-radius: 16px;
  border: 1px solid var(--line-2);
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
  margin-top: 80px;
}
.sw-cta-block .sw-section-title { margin: 0 auto 14px; max-width: 640px; }
.sw-cta-body {
  font-size: 16px;
  color: var(--fg-dim);
  line-height: 1.55;
  margin-bottom: 28px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.sw-big-cta {
  font-size: 14px;
  padding: 14px 28px;
}

/* =========================================
   DOCS HUB — project documentation cards
   ========================================= */
.docs-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 48px;
}
.doc-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 300ms, background 300ms, transform 300ms var(--ease-out-expo);
}
.doc-card:hover {
  border-color: var(--line-2);
  background: var(--bg-3);
  transform: translateY(-2px);
}
@media (max-width: 720px) {
  .doc-card { grid-template-columns: 1fr; }
}
.doc-card-visual {
  position: relative;
  min-height: 220px;
  background: var(--bg-3);
  overflow: hidden;
}
.doc-card-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms var(--ease-out-expo);
}
.doc-card:hover .doc-card-visual img { transform: scale(1.04); }
.doc-card-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, color-mix(in oklab, var(--accent) 10%, transparent), transparent 55%);
  pointer-events: none;
}

.doc-card-body {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.doc-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.doc-card-title {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.doc-card-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid color-mix(in oklab, var(--accent) 40%, transparent);
  background: color-mix(in oklab, var(--accent) 8%, transparent);
  color: var(--accent);
}
.doc-card-tag-professional {
  border-color: color-mix(in oklab, var(--accent-2) 40%, transparent);
  background: color-mix(in oklab, var(--accent-2) 8%, transparent);
  color: var(--accent-2);
}
.doc-card-desc {
  color: var(--fg-dim);
  font-size: 15px;
  line-height: 1.55;
}
.doc-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
}
.doc-card-tags span {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
}
.doc-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.doc-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  border: 1px solid var(--line-2);
  transition: all 200ms var(--ease-out-expo);
}
.doc-pill-view {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.doc-pill-view:hover {
  transform: translateY(-1px);
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.doc-pill-github {
  background: transparent;
  color: var(--fg-dim);
}
.doc-pill-github:hover {
  border-color: var(--fg);
  color: var(--fg);
}
.doc-pill-soon {
  background: transparent;
  color: var(--fg-mute);
  border-style: dashed;
  cursor: default;
}
.docs-footnote {
  margin-top: 40px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-faint);
  letter-spacing: 0.04em;
}

/* =========================================
   CURRICULUM
   ========================================= */
.cv-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  margin-top: 48px;
  align-items: start;
}
@media (max-width: 860px) {
  .cv-grid { grid-template-columns: 1fr; gap: 32px; }
}
.cv-subtitle {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin-bottom: 16px;
}
.cv-desc {
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg-dim);
  margin-bottom: 28px;
}
.cv-items {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}
.cv-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
@media (max-width: 640px) {
  .cv-item { grid-template-columns: 1fr; gap: 6px; }
}
.cv-item-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
}
.cv-item-value {
  font-size: 16px;
  line-height: 1.45;
  color: var(--fg-dim);
}

.cv-transcript-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-2);
  margin-bottom: 20px;
}
.cv-transcript-icon {
  flex-shrink: 0;
  color: var(--accent);
  opacity: 0.9;
}
.cv-transcript-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-mono);
}
.cv-transcript-name {
  font-size: 13px;
  color: var(--fg);
  letter-spacing: 0.02em;
}
.cv-transcript-date {
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: 0.08em;
}
.cv-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.cv-actions .btn { min-width: 0; }

.cv-footnote {
  margin-top: 48px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-mute);
  letter-spacing: 0.04em;
}
.cv-footnote-mark { color: var(--accent); }

/* =========================================
   CONTACT
   ========================================= */
.contact-wrap {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  margin-top: 40px;
  align-items: start;
}
@media (max-width: 860px) {
  .contact-wrap { grid-template-columns: 1fr; gap: 48px; }
}

.contact-huge {
  font-size: clamp(48px, 8vw, 120px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.95;
  margin-bottom: 36px;
}
.contact-huge em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  padding: 18px 26px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--fg);
  transition: all 300ms var(--ease-out-expo);
  margin-bottom: 32px;
}
.contact-email:hover {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -20px var(--accent);
}
.contact-socials {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.contact-social {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 14px;
  transition: padding 300ms var(--ease-out-expo);
  color: var(--fg);
}
.contact-social:last-child { border-bottom: 1px solid var(--line); }
.contact-social .label {
  color: var(--fg-mute);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.contact-social:hover {
  padding-left: 12px;
  color: var(--accent);
}
.contact-social .arrow {
  transition: transform 300ms var(--ease-out-expo);
}
.contact-social:hover .arrow {
  transform: translate(4px, -4px);
}

.contact-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  position: relative;
  overflow: hidden;
}
.contact-card::before {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 180px; height: 180px;
  background: radial-gradient(circle, color-mix(in oklab, var(--accent) 40%, transparent), transparent 65%);
  filter: blur(30px);
  opacity: 0.6;
}
.contact-card-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  position: relative;
}
.contact-card h3 {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  position: relative;
}
.contact-card p {
  color: var(--fg-dim);
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 20px;
  position: relative;
}
.contact-card-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  position: relative;
}
.contact-card-meta .row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
}
.contact-card-meta .row .k { color: var(--fg-mute); }
.contact-card-meta .row .v { color: var(--fg); }

/* Footer — minimal */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--line);
  position: relative;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-mute);
}

/* =========================================
   TWEAKS PANEL
   ========================================= */
.tweaks {
  position: fixed;
  bottom: 20px; right: 20px;
  z-index: 80;
  background: color-mix(in oklab, var(--bg-2) 90%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 18px;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.6);
  transform: translateY(0);
  opacity: 1;
  transition: transform 300ms var(--ease-out-expo), opacity 300ms;
}
.tweaks.hidden {
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
}
.tweaks h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-mute);
  font-weight: 500;
  margin-bottom: 2px;
}
.tweaks-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.tweaks-label {
  font-size: 12px;
  color: var(--fg-dim);
  font-family: var(--font-mono);
}
.tweaks-options, .tweaks-colors {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.tweaks-opt {
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  border-radius: 999px;
  color: var(--fg-dim);
  transition: all 180ms;
}
.tweaks-opt.active {
  background: var(--fg);
  color: var(--bg);
}
.tweaks-color {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: all 180ms;
}
.tweaks-color.active {
  border-color: var(--fg);
  transform: scale(1.1);
}

/* =========================================
   PAGE CRUMB (bottom-left prev/next)
   ========================================= */
.page-crumb {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 18px;
  background: color-mix(in oklab, var(--bg-2) 80%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}
.page-crumb-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-dim);
  transition: color 200ms, transform 200ms var(--ease-out-expo);
}
.page-crumb-link:hover {
  color: var(--fg);
}
.page-crumb-link.prev:hover { transform: translateX(-2px); }
.page-crumb-link.next:hover { transform: translateX(2px); }
.page-crumb-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg-mute);
}
.page-crumb-meta .num { color: var(--accent); }
.page-crumb-meta .bar {
  width: 24px; height: 1px;
  background: var(--line-2);
}
@media (max-width: 520px) {
  .page-crumb { gap: 12px; padding: 8px 14px; font-size: 10px; }
  .page-crumb-meta .bar { width: 14px; }
}
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 900ms var(--ease-out-expo), transform 900ms var(--ease-out-expo);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.reveal.delay-1 { transition-delay: 80ms; }
.reveal.delay-2 { transition-delay: 160ms; }
.reveal.delay-3 { transition-delay: 240ms; }
.reveal.delay-4 { transition-delay: 320ms; }
.reveal.delay-5 { transition-delay: 400ms; }
.reveal.delay-6 { transition-delay: 480ms; }

/* =========================================
   SCROLL REVEAL
   ========================================= */
.mask-reveal {
  display: block;
  overflow: hidden;
}
.mask-reveal > * {
  display: inline-block;
  transform: translateY(110%);
  animation: maskUp 1000ms var(--ease-out-expo) forwards;
  animation-delay: var(--d, 0ms);
}
@keyframes maskUp {
  to { transform: translateY(0); }
}
