@font-face { font-family: 'Inter Tight'; src: url('../fonts/inter-tight-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('../fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2'); font-weight: 100 800; font-style: normal; font-display: swap; }

:root {
  --ink: #e9edf0;
  --ink-2: rgba(233, 237, 240, 0.74);
  --ink-3: rgba(233, 237, 240, 0.5);
  --line: rgba(233, 237, 240, 0.14);
  --link: #9fd8e2;
  --bg: #03070b;
  --sans: 'Inter Tight', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: var(--link); text-decoration: underline; text-decoration-color: rgba(159, 216, 226, 0.35); text-underline-offset: 3px; transition: text-decoration-color 0.2s; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 3px; }
button { font: inherit; color: inherit; }

/* ocean */
#ocean { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; z-index: 0; display: block; opacity: 0; transition: opacity 1.2s ease; }
#ocean.on { opacity: 1; }
body.no-webgl { background: linear-gradient(180deg, #0d1a2a 0%, #3a3b45 30%, #a06a48 44%, #183543 46%, #061722 70%, #020507 100%) fixed; }
.hero-scrim { position: fixed; inset: auto 0 0 0; height: 60vh; z-index: 1; pointer-events: none; background: linear-gradient(to top, rgba(2, 8, 12, 0.55), rgba(2, 8, 12, 0.2) 50%, transparent); }
main { position: relative; z-index: 2; }

/* nav */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 40; display: flex; align-items: center; gap: 24px; padding: 16px var(--gutter); transition: background 0.4s, border-color 0.4s; border-bottom: 1px solid transparent; }
.nav.solid { background: rgba(3, 8, 12, 0.6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--ink); }
.nav .wordmark { color: var(--ink); font-weight: 550; white-space: nowrap; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.sound { border: 0; background: none; color: var(--ink-3); font-size: 14px; cursor: pointer; padding: 4px 0; }
.sound:hover { color: var(--ink); }
.sound[aria-pressed='true'] { color: var(--ink); }

/* depth gauge */
.gauge { position: fixed; right: 16px; top: 50%; transform: translateY(-50%); z-index: 30; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; opacity: 0; transition: opacity 0.6s; }
.gauge.on { opacity: 1; }
.gauge-track { position: relative; width: 1px; height: 30vh; background: var(--line); }
.gauge-fill { position: absolute; left: 0; top: 0; width: 1px; height: 0; background: var(--ink-2); }
.gauge-depth { font-family: var(--mono); font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* hero */
.hero { height: 100vh; height: 100svh; min-height: 520px; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 var(--gutter) 12vh; }
.hero h1 { margin: 0 0 14px; font-weight: 560; font-size: clamp(44px, 7.4vw, 112px); line-height: 1; letter-spacing: -0.035em; text-shadow: 0 2px 30px rgba(0, 0, 0, 0.25); }
.hero p { margin: 0; max-width: 38ch; font-size: clamp(18px, 1.6vw, 22px); color: var(--ink); text-shadow: 0 1px 20px rgba(0, 0, 0, 0.4); }

.dive { height: 170vh; }

/* content */
.content { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter) 40px; }
.content section { padding: 56px 0; }
.content section + section { border-top: 1px solid var(--line); }
.content h2 { font-size: 24px; font-weight: 560; letter-spacing: -0.015em; margin: 0 0 18px; }
.content p { margin: 0 0 14px; color: var(--ink-2); }
.content p:last-child { margin-bottom: 0; }

.video { margin-top: 22px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--line); position: relative; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-2); text-align: center; padding: 20px; }

.papers { list-style: none; margin: 0 0 18px; padding: 0; }
.papers li { display: flex; flex-direction: column; gap: 2px; }
.papers span { color: var(--ink-3); font-size: 15px; }

.projects { list-style: none; margin: 0; padding: 0; }
.projects li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.projects li:first-child { padding-top: 0; }
.projects .when { font-family: var(--mono); font-size: 13px; color: var(--ink-3); padding-top: 3px; }
.projects .name { font-weight: 560; color: var(--ink); }
.projects .text { color: var(--ink-2); grid-column: 2; }
.projects .links { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 15px; }

.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 8px 0; color: var(--ink-2); }
.rows .when { font-family: var(--mono); font-size: 13px; color: var(--ink-3); padding-top: 3px; }

.foot { padding: 40px 0 28px; color: var(--ink-3); font-size: 14px; border-top: 1px solid var(--line); }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-links { display: none; }
  .sound { margin-left: auto; }
  .gauge { right: 8px; }
  .gauge-depth { display: none; }
  .rows li { grid-template-columns: 1fr; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.001ms !important; }
}
