:root {
  /* palette:auto:begin — generated by pipeline/palette.py; do not hand-edit */
  --paper-dark: #140d08;
  --ink: #d2b286;
  --accent-amber: #ae8c63;
  /* palette:auto:end */
  --site-font: "Times New Roman", serif;
}

html,
body,
button,
input,
textarea,
select {
  font-family: var(--site-font);
}

html,
body {
  margin: 0;
  background: #000;
  color: var(--ink);
  -ms-overflow-style: none;
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

.site-header {
  position: fixed;
  top: 1.35rem;
  right: clamp(1.25rem, 3vw, 3rem);
  z-index: 4;
  color: #000;
  transition: color 180ms linear;
}

.site-header nav,
.page-tabs,
.social-links {
  display: flex;
  align-items: center;
}

.site-header nav {
  gap: clamp(1rem, 2vw, 2rem);
}

.page-tabs {
  gap: clamp(0.85rem, 1.7vw, 1.6rem);
}

.social-links {
  gap: 0.75rem;
}

.nav-link,
.icon-link {
  color: inherit;
  text-decoration: none;
}

.nav-link {
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  letter-spacing: 0.025em;
}

.icon-link {
  display: inline-grid;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
}

.icon-link svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.is-pending {
  cursor: default;
}

.subpage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: #fff;
}

.subpage-content {
  width: min(36rem, calc(100vw - 3rem));
}

.subpage-content h1 {
  margin: 0.2rem 0 1rem;
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 400;
  line-height: 0.95;
}

.subpage-content p {
  font-size: 1.25rem;
}

.subpage-content .subpage-kicker {
  color: var(--accent-amber);
}

.subpage-content a {
  display: inline-block;
  margin-top: 2rem;
  color: #fff;
  text-underline-offset: 0.25em;
}

#stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}

#stage.ready {
  opacity: 1;
}

/* Scroll-driven vignette: closes in on downtown as the page scrolls, blacking
   out the off-axis far-field/foreground clutter so the city reads as an island
   in the void. Opacity is driven from main.js. Sits above the canvas, below the
   text. */
#vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(ellipse 68% 52% at 50% 58%, transparent 40%, #000 100%);
}

#stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

#fallback:not([hidden]) {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
}

/* --- Scroll narrative -------------------------------------------------------
   The splat canvas is fixed behind (#stage, z-index 0); this content scrolls
   over it. The .hero block is empty and tall — scrolling through it is what
   pulls the camera back into the void (its height is matched to the 1.4×vh
   zoom range in main.js). The panels then rise up over the floating island. */
#scroll {
  position: relative;
  z-index: 2;
}

#scroll .hero {
  height: 140vh;
  position: relative;
}

#scroll .scroll-hint {
  position: fixed;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0.7;
  animation: hint-bob 2.4s ease-in-out infinite;
}

/* Animate transform only — opacity is driven by scroll from main.js, so the
   keyframes must not touch it (a keyframed opacity would override the fade). */
@keyframes hint-bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}

#scroll .panel {
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem clamp(1.5rem, 6vw, 6rem);
  color: #fff;
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.85), 0 1px 3px rgba(0, 0, 0, 0.9);
}

#scroll .panel.intro {
  min-height: 82vh;
  max-width: 72rem;
}

#scroll .panel h1 {
  margin: 0;
  font-weight: 400;
  font-size: clamp(2.35rem, 5.7vw, 5.15rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: #fff;
}

#scroll .panel h1 span,
#scroll .credentials span {
  display: block;
}

#scroll .panel h1 span {
  white-space: nowrap;
}

#scroll .credentials span {
  white-space: nowrap;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(9.8rem, 13.3rem);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: clamp(2rem, 6vw, 6rem);
  row-gap: 0;
  width: 100%;
}

#profile-name {
  grid-column: 1;
  grid-row: 1;
  align-self: end;
}

.profile-details {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  min-width: 0;
}

#scroll .panel .credentials {
  margin-top: 1.5rem;
  color: #fff;
  font-size: clamp(1.15rem, 2.6vw, 1.6rem);
  line-height: 1.4;
}

#scroll .panel .email-row {
  margin-top: 1.1rem;
  font-size: 1rem;
}

.email-row button,
.email-address {
  margin: 0;
  padding: 0 0 0.15rem;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.portrait {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  width: 100%;
  margin: 0;
  transform: translateY(-1rem);
}

.portrait img {
  display: block;
  width: 100%;
  height: auto;
}

#scroll .panel h2 {
  margin: 0 0 1.25rem;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-amber);
}

#scroll .panel p {
  font-size: clamp(1.15rem, 2.6vw, 1.6rem);
  line-height: 1.65;
  margin: 0;
}

#scroll .about {
  gap: 1.4rem;
  margin-top: 5rem;
}

#scroll .panel a {
  color: var(--accent-amber);
  text-decoration: none;
  border-bottom: 1px solid rgba(174, 140, 99, 0.5);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

#scroll .panel a:hover {
  color: #fff;
  border-color: #fff;
}

#scroll .panel a.email-address {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

@media (prefers-reduced-motion: reduce) {
  #scroll .scroll-hint { animation: none; }
  .site-header { transition: none; }
}

@media (max-width: 700px) {
  .site-header {
    top: 0.9rem;
    right: 0.9rem;
  }

  .site-header nav {
    gap: 0.9rem;
  }

  .page-tabs {
    gap: 0.75rem;
  }

  .social-links {
    gap: 0.5rem;
  }

  .nav-link {
    font-size: 1.2rem;
  }

  .icon-link {
    width: 1.35rem;
    height: 1.35rem;
  }

  #scroll .panel {
    padding-inline: 1.25rem;
  }

  .profile-layout {
    grid-template-columns: minmax(0, 1fr) minmax(5rem, 24vw);
    gap: 0.75rem 1rem;
  }

  #profile-name {
    align-self: center;
  }

  .portrait {
    grid-row: 1;
    transform: translateY(-0.5rem);
  }

  .profile-details {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  #scroll .panel h1 {
    font-size: clamp(1.65rem, 7.2vw, 2.2rem);
  }

  #scroll .credentials {
    margin-top: 0.5rem;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

#debug-panel {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 260px;
  padding: 10px 12px;
  background: rgba(10, 8, 7, 0.82);
  border: 1px solid rgba(242, 232, 216, 0.25);
  border-radius: 6px;
  font-family: var(--site-font);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink);
}

#debug-panel fieldset {
  border: none;
  margin: 0 0 6px;
  padding: 0;
}

#debug-panel label {
  display: block;
}

#debug-panel .row {
  display: flex;
  align-items: center;
  gap: 6px;
}

#debug-panel .row input[type="range"] {
  flex: 1;
}

#debug-panel .val {
  min-width: 44px;
  text-align: right;
  color: var(--accent-amber);
}

#debug-panel .fps {
  color: var(--accent-amber);
  font-weight: bold;
}
