/* ==========================================================================
   Lucas Cunha — portfolio
   Tokens first; light theme by default, dark via system or [data-theme].
   ========================================================================== */

:root {
  --bg: #fafaf9;
  --bg-alt: #f3f2ef;
  --surface: #ffffff;
  --surface-2: #f6f5f3;
  --text: #121110;
  --text-2: #3d3a36;
  --muted: #6b665f;
  --border: #e6e3de;
  --border-strong: #d4d0c9;
  --accent: #5b3fd6;
  --accent-hover: #4a30c0;
  --accent-soft: #eeeafe;
  --accent-text: #4a30c0;
  --on-accent: #ffffff;
  --success: #15803d;
  --contact-bg: #17141f;
  --shadow-sm: 0 1px 2px rgb(20 16 10 / 0.05);
  --shadow-md: 0 1px 2px rgb(20 16 10 / 0.04), 0 8px 24px -8px rgb(20 16 10 / 0.12);
  --shadow-lg: 0 24px 60px -20px rgb(20 16 10 / 0.3);
  --grid-line: rgb(18 17 16 / 0.06);

  /* Project visual tokens, tinted per card with --hue */
  --vz-bg-l: 96%;
  --vz-bg-s: 55%;
  --vz-surface: #ffffff;
  --vz-ink-l: 28%;
  --vz-line-l: 84%;
  --vz-soft-l: 88%;
  --vz-soft-s: 70%;
  --vz-accent-l: 54%;

  --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --container: 1180px;
  --gutter: 24px;
  --header-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0d;
    --bg-alt: #101013;
    --surface: #141417;
    --surface-2: #1b1b1f;
    --text: #f4f4f5;
    --text-2: #d4d4d8;
    --muted: #a1a1aa;
    --border: #26262b;
    --border-strong: #34343a;
    --accent: #9d8cff;
    --accent-hover: #b3a6ff;
    --accent-soft: #221d3d;
    --accent-text: #b8adff;
    --on-accent: #0b0b0d;
    --success: #4ade80;
    --contact-bg: #17141f;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-md: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -8px rgb(0 0 0 / 0.6);
    --shadow-lg: 0 24px 60px -20px rgb(0 0 0 / 0.8);
    --grid-line: rgb(255 255 255 / 0.05);
    --vz-bg-l: 13%;
    --vz-bg-s: 28%;
    --vz-surface: #1c1c21;
    --vz-ink-l: 82%;
    --vz-line-l: 30%;
    --vz-soft-l: 22%;
    --vz-soft-s: 34%;
    --vz-accent-l: 66%;
  }
}

:root[data-theme="dark"] {
  --bg: #0b0b0d;
  --bg-alt: #101013;
  --surface: #141417;
  --surface-2: #1b1b1f;
  --text: #f4f4f5;
  --text-2: #d4d4d8;
  --muted: #a1a1aa;
  --border: #26262b;
  --border-strong: #34343a;
  --accent: #9d8cff;
  --accent-hover: #b3a6ff;
  --accent-soft: #221d3d;
  --accent-text: #b8adff;
  --on-accent: #0b0b0d;
  --success: #4ade80;
  --contact-bg: #17141f;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow-md: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -8px rgb(0 0 0 / 0.6);
  --shadow-lg: 0 24px 60px -20px rgb(0 0 0 / 0.8);
  --grid-line: rgb(255 255 255 / 0.05);
  --vz-bg-l: 13%;
  --vz-bg-s: 28%;
  --vz-surface: #1c1c21;
  --vz-ink-l: 82%;
  --vz-line-l: 30%;
  --vz-soft-l: 22%;
  --vz-soft-s: 34%;
  --vz-accent-l: 66%;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -0.025em; font-weight: 600; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
html:has(.sheet[open]) { overflow: hidden; }
::selection { background: var(--accent); color: var(--on-accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.muted { color: var(--muted); }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.button:active { transform: translateY(1px); }
.button-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }

.button-primary { background: var(--text); color: var(--bg); }
.button-primary:hover { background: var(--accent); color: var(--on-accent); }

.button-ghost { border-color: var(--border-strong); background: var(--surface); color: var(--text); }
.button-ghost:hover { border-color: var(--text); }

.button-light { background: #fff; color: #17141f; }
.button-light:hover { background: #e9e5ff; }

.button-outline-light { border-color: rgb(255 255 255 / 0.22); color: #fff; background: transparent; }
.button-outline-light:hover { border-color: rgb(255 255 255 / 0.6); background: rgb(255 255 255 / 0.06); }

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.icon-button:hover { border-color: var(--border-strong); background: var(--surface-2); }
.icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-button:disabled { opacity: .35; cursor: default; }

.link-button {
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent-text);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav a:hover { color: var(--text); }
.nav a[aria-current="true"] { color: var(--text); background: var(--surface-2); }
.nav .nav-cta-mobile { display: none; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle { display: none; }

.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: none; }
  :root:not([data-theme="light"]) .icon-moon { display: block; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 40px; overflow: hidden; }

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 70% 30%, #000 30%, transparent 75%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  box-shadow: var(--shadow-sm);
}

.pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}
.pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--success);
  opacity: 0;
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0% { transform: scale(.6); opacity: .6; }
  100% { transform: scale(1.6); opacity: 0; }
}

.hero h1 {
  margin-top: 24px;
  font-size: clamp(40px, 5.6vw, 68px);
  letter-spacing: -0.04em;
  line-height: 1.02;
  max-width: 12.5em;
}
.accent-text { color: var(--accent); }

.hero-lede {
  margin-top: 24px;
  max-width: 34em;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Bento */
.hero-bento {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.bento-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.bento-now, .bento-stack { grid-column: span 2; }
.bento-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.now-list { display: grid; gap: 12px; margin-top: 14px; }
.now-list li { display: flex; align-items: flex-start; gap: 12px; }
.now-list strong { display: block; font-size: 15px; font-weight: 600; }
.now-list span:not(.now-dot) { font-size: 14px; color: var(--muted); }
.now-dot {
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.bento-number {
  font-size: 56px;
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
}
.bento-number span { color: var(--accent); }
.bento-caption { margin-top: 8px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.bento-strong { margin-top: 10px; font-size: 26px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.mini-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.mini-chips span {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
}

.domain-strip {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 64px;
  border-top: 1px solid var(--border);
}
.domain-strip li { padding: 20px 20px 0 0; display: grid; gap: 2px; }
.domain-strip li + li { padding-left: 20px; border-left: 1px solid var(--border); }
.domain-strip span { font-weight: 600; letter-spacing: -0.01em; }
.domain-strip small { font-size: 13px; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.eyebrow::before { content: ''; width: 18px; height: 1px; background: currentColor; }
.eyebrow-light { color: #c9bfff; }

.section h2 {
  margin-top: 14px;
  font-size: clamp(30px, 3.6vw, 44px);
  letter-spacing: -0.035em;
  max-width: 16em;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 40px;
}
.section-intro { max-width: 30em; color: var(--muted); font-size: 16px; }
.section-head .section-intro { flex: 0 1 380px; }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: all .2s var(--ease);
}
.filter-chip:hover { border-color: var(--border-strong); color: var(--text); }
.filter-chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.filter-chip .count {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.filter-chip[aria-pressed="true"] .count { background: rgb(127 127 127 / .25); color: inherit; }
.filter-status { min-height: 22px; margin: 14px 0 18px; font-size: 14px; color: var(--muted); }

/* ---------- Work cards ---------- */
.work-grid { display: grid; gap: 20px; }
.work-featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.work-more { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.more-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 56px 0 18px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.more-head h3 { font-size: 20px; }
.more-head span { font-size: 14px; color: var(--muted); }

.card {
  --vz-bg: hsl(var(--hue) var(--vz-bg-s) var(--vz-bg-l));
  --vz-ink: hsl(var(--hue) 18% var(--vz-ink-l));
  --vz-line: hsl(var(--hue) 22% var(--vz-line-l));
  --vz-soft: hsl(var(--hue) var(--vz-soft-s) var(--vz-soft-l));
  --vz-accent: hsl(var(--hue) 68% var(--vz-accent-l));
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.card:hover .card-visual svg { transform: scale(1.025); }

.card-visual {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--vz-bg);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.card-visual svg { width: 100%; height: 100%; transition: transform .6s var(--ease); }
.work-more .card-visual { aspect-ratio: 16 / 9; }

.card-body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 24px; }
.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 13px;
  color: var(--muted);
}
.card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
.card-title { margin-top: 10px; font-size: 22px; letter-spacing: -0.025em; }
.work-more .card-title { font-size: 19px; }
.card-tagline { margin-top: 8px; color: var(--text-2); font-size: 15px; line-height: 1.5; }
.work-featured .card-tagline { font-size: 16px; }

.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.tag {
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-2);
  white-space: nowrap;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--muted);
}
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--vz-accent); }
.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.card-cta .arrow { transition: transform .25s var(--ease); }
.card:hover .card-cta .arrow { transform: translateX(3px); }

/* Whole card is clickable through the title button */
.card-link {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  text-align: left;
  color: inherit;
}
.card-link::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card-link:focus-visible { outline: none; }
.card:has(.card-link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }

.empty-state { padding: 40px 0; text-align: center; color: var(--muted); }

.cta-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 24px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}
.cta-tile h3 { font-size: 22px; letter-spacing: -0.025em; max-width: 11em; }
.cta-tile p { margin-top: 10px; color: var(--muted); font-size: 15px; }
.cta-tile-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* SVG visual primitives */
.vz-bg { fill: var(--vz-bg); }
.vz-surface { fill: var(--vz-surface); }
.vz-surface-s { fill: var(--vz-surface); stroke: var(--vz-line); stroke-width: 1; }
.vz-line { fill: none; stroke: var(--vz-line); stroke-width: 1.5; }
.vz-line-thin { fill: none; stroke: var(--vz-line); stroke-width: 1; }
.vz-ink { fill: var(--vz-ink); }
.vz-ink-soft { fill: var(--vz-ink); opacity: .18; }
.vz-soft { fill: var(--vz-soft); }
.vz-accent { fill: var(--vz-accent); }
.vz-accent-s { fill: none; stroke: var(--vz-accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.vz-accent-dash { fill: none; stroke: var(--vz-accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 8; }
.vz-ink-s { fill: none; stroke: var(--vz-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .5; }
.vz-white-s { fill: none; stroke: var(--vz-surface); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.vz-text { fill: var(--vz-ink); font-family: var(--font-sans); font-size: 12px; font-weight: 500; }
.vz-text-accent { fill: var(--vz-accent); font-family: var(--font-sans); font-size: 12px; font-weight: 600; }
.vz-text-on { fill: var(--vz-surface); font-family: var(--font-sans); font-size: 11px; font-weight: 600; }
.vz-shadow { filter: drop-shadow(0 10px 18px rgb(0 0 0 / .12)); }

/* ---------- Experience ---------- */
.experience-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
  gap: 72px;
  align-items: start;
}
.experience-aside { position: sticky; top: calc(var(--header-h) + 32px); }
.experience-aside .section-intro { margin-top: 18px; }
.edu-card {
  margin-top: 32px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  display: grid;
  gap: 4px;
}
.edu-card .bento-label { margin-bottom: 6px; }
.edu-card .muted { font-size: 14px; }

.timeline { position: relative; display: grid; gap: 14px; }
.job {
  position: relative;
  padding: 24px 24px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.job-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
.job-current { color: var(--success); }
.job h3 { margin-top: 12px; font-size: 20px; }
.job-org { margin-top: 4px; font-size: 15px; font-weight: 500; color: var(--text-2); }
.job-org span { font-weight: 400; color: var(--muted); }
.job ul { margin-top: 14px; display: grid; gap: 8px; }
.job li {
  position: relative;
  padding-left: 18px;
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.55;
}
.job li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: .7em;
  width: 7px;
  height: 2px;
  border-radius: 1px;
  background: var(--border-strong);
}
.job-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.job-foot .card-tags { margin-top: 0; }

.earlier { margin-top: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.earlier summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 24px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.earlier summary::-webkit-details-marker { display: none; }
.earlier summary::after {
  content: '+';
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--muted);
  transition: transform .25s var(--ease);
}
.earlier[open] summary::after { transform: rotate(45deg); }
.earlier summary .muted { font-weight: 400; font-size: 14px; }
.timeline-earlier { padding: 0 14px 6px; }
.timeline-earlier .job { background: var(--surface-2); }
.earlier-note { padding: 8px 24px 20px; font-size: 14px; }

/* ---------- Stack ---------- */
.stack-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stack-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.stack-card h3 { font-size: 17px; }
.stack-items { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.stack-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 14px;
  color: var(--text-2);
}
button.stack-item { transition: all .2s var(--ease); }
button.stack-item::after { content: '↗'; font-size: 12px; color: var(--accent-text); }
button.stack-item:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }

/* ---------- About ---------- */
.about-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: start; }
.about-copy { display: grid; gap: 16px; margin-top: 24px; font-size: 17px; color: var(--text-2); max-width: 34em; }
.principles { display: grid; gap: 12px; }
.principles li {
  display: flex;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.principle-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}
.principles h3 { font-size: 17px; }
.principles p { margin-top: 6px; font-size: 15px; color: var(--muted); }

/* ---------- Contact ---------- */
.contact-card {
  position: relative;
  overflow: hidden;
  padding: 72px 56px;
  border-radius: 28px;
  background: var(--contact-bg);
  color: #fff;
  isolation: isolate;
}
.contact-glow {
  position: absolute;
  z-index: -1;
  inset: -40% -10% auto auto;
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, rgb(124 99 255 / .5) 0%, rgb(124 99 255 / .18) 40%, transparent 70%);
}
.contact-card h2 { color: #fff; max-width: 14em; font-size: clamp(32px, 4.4vw, 56px); }
.contact-lede { margin-top: 18px; max-width: 34em; font-size: 17px; color: rgb(255 255 255 / .72); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* ---------- Footer ---------- */
.site-footer { padding: 32px 0 40px; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  font-size: 14px;
  color: var(--muted);
}
.footer-inner a:hover { color: var(--text); }

/* ---------- Case study sheet ---------- */
.sheet {
  --vz-bg: hsl(var(--hue, 252) var(--vz-bg-s) var(--vz-bg-l));
  --vz-ink: hsl(var(--hue, 252) 18% var(--vz-ink-l));
  --vz-line: hsl(var(--hue, 252) 22% var(--vz-line-l));
  --vz-soft: hsl(var(--hue, 252) var(--vz-soft-s) var(--vz-soft-l));
  --vz-accent: hsl(var(--hue, 252) 68% var(--vz-accent-l));
  margin: 0 0 0 auto;
  padding: 0;
  width: min(760px, 100%);
  max-width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  border: 0;
  border-left: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}
.sheet::backdrop { background: rgb(10 8 6 / .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sheet[open] { animation: sheet-in .38s var(--ease); }
.sheet[open]::backdrop { animation: fade-in .3s var(--ease); }
@keyframes sheet-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.sheet-inner { height: 100%; overflow-y: auto; overscroll-behavior: contain; }
.sheet-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.sheet-crumb { font-family: var(--font-mono); font-size: 12px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.sheet-bar-actions { display: flex; gap: 8px; }

.sheet-body { padding: 28px 40px 56px; }
.sheet-visual {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background: var(--vz-bg);
  border: 1px solid var(--border);
  overflow: hidden;
}
.sheet-visual svg { width: 100%; height: 100%; }
.sheet-body h2 { margin-top: 28px; font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.035em; }
.sheet-tagline { margin-top: 10px; font-size: 19px; color: var(--text-2); line-height: 1.45; }
.sheet-summary { margin-top: 16px; color: var(--muted); font-size: 16px; }

.sheet-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
  overflow: hidden;
}
.sheet-facts div { padding: 14px 16px; background: var(--surface); }
.sheet-facts dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sheet-facts dd { margin: 4px 0 0; font-size: 15px; font-weight: 500; }

.sheet-section { margin-top: 36px; }
.sheet-section h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.sheet-section > p { margin-top: 12px; font-size: 16px; color: var(--text-2); }
.sheet-list { display: grid; gap: 10px; margin-top: 14px; }
.sheet-list li {
  position: relative;
  padding-left: 30px;
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.55;
}
.sheet-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .2em;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: var(--vz-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.sheet-note {
  margin-top: 32px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 14px;
  color: var(--muted);
}
.sheet-link { margin-top: 24px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 200;
  transform: translateX(-50%);
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toast-in .3s var(--ease);
}
@keyframes toast-in { from { transform: translate(-50%, 12px); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-bento { max-width: 640px; }
  .work-more { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .experience-layout, .about-layout { grid-template-columns: 1fr; gap: 40px; }
  .experience-aside { position: static; }
  .stack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .menu-toggle { display: inline-grid; }
  .header-cta { display: none; }
  .nav {
    position: absolute;
    top: calc(var(--header-h) - 4px);
    left: 12px;
    right: 12px;
    display: grid;
    gap: 2px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav a { padding: 12px 14px; font-size: 16px; color: var(--text); border-radius: 10px; }
  .nav .nav-cta-mobile { display: block; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .section-head .section-intro { flex: none; }
  .work-featured { grid-template-columns: 1fr; }
  .domain-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .domain-strip li:nth-child(3) { padding-left: 0; border-left: 0; }
  .contact-card { padding: 48px 32px; }
}

@media (max-width: 600px) {
  :root { --gutter: 16px; --header-h: 60px; }
  .brand-name { display: none; }
  .hero { padding-top: 40px; }
  .hero-lede { font-size: 17px; }
  .hero-actions .button { flex: 1 1 auto; }
  .bento-card { padding: 16px; }
  .bento-number { font-size: 44px; }
  .bento-strong { font-size: 22px; }
  .section { padding: 64px 0; }
  .work-more { grid-template-columns: 1fr; }
  .stack-grid { grid-template-columns: 1fr; }
  .card-body { padding: 18px 18px 20px; }
  .job { padding: 20px 18px; }
  .earlier summary { padding: 16px 18px; }
  .timeline-earlier { padding: 0 8px 4px; }
  .earlier-note { padding: 8px 18px 18px; }
  .principles li { padding: 18px; gap: 14px; }
  .contact-card { padding: 40px 22px; border-radius: 22px; }
  .contact-actions .button { width: 100%; }
  .sheet { border-left: 0; }
  .sheet-body { padding: 20px 18px 48px; }
  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: calc(var(--gutter) * -1);
    padding: 2px var(--gutter) 6px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter-chip { flex: none; }
  .filter-status { margin-top: 8px; }
  .sheet-tagline { font-size: 17px; }
  .domain-strip { margin-top: 44px; }
  .domain-strip li { padding: 16px 12px 0 0; }
  .domain-strip li:nth-child(even) { padding-left: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Print: a clean one-page summary ---------- */
@media print {
  :root { --bg: #fff; --surface: #fff; --text: #000; --muted: #444; --border: #ccc; }
  body { font-size: 11pt; }
  .site-header, .hero-bento, .hero-grid-bg, .hero-actions, .filters, .filter-status, .card-visual,
  .card-foot, .contact-actions, .contact-glow, .site-footer, .sheet, .toast, .skip-link, .stack-grid button::after { display: none !important; }
  .section, .hero { padding: 16px 0; }
  .section-alt { background: none; border: 0; }
  .work-featured, .work-more { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card, .job, .stack-card, .principles li { break-inside: avoid; box-shadow: none; }
  .js .reveal { opacity: 1; transform: none; }
  .contact-card { background: none; color: #000; padding: 0; }
  .contact-card h2, .contact-lede { color: #000; }
}
