/* FireHub public site — editorial studio system */

:root {
  color-scheme: light;
  --bg: #f3f1ec;
  --bg-2: #ebe8e1;
  --paper: #fbfaf7;
  --shard: #f7f4ee;
  --ink: #111110;
  --ink-2: #3b3a36;
  --ink-3: #75726a;
  --line: rgba(17, 17, 16, 0.1);
  --line-2: rgba(17, 17, 16, 0.18);
  --gold: #8a6830;
  --gold-2: #c8a96e;
  --gold-dim: rgba(138, 104, 48, 0.14);
  --glass: rgba(255, 255, 255, 0.72);
  --glass-line: rgba(255, 255, 255, 0.8);
  --shadow: 0 18px 50px -24px rgba(17, 17, 16, 0.35);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --pad: clamp(18px, 4vw, 40px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 86px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07080b;
  --bg-2: #0c0e13;
  --paper: #12141a;
  --shard: #14161c;
  --ink: #eef0f4;
  --ink-2: #c4c7d0;
  --ink-3: #8b909c;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --gold: #e0b472;
  --gold-2: #f0d7a8;
  --gold-dim: rgba(224, 180, 114, 0.16);
  --glass: rgba(18, 20, 26, 0.72);
  --glass-line: rgba(255, 255, 255, 0.1);
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.85);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 480px at 70% -10%, var(--gold-dim), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

[hidden] {
  display: none !important;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 80;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
}

.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.nav {
  position: fixed;
  z-index: 40;
  top: 14px;
  left: 50%;
  width: min(1180px, calc(100% - 24px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 66px;
  padding: 8px 10px 8px 12px;
  border: 1px solid var(--glass-line);
  border-radius: 26px;
  background:
    linear-gradient(180deg, color-mix(in srgb, #fff 12%, transparent), transparent 62%),
    var(--glass);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 color-mix(in srgb, #fff 24%, transparent);
  transition:
    top 0.45s var(--ease),
    min-height 0.45s var(--ease),
    width 0.45s var(--ease),
    border-color 0.45s var(--ease),
    box-shadow 0.45s var(--ease);
}

/* compact state once the page is scrolled */
.nav.is-scrolled {
  top: 8px;
  min-height: 58px;
  width: min(1120px, calc(100% - 24px));
  border-color: color-mix(in srgb, var(--gold) 30%, var(--glass-line));
  box-shadow:
    0 22px 50px -22px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 color-mix(in srgb, #fff 24%, transparent);
}

/* thin gold reading-progress line along the bottom edge */
.nav::after {
  content: "";
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  transform: scaleX(var(--nav-progress, 0));
  transform-origin: left center;
  opacity: 0.85;
  pointer-events: none;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  border: 1px solid rgba(214, 184, 125, 0.6);
  background:
    radial-gradient(circle at 30% 20%, rgba(214, 184, 125, 0.28), transparent 62%),
    #111110;
  box-shadow: 0 6px 18px -8px rgba(214, 184, 125, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: #e6c98f;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.logo-img {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  object-fit: cover;
}

.logo.has-custom-logo .logo-copy {
  display: none;
}

.logo-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.logo-text {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
}

.logo-role {
  margin-top: 2px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.logo:hover .logo-mark {
  transform: rotate(-6deg) scale(1.06);
  box-shadow: 0 8px 22px -6px rgba(214, 184, 125, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.nav-links {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 3%, transparent);
}

/* sliding highlight that follows hover / the active section (positioned in studio.js) */
.nav-indicator {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  border-radius: 999px;
  background:
    linear-gradient(180deg, color-mix(in srgb, #fff 16%, transparent), transparent),
    var(--gold-dim);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--gold) 38%, transparent),
    0 6px 16px -8px var(--gold);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.45s var(--ease),
    width 0.45s var(--ease),
    height 0.45s var(--ease),
    opacity 0.3s var(--ease);
}

.nav-indicator.is-on {
  opacity: 1;
}

.nav-links a,
.mob-menu a {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 0.92rem;
  transition: color 0.3s var(--ease);
}

.nav-links a i,
.mob-menu a i {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-style: normal;
  letter-spacing: 0.04em;
}

.nav-links a.is-active,
.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
}

.nav-links a:focus-visible {
  outline-offset: -2px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 4px;
}

.theme-btn,
.menu-btn,
.btn,
.select-btn {
  border: 0;
  background: transparent;
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 3%, transparent);
  color: var(--ink-2);
  font-size: 0.84rem;
  cursor: pointer;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.theme-btn::before {
  content: "☀";
  color: var(--gold);
  font-size: 0.95rem;
  line-height: 1;
}

html[data-theme="light"] .theme-btn::before {
  content: "☾";
}

.theme-btn:hover {
  color: var(--ink);
  border-color: var(--gold);
  background: var(--gold-dim);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-left: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.8rem;
  white-space: nowrap;
}

.status #nav-clock {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--ink-3);
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3dd68c;
  box-shadow: 0 0 0 0 rgba(61, 214, 140, 0.7);
  animation: pulse 1.8s ease-out infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 7px transparent;
  }
}

.menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--ink) 3%, transparent);
  cursor: pointer;
}

.menu-btn span {
  display: block;
  width: 16px;
  height: 1.5px;
  margin: 0;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.4s var(--ease), width 0.4s var(--ease);
}

.menu-btn span:last-child {
  width: 11px;
}

.menu-btn[aria-expanded="true"] span:first-child {
  transform: translateY(3.25px) rotate(45deg);
}

.menu-btn[aria-expanded="true"] span:last-child {
  width: 16px;
  transform: translateY(-3.25px) rotate(-45deg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.92rem;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-ink {
  background: var(--ink);
  color: var(--bg);
}

.btn-line {
  border-color: var(--line-2);
  color: var(--ink);
  background: transparent;
}

.btn-line:hover {
  border-color: var(--gold);
}

.nav-right .btn,
.theme-btn,
.nav-links a {
  white-space: nowrap;
}

/* make room as the viewport narrows: status first, then the theme label */
@media (max-width: 1240px) {
  .status {
    display: none;
  }
}

@media (max-width: 1100px) {
  .theme-btn {
    width: 38px;
    padding: 0;
    justify-content: center;
  }

  .theme-btn .theme-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .nav-links a {
    padding: 8px 11px;
  }
}

.nav-right .btn-ink {
  gap: 6px;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid color-mix(in srgb, #fff 35%, transparent);
  background: linear-gradient(135deg, #f0d7a8, #d9b36c);
  box-shadow: 0 10px 24px -12px #c8a96e, inset 0 1px 0 rgba(255, 255, 255, 0.6);
  color: #14110a;
  font-weight: 600;
}

.nav-right .btn-ink::after {
  content: "→";
  transition: transform 0.3s var(--ease);
}

.nav-right .btn-ink:hover {
  box-shadow: 0 14px 30px -10px #c8a96e, inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.nav-right .btn-ink:hover::after {
  transform: translateX(3px);
}

.mob-menu {
  position: fixed;
  z-index: 35;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  padding: 24px;
  background:
    radial-gradient(520px 360px at 85% 12%, color-mix(in srgb, var(--gold-2) 22%, transparent), transparent 70%),
    color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
}

.mob-menu:not([hidden]) {
  animation: mob-fade 0.35s var(--ease) both;
}

.mob-menu:not([hidden]) a {
  animation: mob-rise 0.6s var(--ease) both;
}

.mob-menu:not([hidden]) a:nth-child(1) { animation-delay: 0.05s; }
.mob-menu:not([hidden]) a:nth-child(2) { animation-delay: 0.1s; }
.mob-menu:not([hidden]) a:nth-child(3) { animation-delay: 0.15s; }
.mob-menu:not([hidden]) a:nth-child(4) { animation-delay: 0.2s; }

@keyframes mob-fade {
  from {
    opacity: 0;
  }
}

@keyframes mob-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mob-menu:not([hidden]),
  .mob-menu:not([hidden]) a {
    animation: none;
  }

  .nav,
  .nav-indicator,
  .logo-mark {
    transition: none;
  }

  .logo:hover .logo-mark {
    transform: none;
  }
}

.mob-menu a {
  width: 100%;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 8vw, 4rem);
  line-height: 1;
}

.mob-foot {
  margin-top: 18px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero {
  position: relative;
  min-height: 100vh;
  padding: calc(var(--nav-h) + 18px) 16px 18px;
  /* lifted/hovered glass tiles and the long typed line must never add a sideways scrollbar */
  overflow-x: clip;
}

.hero-stage {
  position: relative;
  min-height: calc(100vh - var(--nav-h) - 36px);
  perspective: 1600px;
}

/* rotating globe behind the glass shards (seen through the frosted glass) */
.hero-globe {
  position: absolute;
  top: 0;
  left: 54%;
  height: 100%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  pointer-events: none;
}

/* While the shards are up, the globe is only seen through them (a blurred copy lives in each
   shard, see .shard-globe-canvas); once they scatter the sharp one takes over. */
.hero-globe.is-source {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.hero.is-scattered .hero-globe.is-source {
  opacity: 1;
}

.shard-globe-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: blur(7px) saturate(1.35) brightness(1.35);
}

@media (max-width: 980px) {
  .hero-globe { display: none; }
}

.glass-plate {
  position: relative;
  transform: translateZ(0);
  perspective: 900px;
}

.glass-rig {
  position: relative;
  height: calc(100vh - var(--nav-h) - 36px);
  min-height: 560px;
  transform-style: preserve-3d;
}

.face {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(128deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.1) 12%, transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 24%),
    linear-gradient(165deg, rgba(78, 86, 104, 0.5) 0%, rgba(16, 18, 26, 0.46) 100%);
  backdrop-filter: blur(18px) saturate(1.45);
  -webkit-backdrop-filter: blur(18px) saturate(1.45);
}

html[data-theme="light"] .face {
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.28) 42%, rgba(247, 245, 240, 0.46) 100%);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.face-copy {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: min(38%, 34rem);
  max-width: 100%;
  overflow: visible;
  padding: 7% 2.4% 5.5% 4.6%;
}

.portrait-tilt {
  position: absolute;
  z-index: 6;
  top: 4%;
  right: 2%;
  width: 42%;
  height: 94%;
  perspective: 640px;
  pointer-events: none;
}

.hero-figure {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transform-origin: center 42%;
}

.hero-halo {
  position: absolute;
  left: 50%;
  top: 1%;
  width: min(58%, 280px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(255, 255, 255, 0.04);
  transform: translateX(-50%);
}

.hero-figure .profile-placeholder {
  position: absolute;
  inset: 0;
  background: transparent;
}

.hero-figure .profile-photo-img {
  object-fit: contain;
  object-position: center bottom;
  filter: none;
  image-rendering: auto;
}

.shard {
  --sheen: 0;
  position: absolute;
  inset: 0;
  clip-path: var(--clip);
  transform-style: preserve-3d;
  filter: drop-shadow(0 10px 8px rgba(0, 0, 0, 0.16));
  transition: filter 0.35s ease;
  will-change: transform;
}

.shard.is-hot {
  filter: drop-shadow(0 42px 26px rgba(0, 0, 0, 0.5));
}

.shard-fire,
.shard-fire.is-hot {
  filter: drop-shadow(0 10px 8px rgba(0, 0, 0, 0.16));
}

.shard-fire .face,
html[data-theme="light"] .shard-fire .face {
  background:
    linear-gradient(128deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.05) 14%, transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 20%),
    linear-gradient(165deg, rgba(78, 86, 104, 0.22) 0%, rgba(16, 18, 26, 0.28) 100%);
  backdrop-filter: blur(8px) saturate(1.15);
  -webkit-backdrop-filter: blur(8px) saturate(1.15);
}

.shard-fire::before {
  background: radial-gradient(240px 190px at var(--gx, 66%) var(--gy, 74%), rgba(48, 140, 255, 0.2), transparent 70%);
}

.shard-fire::after {
  background:
    linear-gradient(118deg, rgba(210, 236, 255, 0.36) 0%, rgba(255, 255, 255, 0.08) 10%, transparent 28%),
    linear-gradient(180deg, rgba(60, 150, 255, 0.12), transparent 24%);
  box-shadow:
    inset 0 1px 0 rgba(190, 226, 255, calc(0.4 + var(--sheen) * 0.28)),
    inset 0 0 0 1px rgba(70, 156, 255, calc(0.2 + var(--sheen) * 0.22)),
    inset 0 -18px 28px rgba(40, 120, 255, 0.06);
}

.shard-fire-canvas,
.shard-glow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transform: translateZ(4px);
}

/* Same flame bed painted in every tile, so the burn runs straight through the cracks */
.shard-fire-canvas {
  z-index: 5;
  mix-blend-mode: lighten;
  filter: saturate(1.5) contrast(1.2) brightness(1.4);
}

.shard-fire-source {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 240px;
  height: 160px;
  opacity: 0;
  pointer-events: none;
}

.shard-glow {
  z-index: 5;
  mix-blend-mode: screen;
}

.shard-glow--upper {
  background:
    radial-gradient(46% 22% at 66% 40%, rgba(80, 180, 255, 0.72), rgba(30, 90, 255, 0.3) 42%, transparent 74%),
    radial-gradient(28% 18% at 50% 56%, rgba(50, 140, 255, 0.4), transparent 70%);
}

.shard-glow--corner {
  background: radial-gradient(24% 28% at 34% 84%, rgba(70, 160, 255, 0.58), rgba(20, 80, 255, 0.16) 48%, transparent 76%);
}

.shard-glow--faint {
  background:
    radial-gradient(42% 24% at 46% 52%, rgba(90, 170, 255, 0.4), transparent 72%),
    radial-gradient(30% 18% at 58% 68%, rgba(60, 150, 255, 0.28), transparent 70%);
}

.shard-glow--right {
  background:
    linear-gradient(to top, rgba(40, 130, 255, 0.48) 0%, rgba(80, 180, 255, 0.2) 22%, transparent 42%),
    radial-gradient(40% 26% at 88% 90%, rgba(120, 210, 255, 0.5), transparent 72%);
}

.portrait-tilt .hero-figure::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 6%;
  bottom: 0;
  height: 48%;
  pointer-events: none;
  background: radial-gradient(closest-side at 50% 100%, rgba(60, 150, 255, 0.24), transparent 74%);
  mix-blend-mode: soft-light;
  animation: ember-glow 4.8s ease-in-out infinite;
}

@keyframes ember-glow {
  0%,
  100% { opacity: 0.45; }
  45% { opacity: 0.9; }
  72% { opacity: 0.58; }
}

.shard::before,
.shard::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.shard::before {
  z-index: 3;
  background: radial-gradient(180px 150px at var(--gx, 50%) var(--gy, 40%), rgba(107, 98, 158, 0.55), transparent 68%);
  opacity: calc(var(--sheen) * 0.7);
  mix-blend-mode: screen;
}

.shard::after {
  z-index: 4;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.12) 10%, transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 22%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, calc(0.62 + var(--sheen) * 0.3)),
    inset 0 0 0 1px rgba(255, 255, 255, calc(0.28 + var(--sheen) * 0.35)),
    inset 0 -20px 32px rgba(176, 196, 230, calc(0.12 + var(--sheen) * 0.24));
}

.shard.shard-warm::after {
  box-shadow:
    inset 0 1px 0 rgba(200, 230, 255, calc(0.45 + var(--sheen) * 0.2)),
    inset 0 0 0 1px rgba(80, 160, 255, calc(0.14 + var(--sheen) * 0.16)),
    inset 0 -28px 46px rgba(30, 100, 255, 0.14);
}

.shard-live .face-copy {
  pointer-events: auto;
}

.shard:not(.shard-live) .face {
  pointer-events: none;
}

.glass-rig:not(.is-ready) .shard {
  opacity: 0;
}

.hero .btn-ink {
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 10px 28px -18px rgba(0, 0, 0, 0.55);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.hero .btn-ink:hover {
  background: var(--gold);
  color: #12110e;
  box-shadow: 0 14px 32px -16px rgba(224, 180, 114, 0.55);
}

.hero .btn-line {
  border-color: color-mix(in srgb, var(--gold) 34%, var(--line-2));
  color: var(--ink);
  background: color-mix(in srgb, var(--paper) 18%, transparent);
}

.hero .btn-line:hover {
  border-color: var(--gold);
  color: var(--gold-2);
  background: color-mix(in srgb, var(--gold) 10%, transparent);
}

.eyebrow,
.sec-i,
.sec-t,
.meta-label,
.field-label,
.contact-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  /* Span past the left glass crack so wrapped lines live in the next tiles */
  width: min(190%, 48rem);
  max-width: none;
  margin: 0;
  color: color-mix(in srgb, var(--ink-2) 82%, var(--gold));
  font-size: 0.98rem;
  line-height: 1.45;
  letter-spacing: 0.12em;
  white-space: normal;
}

.eyebrow-role-flow {
  position: relative;
  display: block;
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
}

/* data-sync (not the id) so the copies painted in the other glass tiles are styled identically.
   One line only: it runs on through the next tiles instead of wrapping. */
[data-sync="role"] {
  display: block;
  font-size: 1.08rem;
  letter-spacing: 0.1em;
  font-weight: 500;
  white-space: nowrap;
}

.eyebrow-meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.eyebrow-sep {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-dim);
  flex: 0 0 auto;
}

.eyebrow-place {
  color: var(--gold);
  font-size: 0.92rem;
  letter-spacing: 0.16em;
}

.hero-title {
  max-width: 8ch;
  margin: 14px 0 0;
  font-family: var(--serif);
  font-size: clamp(3.7rem, 5.8vw, 6rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.86;
  color: var(--ink);
  text-wrap: balance;
}

.hero-title .text-gradient {
  white-space: pre-line;
}

.hero-title em {
  color: var(--gold);
  font-style: italic;
  margin-left: 0.02em;
}

.hero-description {
  max-width: 34ch;
  margin: 20px 0 0;
  color: color-mix(in srgb, var(--ink-2) 88%, var(--gold));
  font-size: 1.05rem;
  line-height: 1.55;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 22px;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid color-mix(in srgb, var(--gold) 18%, var(--line));
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 3.6rem;
}

.stat-value {
  color: var(--gold-2);
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-placeholder {
  width: 100%;
  height: 100%;
  background: #1a120e;
}

.about-side .about-photo {
  display: none;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 24px;
  background: #1a120e;
  box-shadow: var(--shadow);
}

.about-side .about-photo.has-photo {
  display: block;
}

.profile-photo-img,
.about-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.profile-photo-initial,
.about-photo-initial {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 6rem;
  font-style: italic;
}

.face-photo .profile-placeholder {
  position: absolute;
  inset: 0;
}

.scroll-cue {
  position: absolute;
  right: 10px;
  top: 50%;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
}

.terms {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: clamp(24px, 5vw, 64px);
  border-radius: 28px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.hero.is-terms .terms {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.hero.is-terms .terms {
  background: transparent;
  backdrop-filter: none;
}

.terms .btn {
  align-self: flex-start;
  margin-top: 8px;
  background: var(--paper);
}

.terms h2 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 500;
  line-height: 0.95;
}

.terms p {
  max-width: 68ch;
  color: var(--ink-2);
}

.terms p strong {
  color: var(--ink);
  font-weight: 600;
}

.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding: 20px 0;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 0.86rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
}

.marquee.is-ready .marquee-track {
  animation: marquee var(--marquee-duration, 40s) linear infinite;
}

.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track {
  animation-play-state: paused;
}

/* Each group carries its own trailing gap, so a -50% shift loops with no seam. */
.marquee-group {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 30px;
  margin: 0;
  padding: 0 30px 0 0;
  list-style: none;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  transition: color 0.25s var(--ease);
}

.marquee-item::after {
  content: "✦";
  margin-left: 20px;
  color: var(--gold);
  font-size: 0.8em;
  letter-spacing: 0;
}

.marquee-item:hover {
  color: var(--ink);
}

.marquee-icon {
  display: inline-flex;
  color: var(--gold);
}

.marquee-icon svg {
  display: block;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 560px) {
  .marquee {
    padding: 16px 0;
    font-size: 0.76rem;
  }

  .marquee-group {
    gap: 22px;
    padding-right: 22px;
  }

  .marquee-item::after {
    margin-left: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .marquee-track {
    width: auto;
    padding: 0 var(--pad);
  }

  .marquee-group {
    flex: 1;
    flex-shrink: 1;
    flex-wrap: wrap;
    row-gap: 12px;
    justify-content: center;
  }

  .marquee-group[aria-hidden="true"] {
    display: none;
  }
}

.section {
  padding: clamp(72px, 10vw, 120px) var(--pad);
}

.sec-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  color: var(--ink-3);
}

.sec-head::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.sec-i {
  color: var(--gold);
}

.about-grid,
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.about-grid {
  align-items: start;
}

.about-side {
  display: grid;
  gap: 18px;
  min-width: 0;
}

@media (min-width: 981px) {
  .about-side {
    position: sticky;
    top: calc(var(--nav-h) + 16px);
  }
}

.about-quote {
  max-width: 16ch;
  font-family: var(--serif);
  font-size: clamp(2.7rem, 5vw, 4.4rem);
  font-weight: 500;
  font-style: italic;
  line-height: 0.96;
  color: color-mix(in srgb, var(--ink) 78%, var(--gold));
}

.lead {
  max-width: 62ch;
  margin-top: 22px;
  color: var(--ink);
  font-size: 1.05rem;
}

.about-copy p + p {
  margin-top: 12px;
  color: var(--ink-2);
}

.about-facts {
  display: block;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.about-facts li {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.4;
}

.about-facts li[hidden] {
  display: none;
}

.about-facts strong {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.craft {
  position: relative;
}

.craft-stage {
  display: grid;
}

.craft-card {
  width: 100%;
  padding: 18px;
  border: 1px solid var(--line-2);
  border-radius: 28px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  box-shadow: var(--shadow);
}

.craft-card:not(.is-active) {
  display: none;
}

.craft-card.is-active {
  animation: craft-in 0.5s var(--ease) both;
}

@keyframes craft-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.craft-top {
  display: flex;
  justify-content: space-between;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.live-dot::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: #3dd68c;
}

.craft-visual {
  display: grid;
  place-items: center;
  height: 210px;
  margin: 14px 0 16px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--gold) 10%, transparent), transparent 40%),
    var(--bg-2);
  overflow: hidden;
}

.craft-card h3 {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
}

.craft-card p {
  margin-top: 6px;
  color: var(--ink-2);
}

.mini-form,
.mini-list,
.mini-chart,
.mini-cloud {
  width: min(240px, 80%);
}

.mini-form span,
.mini-list li,
.mini-cloud span {
  display: block;
  height: 12px;
  margin: 10px 0;
  border-radius: 999px;
  background: var(--line-2);
}

.mini-form span:first-child {
  width: 46%;
}

.mini-form b,
.mini-cloud b {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.mini-list li {
  width: 100%;
  height: auto;
  padding: 8px 10px;
  background: color-mix(in srgb, var(--paper) 70%, transparent);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 120px;
}

.mini-chart i {
  display: block;
  width: 18px;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(var(--gold), transparent);
}

.mini-cloud span:nth-child(2) { width: 72%; margin-left: 14%; }
.mini-cloud span:nth-child(3) { width: 48%; margin-left: 26%; }

.craft-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
}

.craft-nav,
.craft-play {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.craft-nav:hover,
.craft-play:hover {
  border-color: var(--gold);
  background: var(--gold-dim);
}

.craft-nav {
  font-size: 1.1rem;
}

.craft-play {
  margin-left: auto;
  color: var(--ink-2);
  text-transform: uppercase;
}

.craft-play[hidden] {
  display: none;
}

.craft-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

/* 44px-tall hit area; the visible bar is drawn by ::after. */
.craft-dot {
  position: relative;
  width: 30px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.craft-dot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 4px;
  border-radius: 999px;
  background: var(--line-2);
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease), background 0.3s var(--ease);
}

.craft-dot:hover::after {
  background: var(--ink-3);
}

.craft-dot.is-active::after {
  width: 26px;
  background: var(--ink);
}

.craft-nav:focus-visible,
.craft-play:focus-visible,
.craft-dot:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.experience-block {
  margin-top: 64px;
}

.experience-block h3 {
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
}

.timeline {
  display: grid;
  gap: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.timeline time {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.timeline h3 {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 500;
}

.timeline-org,
.timeline p {
  color: var(--ink-2);
}

.timeline-figure {
  margin: 0 0 12px;
}

.timeline-featured-img {
  width: min(100%, 420px);
  border-radius: 16px;
}

.experience-more,
.projects-more {
  margin-top: 18px;
}

.project-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: white;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-image--noir { background: radial-gradient(circle at 30% 20%, #5a4632, #16120f 62%); }
.project-image--pastry { background: radial-gradient(circle at 70% 20%, #6a3b32, #140e0c 60%); }
.project-image--firehub { background: radial-gradient(circle at 40% 30%, #8a5a28, #120e0c 62%); }
.project-image--none { background: radial-gradient(circle at 50% 30%, #314056, #101218 64%); }

/* Skill-sphere nodes can poke past the edge of a narrow screen */
#stack {
  overflow-x: clip;
}

.contact-copy h2 {
  max-width: 12ch;
  font-family: var(--serif);
  font-size: clamp(3rem, 6vw, 5.2rem);
  font-weight: 500;
  line-height: 0.92;
}

.contact-copy h2 em {
  color: var(--gold);
  font-style: italic;
}

.contact-copy .lead {
  max-width: 46ch;
  margin-top: 18px;
  color: var(--ink-2);
}

.contact-avail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 0.84rem;
}

.contact-list {
  display: grid;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.contact-list li {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: baseline;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.contact-label {
  color: var(--ink-3);
}

.contact-value {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.contact-list a {
  color: var(--gold);
}

.contact-list a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.copy-btn {
  padding: 4px 11px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), background 0.25s var(--ease);
}

.copy-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.copy-btn.is-copied {
  border-color: var(--gold);
  background: var(--gold-dim);
  color: var(--gold);
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.social-row a {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 0.88rem;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

.social-row a:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-1px);
}

.contact-panel {
  position: relative;
  min-width: 0;
}

.form {
  position: relative;
  display: grid;
  gap: 18px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.form::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-2), transparent);
}

.field {
  position: relative;
  display: grid;
  gap: 4px;
}

.field-label {
  color: var(--ink-3);
  transition: color 0.25s var(--ease);
}

.field:focus-within .field-label {
  color: var(--gold);
}

.field input,
.field textarea,
.select-btn {
  width: 100%;
  padding: 12px 2px;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.field input:focus,
.field textarea:focus,
.select-btn:focus-visible,
.select-btn[aria-expanded="true"] {
  outline: none;
  border-bottom-color: var(--gold);
  box-shadow: 0 1px 0 0 var(--gold);
}

.select-btn {
  position: relative;
  padding-right: 28px;
  cursor: pointer;
}

.select-btn::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--ink-3);
  border-bottom: 1.5px solid var(--ink-3);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.25s var(--ease);
}

.select-btn[aria-expanded="true"]::after {
  transform: translateY(-30%) rotate(-135deg);
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.field-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.char-count {
  margin-left: auto;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.7rem;
  white-space: nowrap;
}

.char-count.is-near {
  color: #d35b4a;
}

.form-error {
  min-height: 1.2em;
  color: #d35b4a;
  font-size: 0.8rem;
}

.is-invalid {
  border-bottom-color: #d35b4a !important;
  box-shadow: 0 1px 0 0 #d35b4a !important;
}

.btn-send {
  width: 100%;
  min-height: 52px;
  font-size: 1rem;
  cursor: pointer;
}

.btn-send-arrow {
  transition: transform 0.3s var(--ease);
}

.btn-send:hover .btn-send-arrow {
  transform: translateX(4px);
}

.btn-send:disabled {
  opacity: 0.7;
  cursor: progress;
  transform: none;
}

.form-note {
  margin: -4px 0 0;
  color: var(--ink-3);
  font-size: 0.8rem;
  text-align: center;
}

.form-status {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.88rem;
  text-align: center;
}

.form-status.is-success {
  color: var(--gold);
}

.form-status.is-error {
  color: #d35b4a;
}

.form.is-hidden {
  display: none;
}

.form-done {
  display: grid;
  justify-items: start;
  gap: 14px;
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  box-shadow: var(--shadow);
  animation: form-done-in 0.5s var(--ease);
}

.form-done[hidden] {
  display: none;
}

.form-done:focus {
  outline: none;
}

.form-done h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  font-weight: 500;
  line-height: 1;
}

.form-done p {
  margin: 0;
  color: var(--ink-2);
}

.form-done-alt {
  font-size: 0.88rem;
  color: var(--ink-3) !important;
}

.form-done-alt a {
  color: var(--gold);
}

.form-done-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gold-dim);
  color: var(--gold);
  font-size: 1.2rem;
}

@keyframes form-done-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .form-done {
    animation: none;
  }

  .btn-send:hover .btn-send-arrow,
  .social-row a:hover {
    transform: none;
  }
}

@media (max-width: 520px) {
  .contact-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.select {
  position: relative;
}

.select-list {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.select-list {
  margin: 0;
  list-style: none;
}

.select-list li {
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.select-list li:hover,
.select-list li:focus,
.select-list li[aria-selected="true"] {
  background: var(--gold-dim);
  outline: none;
}

.select-list li[aria-selected="true"] {
  color: var(--gold);
}

/* ---- Contact: centered glass layout ---- */
#contact {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
}

#contact::before,
#contact::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}

#contact::before {
  top: 14%;
  left: 50%;
  width: min(720px, 80vw);
  height: min(520px, 60vw);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--gold-2) 38%, transparent), transparent);
  transform: translateX(-72%);
  opacity: 0.7;
}

#contact::after {
  top: 34%;
  left: 50%;
  width: min(620px, 70vw);
  height: min(460px, 56vw);
  background: radial-gradient(closest-side, rgba(70, 140, 255, 0.28), transparent);
  transform: translateX(-8%);
  opacity: 0.6;
}

#contact .contact-grid {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: clamp(28px, 4vw, 44px);
  text-align: center;
}

#contact .contact-copy {
  display: grid;
  justify-items: center;
}

#contact .contact-copy h2 {
  max-width: 15ch;
  margin-inline: auto;
}

#contact .contact-copy .lead {
  margin-inline: auto;
}

.contact-avail {
  border-color: var(--glass-line);
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 18%, transparent);
}

#contact .contact-panel {
  width: min(640px, 100%);
  text-align: left;
}

#contact .form,
#contact .form-done {
  border: 1px solid var(--glass-line);
  border-radius: 30px;
  background:
    linear-gradient(155deg, color-mix(in srgb, #fff 14%, transparent) 0%, transparent 42%),
    var(--glass);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 color-mix(in srgb, #fff 22%, transparent),
    inset 0 0 0 1px color-mix(in srgb, #fff 4%, transparent);
}

#contact .form {
  gap: 20px;
}

#contact .form::before {
  inset: 0 12% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-2), transparent);
  opacity: 0.9;
}

#contact .field input,
#contact .field textarea,
#contact .select-btn {
  padding: 13px 16px;
  border: 1px solid var(--glass-line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  box-shadow: inset 0 1px 2px color-mix(in srgb, #000 14%, transparent);
}

#contact .field input:focus,
#contact .field textarea:focus,
#contact .select-btn:focus-visible,
#contact .select-btn[aria-expanded="true"] {
  border-color: var(--gold);
  background: color-mix(in srgb, var(--gold) 7%, transparent);
  box-shadow: 0 0 0 4px var(--gold-dim), 0 8px 26px -12px var(--gold);
}

#contact .select-btn {
  padding-right: 40px;
}

#contact .select-btn::after {
  right: 18px;
}

#contact .is-invalid {
  border-color: #d35b4a !important;
  box-shadow: 0 0 0 4px rgba(211, 91, 74, 0.16) !important;
}

#contact .select-list {
  border-color: var(--glass-line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
}

#contact .btn-send {
  border-radius: 18px;
  background: linear-gradient(135deg, #f0d7a8, #d9b36c);
  color: #14110a;
  font-weight: 600;
  box-shadow: 0 14px 34px -14px #c8a96e, inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

#contact .btn-send:hover {
  box-shadow: 0 18px 40px -12px #c8a96e, inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

#contact .form-done {
  justify-items: center;
  text-align: center;
}

.contact-meta {
  display: grid;
  justify-items: center;
  gap: 22px;
  width: min(980px, 100%);
}

.contact-meta .contact-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  margin: 0;
  border-top: 0;
}

.contact-meta .contact-list li {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-content: center;
  gap: 8px;
  padding: 20px 18px;
  border: 1px solid var(--glass-line);
  border-radius: 22px;
  background:
    linear-gradient(155deg, color-mix(in srgb, #fff 10%, transparent), transparent 55%),
    var(--glass);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 16%, transparent);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

.contact-meta .contact-list li:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--gold) 55%, var(--glass-line));
}

.contact-meta .contact-value {
  justify-content: center;
  color: var(--ink);
}

.contact-meta .social-row {
  justify-content: center;
  margin: 0;
}

.contact-meta .social-row a {
  border-color: var(--glass-line);
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

@media (max-width: 760px) {
  .contact-meta .contact-list {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-meta .contact-list li:hover {
    transform: none;
  }
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 22px var(--pad) 28px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.88rem;
}

.site-toast {
  position: fixed;
  z-index: 70;
  left: 50%;
  bottom: 18px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  transform: translateX(-50%);
}

.page {
  padding: calc(var(--nav-h) + 28px) var(--pad) 64px;
}

.page-kicker {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page h1 {
  margin: 10px 0 8px;
  font-family: var(--serif);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 500;
  line-height: 0.92;
}

.page-lead {
  margin-bottom: 28px;
  color: var(--ink-2);
}

.page .projects-grid,
.page .timeline {
  display: grid;
  gap: 18px;
}

.page .project-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
}

.page .project-image {
  position: relative;
  min-height: 180px;
}

.page .project-featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page .project-body {
  padding: 20px 22px;
}

.page .project-body h3 {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
}

.page .project-body p {
  margin-top: 8px;
  color: var(--ink-2);
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.project-tech li {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--gold-dim);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
}

.project-link {
  color: var(--gold);
}

.back-link {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--ink-3);
}

@media (max-width: 980px) {
  .nav-links,
  .theme-btn,
  .status {
    display: none;
  }

  .menu-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-left: auto;
  }

  .nav-right {
    margin-left: auto;
  }

  .nav-right .btn {
    display: none;
  }

  .about-grid,
  .contact-grid,
  .page .project-card,
  .timeline-item {
    grid-template-columns: 1fr;
  }

  .scroll-cue {
    display: none;
  }

  .glass-rig {
    height: auto;
    min-height: 0;
  }

  .shard {
    position: relative;
    inset: auto;
    clip-path: none !important;
    transform: none !important;
    filter: none;
    opacity: 1 !important;
  }

  .shard:not(.shard-live) {
    display: none;
  }

  .face,
  .face-copy,
  .portrait-tilt,
  .hero-figure {
    position: relative;
    inset: auto;
    width: auto;
  }

  .face {
    display: block;
    border-radius: 28px;
  }

  .face-copy {
    width: auto;
    min-height: 420px;
  }

  .eyebrow {
    width: 100%;
  }

  [data-sync="role"] {
    white-space: normal;
  }

  .portrait-tilt {
    height: 520px;
    margin-top: 14px;
    perspective: none;
  }

  .hero-figure {
    height: 100%;
  }

  .portrait-tilt .hero-figure::after,
  .shard-glow {
    content: none;
    display: none;
  }

  .hero-title {
    font-size: clamp(3.4rem, 16vw, 5.2rem);
  }

  .craft-card:not(.is-active) {
    display: none;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 980px) {
  .about-side {
    max-width: 560px;
  }
}

@media (max-width: 560px) {
  .about-quote {
    font-size: clamp(2.3rem, 11vw, 2.9rem);
  }

  .about-facts li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .craft-visual {
    height: 170px;
  }

  .craft-card h3 {
    font-size: 1.7rem;
  }

  .craft-controls {
    gap: 4px;
  }

  .craft-nav,
  .craft-play {
    padding: 0 10px;
  }

  .craft-dot {
    width: 24px;
  }

  .craft-dot::after {
    width: 14px;
  }

  .craft-dot.is-active::after {
    width: 20px;
  }

  .timeline-item {
    gap: 6px;
    padding: 18px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ==========================================================================
   About: cinematic depth layer (enabled by html.js-fx, see js/about-motion.js)
   ========================================================================== */

#about {
  position: relative;
  isolation: isolate;
  --glare: rgba(255, 255, 255, 0.14);
  --tilt-shadow: rgba(0, 0, 0, 0.55);
}

html[data-theme="light"] #about {
  --glare: rgba(255, 255, 255, 0.7);
  --tilt-shadow: rgba(40, 30, 10, 0.3);
}

.about-fx {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.about-spot {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    640px circle at var(--mx, 70%) var(--my, 30%),
    color-mix(in srgb, var(--gold) 20%, transparent),
    transparent 62%
  );
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}

#about.is-live .about-spot {
  opacity: 1;
}

/* Moving perspective grid, like the work tunnel, rolling toward the viewer. */
.about-floor {
  position: absolute;
  right: -10%;
  bottom: -4%;
  left: -10%;
  height: 34%;
  background:
    repeating-linear-gradient(90deg, transparent 0 46px, color-mix(in srgb, var(--gold) 55%, transparent) 47px 48px),
    repeating-linear-gradient(0deg, transparent 0 46px, color-mix(in srgb, var(--gold) 45%, transparent) 47px 48px);
  mask-image: radial-gradient(ellipse at 50% 0, #000 0, transparent 68%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0, #000 0, transparent 68%);
  opacity: 0.4;
  transform: perspective(420px) rotateX(68deg);
  transform-origin: center top;
  animation: about-floor-run 3.2s linear infinite;
}

@keyframes about-floor-run {
  to {
    background-position: 0 0, 0 48px;
  }
}

.about-orb {
  position: absolute;
  width: clamp(280px, 38vw, 560px);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  translate: calc(var(--px, 0) * 40px * var(--k, 1)) calc(var(--sp, 0) * -140px * var(--k, 1) + var(--py, 0) * 30px);
  animation: about-drift 16s ease-in-out infinite alternate;
}

.about-orb--a {
  top: 6%;
  left: -8%;
  background: radial-gradient(circle, color-mix(in srgb, var(--gold) 34%, transparent), transparent 68%);
}

.about-orb--b {
  top: 38%;
  right: -12%;
  background: radial-gradient(circle, rgba(92, 132, 255, 0.2), transparent 68%);
  animation-duration: 21s;
}

.about-orb--c {
  bottom: 8%;
  left: 24%;
  width: clamp(200px, 26vw, 380px);
  background: radial-gradient(circle, color-mix(in srgb, var(--gold-2) 26%, transparent), transparent 68%);
  animation-duration: 13s;
}

html[data-theme="light"] .about-orb {
  opacity: 0.35;
}

@keyframes about-drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(36px, -28px, 0) scale(1.12);
  }
}

.about-ember {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: var(--gold-2, var(--gold));
  box-shadow: 0 0 10px 2px color-mix(in srgb, var(--gold) 60%, transparent);
  filter: blur(var(--b));
  opacity: 0;
  animation: about-ember var(--d) linear var(--delay) infinite;
}

@keyframes about-ember {
  0% {
    opacity: 0;
    transform: translate3d(0, 40px, 0) scale(0.6);
  }
  20% {
    opacity: var(--o);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--dx), -280px, 0) scale(1.1);
  }
}

/* ---------- Title: words rise out of the dark ---------- */

.js-fx .about-quote {
  perspective: 800px;
  translate: 0 calc((0.5 - var(--sp, 0.5)) * 36px);
}

.js-fx .about-quote .w {
  display: inline-block;
  opacity: 0;
  filter: blur(10px);
  transform: translate3d(0, 0.55em, -80px) rotateX(-65deg);
  transform-origin: 50% 100%;
  transition:
    opacity 0.9s var(--ease),
    filter 0.9s var(--ease),
    transform 1.1s var(--ease);
  transition-delay: calc(var(--wi, 0) * 85ms + 150ms);
}

.js-fx .about-quote.is-in .w {
  opacity: 1;
  filter: none;
  transform: none;
}

/* ---------- Generic scroll reveal ---------- */

.js-fx .fx {
  opacity: 0;
  translate: 0 30px;
  transition:
    opacity 0.9s var(--ease),
    translate 1s var(--ease);
  transition-delay: var(--fx-d, 0ms);
}

.js-fx .fx.is-in {
  opacity: 1;
  translate: none;
}

/* Hairline under the section label draws in like a title card. */
.js-fx #about .sec-head.fx-line::after {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.4s var(--ease) 0.2s;
}

.js-fx #about .sec-head.fx-line.is-in::after {
  transform: scaleX(1);
}

/* Facts */
.about-facts li strong {
  transition: color 0.3s var(--ease);
}

.about-facts li:hover strong {
  color: var(--gold);
}

/* ---------- Timeline ---------- */

.js-fx #about .timeline-item {
  position: relative;
  border-top: 0;
  transition:
    opacity 0.9s var(--ease),
    translate 1s var(--ease);
  transition-delay: var(--fx-d, 0ms);
}

.js-fx #about .timeline-item::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), var(--line) 30%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.3s var(--ease) var(--fx-d, 0ms);
}

.js-fx #about .timeline-item.is-in::before {
  transform: scaleX(1);
}

#about .timeline-item > * {
  transition: transform 0.45s var(--ease), color 0.3s var(--ease), opacity 0.3s var(--ease);
}

@media (hover: hover) {
  #about .timeline:hover .timeline-item:not(:hover) > * {
    opacity: 0.5;
  }

  #about .timeline-item:hover > * {
    transform: translateX(8px);
  }

  #about .timeline-item:hover time {
    color: var(--gold-2, var(--gold));
  }
}

/* ---------- 3D tilt: carousel card and photo ---------- */

.js-fx .craft-stage {
  transform-style: preserve-3d;
  will-change: transform;
}

.js-fx .craft-card {
  position: relative;
  transform-style: preserve-3d;
  box-shadow:
    calc(var(--tx, 0) * -26px) calc(var(--ty, 0) * -20px + 30px) 60px -22px var(--tilt-shadow),
    0 0 0 1px color-mix(in srgb, var(--gold) 10%, transparent);
}

.js-fx .craft-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 0%), var(--glare), transparent 58%);
  opacity: 0;
  transform: translateZ(80px);
  transition: opacity 0.45s var(--ease);
}

.js-fx .craft.is-hover .craft-card::after {
  opacity: 1;
}

/* Layers sit at different depths so the card parallaxes as it turns. */
.js-fx .craft-top {
  transform: translateZ(22px);
}

.js-fx .craft-visual {
  transform: translateZ(54px);
  box-shadow: 0 18px 30px -18px var(--tilt-shadow);
}

.js-fx .craft-card h3 {
  transform: translateZ(36px);
}

.js-fx .craft-card p {
  transform: translateZ(18px);
}

/* New slide swings in from depth, then its parts rise in sequence. */
.js-fx .craft-card.is-active {
  animation: craft-swing 0.9s var(--ease) both;
}

@keyframes craft-swing {
  from {
    opacity: 0;
    transform: translate3d(36px, 0, -90px) rotateY(-26deg);
  }
}

.js-fx .craft-card.is-active .craft-top,
.js-fx .craft-card.is-active h3,
.js-fx .craft-card.is-active p {
  animation: craft-rise 0.8s var(--ease) both;
}

.js-fx .craft-card.is-active h3 {
  animation-delay: 0.18s;
}

.js-fx .craft-card.is-active p {
  animation-delay: 0.28s;
}

@keyframes craft-rise {
  from {
    opacity: 0;
    translate: 0 16px;
  }
}

.js-fx .about-side .about-photo {
  transform-style: preserve-3d;
  will-change: transform;
  box-shadow:
    calc(var(--tx, 0) * -24px) calc(var(--ty, 0) * -18px + 28px) 56px -22px var(--tilt-shadow),
    0 0 0 1px color-mix(in srgb, var(--gold) 14%, transparent);
}

.js-fx .about-side .about-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(360px circle at var(--gx, 50%) var(--gy, 0%), var(--glare), transparent 60%);
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}

.js-fx .about-side .about-photo.is-hover::after {
  opacity: 1;
}

.js-fx .about-side .about-photo {
  position: relative;
}

.about-photo-img {
  animation: about-kenburns 20s ease-in-out infinite alternate;
}

@keyframes about-kenburns {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.09) translate3d(-1.5%, -1%, 0);
  }
}

/* ---------- Alive mini visuals inside the practice cards ---------- */

.mini-form span {
  background: linear-gradient(
    90deg,
    var(--line-2) 0 38%,
    color-mix(in srgb, var(--gold) 55%, var(--line-2)) 50%,
    var(--line-2) 62% 100%
  );
  background-size: 260% 100%;
  animation: mini-shimmer 2.6s linear infinite;
}

.mini-form span:nth-child(2) {
  animation-delay: -0.5s;
}

.mini-form span:nth-child(3) {
  animation-delay: -1s;
}

@keyframes mini-shimmer {
  from {
    background-position: 130% 0;
  }
  to {
    background-position: -130% 0;
  }
}

.mini-form b,
.mini-cloud b {
  animation: mini-pulse 2.4s ease-in-out infinite;
}

@keyframes mini-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 0%, transparent);
  }
  50% {
    box-shadow: 0 0 0 7px color-mix(in srgb, var(--gold) 22%, transparent);
  }
}

.mini-list li::before {
  content: "✓";
  margin-right: 8px;
  color: #3dd68c;
}

.craft-card.is-active .mini-list li {
  animation: mini-check 0.6s var(--ease) both;
}

.craft-card.is-active .mini-list li:nth-child(1) {
  animation-delay: 0.35s;
}

.craft-card.is-active .mini-list li:nth-child(2) {
  animation-delay: 0.65s;
}

.craft-card.is-active .mini-list li:nth-child(3) {
  animation-delay: 0.95s;
}

@keyframes mini-check {
  from {
    opacity: 0;
    translate: -14px 0;
  }
}

.mini-cloud span {
  animation: mini-float 3.2s ease-in-out infinite alternate;
}

.mini-cloud span:nth-child(2) {
  animation-delay: -0.8s;
}

.mini-cloud span:nth-child(3) {
  animation-delay: -1.6s;
}

@keyframes mini-float {
  to {
    translate: 0 -5px;
  }
}

.mini-chart i {
  transform-origin: bottom;
}

.craft-card.is-active .mini-chart i {
  animation:
    mini-grow 0.9s var(--ease) both,
    mini-bob 2.6s ease-in-out 1s infinite alternate;
}

.craft-card.is-active .mini-chart i:nth-child(1) { animation-delay: 0.25s, 1s; }
.craft-card.is-active .mini-chart i:nth-child(2) { animation-delay: 0.35s, 1.3s; }
.craft-card.is-active .mini-chart i:nth-child(3) { animation-delay: 0.45s, 1.6s; }
.craft-card.is-active .mini-chart i:nth-child(4) { animation-delay: 0.55s, 1.9s; }
.craft-card.is-active .mini-chart i:nth-child(5) { animation-delay: 0.65s, 2.2s; }

@keyframes mini-grow {
  from {
    transform: scaleY(0);
  }
}

@keyframes mini-bob {
  to {
    transform: scaleY(0.82);
  }
}

@media (max-width: 700px) {
  .about-floor {
    height: 22%;
  }

  .about-orb {
    filter: blur(30px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-fx {
    display: none;
  }

  .about-photo-img {
    animation: none;
  }
}

/* ==========================================================================
   Experience section — pinned stage with a scroll-driven galaxy
   ========================================================================== */

.xp {
  position: relative;
  /* height is set by experience-stage.js (one step of scrolling per role) */
  height: 100vh;
  /* The scene is always "night", whatever theme the site uses. */
  --ink: #f2efe8;
  --ink-2: #cfcbc2;
  --ink-3: #9a968c;
  --gold: #e8bb78;
  --gold-2: #f6dcae;
  --line: rgba(255, 255, 255, 0.1);
  color: var(--ink);
}

.xp-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: #03040a;
}

.xp-sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: #03040a;
}

.exp-stars {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  opacity: 0.8;
  will-change: transform;
}

/*
 * The hourglass clip is scrubbed by scroll (see experience-stage.js).
 * It is a portrait video, so it sits as a tall panel whose side edges fade
 * into the starfield.
 */
.exp-video {
  position: absolute;
  top: 50%;
  left: var(--hg-x, 70%);
  height: 112vh;
  width: auto;
  aspect-ratio: 9 / 16;
  max-width: none;
  translate: -50% -50%;
  object-fit: cover;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 78%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 78%, transparent 100%);
  pointer-events: none;
}

/*
 * A blurred, stretched copy of the current video frame fills the whole stage,
 * so the hourglass scene (its glow, colours and galaxy) spreads behind the
 * text too. It is repainted as the clip is scrubbed.
 */
.exp-bg {
  position: absolute;
  top: -6%;
  left: calc(var(--hg-x, 70%) - 100%);
  width: 200%;
  height: 112%;
  /* The blur is done on the tiny canvas itself (cheap); the browser smooths the upscale */
  opacity: 0.85;
}

/* Keeps text readable over the bright part of the galaxy, and blends the edges */
.xp-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(3, 4, 10, 0.72) 0%, rgba(3, 4, 10, 0.5) 34%, rgba(3, 4, 10, 0.12) 58%, rgba(3, 4, 10, 0) 72%),
    linear-gradient(180deg, rgba(3, 4, 10, 0.7) 0%, transparent 18%, transparent 82%, rgba(3, 4, 10, 0.7) 100%);
}

.xp-head {
  position: absolute;
  z-index: 2;
  top: calc(var(--nav-h) + 6px);
  left: var(--pad);
  right: var(--pad);
  max-width: 1180px;
  margin: 0 auto;
}

.xp-head .sec-head {
  margin-bottom: 8px;
}

.xp-heading {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 500;
  line-height: 1;
}

.xp-heading em {
  color: var(--gold);
}

.xp-hint {
  margin: 8px 0 0;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.xp-slides {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.exp-card {
  position: absolute;
  left: 50%;
  top: 54%;
  width: min(1180px, calc(100% - var(--pad) * 2));
  margin-top: 0;
  translate: -50% -50%;
  will-change: transform, opacity;
}

.exp-card > *:not(.exp-ghost) {
  position: relative;
  max-width: 540px;
}

.exp-ghost {
  position: absolute;
  right: -2%;
  bottom: -40%;
  z-index: -1;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(9rem, 26vw, 22rem);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px rgba(232, 187, 120, 0.22);
  user-select: none;
  pointer-events: none;
}

.exp-meta {
  margin: 0 0 14px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
}

.exp-period {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid rgba(232, 187, 120, 0.4);
  border-radius: 999px;
  background: rgba(232, 187, 120, 0.08);
  color: var(--gold-2);
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.exp-title {
  margin: 20px 0 10px;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  font-weight: 500;
  line-height: 0.98;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.6);
}

.exp-org {
  margin: 0 0 18px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
}

.exp-desc {
  margin: 0;
  color: var(--ink-2);
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.7;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.8);
}

.exp-figure {
  margin: 22px 0 0;
}

.exp-figure img {
  width: min(100%, 320px);
  max-height: 170px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 16px;
}

/* Right-hand progress rail */
.exp-rail {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: clamp(10px, 2vw, 26px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transform: translateY(-50%);
}

.exp-dot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 6px 4px;
  border: 0;
  background: none;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.exp-dot span {
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.exp-dot::after {
  content: "";
  width: 8px;
  height: 8px;
  border: 1px solid var(--ink-3);
  border-radius: 50%;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease),
    transform 0.3s var(--ease);
}

.exp-dot:hover span,
.exp-dot:focus-visible span,
.exp-dot[aria-current="true"] span {
  opacity: 1;
  transform: none;
}

.exp-dot[aria-current="true"] {
  color: var(--gold);
}

.exp-dot[aria-current="true"]::after {
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: 0 0 14px rgba(232, 187, 120, 0.8);
  transform: scale(1.3);
}

@media (max-width: 760px) {
  .xp-veil {
    background: linear-gradient(180deg, rgba(3, 4, 10, 0.7) 0%, rgba(3, 4, 10, 0.55) 40%, rgba(3, 4, 10, 0.78) 100%);
  }

  .exp-card {
    top: 56%;
  }

  .exp-video {
    left: 50%;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    opacity: 0.6;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .exp-ghost {
    bottom: -20%;
    right: 0;
  }

  .exp-rail {
    right: 4px;
  }

  .exp-dot span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .exp-card {
    will-change: auto;
  }
}
