:root {
  --ink: #0a0a0a;
  --white: #ffffff;
  --off-white: #e8e8e8;
  --grey: #b5b5b5;
  --grey-dim: #8c8c8c;
  --serif: "Instrument Serif", serif;
  --mono: "IBM Plex Mono", monospace;
}

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

html {
  scrollbar-width: none;
  scroll-behavior: smooth;
}
html::-webkit-scrollbar { display: none; }

body {
  background: var(--ink);
  color: var(--off-white);
  font-family: var(--mono);
  overflow-x: hidden;
}

#gl {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
}

/* animated film grain over everything, additive so it reads on black */
.grain {
  position: fixed;
  inset: -100%;
  z-index: 3;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 0.9s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); }
  75% { transform: translate(-1%, -1%); }
  100% { transform: translate(0, 0); }
}

.site-head {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  height: 5rem;
  padding: 1.4rem 2rem 2rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  background: linear-gradient(rgba(10, 10, 10, 0.9), transparent);
}

.site-mark {
  position: absolute;
  top: 1.4rem;
  left: 2rem;
  color: var(--off-white);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  position: absolute;
  top: 0.85rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: clamp(0.8rem, 1.4vw, 1.4rem);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  white-space: nowrap;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(232, 232, 232, 0.1);
  background: rgba(10, 10, 10, 0.82);
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0.42rem;
  color: var(--grey-dim);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.site-nav a + a::before {
  content: "/";
  margin-right: clamp(0.8rem, 1.4vw, 1.4rem);
  color: rgba(181, 181, 181, 0.28);
}

.site-nav .nav-no {
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  color: rgba(181, 181, 181, 0.46);
  transition: color 180ms ease;
}

.site-nav .nav-label {
  position: relative;
}

.site-nav .nav-label::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -0.42rem;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="location"] {
  color: var(--white);
}

.site-nav a:hover .nav-no,
.site-nav a:focus-visible .nav-no,
.site-nav a[aria-current="location"] .nav-no {
  color: var(--grey);
}

.site-nav a:hover .nav-label::after,
.site-nav a:focus-visible .nav-label::after,
.site-nav a[aria-current="location"] .nav-label::after {
  transform: scaleX(1);
}

.site-nav a:focus-visible,
.site-mark:focus-visible {
  outline: 1px solid var(--white);
  outline-offset: 0.35rem;
}

#scroll-readout {
  position: absolute;
  top: 1.4rem;
  right: 2rem;
}

.mono { font-family: var(--mono); }
.dim { color: var(--grey-dim); }

.page { position: relative; z-index: 1; }

.panel {
  min-height: 130vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* safe: when content is taller than the panel (long bio on a short
     phone), align start instead of clipping both ends off-screen */
  justify-content: safe center;
  padding: 0 clamp(1.5rem, 6vw, 6rem);
  scroll-margin-top: 5rem;
}

.panel.right { align-items: flex-end; text-align: right; }
.panel.right .col { text-align: left; }

/* text sits naked on the glyph field — no pools, no blur. the only halo is
   the single tight glyph-outline below, just enough to cut a letter out of
   the cell it happens to land on. */
.col {
  position: relative;
  max-width: 36rem;
  padding: 2.2rem 2.4rem;
}

.panel { text-shadow: 0 0 3px var(--ink); }

.hero {
  min-height: 100vh;
  justify-content: flex-end;
  padding-bottom: 12vh;
}

.intro-cue {
  position: relative;
  width: clamp(18rem, 24vw, 22rem);
  padding: 0.2rem 0 0.2rem 1.15rem;
}

.intro-cue::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: rgba(232, 232, 232, 0.2);
}

.intro-cue::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0.34rem;
  height: 1px;
  background: var(--off-white);
}

.intro-ident,
.scroll-hint {
  display: grid;
  grid-template-columns: auto minmax(2rem, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
}

.intro-ident {
  margin-bottom: 1.05rem;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
}

.intro-number {
  color: var(--off-white);
  font-weight: 500;
}

.intro-name {
  color: var(--grey);
}

.intro-rule,
.scroll-rule {
  height: 1px;
  background: rgba(232, 232, 232, 0.2);
}

.scroll-hint {
  margin: 0;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--grey-dim);
}

.scroll-arrow {
  color: var(--off-white);
  animation: descend-cue 1.8s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

@keyframes descend-cue {
  0%, 100% { transform: translateY(-0.12rem); opacity: 0.45; }
  50% { transform: translateY(0.18rem); opacity: 1; }
}

/* hero resume cta — bordered mono chip, rides the intro column down to
   the contact pane where the actual download link lives */
.resume-cta {
  display: inline-flex;
  align-items: baseline;
  gap: 0.7rem;
  margin-top: 1.5rem;
  padding: 0.72rem 1.1rem;
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--off-white);
  text-decoration: none;
  border: 1px solid rgba(232, 232, 232, 0.28);
  background: rgba(10, 10, 10, 0.55);
  transition: border-color 180ms ease, color 180ms ease;
}
.resume-cta .cta-arrow { color: var(--grey-dim); transition: color 180ms ease; }
.resume-cta:hover,
.resume-cta:focus-visible {
  color: var(--white);
  border-color: var(--white);
}
.resume-cta:hover .cta-arrow,
.resume-cta:focus-visible .cta-arrow { color: var(--white); }
.resume-cta:focus-visible {
  outline: 1px solid var(--white);
  outline-offset: 0.35rem;
}

.outro {
  position: relative;
  min-height: 100vh;
  align-items: center;
  text-align: center;
  justify-content: center;
}


.kicker {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  margin-bottom: 1.6rem;
  color: var(--grey-dim);
}

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.2rem, 9.5vw, 8.5rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  color: var(--off-white);
  white-space: nowrap;
}

/* the italic words step up to pure white — the only "accent" is brightness */
.display em {
  font-style: italic;
  color: var(--white);
}

.display.md { font-size: clamp(2.4rem, 5.5vw, 4.6rem); margin-bottom: 1.8rem; }

.body {
  font-family: var(--mono);
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--grey);
  max-width: 30rem;
}

.ramp {
  margin-top: 2.2rem;
  font-size: 1.1rem;
  letter-spacing: 0.4em;
  color: var(--off-white);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0.9rem 1.2rem;
  display: inline-block;
  background: rgba(10, 10, 10, 0.55);
}

/* bio chunks: short paragraphs, one thought per beat */
.col .body + .body { margin-top: 1.2rem; }

.speclist {
  margin-top: 1.8rem;
  font-size: 0.8rem;
  line-height: 2.1;
  letter-spacing: 0.06em;
  color: var(--grey-dim);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem 1.8rem;
}

.outro a {
  color: var(--white);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  transition: border-color 0.3s;
}
.inline-link {
  color: #d8d8d8;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  transition: border-color 0.3s;
}
.inline-link:hover,
.inline-link:focus-visible {
  border-color: #ffffff;
}
.outro a:hover { border-color: var(--white); }

/* reveal machinery — JS wraps words in masked shells and scrubs them in.
   nothing here hides the copy: with JS off (or failed) the page reads as
   plain text, all hidden states are applied by the scrub tweens */
[data-reveal-chars] .word { display: inline-block; overflow: hidden; vertical-align: bottom; }
[data-reveal-chars] .word > span { display: inline-block; }

/* signal load (outro) — churn spans hold 1ch in the mono blocks so the
   cycling glyphs never reflow the line; serif chars stay inline so the
   headline keeps its kerning */
.char { display: inline-block; }
.mono .char { min-width: 1ch; }
.display .char { display: inline; min-width: 0; }

/* the flying pane: sized to land at roughly 45% of the screen, centred.
   whole outro reads a step greyer and a touch translucent by design */
.load-box {
  width: clamp(20rem, 46vw, 46rem);
  opacity: 0.94;
  will-change: transform;
}
.outro,
.outro .display,
.outro .display em,
.outro .kicker,
.outro a,
.outro .dim {
  color: #d8d8d8;
}

@media (max-width: 640px) {
  .site-head {
    height: 5.6rem;
    padding: 1.1rem 1.2rem 2rem;
    font-size: 0.64rem;
  }
  .site-mark { top: 1.1rem; left: 1.2rem; }
  #scroll-readout { top: 1.1rem; right: 1.2rem; }
  .site-nav {
    top: 2.6rem;
    right: 1.2rem;
    left: 1.2rem;
    transform: none;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.58rem;
    padding: 0.55rem 0.7rem;
  }
  .panel:not(.hero):not(.outro) {
  padding-top: 16vh;
  padding-bottom: 16vh;
}
  .site-nav a + a::before { content: none; }
  .site-nav .nav-no { font-size: 0.46rem; }
  .intro-cue {
    width: min(19rem, calc(100vw - 3rem));
    padding-left: 0.9rem;
  }
  .intro-ident { font-size: 0.64rem; }
  .scroll-hint { font-size: 0.58rem; }
  .col { padding: 1.5rem 1.4rem; }
  .ramp { font-size: 0.8rem; letter-spacing: 0.18em; } /* fits a 360px viewport */
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain { animation: none; }
  .scroll-arrow { animation: none; }
}
