:root {
  --bg: #0a0a0c;
  --bg-2: #101015;
  --surface: rgba(255, 255, 255, 0.025);
  --surface-2: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.09);
  --border-hi: rgba(255, 255, 255, 0.18);
  --text: #ECEAE3;
  --muted: #9b9b92;
  --dim: #6a6a63;
  --accent: #ff7a2f;
  --accent-soft: rgba(255, 122, 47, 0.12);
  --live: #57e3b0;
  --serif: 'Bricolage Grotesque', Georgia, serif;
  --sans: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Film-grain / texture overlay (anti-"AI slop") */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }
::selection { background: var(--accent); color: #120a03; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; width: 100%; }

/* ── Nav ─────────────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  transition: background .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
nav.scrolled, nav.solid {
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
nav .inner {
  max-width: var(--max); margin: auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 66px; padding: 0 28px;
}
.brand {
  font-family: var(--mono);
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.02em; text-decoration: none;
  display: inline-flex; align-items: center; gap: 9px;
}
.brand .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--live); box-shadow: 0 0 0 0 rgba(87, 227, 176, .5);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(87, 227, 176, .45); }
  70% { box-shadow: 0 0 0 7px rgba(87, 227, 176, 0); }
  100% { box-shadow: 0 0 0 0 rgba(87, 227, 176, 0); }
}
nav ul { list-style: none; display: flex; gap: 30px; align-items: center; }
nav ul a {
  font-size: 13px; color: var(--muted); text-decoration: none;
  letter-spacing: .01em; transition: color .18s;
}
nav ul a:hover, nav ul a.active { color: var(--text); }
nav ul a.active { position: relative; }
nav ul a.cta {
  color: var(--text); border: 1px solid var(--border-hi);
  padding: 7px 15px; border-radius: 99px; transition: all .2s var(--ease);
}
nav ul a.cta:hover { background: var(--accent); border-color: var(--accent); color: #120a03; }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); cursor: pointer; }
@media (max-width: 780px) {
  nav ul { display: none; }
  nav ul.open {
    display: flex; flex-direction: column; position: absolute;
    top: 66px; left: 0; right: 0; background: rgba(10,10,12,.96);
    backdrop-filter: blur(14px); padding: 22px 28px; gap: 20px;
    border-bottom: 1px solid var(--border);
  }
  .nav-toggle { display: block; }
}

main { flex: 1 0 auto; }

/* ── Hero (home) ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: 120px 0 60px;
  overflow: hidden;
}
#edge-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; display: block;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 90% at 15% 40%, rgba(10,10,12,0.72) 0%, rgba(10,10,12,0.35) 45%, transparent 75%),
    linear-gradient(to bottom, transparent 60%, var(--bg) 100%);
}
.hero .wrap { position: relative; z-index: 2; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px; letter-spacing: 0.06em;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 26px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--accent); opacity: .6; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.7rem, 7.5vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 15ch;
  margin-bottom: 26px;
}
.hero h1 .rot {
  font-style: italic; color: var(--accent); display: inline-block;
  transition: opacity .5s var(--ease), filter .5s var(--ease), transform .5s var(--ease);
}
.hero h1 .rot.swap { opacity: 0; filter: blur(6px); transform: translateY(6px); }
.hero .lead {
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  color: var(--muted);
  max-width: 56ch; line-height: 1.72;
  margin-bottom: 34px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  text-decoration: none; padding: 13px 26px; border-radius: 99px;
  display: inline-flex; align-items: center; gap: 9px;
  transition: all .22s var(--ease); cursor: pointer; border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #120a03; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -8px rgba(255,122,47,.5); }
.btn-ghost { border-color: var(--border-hi); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); background: var(--surface-2); }

/* ── Subpage header ──────────────────────────────────────────────── */
.page-head {
  position: relative;
  padding: 140px 0 40px;
  border-bottom: 1px solid var(--border);
}
.page-head h1 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.2rem, 5.5vw, 4rem); line-height: 1.05;
  letter-spacing: -0.02em; margin-bottom: 16px; max-width: 18ch;
}
.page-head p { color: var(--muted); max-width: 62ch; }
.back-link {
  font-family: var(--mono); font-size: 12px; color: var(--dim);
  text-decoration: none; display: inline-flex; align-items: center; gap: 7px;
  margin-bottom: 22px; transition: color .18s;
}
.back-link:hover { color: var(--accent); }

/* ── Section scaffolding ─────────────────────────────────────────── */
section.block { padding: 90px 0; position: relative; }
.section-head { margin-bottom: 48px; max-width: 760px; }
.section-kicker {
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent);
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
}
.section-kicker span.num { color: var(--dim); }
.section-head h2 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.08; letter-spacing: -0.02em;
}
.section-head p { color: var(--muted); margin-top: 16px; max-width: 60ch; }

/* ── Work ────────────────────────────────────────────────────────── */
.work-list { display: flex; flex-direction: column; gap: 22px; }
.work-card {
  border: 1px solid var(--border); border-radius: 16px;
  background: var(--surface); padding: 34px;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.work-card:hover { border-color: var(--border-hi); background: var(--surface-2); }
.work-card.flagship {
  background: radial-gradient(120% 140% at 100% 0%, var(--accent-soft) 0%, transparent 55%), var(--surface);
  border-color: rgba(255,122,47,.28);
}
.work-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.work-top .title-wrap { display: flex; flex-direction: column; gap: 5px; }
.flag {
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent);
  border: 1px solid rgba(255,122,47,.35); border-radius: 99px;
  padding: 3px 10px; align-self: flex-start; margin-bottom: 4px;
}
.work-card h3 { font-family: var(--serif); font-weight: 500; font-size: 1.7rem; letter-spacing: -.01em; }
.work-card .subtitle { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.work-card .year { font-family: var(--mono); font-size: 12px; color: var(--dim); white-space: nowrap; }
.work-card .blurb { color: var(--muted); max-width: 68ch; margin-bottom: 20px; }
.work-card ul.hl { list-style: none; display: flex; flex-direction: column; gap: 9px; margin-bottom: 22px; }
.work-card ul.hl li { position: relative; padding-left: 24px; font-size: 14.5px; color: var(--muted); line-height: 1.6; }
.work-card ul.hl li::before { content: "→"; position: absolute; left: 0; top: 0; color: var(--accent); font-family: var(--mono); }
.work-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; justify-content: space-between; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 4px 10px; border-radius: 6px;
}
.work-links { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.work-links a {
  font-size: 13.5px; color: var(--text); text-decoration: none;
  display: inline-flex; align-items: center; gap: 7px;
  border-bottom: 1px solid var(--border-hi); padding-bottom: 2px; transition: color .18s, border-color .18s;
}
.work-links a:hover { color: var(--accent); border-color: var(--accent); }
.value-pill {
  font-family: var(--mono); font-size: 11.5px; color: var(--live);
  border: 1px solid rgba(87,227,176,.3); border-radius: 99px; padding: 5px 12px;
}

/* ── Launcher ────────────────────────────────────────────────────── */
.launch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.launch-item {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); overflow: hidden;
  text-decoration: none; transition: all .25s var(--ease); position: relative;
}
.launch-item:hover { border-color: var(--accent); background: var(--surface-2); transform: translateY(-3px); }
.launch-shot {
  display: block; aspect-ratio: 16 / 10; overflow: hidden;
  background: var(--surface-2); border-bottom: 1px solid var(--border); position: relative;
}
.launch-shot img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  display: block; background: var(--surface-2); transition: transform .5s var(--ease);
}
.launch-item:hover .launch-shot img { transform: scale(1.04); }
.launch-shot.noimg img { display: none; }
.launch-shot.noimg::after {
  content: "preview loading…"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px; color: var(--dim);
}
.launch-body { display: flex; flex-direction: column; gap: 7px; padding: 16px 20px; }
.launch-item.nopreview .launch-body { padding: 20px 22px; }
.launch-item .cat { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.launch-item .name {
  font-size: 16px; font-weight: 500; color: var(--text);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.launch-item .name .arw { color: var(--accent); transition: transform .25s var(--ease); }
.launch-item:hover .name .arw { transform: translate(3px, -3px); }
.launch-item .note { font-size: 13px; color: var(--muted); }

/* ── Capabilities ────────────────────────────────────────────────── */
.caps { display: flex; flex-wrap: wrap; gap: 10px; }
.cap {
  font-family: var(--sans); font-size: 14px; color: var(--text);
  border: 1px solid var(--border); border-radius: 99px; padding: 9px 18px;
  background: var(--surface); transition: all .22s var(--ease);
}
.cap:hover { border-color: var(--accent); color: var(--accent); }

/* ── Résumé ──────────────────────────────────────────────────────── */
.resume-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 46px; }
@media (max-width: 820px) { .resume-grid { grid-template-columns: 1fr; gap: 40px; } }
.col-label { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 24px; }
.job { padding: 22px 0; border-top: 1px solid var(--border); }
.job:first-of-type { border-top: 0; padding-top: 0; }
.job-head { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.job-head h4 { font-size: 16px; font-weight: 600; }
.job-head .org { font-size: 13px; color: var(--accent); }
.job-head .date { font-family: var(--mono); font-size: 11.5px; color: var(--dim); white-space: nowrap; }
.job ul { list-style: none; display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.job ul li { font-size: 14px; color: var(--muted); padding-left: 16px; position: relative; }
.job ul li::before { content: "·"; position: absolute; left: 3px; color: var(--accent); }
.vol-item { padding: 16px 0; border-top: 1px solid var(--border); }
.vol-item:first-of-type { border-top: 0; padding-top: 0; }
.vol-item .vt { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.vol-item .vd { font-size: 13.5px; color: var(--muted); }
.edu-card { border: 1px solid var(--border); border-radius: 12px; padding: 20px; background: var(--surface); margin-bottom: 30px; }

/* ── Contact ─────────────────────────────────────────────────────── */
.contact-block { text-align: center; padding: 96px 0 90px; }
.contact-block h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -.02em; margin-bottom: 20px; }
.contact-block p { color: var(--muted); max-width: 48ch; margin: 0 auto 34px; }
.contact-row { display: flex; flex-wrap: wrap; gap: 14px 26px; justify-content: center; margin-top: 10px; }
.contact-row a { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--muted); text-decoration: none; transition: color .18s; }
.contact-row a:hover { color: var(--accent); }
.contact-row svg { width: 17px; height: 17px; flex: none; }

footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border); text-align: center;
  padding: 30px 28px; font-family: var(--mono); font-size: 12px; color: var(--dim);
}

/* ── Reveal animation (JS-gated, reduced-motion safe) ────────────── */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero h1 .rot.swap { opacity: 1; filter: none; transform: none; }
  .brand .dot { animation: none; }
}
