@font-face {
  font-family: Manrope;
  src: url("./fonts/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #101411;
  --foreground: #f1f1e8;
  --muted: #b5bdb1;
  --accent: #dcf89d;
  --line: #384338;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font: 1rem/1.65 Manrope, system-ui, sans-serif;
}
body::before {
  content: "";
  position: fixed;
  z-index: -2;
  inset: 0;
  background:
    radial-gradient(ellipse at 76% 35%, #1b261b 0%, transparent 58%),
    radial-gradient(circle, #30392c 1px, transparent 1px) center / 32px 32px;
  opacity: .72;
  pointer-events: none;
}
body { isolation: isolate; }
.scene { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.scene canvas { display: block; width: 100%; height: 100%; }
.frame { width: min(1272px, calc(100% - 8rem)); margin-inline: auto; }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; text-underline-offset: .23em; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
a:hover { color: var(--accent); }
.skip {
  position: fixed;
  z-index: 4;
  inset: .5rem auto auto 1rem;
  padding: .6rem .9rem;
  background: var(--background);
  transform: translateY(-180%);
}
.skip:focus { transform: none; }

.site-header {
  position: sticky;
  z-index: 2;
  top: 0;
  background: var(--background);
  border-bottom: 1px solid var(--line);
}
.header-inner, .footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem 1.5rem;
  padding-block: 1rem;
}
.brand, nav, .header-controls { display: flex; align-items: center; }
.brand { gap: .65rem; font-size: .95rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.header-controls { gap: clamp(.65rem, 2vw, 1.6rem); }
nav { gap: clamp(.8rem, 3.5vw, 2.6rem); font-size: .88rem; font-weight: 650; }
nav a { text-decoration: none; }
nav span { color: var(--accent); }

.chapter {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6.25rem);
  min-height: 88svh;
  padding-block: clamp(4.5rem, 8vw, 8rem);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 4.25rem;
}
#main { scroll-margin-top: 4.25rem; }
.hero { min-height: calc(100svh - 4.25rem); padding-block: clamp(3rem, 6vh, 6.5rem); gap: 0; }
.hero-copy, .chapter-copy { position: relative; z-index: 1; }
.hero-copy { padding-bottom: 1.5rem; }
.label {
  color: var(--muted);
  font: .72rem/1.55 var(--mono);
  letter-spacing: .105em;
  text-transform: uppercase;
}
.status-dot {
  display: inline-block;
  width: .45rem;
  height: .45rem;
  margin-right: .35rem;
  border-radius: 50%;
  vertical-align: .07em;
  background: var(--accent);
  box-shadow: 0 0 12px #dcf89680;
}
h1, h2, h3 { font-weight: 730; }
h1 {
  margin-block: .65rem 1.35rem;
  font-size: clamp(3.4rem, 8.25vw, 8.5rem);
  line-height: .93;
  letter-spacing: -.072em;
}
h1 span, h2 span { color: var(--accent); }
.hero-intro { max-width: 38ch; color: var(--muted); font-size: clamp(1rem, 1.35vw, 1.2rem); }
.actions { display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; align-items: center; margin-top: 1.8rem; }
.primary {
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  background: var(--accent);
  color: #192010;
  padding: .68rem 1rem;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 800;
}
.primary:hover { color: #192010; background: var(--foreground); }
.inline-link { font-size: .9rem; font-weight: 700; }
.inline-link span { color: var(--accent); }

.visual { position: relative; min-width: 0; }
.hero-visual { width: calc(100% + 2rem); max-width: min(42rem, 72svh); justify-self: center; aspect-ratio: 1; }
.chapter-visual { aspect-ratio: 1.1; }
.orbit-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
:root:is([data-scene="active"], [data-scene="still"]) .orbit-still { visibility: hidden; }
.figure-label { position: absolute; right: 1rem; bottom: .75rem; }
.chapter-visual .figure-label { visibility: hidden; }
:root:is([data-scene="active"], [data-scene="still"]) .chapter-visual .figure-label { visibility: visible; }
.crosshair { position: absolute; color: #79866d; font: .9rem var(--mono); }
.crosshair-top { top: .7rem; right: 1rem; }
.crosshair-bottom { bottom: .7rem; left: 1rem; }
.chapter-index {
  position: absolute;
  bottom: 1.15rem;
  left: 0;
  display: flex;
  align-items: center;
  gap: .9rem;
}
.chapter-index span + span { border-left: 1px solid var(--line); padding-left: .9rem; }

.chapter-label { color: var(--accent); margin-bottom: .65rem; }
h2 {
  font-size: clamp(2.9rem, 5.3vw, 5.35rem);
  line-height: 1;
  letter-spacing: -.068em;
  margin-bottom: 1.8rem;
}
h3 { font-size: clamp(1.25rem, 2vw, 1.65rem); line-height: 1.2; letter-spacing: -.04em; }
.entry { padding-block: 1.05rem; border-top: 1px solid var(--line); }
.entry:last-child { padding-bottom: 0; }
.entry p:not(.label) { color: var(--muted); margin-top: .45rem; max-width: 49ch; }
.responsibilities { color: var(--muted); margin: .8rem 0 0; padding-left: 1.2rem; max-width: 57ch; }
.responsibilities li + li { margin-top: .42rem; }
.responsibilities li::marker { color: var(--accent); }
.detail { color: #a4b498; letter-spacing: .055em; }
.experience .detail { margin-bottom: .45rem; }
.project { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); gap: .65rem; }
.project-number { padding-top: .23rem; color: var(--accent); }
.project .detail { margin-top: .6rem; }
.contact { min-height: 67svh; }
.contact h2 { margin-bottom: 0; }
.footer { padding-block: 1.2rem 2.15rem; font-size: .85rem; }

.motion {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
}
.motion .play-icon, [data-scene="still"] .motion .pause-icon { display: none; }
[data-scene="still"] .motion .play-icon { display: inline; }
:root[data-scene="active"] { scroll-behavior: smooth; }
.motion:hover { color: var(--accent); border-color: var(--accent); }
.motion[hidden] { display: none; }
:root[data-scene="active"] .arriving { animation: arrive .55s ease-out both; }
@keyframes arrive {
  from { opacity: .6; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1050px) {
  .frame { width: calc(100% - 4rem); }
}
@media (max-width: 760px) {
  .frame { width: calc(100% - 2.5rem); }
  .header-inner { column-gap: .65rem; }
  .chapter { min-height: 0; grid-template-columns: minmax(0, 1fr); gap: 1.4rem; padding-block: 3rem; }
  .hero { padding-block: 4.25rem 2.75rem; }
  .hero-copy { padding-bottom: 0; }
  h1 { font-size: clamp(3.6rem, 11.8vw, 6rem); }
  .hero-visual { width: min(100%, 24rem); margin-inline: auto; aspect-ratio: 1.22; }
  .chapter-index { bottom: .7rem; }
  .chapter-visual { display: none; }
  :root:is([data-scene="active"], [data-scene="still"]) .chapter-visual {
    display: block;
    width: min(90%, 23rem);
    aspect-ratio: 1.65;
    margin-inline: auto;
    grid-row: 1;
  }
  .contact h2 { font-size: clamp(3rem, 11vw, 5rem); }
}
@media (max-width: 390px) {
  .frame { width: calc(100% - 2rem); }
  .brand span { display: none; }
  nav { gap: .85rem; }
  .actions { gap: .75rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .scene, .motion { display: none; }
  :root[data-scene="active"] .orbit-still { visibility: visible; }
  :root[data-scene="active"] .arriving { animation: none; }
}
