/* Antoine Joly — refined.
   Same structure as "final", rebuilt on a disciplined surface + elevation system.
   Light by default; dark is a warm-neutral graphite. One accent: royal blue. */

:root {
  /* Surfaces: page < surface < raised; sunken for wells (media, chips) */
  --bg: #f6f7f9;
  --surface: #ffffff;
  --raised: #ffffff;
  --sunken: #eff1f4;
  --ink: #0b0d12;
  --ink-2: #434956;
  --ink-3: #747b89;
  --hair: rgba(11, 13, 18, 0.075);
  --hair-2: rgba(11, 13, 18, 0.12);
  --accent: #1128eb;
  --accent-fill: #1128eb;
  --accent-hover: #0d20c4;
  --accent-edge: #0d20c4;
  --accent-ink: #ffffff;
  --accent-soft: rgba(17, 40, 235, 0.08);
  --accent-tint: rgba(17, 40, 235, 0.12);

  /* Elevation: crisp 1px ring + tight contact + soft ambient */
  --ring: 0 0 0 1px rgba(11, 13, 18, 0.07);
  --hl: inset 0 0 0 0 transparent;
  --shadow-1: var(--ring), 0 1px 2px rgba(11, 13, 18, 0.04);
  --shadow-2: var(--ring), 0 1px 2px rgba(11, 13, 18, 0.04), 0 6px 16px -6px rgba(11, 13, 18, 0.07);
  --shadow-3: var(--ring), 0 2px 4px rgba(11, 13, 18, 0.04), 0 18px 40px -16px rgba(11, 13, 18, 0.14);
  --icon-shadow: 0 0 0 1px rgba(11, 13, 18, 0.08), 0 1px 1px rgba(11, 13, 18, 0.06), 0 4px 10px -4px rgba(11, 13, 18, 0.18);

  --nav-bg: rgba(246, 247, 249, 0.78);
  --scrim: rgba(246, 247, 249, 0.96);
  --wash: rgba(17, 40, 235, 0.05);
  --skeleton: linear-gradient(90deg, rgba(11, 13, 18, 0.045), rgba(11, 13, 18, 0.08), rgba(11, 13, 18, 0.045));

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Radius by role: controls / tiles / cards */
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: max(24px, env(safe-area-inset-left, 0px));
  --gutter-r: max(24px, env(safe-area-inset-right, 0px));
  --maxw: 1180px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0d0f13;
  --surface: #14171c;
  --raised: #1a1d23;
  --sunken: #101216;
  --ink: #eceef2;
  --ink-2: #a8aebb;
  --ink-3: #7a808e;
  --hair: rgba(255, 255, 255, 0.07);
  --hair-2: rgba(255, 255, 255, 0.12);
  --accent: #5a6bff;
  --accent-fill: #1128eb;
  --accent-hover: #2b40f5;
  --accent-edge: #2b40f5;
  --accent-ink: #ffffff;
  --accent-soft: rgba(90, 107, 255, 0.12);
  --accent-tint: rgba(90, 107, 255, 0.18);

  --ring: 0 0 0 1px rgba(255, 255, 255, 0.065);
  --hl: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  --shadow-1: var(--ring), var(--hl), 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-2: var(--ring), var(--hl), 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 20px -8px rgba(0, 0, 0, 0.5);
  --shadow-3: var(--ring), var(--hl), 0 2px 4px rgba(0, 0, 0, 0.3), 0 24px 48px -20px rgba(0, 0, 0, 0.7);
  --icon-shadow: 0 0 0 1px rgba(255, 255, 255, 0.09), 0 1px 1px rgba(0, 0, 0, 0.4), 0 6px 14px -6px rgba(0, 0, 0, 0.7);

  --nav-bg: rgba(13, 15, 19, 0.78);
  --scrim: rgba(9, 10, 13, 0.96);
  --wash: rgba(90, 107, 255, 0.06);
  --skeleton: linear-gradient(90deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035));
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16.5px/1.65 var(--sans); letter-spacing: -0.008em;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip; text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: var(--r-sm); background: var(--accent); color: var(--accent-ink); transition: top 0.2s; }
.skip:focus { top: 12px; }
.accent-text { color: var(--accent); }
.ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Atmosphere: one barely-there tonal wash behind the hero, no blur layers */
.ambient {
  position: absolute; inset: 0 0 auto 0; height: 960px; pointer-events: none; z-index: -1;
  background: radial-gradient(60% 55% at 72% 34%, var(--wash), transparent 70%);
}

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: var(--r-sm);
  font-size: 15px; font-weight: 500; letter-spacing: -0.012em; white-space: nowrap;
  transition: background-color 0.18s, box-shadow 0.18s, color 0.18s, transform 0.18s var(--ease);
}
.btn-primary {
  color: var(--accent-ink);
  background: var(--accent-fill);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary .ico { transition: transform 0.25s var(--ease); }
.btn-primary:hover .ico { transform: translate(1.5px, -1.5px); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--hair-2); }
.btn-ghost:hover { background: var(--sunken); }
:root[data-theme="dark"] .btn-ghost:hover { background: #20242b; }
.btn-sm { height: 34px; padding: 0 13px; font-size: 14px; border-radius: 9px; }
.btn-lg { height: 50px; padding: 0 20px; font-size: 15.5px; border-radius: 12px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) var(--gutter-r) 14px var(--gutter);
  transition: background-color 0.25s, box-shadow 0.25s, padding 0.25s var(--ease);
}
.nav.scrolled {
  background: var(--nav-bg); box-shadow: 0 1px 0 var(--hair);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  padding-top: calc(env(safe-area-inset-top, 0px) + 9px); padding-bottom: 9px;
}
.nav-inner { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; gap: 20px; }
.nav-mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.02em; font-size: 15px; }
.nav-mark { color: var(--accent); }
.nav-wordmark { display: block; height: 15px; width: auto; }
.nav-links { margin-left: auto; display: flex; gap: 2px; }
.nav-links a {
  position: relative; padding: 6px 11px; border-radius: 8px; font-size: 14px; color: var(--ink-3);
  transition: color 0.18s, background-color 0.18s;
}
.nav-links a:hover { color: var(--ink); background: var(--hair); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: 1px; height: 1.5px; border-radius: 2px; background: var(--accent); }
.nav-end { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--raised); color: var(--ink); box-shadow: var(--shadow-1);
  transition: background-color 0.18s;
}
.icon-btn:hover { background: var(--sunken); }
:root[data-theme="dark"] .icon-btn:hover { background: #20242b; }
.theme-toggle svg { width: 18px; height: 18px; overflow: visible; }
.theme-toggle .sun-core { r: 5px; transition: r 0.5s var(--ease); }
.theme-toggle .moon-cut { transition: cx 0.5s var(--ease), cy 0.5s var(--ease); }
.theme-toggle .sun-rays { transform-origin: 12px 12px; transition: transform 0.5s var(--ease), opacity 0.3s; }
:root[data-theme="dark"] .theme-toggle .sun-core { r: 8px; }
:root[data-theme="dark"] .theme-toggle .moon-cut { cx: 17px; cy: 7px; }
:root[data-theme="dark"] .theme-toggle .sun-rays { transform: rotate(-90deg) scale(0.4); opacity: 0; }

.menu-btn { display: none; }
.menu-btn span { display: block; width: 16px; height: 1.5px; border-radius: 2px; background: currentColor; transition: transform 0.3s var(--ease); }
.menu-btn span + span { margin-top: 4.5px; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3px) rotate(-45deg); }
.menu-btn > div { display: grid; }

/* Mobile menu */
.mmenu {
  position: fixed; inset: 0; z-index: 45; background: var(--bg);
  padding: calc(env(safe-area-inset-top, 0px) + 84px) var(--gutter-r) calc(env(safe-area-inset-bottom, 0px) + 28px) var(--gutter);
  display: flex; flex-direction: column; gap: 28px; overflow-y: auto;
  opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.mmenu.open { opacity: 1; visibility: visible; transition: opacity 0.25s ease; }
.mmenu-links { display: grid; }
.mmenu-links a {
  display: flex; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--hair);
  font-size: 28px; font-weight: 560; letter-spacing: -0.03em; line-height: 1.2;
  transform: translateY(8px); opacity: 0; transition: transform 0.45s var(--ease), opacity 0.45s var(--ease);
}
.mmenu-links a small { font: 500 12px var(--mono); color: var(--ink-3); letter-spacing: 0; min-width: 22px; }
.mmenu.open .mmenu-links a { transform: none; opacity: 1; }
.mmenu-foot { margin-top: auto; display: grid; gap: 10px; }
.mmenu-foot p { color: var(--ink-3); font-size: 14px; }
html.menu-open { overflow: hidden; }

/* View-transition sweep: the new theme grows as a circle from the toggle */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 2; }
html.theme-fade, html.theme-fade * { transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease !important; }

/* ---------- Layout ---------- */
main { position: relative; }
.hero, .sections, .footer { padding-left: var(--gutter); padding-right: var(--gutter-r); }
.block, .footer > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); align-items: center; gap: 40px;
  max-width: calc(var(--maxw) + 48px); margin: 0 auto;
  padding-top: calc(env(safe-area-inset-top, 0px) + 120px); padding-bottom: 56px; min-height: min(820px, 100svh);
}
.hero-copy { min-width: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--ink-2); letter-spacing: -0.01em; }
.eyebrow::before { content: ""; width: 18px; height: 1.5px; border-radius: 2px; background: var(--accent); }
.hero-name {
  margin-top: 22px; font-size: clamp(50px, 6.4vw, 86px); line-height: 0.96; font-weight: 600; letter-spacing: -0.048em;
  text-wrap: balance;
}
.hero-tag { margin-top: 26px; font-size: clamp(21px, 2vw, 26px); line-height: 1.22; font-weight: 500; letter-spacing: -0.028em; max-width: 21ch; text-wrap: balance; }
.hero-head { margin-top: 14px; color: var(--ink-3); max-width: 40ch; font-size: 16.5px; line-height: 1.6; }
.hero-actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-loc { margin-top: 26px; display: inline-flex; align-items: center; gap: 7px; color: var(--ink-3); font-size: 13.5px; }

/* ---------- Highlights ---------- */

/* ---------- Blocks ---------- */
.block { padding-top: clamp(96px, 11vw, 144px); }
.block-head { display: grid; gap: 12px; margin-bottom: clamp(36px, 4vw, 52px); max-width: 680px; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font: 500 12px/1 var(--mono); color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; }
.kicker-idx { color: var(--accent); }
.kicker-idx:empty { display: none; }
.block-title { font-size: clamp(34px, 4vw, 48px); line-height: 1.04; font-weight: 600; letter-spacing: -0.042em; text-wrap: balance; }
.block-sub { color: var(--ink-3); font-size: 17px; }

.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1); position: relative; }

/* ---------- Projects ---------- */
.projects { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.proj {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-2);
}
.proj:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.proj:nth-child(even) .proj-media { order: 2; }
.proj-media {
  position: relative; margin: 8px; border-radius: calc(var(--r-lg) - 8px); overflow: hidden;
  background: var(--sunken); min-height: 400px; min-width: 0; isolation: isolate;
}
.proj-media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--hair); pointer-events: none; z-index: 3; }
.proj-media .slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.8s ease; }
.proj-media .slide.is-active { opacity: 1; }
.proj-media img.slide { cursor: zoom-in; }
.media-tag {
  position: absolute; top: 12px; left: 12px; z-index: 2; padding: 5px 9px; border-radius: 7px;
  background: rgba(11, 13, 18, 0.72); color: #fff;
  font: 500 11px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
}
.proj-progress { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; gap: 4px; z-index: 2; }
.proj-progress button { flex: 1; height: 2px; padding: 0; border-radius: 2px; background: rgba(255, 255, 255, 0.38); overflow: hidden; position: relative; }
.proj-progress button::before { content: ""; position: absolute; inset: -10px 0; }
.proj-progress button::after { content: ""; position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left; }
.proj-progress button.done::after { transform: scaleX(1); }
.proj-progress button.active::after { animation: fill var(--dur, 4s) linear forwards; }
@keyframes fill { to { transform: scaleX(1); } }

.proj-body { padding: clamp(26px, 3vw, 40px); display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.proj-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.proj-icon { width: 44px; height: 44px; border-radius: 11px; object-fit: cover; box-shadow: var(--icon-shadow); flex: none; }
.proj-num { font: 500 12px var(--mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.proj-title { font-size: clamp(22px, 2.1vw, 27px); line-height: 1.15; font-weight: 600; letter-spacing: -0.032em; text-wrap: balance; margin-top: 4px; }
.proj-desc { color: var(--ink-2); font-size: 15.5px; line-height: 1.65; display: grid; gap: 12px; position: relative; max-height: 9.9em; overflow: hidden; transition: max-height 0.6s var(--ease); }
.proj-desc::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3.3em; background: linear-gradient(rgba(255, 255, 255, 0), var(--surface)); transition: opacity 0.3s; }
:root[data-theme="dark"] .proj-desc::after { background: linear-gradient(rgba(20, 23, 28, 0), var(--surface)); }
.proj-desc.full, .proj.is-open .proj-desc { max-height: 80em; }
.proj-desc.full::after, .proj.is-open .proj-desc::after { opacity: 0; }
.proj-more { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink); padding: 2px 0; }
.proj-more:hover { color: var(--accent); }
.proj-link { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--accent); padding: 2px 0; border-bottom: 1px solid transparent; transition: border-color 0.2s var(--ease); }
.proj-link:hover { border-bottom-color: currentColor; }
.proj-more svg { width: 14px; height: 14px; transition: transform 0.3s var(--ease); }
.proj.is-open .proj-more svg { transform: rotate(180deg); }
.chips { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--hair); }
.chip { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.chip img { width: 20px; height: 20px; border-radius: 6px; object-fit: cover; box-shadow: 0 0 0 1px var(--hair); }

/* ---------- Experience timeline (always open) ---------- */
.timeline { position: relative; padding-left: 40px; }
.tl-line { position: absolute; left: 12px; top: 34px; bottom: 34px; width: 1px; background: var(--hair-2); }
.tl-fill { position: absolute; inset: 0; background: var(--accent); transform-origin: top; transform: scaleY(0); will-change: transform; }
.tl-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.tl-item, .tl-card { min-width: 0; }
.tl-item { position: relative; }
.tl-node {
  position: absolute; left: -32px; top: 34px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); box-shadow: 0 0 0 1px var(--hair-2), 0 0 0 4px var(--bg);
  transition: background-color 0.35s, box-shadow 0.35s;
}
.tl-item.lit .tl-node { background: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-soft); }
.tl-card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1); position: relative; }
.tl-head { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 26px 28px 0; }
.tl-logo { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; box-shadow: var(--icon-shadow); background: #fff; }
.tl-role { font-size: clamp(18px, 1.6vw, 20px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.25; }
.tl-co { color: var(--ink-2); font-size: 15px; margin-top: 3px; }
.tl-loc { color: var(--ink-3); font-size: 13.5px; margin-top: 3px; display: inline-flex; gap: 6px; align-items: center; }
.tl-dates { font: 500 12px/1 var(--mono); color: var(--ink-3); padding: 8px 0 0; white-space: nowrap; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.tl-item:first-child .tl-dates { color: var(--accent); }
.tl-desc { padding: 18px 28px 0 92px; color: var(--ink-2); display: grid; gap: 12px; font-size: 15.5px; line-height: 1.65; max-width: calc(70ch + 120px); }
.tl-strip {
  display: flex; gap: 10px; overflow-x: auto; padding: 22px 28px 28px 92px; scroll-snap-type: x proximity;
  scrollbar-width: thin; scrollbar-color: var(--hair-2) transparent; scroll-padding-left: 92px;
}
.tl-strip button {
  flex: none; position: relative; width: 224px; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden;
  scroll-snap-align: start; padding: 0; background: var(--sunken); cursor: zoom-in;
}
.tl-strip button::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--hair); pointer-events: none; }
.tl-strip img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.tl-strip button:hover img { transform: scale(1.04); }
.tl-nostrip { height: 28px; }

/* ---------- Toolbox ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; }
.tool {
  padding: 24px 12px 18px; display: grid; justify-items: center; gap: 12px; text-align: center;
  background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-1);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.tool:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.tool img { width: 46px; height: 46px; border-radius: 11px; object-fit: cover; background: #fff; box-shadow: var(--icon-shadow); }
.tool span { font-size: 13.5px; color: var(--ink-2); font-weight: 500; letter-spacing: -0.01em; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.about-lead { font-size: clamp(22px, 2.2vw, 29px); line-height: 1.3; font-weight: 500; letter-spacing: -0.03em; text-wrap: pretty; position: sticky; top: 112px; }
.about-body { display: grid; gap: 18px; color: var(--ink-2); font-size: 16.5px; max-width: 62ch; }
.about-cta { color: var(--ink); font-weight: 500; }
.about-cta a { color: var(--accent); background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; transition: background-size 0.3s var(--ease); }
.about-cta a:hover { background-size: 0 1px; }

/* ---------- Education ---------- */
.edu { display: grid; gap: 10px; }
.edu-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 20px 24px; }
.edu-logo { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; box-shadow: var(--icon-shadow); background: #fff; }
.edu-main h3 { font-size: 16.5px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.35; }
.edu-main p { color: var(--ink-3); font-size: 14.5px; margin-top: 2px; }
.edu-dates { font: 500 12px var(--mono); color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Skills ---------- */
.skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
.skills li { display: grid; gap: 3px; padding: 17px 0; border-top: 1px solid var(--hair); }
.skills li:nth-last-child(-n + 2) { border-bottom: 1px solid var(--hair); }
.skill-name { font-weight: 500; font-size: 16px; letter-spacing: -0.018em; transition: color 0.18s; }
.skill-ctx { color: var(--ink-3); font-size: 14px; }
.skills li:hover .skill-name { color: var(--accent); }

/* ---------- Languages ---------- */
.langs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lang { display: flex; align-items: center; gap: 18px; padding: 22px 24px; }
.lang-flag { width: 48px; flex: none; display: grid; place-items: center; }
.lang-flag img { display: block; width: 48px; height: 32px; object-fit: cover; border-radius: 5px; box-shadow: 0 0 0 1px var(--hair); }
.lang b { display: block; font-size: 16.5px; font-weight: 600; letter-spacing: -0.02em; }
.lang div span { color: var(--ink-3); font-size: 14.5px; }

/* ---------- Footer / CTA ---------- */
.footer { padding-top: clamp(104px, 12vw, 160px); padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 36px); }
.cta { padding: clamp(32px, 6vw, 72px); display: grid; gap: 20px; justify-items: start; box-shadow: var(--shadow-2); overflow: hidden; }
.cta::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent) 70%, transparent); opacity: 0.55;
}
.cta-title { font-size: clamp(28px, 3.6vw, 46px); line-height: 1.08; font-weight: 600; letter-spacing: -0.042em; max-width: 22ch; text-wrap: balance; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 28px; color: var(--ink-3); font-size: 13.5px; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 90; background: var(--scrim);
  display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; grid-template-rows: 1fr auto; align-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 60px) var(--gutter-r) calc(env(safe-area-inset-bottom, 0px) + 20px) var(--gutter);
  animation: fadeIn 0.25s ease;
}
.lightbox[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } }
.lb-stage { margin: 0; grid-column: 2; height: 100%; min-height: 0; display: grid; place-items: center; }
.lb-img { max-width: 100%; max-height: calc(100svh - 200px); object-fit: contain; border-radius: 12px; box-shadow: var(--shadow-3); animation: lbIn 0.4s var(--ease); }
@keyframes lbIn { from { opacity: 0; transform: scale(0.985); } }
.lb-close, .lb-nav {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--raised); color: var(--ink); box-shadow: var(--shadow-1); transition: background-color 0.18s;
}
.lb-close:hover, .lb-nav:hover { background: var(--sunken); }
.lb-close svg, .lb-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lb-close { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 14px); right: var(--gutter-r); }
.lb-prev { grid-column: 1; justify-self: start; }
.lb-next { grid-column: 3; justify-self: end; }
.lb-thumbs { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: center; overflow-x: auto; padding: 16px 4px 4px; scrollbar-width: none; }
.lb-thumbs button { flex: none; width: 64px; height: 44px; border-radius: 8px; overflow: hidden; padding: 0; opacity: 0.45; box-shadow: 0 0 0 1px var(--hair-2); transition: opacity 0.2s, box-shadow 0.2s; }
.lb-thumbs button.on { opacity: 1; box-shadow: 0 0 0 2px var(--accent); }
.lb-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.lb-count { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 27px); left: var(--gutter); font: 500 12px var(--mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); z-index: 95;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  padding: 10px 15px; border-radius: 10px; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 12px 28px -10px rgba(0, 0, 0, 0.4); transition: opacity 0.25s, transform 0.35s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Skeletons ---------- */
.sk { background: var(--skeleton); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; border-radius: 10px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.sk-proj { display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; padding: 8px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-2); }
.sk-media { aspect-ratio: 16 / 11; border-radius: 12px; }
.sk-lines { display: grid; gap: 12px; align-content: start; padding: 24px 16px; }
.sk-lines.pad { padding: 26px; }
.sk-l { height: 13px; }
.w40 { width: 40%; } .w60 { width: 60%; } .w75 { width: 75%; } .w90 { width: 90%; }
.sk-tool { height: 116px; border-radius: var(--r); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.6s var(--ease) var(--d, 0ms), transform 0.6s var(--ease) var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
/* Hero entrance: pure CSS, so it never waits on scripts */
.rise { animation: rise 0.7s var(--ease) both; }
.hero-copy .rise:nth-child(2) { animation-delay: 60ms; } .hero-copy .rise:nth-child(3) { animation-delay: 120ms; }
.hero-copy .rise:nth-child(4) { animation-delay: 180ms; } .hero-copy .rise:nth-child(5) { animation-delay: 240ms; }
.hero-copy .rise:nth-child(6) { animation-delay: 300ms; } .hero-visual.rise { animation-delay: 140ms; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
/* Lenis smooth scroll */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav-end { margin-left: auto; }
  .menu-btn { display: grid; }
}
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; padding-top: calc(env(safe-area-inset-top, 0px) + 92px); min-height: 0; gap: 12px; }
  .hero-visual { order: -1; }
  .proj, .proj:nth-child(even) { grid-template-columns: 1fr; }
  .proj:nth-child(even) .proj-media { order: 0; }
  .proj-media { min-height: 0; aspect-ratio: 16 / 10; margin: 8px 8px 0; }
  .sk-proj { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .about-lead { position: static; }
}
@media (max-width: 640px) {
  :root { --gutter: max(16px, env(safe-area-inset-left, 0px)); --gutter-r: max(16px, env(safe-area-inset-right, 0px)); }
  body { font-size: 16px; }
  .nav-cta { display: none; }
  .hero-name { font-size: clamp(44px, 13vw, 56px); }
  .hero-actions .btn { flex: 1 1 auto; }
  .block { padding-top: 84px; }
  .block-sub { font-size: 16px; }
  .proj-body { padding: 22px 20px 24px; }
  .timeline { padding-left: 24px; }
  .tl-line { left: 4px; top: 28px; bottom: 28px; }
  .tl-node { left: -24px; top: 28px; }
  .tl-head { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 20px 20px 0; }
  .tl-logo { width: 40px; height: 40px; border-radius: 10px; }
  .tl-dates { grid-column: 1 / -1; justify-self: start; padding: 2px 0 0; }
  .tl-desc { padding: 14px 20px 0; font-size: 15px; }
  .tl-strip { padding: 16px 20px 20px; scroll-padding-left: 20px; }
  .tl-strip button { width: 196px; }
  .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .tool { padding: 18px 6px 14px; }
  .tool img { width: 40px; height: 40px; border-radius: 10px; }
  .tool span { font-size: 12.5px; }
  .edu-item { grid-template-columns: 42px minmax(0, 1fr); padding: 18px; gap: 14px; }
  .edu-logo { width: 42px; height: 42px; border-radius: 10px; }
  .edu-dates { grid-column: 2; }
  .skills { grid-template-columns: 1fr; }
  .skills li:nth-last-child(2) { border-bottom: 0; }
  .langs { grid-template-columns: 1fr; }
  .cta-actions .btn { width: 100%; }
  .lightbox { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto auto; }
  .lb-stage { grid-column: 1 / -1; grid-row: 1; }
  .lb-prev { grid-row: 2; grid-column: 1; margin-top: 12px; }
  .lb-next { grid-row: 2; grid-column: 2; margin-top: 12px; }
  .lb-thumbs { grid-row: 3; }
}

/* ---------- Rate page (/univair): one Projects card, layout only, existing tokens ---------- */
.hero-page { grid-template-columns: minmax(0, 1fr); min-height: 0; align-items: start; padding-bottom: clamp(36px, 5vw, 56px); }
.hero-page .hero-name { line-height: 0; }
.client-logo { display: block; height: clamp(52px, 7.4vw, 88px); width: auto; max-width: 100%; }
.proj-solo, .proj-solo:nth-child(even) { grid-template-columns: minmax(0, 1fr); }
.client-icon { display: grid; place-items: center; background: var(--ink); color: var(--bg); }
.client-icon svg { width: 66%; height: auto; }

.quote { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.quote .proj-body { padding: 0; gap: 0; }
.quote-sec {
  display: grid; grid-template-columns: minmax(0, 250px) minmax(0, 1fr); gap: 20px clamp(28px, 4vw, 56px);
  padding: clamp(28px, 4vw, 48px); border-top: 1px solid var(--hair); scroll-margin-top: 96px;
}
.quote-sec:first-child { border-top: 0; }
.quote-head { display: grid; gap: 12px; align-content: start; justify-items: start; }
.quote-title { font-size: clamp(22px, 2.1vw, 27px); line-height: 1.15; font-weight: 600; letter-spacing: -0.032em; text-wrap: balance; }
.quote-main { min-width: 0; display: grid; gap: 18px; align-content: start; }
.quote-note { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.6; }
.quote .skills li { padding: 13px 0; }

.rate-convert { display: flex; flex-wrap: wrap; align-items: center; gap: 14px clamp(18px, 3vw, 36px); }
.rate-amt { display: flex; align-items: center; gap: 12px; margin: 0; }
.rate-amt img { width: 36px; height: 24px; object-fit: cover; border-radius: 5px; box-shadow: 0 0 0 1px var(--hair); flex: none; }
.rate-amt b { font-size: clamp(38px, 4.4vw, 56px); line-height: 1; font-weight: 600; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rate-amt span { font: 500 13px var(--mono); color: var(--ink-3); white-space: nowrap; }
.rate-arrow { display: grid; color: var(--accent); }
.rate-arrow svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.tool-rows { list-style: none; margin: 0; padding: 0; display: grid; }
.tool-row {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto minmax(118px, auto); align-items: center; gap: 4px 16px;
  padding: 12px 0; border-top: 1px solid var(--hair);
}
.tool-row:last-child { border-bottom: 1px solid var(--hair); }
.tool-icon { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; box-shadow: var(--icon-shadow); }
.tool-meta { display: grid; gap: 2px; min-width: 0; }
.tool-meta b { font-size: 15.5px; font-weight: 500; letter-spacing: -0.015em; transition: color 0.18s; }
.tool-meta span { color: var(--ink-3); font-size: 13.5px; }
.tool-row:hover .tool-meta b { color: var(--accent); }
.tool-plan { font: 500 12px var(--mono); color: var(--ink-3); white-space: nowrap; }
.tool-price { color: var(--ink-3); font-size: 13px; white-space: nowrap; text-align: right; }
.tool-price b { color: var(--ink); font-size: 17px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-right: 2px; }
.tool-total { margin: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 4px 6px; color: var(--ink-2); font-size: 15px; text-align: right; }
.quote-fine { font-size: 13.5px; color: var(--ink-3); }
.quote-fine b { color: var(--ink-2); font-weight: 600; }
.tool-total b { color: var(--ink); font-size: 18px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

.bill-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; counter-reset: none; }
.bill-steps li { display: grid; gap: 6px; align-content: start; padding: 18px 0 0; border-top: 1px solid var(--hair); }
.bill-steps .kicker-idx { font: 500 12px var(--mono); }
.bill-steps li > span:last-child { font-size: 15.5px; line-height: 1.55; color: var(--ink); }
.skills-one { grid-template-columns: minmax(0, 1fr); }
.skills-one li:nth-last-child(2) { border-bottom: 0; }
.cta-sign { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; margin-top: 8px; }
@media (max-width: 920px) {
  .quote-sec { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .rate-convert { flex-direction: column; align-items: flex-start; }
  .rate-arrow { transform: rotate(90deg); margin-left: 6px; }
  .tool-row { grid-template-columns: 40px minmax(0, 1fr) auto; align-items: start; gap: 6px 14px; }
  .tool-meta { grid-column: 2 / -1; }
  .tool-plan { grid-column: 2; grid-row: 2; align-self: center; }
  .tool-price { grid-column: 3; grid-row: 2; }
  .tool-total { justify-content: flex-start; text-align: left; }
  .bill-steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .bill-steps li { padding: 14px 0; }
}

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