:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-soft: #0a1728;
  --bg-elevated: rgba(8, 18, 34, 0.82);
  --surface: rgba(12, 24, 44, 0.9);
  --surface-strong: #111f38;
  --surface-soft: #13243f;
  --surface-muted: #1d3151;
  --text: #edf2fb;
  --text-strong: #ffffff;
  --text-soft: #a8b6ca;
  --text-muted: #7f93ad;
  --accent: #8ab4ff;
  --accent-2: #2dd4bf;
  --accent-strong: #bfd4ff;
  --accent-soft: rgba(45, 212, 191, 0.12);
  --bg-grid: rgba(191, 212, 255, 0.032);
  --border: rgba(191, 212, 255, 0.17);
  --border-strong: rgba(45, 212, 191, 0.34);
  --glow: 0 0 36px rgba(45, 212, 191, 0.16);
  --shadow: 0 30px 80px rgba(2, 6, 23, 0.42);
  --shadow-soft: 0 18px 44px rgba(2, 6, 23, 0.3);
  --button-bg: linear-gradient(135deg, #2dd4bf, #8ab4ff);
  --button-text: #04111f;
  --button-border: rgba(191, 212, 255, 0.48);
  --pixel-shadow: 4px 4px 0 rgba(2, 6, 23, 0.22);
  --radius: 10px;
  --pixel-border: 2px solid rgba(191, 212, 255, 0.17);
}

body.light-theme {
  color-scheme: light;
  --bg: #dce8f6;
  --bg-soft: #edf4fb;
  --bg-elevated: rgba(242, 247, 252, 0.84);
  --surface: rgba(247, 250, 254, 0.94);
  --surface-strong: #e7f0f9;
  --surface-soft: #dde9f5;
  --surface-muted: #cbd9e8;
  --text: #0f1b2e;
  --text-strong: #071426;
  --text-soft: #51647b;
  --text-muted: #6b7f96;
  --accent: #1d4ed8;
  --accent-2: #0f766e;
  --accent-strong: #102a59;
  --accent-soft: rgba(15, 118, 110, 0.11);
  --bg-grid: rgba(29, 78, 216, 0.026);
  --border: rgba(29, 78, 216, 0.17);
  --border-strong: rgba(15, 118, 110, 0.28);
  --glow: 0 0 30px rgba(15, 118, 110, 0.12);
  --shadow: 0 28px 70px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 16px 38px rgba(15, 23, 42, 0.08);
  --button-bg: linear-gradient(135deg, #0f766e, #2563eb);
  --button-text: #ffffff;
  --button-border: rgba(15, 118, 110, 0.32);
  --pixel-shadow: 4px 4px 0 rgba(30, 64, 175, 0.1);
  --pixel-border: 2px solid rgba(29, 78, 216, 0.17);
}

body.dark-theme {
  color-scheme: dark;
  --bg: #07111f;
  --bg-soft: #0a1728;
  --bg-elevated: rgba(8, 18, 34, 0.82);
  --surface: rgba(12, 24, 44, 0.9);
  --surface-strong: #111f38;
  --surface-soft: #13243f;
  --surface-muted: #1d3151;
  --text: #edf2fb;
  --text-strong: #ffffff;
  --text-soft: #a8b6ca;
  --text-muted: #7f93ad;
  --accent: #8ab4ff;
  --accent-2: #2dd4bf;
  --accent-strong: #bfd4ff;
  --accent-soft: rgba(45, 212, 191, 0.12);
  --bg-grid: rgba(191, 212, 255, 0.032);
  --border: rgba(191, 212, 255, 0.17);
  --border-strong: rgba(45, 212, 191, 0.34);
  --glow: 0 0 36px rgba(45, 212, 191, 0.16);
  --shadow: 0 30px 80px rgba(2, 6, 23, 0.42);
  --shadow-soft: 0 18px 44px rgba(2, 6, 23, 0.3);
  --button-bg: linear-gradient(135deg, #2dd4bf, #8ab4ff);
  --button-text: #04111f;
  --button-border: rgba(191, 212, 255, 0.48);
  --pixel-shadow: 4px 4px 0 rgba(2, 6, 23, 0.22);
  --pixel-border: 2px solid rgba(191, 212, 255, 0.17);
}

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

html {
  scroll-behavior: smooth;
}

/* Work and Experience are temporarily out of the public navigation (their pages stay live at their URLs).
   To bring them back, delete this rule; the markup only carries a data-nav-hidden marker. */
[data-nav-hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  font-family: Inter, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    linear-gradient(rgba(191, 212, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(191, 212, 255, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 16% 12%, rgba(45, 212, 191, 0.12), transparent 24%),
    radial-gradient(circle at 84% 18%, rgba(138, 180, 255, 0.13), transparent 26%),
    linear-gradient(180deg, #020617 0%, var(--bg) 18%, #050b16 100%);
  background-size: 42px 42px, 42px 42px, auto, auto, auto;
  line-height: 1.65;
  transition: background-color 0.25s ease, color 0.25s ease;
}

body.dark-theme {
  background:
    linear-gradient(rgba(191, 212, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(191, 212, 255, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 18% 12%, rgba(45, 212, 191, 0.12), transparent 24%),
    radial-gradient(circle at 84% 18%, rgba(138, 180, 255, 0.13), transparent 26%),
    linear-gradient(180deg, #020617 0%, var(--bg) 18%, #050b16 100%);
  background-size: 42px 42px, 42px 42px, auto, auto, auto;
}

body.light-theme {
  background:
    linear-gradient(rgba(29, 78, 216, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 78, 216, 0.055) 1px, transparent 1px),
    radial-gradient(circle at 14% 14%, rgba(15, 118, 110, 0.12), transparent 24%),
    radial-gradient(circle at 84% 18%, rgba(29, 78, 216, 0.12), transparent 26%),
    linear-gradient(180deg, #edf4fb 0%, var(--bg) 24%, #d4e2f1 100%);
  background-size: 42px 42px, 42px 42px, auto, auto, auto;
}

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

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

button {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.container {
  width: min(1180px, 100%);
  padding-left: 32px;
  padding-right: 32px;
  margin: 0 auto;
}

.world-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px;
  overflow: hidden;
  color: #ffffff;
  background:
    linear-gradient(rgba(148, 163, 184, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 28% 24%, rgba(138, 180, 255, 0.16), transparent 30%),
    radial-gradient(circle at 76% 72%, rgba(45, 212, 191, 0.12), transparent 28%),
    linear-gradient(135deg, #020617 0%, #07111f 52%, #0d1728 100%);
  background-size: 34px 34px, 34px 34px, auto, auto, auto;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 560ms ease, visibility 560ms ease;
}

.world-loader::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(45, 212, 191, 0.08), transparent 22%),
    linear-gradient(180deg, transparent 0%, rgba(2, 6, 23, 0.42) 100%);
  pointer-events: none;
}

.world-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.world-loader.is-hidden .world-loader__inner,
.world-loader.is-hidden .world-loader__blocks,
.world-loader.is-hidden .world-loader__particles {
  opacity: 0;
  transform: scale(0.98);
}

.world-loader__inner {
  position: relative;
  z-index: 2;
  width: min(560px, 100%);
  display: grid;
  gap: 16px;
  padding: clamp(24px, 4vw, 36px);
  border: 2px solid rgba(191, 212, 255, 0.14);
  border-radius: 8px;
  background: rgba(7, 17, 31, 0.72);
  box-shadow:
    8px 8px 0 rgba(2, 6, 23, 0.68),
    0 32px 80px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  transition: opacity 420ms ease, transform 420ms ease;
}

.world-loader__particles,
.world-loader__blocks {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  transition: opacity 420ms ease, transform 420ms ease;
}

.world-loader__particles span {
  position: absolute;
  width: 5px;
  height: 5px;
  background: rgba(191, 212, 255, 0.72);
  box-shadow: 0 0 12px rgba(138, 180, 255, 0.35);
  animation: loaderParticleTwinkle 2.8s ease-in-out infinite;
}

.world-loader__particles span:nth-child(1) { left: 11%; top: 18%; animation-delay: -0.2s; }
.world-loader__particles span:nth-child(2) { left: 22%; top: 72%; background: rgba(45, 212, 191, 0.58); animation-delay: -1.1s; }
.world-loader__particles span:nth-child(3) { left: 34%; top: 28%; animation-delay: -1.8s; }
.world-loader__particles span:nth-child(4) { left: 48%; top: 82%; background: rgba(45, 212, 191, 0.5); animation-delay: -0.7s; }
.world-loader__particles span:nth-child(5) { right: 32%; top: 16%; animation-delay: -1.4s; }
.world-loader__particles span:nth-child(6) { right: 22%; top: 68%; background: rgba(138, 180, 255, 0.62); animation-delay: -2.2s; }
.world-loader__particles span:nth-child(7) { right: 12%; top: 34%; animation-delay: -0.9s; }
.world-loader__particles span:nth-child(8) { left: 8%; top: 44%; background: rgba(45, 212, 191, 0.44); animation-delay: -2.6s; }

.loader-block {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 2px solid rgba(191, 212, 255, 0.18);
  background: #1d4ed8;
  box-shadow:
    inset -7px -7px 0 rgba(2, 6, 23, 0.28),
    inset 5px 5px 0 rgba(255, 255, 255, 0.08),
    5px 5px 0 rgba(2, 6, 23, 0.58);
  animation: loaderBlockFloat 4.6s ease-in-out infinite;
}

.block-1 { left: 15%; top: 24%; }
.block-2 { right: 18%; top: 20%; width: 26px; height: 26px; background: #0f766e; animation-delay: -1.2s; }
.block-3 { left: 24%; bottom: 20%; width: 28px; height: 28px; background: #334155; animation-delay: -2s; }
.block-4 { right: 26%; bottom: 24%; background: #1e3a8a; animation-delay: -2.8s; }
.block-5 { right: 9%; bottom: 42%; width: 22px; height: 22px; background: #115e59; animation-delay: -3.4s; }

.world-loader__cube {
  width: 42px;
  height: 42px;
  margin-bottom: 4px;
  border: 2px solid rgba(191, 212, 255, 0.22);
  background: #0f766e;
  box-shadow:
    inset -9px -9px 0 rgba(2, 6, 23, 0.28),
    inset 7px 7px 0 rgba(255, 255, 255, 0.08),
    5px 5px 0 rgba(2, 6, 23, 0.68);
  animation: loaderCubeBuild 1.35s steps(4, end) infinite;
}

.world-loader__cube span {
  display: block;
  width: 14px;
  height: 14px;
  margin: 8px;
  background: rgba(191, 212, 255, 0.28);
}

.world-loader__kicker,
.world-loader__title {
  margin: 0;
}

.world-loader__kicker {
  color: rgba(191, 212, 255, 0.82);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.24em;
  line-height: 1.2;
  text-transform: uppercase;
}

.world-loader__title {
  color: #ffffff;
  font-size: clamp(2.5rem, 8vw, 5.4rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 0.95;
  text-transform: uppercase;
  text-shadow: 4px 4px 0 rgba(138, 180, 255, 0.08), 0 24px 60px rgba(0, 0, 0, 0.42);
}

.world-loader__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 12px;
  color: rgba(226, 232, 240, 0.76);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.world-loader__percent {
  color: #bfd4ff;
  font-variant-numeric: tabular-nums;
}

.world-loader__bar {
  position: relative;
  height: 4px;
  overflow: hidden;
  border: 1px solid rgba(191, 212, 255, 0.18);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 4px 4px 0 rgba(2, 6, 23, 0.42);
}

.world-loader__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  transform: translateX(-100%);
  animation: loaderProgressScan 1.15s ease-in-out infinite;
}

.world-loader__progress {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #8ab4ff, #2dd4bf);
  box-shadow: 0 0 22px rgba(45, 212, 191, 0.48);
  transition: width 90ms linear;
}

.world-loader__terrain {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  height: 34px;
  margin-top: 4px;
  border: 1px solid rgba(191, 212, 255, 0.12);
  box-shadow: 4px 4px 0 rgba(2, 6, 23, 0.46);
}

.world-loader__terrain span {
  background: linear-gradient(180deg, #14b8a6 0 10px, #4a3222 10px 100%);
  box-shadow: inset -5px -5px 0 rgba(2, 6, 23, 0.2), inset 4px 4px 0 rgba(255, 255, 255, 0.05);
}

.world-loader__terrain span:nth-child(2) {
  background: linear-gradient(180deg, #2dd4bf 0 10px, #4a3222 10px 100%);
}

.world-loader__terrain span:nth-child(4) {
  background: linear-gradient(180deg, #60a5fa 0 10px, #334155 10px 100%);
}

.voxel-opening {
  --voxel-mouse-x: 0;
  --voxel-mouse-y: 0;
  --voxel-scroll: 0;
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #ffffff;
  background:
    linear-gradient(180deg, #020617 0%, #07111f 46%, #0b1630 72%, #07111f 100%);
  isolation: isolate;
}

.voxel-opening__sky,
.voxel-opening__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.voxel-opening__sky {
  z-index: -3;
  opacity: 0.92;
  background:
    radial-gradient(circle at calc(22% + (var(--voxel-mouse-x) * 18px)) 24%, rgba(96, 165, 250, 0.2), transparent 28%),
    radial-gradient(circle at 76% calc(54% - (var(--voxel-scroll) * 12%)), rgba(45, 212, 191, 0.13), transparent 30%),
    radial-gradient(circle at 52% 88%, rgba(96, 165, 250, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.02), rgba(2, 6, 23, 0.72));
}

.voxel-opening__sky::before,
.voxel-opening__sky::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(191, 212, 255, 0.72);
  box-shadow:
    72px 34px 0 rgba(255, 255, 255, 0.44),
    168px 82px 0 rgba(45, 212, 191, 0.52),
    292px 46px 0 rgba(191, 212, 255, 0.58),
    428px 118px 0 rgba(255, 255, 255, 0.34),
    612px 72px 0 rgba(138, 180, 255, 0.54),
    760px 156px 0 rgba(45, 212, 191, 0.38),
    920px 92px 0 rgba(255, 255, 255, 0.42),
    1080px 42px 0 rgba(191, 212, 255, 0.5),
    1188px 132px 0 rgba(45, 212, 191, 0.42);
}

.voxel-opening__sky::after {
  top: 34%;
  left: 8%;
  opacity: 0.52;
  transform: scale(1.4);
}

.voxel-opening__grid {
  z-index: -2;
  opacity: 0.085;
  background:
    linear-gradient(rgba(191, 212, 255, 0.8) 1px, transparent 1px),
    linear-gradient(90deg, rgba(191, 212, 255, 0.8) 1px, transparent 1px),
    linear-gradient(rgba(45, 212, 191, 0.42) 2px, transparent 2px),
    linear-gradient(90deg, rgba(45, 212, 191, 0.42) 2px, transparent 2px);
  background-size: 32px 32px, 32px 32px, 128px 128px, 128px 128px;
  transform: translateY(calc(var(--voxel-scroll) * -24px));
}

.voxel-moon,
.voxel-stars,
.voxel-meteors {
  position: absolute;
  pointer-events: none;
}

.voxel-moon {
  top: clamp(92px, 12vw, 128px);
  right: clamp(72px, 10vw, 150px);
  z-index: 0;
  width: clamp(58px, 7vw, 88px);
  height: clamp(58px, 7vw, 88px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(191, 212, 255, 0.78));
  box-shadow:
    0 0 36px rgba(191, 212, 255, 0.32),
    0 0 88px rgba(138, 180, 255, 0.2),
    inset -12px -12px 0 rgba(148, 163, 184, 0.18);
  clip-path: polygon(0 18%, 18% 18%, 18% 0, 82% 0, 82% 18%, 100% 18%, 100% 82%, 82% 82%, 82% 100%, 18% 100%, 18% 82%, 0 82%);
  opacity: 0.9;
  animation: voxelMoonGlow 5.8s ease-in-out infinite;
}

.voxel-moon::before,
.voxel-moon::after {
  content: "";
  position: absolute;
  background: rgba(15, 23, 42, 0.16);
}

.voxel-moon::before {
  width: 12px;
  height: 12px;
  left: 22%;
  top: 28%;
  box-shadow: 28px 20px 0 rgba(15, 23, 42, 0.1);
}

.voxel-moon::after {
  width: 8px;
  height: 8px;
  right: 24%;
  top: 18%;
}

.voxel-stars {
  inset: 0;
  z-index: 0;
}

.voxel-stars span {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(226, 232, 240, 0.86);
  box-shadow: 0 0 14px rgba(191, 212, 255, 0.38);
  animation: voxelStarTwinkle 3.8s ease-in-out infinite;
}

.voxel-stars span:nth-child(1) { left: 10%; top: 18%; animation-delay: -0.4s; }
.voxel-stars span:nth-child(2) { left: 18%; top: 33%; width: 3px; height: 3px; opacity: 0.72; animation-delay: -2.1s; }
.voxel-stars span:nth-child(3) { left: 30%; top: 12%; background: rgba(45, 212, 191, 0.72); animation-delay: -1.6s; }
.voxel-stars span:nth-child(4) { left: 42%; top: 24%; width: 5px; height: 5px; animation-delay: -2.8s; }
.voxel-stars span:nth-child(5) { left: 52%; top: 14%; opacity: 0.62; animation-delay: -0.9s; }
.voxel-stars span:nth-child(6) { left: 64%; top: 31%; background: rgba(138, 180, 255, 0.78); animation-delay: -3.2s; }
.voxel-stars span:nth-child(7) { right: 20%; top: 18%; width: 3px; height: 3px; animation-delay: -1.2s; }
.voxel-stars span:nth-child(8) { right: 10%; top: 38%; background: rgba(45, 212, 191, 0.58); animation-delay: -2.5s; }
.voxel-stars span:nth-child(9) { left: 14%; top: 52%; opacity: 0.5; animation-delay: -3.6s; }
.voxel-stars span:nth-child(10) { left: 46%; top: 48%; width: 3px; height: 3px; animation-delay: -1.9s; }
.voxel-stars span:nth-child(11) { right: 30%; top: 50%; opacity: 0.48; animation-delay: -0.7s; }
.voxel-stars span:nth-child(12) { right: 6%; top: 16%; width: 5px; height: 5px; animation-delay: -2.9s; }

.voxel-stars span:nth-child(4n)::after {
  content: "";
  position: absolute;
  left: -4px;
  top: 1px;
  width: 12px;
  height: 2px;
  background: currentColor;
  opacity: 0.45;
}

.voxel-meteors {
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.voxel-meteor {
  position: absolute;
  width: 74px;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(191, 212, 255, 0.88), #ffffff);
  box-shadow: 0 0 16px rgba(138, 180, 255, 0.46);
  opacity: 0;
  transform: rotate(-28deg) translateX(0);
  animation: voxelMeteor 8s linear infinite;
}

.voxel-meteor::after {
  content: "";
  position: absolute;
  right: -3px;
  top: -3px;
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 18px rgba(45, 212, 191, 0.45);
}

.meteor-1 {
  left: 58%;
  top: 17%;
  animation-delay: 1.2s;
}

.meteor-2 {
  left: 72%;
  top: 34%;
  width: 52px;
  opacity: 0;
  animation-delay: 4.8s;
  animation-duration: 10s;
}

.meteor-3 {
  left: 28%;
  top: 40%;
  width: 58px;
  animation-delay: 7.4s;
  animation-duration: 11.5s;
}

.voxel-opening__topbar {
  position: absolute;
  top: clamp(24px, 4vw, 48px);
  left: clamp(24px, 4vw, 56px);
  right: clamp(24px, 4vw, 56px);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.voxel-opening__avatar {
  width: 72px;
  height: 72px;
  padding: 5px;
  overflow: hidden;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34), 0 0 0 4px rgba(138, 180, 255, 0.08);
  opacity: 0;
  transform: translateY(-14px);
  animation: voxelFadeDown 700ms cubic-bezier(0.22, 1, 0.36, 1) 120ms forwards;
}

.voxel-opening__avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.voxel-opening__menu {
  display: inline-grid;
  grid-template-columns: auto 34px;
  align-items: center;
  gap: 5px 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  opacity: 0;
  transform: translateY(-14px);
  transition: opacity 180ms ease, transform 180ms ease;
  animation: voxelFadeDown 700ms cubic-bezier(0.22, 1, 0.36, 1) 220ms forwards;
}

.voxel-opening__menu:hover,
.voxel-opening__menu:focus-visible {
  opacity: 0.75;
  transform: translateY(-2px);
}

.voxel-opening__menu i {
  grid-column: 2;
  width: 34px;
  height: 2px;
  border-radius: 0;
  background: currentColor;
  box-shadow: 0 1px 0 rgba(138, 180, 255, 0.25);
}

.voxel-opening__menu span {
  grid-row: 1 / span 3;
}

.voxel-opening__content {
  position: relative;
  z-index: 3;
  width: min(1200px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: clamp(40px, 6vw, 96px);
  padding-top: 96px;
  padding-bottom: 96px;
}

.voxel-opening__copy {
  max-width: 620px;
}

.voxel-opening__kicker,
.voxel-opening__copy h1,
.voxel-opening__subtitle,
.voxel-opening__description,
.voxel-opening__enter {
  opacity: 0;
  transform: translateY(22px);
  animation: voxelFadeUp 760ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.voxel-opening__kicker {
  margin: 0 0 18px;
  color: rgba(191, 212, 255, 0.82);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  animation-delay: 260ms;
}

.voxel-opening__copy h1 {
  margin: 0;
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 0.9;
  text-transform: uppercase;
  text-shadow:
    3px 3px 0 rgba(45, 212, 191, 0.18),
    7px 7px 0 rgba(2, 6, 23, 0.72),
    0 22px 70px rgba(0, 0, 0, 0.48);
  animation-delay: 360ms;
}

.voxel-opening__subtitle {
  margin: 22px 0 0;
  color: #bfd4ff;
  font-size: clamp(1.3rem, 2vw, 2rem);
  font-weight: 800;
  line-height: 1.25;
  animation-delay: 480ms;
}

.voxel-opening__description {
  max-width: 520px;
  margin: 14px 0 0;
  color: rgba(226, 232, 240, 0.76);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.65;
  animation-delay: 600ms;
}

.voxel-opening__enter {
  display: inline-flex;
  margin-top: 30px;
  padding: 16px 22px;
  border: 2px solid rgba(255, 255, 255, 0.34);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(138, 180, 255, 0.2), rgba(15, 26, 47, 0.78));
  color: #ffffff;
  box-shadow: 4px 4px 0 rgba(2, 6, 23, 0.88), 8px 8px 0 rgba(45, 212, 191, 0.12);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
  animation-delay: 720ms;
}

.voxel-opening__enter:hover,
.voxel-opening__enter:focus-visible {
  transform: translate(-2px, -2px);
  border-color: rgba(191, 212, 255, 0.72);
  background: rgba(138, 180, 255, 0.16);
  box-shadow: 6px 6px 0 rgba(2, 6, 23, 0.88), 11px 11px 0 rgba(45, 212, 191, 0.16);
}

.voxel-scene {
  position: relative;
  z-index: 3;
  height: clamp(420px, 55vw, 620px);
  perspective: 1000px;
  opacity: 0;
  transform: translateX(30px);
  animation: voxelSceneIn 900ms cubic-bezier(0.22, 1, 0.36, 1) 520ms forwards;
}

.voxel-cloud {
  position: absolute;
  z-index: 0;
  width: 44px;
  height: 18px;
  background: rgba(191, 212, 255, 0.12);
  box-shadow:
    22px 0 0 rgba(191, 212, 255, 0.1),
    44px 0 0 rgba(191, 212, 255, 0.08),
    12px -14px 0 rgba(191, 212, 255, 0.1),
    34px -14px 0 rgba(191, 212, 255, 0.08);
  opacity: 0.72;
  transform: translate(calc(var(--voxel-mouse-x) * 5px), calc(var(--voxel-mouse-y) * 3px));
}

.cloud-1 {
  top: 8%;
  left: 28%;
}

.cloud-2 {
  top: 18%;
  right: 20%;
  transform: scale(0.72) translate(calc(var(--voxel-mouse-x) * -5px), calc(var(--voxel-mouse-y) * 3px));
}

.cloud-page-1 {
  top: 18%;
  left: 9%;
  z-index: 0;
  transform: scale(0.92) translate(calc(var(--voxel-mouse-x) * 3px), calc(var(--voxel-mouse-y) * 2px));
}

.cloud-page-2 {
  top: 28%;
  right: 12%;
  z-index: 0;
  opacity: 0.5;
  transform: scale(0.78) translate(calc(var(--voxel-mouse-x) * -4px), calc(var(--voxel-mouse-y) * 2px));
}

.voxel-cube,
.voxel-portal,
.voxel-tag {
  transform-style: preserve-3d;
}

.voxel-cube {
  position: absolute;
  width: 72px;
  height: 72px;
  background: #1d4ed8;
  border: 2px solid rgba(191, 212, 255, 0.22);
  box-shadow:
    inset -14px -14px 0 rgba(2, 6, 23, 0.28),
    inset 10px 10px 0 rgba(255, 255, 255, 0.08),
    7px 7px 0 rgba(2, 6, 23, 0.64),
    0 24px 50px rgba(0, 0, 0, 0.32);
  animation: voxelFloat 5s ease-in-out infinite;
}

.voxel-cube::before,
.voxel-cube::after {
  content: "";
  position: absolute;
  border: 2px solid rgba(191, 212, 255, 0.16);
}

.voxel-cube::before {
  left: 8px;
  right: -10px;
  top: -14px;
  height: 14px;
  background: rgba(96, 165, 250, 0.44);
  transform: skewX(-38deg);
}

.voxel-cube::after {
  top: -5px;
  right: -15px;
  width: 15px;
  bottom: 8px;
  background: rgba(15, 23, 42, 0.58);
  transform: skewY(-42deg);
}

.cube-1 {
  top: 10%;
  left: 8%;
  transform: translate(calc(var(--voxel-mouse-x) * 12px), calc(var(--voxel-mouse-y) * 8px)) rotate(8deg);
}

.cube-2 {
  top: 22%;
  right: 8%;
  width: 54px;
  height: 54px;
  background: #0f766e;
  animation-delay: -1.4s;
}

.cube-3 {
  right: 22%;
  bottom: 18%;
  width: 46px;
  height: 46px;
  background: #334155;
  animation-delay: -2.3s;
}

.voxel-portal {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 52%;
  width: min(78%, 520px);
  aspect-ratio: 16 / 10;
  transform: translate(-50%, -50%) translate(calc(var(--voxel-mouse-x) * -8px), calc(var(--voxel-mouse-y) * -6px));
  border: 6px solid rgba(191, 212, 255, 0.22);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(30, 64, 175, 0.34), rgba(6, 16, 31, 0.98));
  box-shadow:
    10px 10px 0 rgba(2, 6, 23, 0.78),
    16px 16px 0 rgba(45, 212, 191, 0.08),
    0 0 72px rgba(45, 212, 191, 0.24),
    inset 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.voxel-portal::before,
.voxel-portal::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 18px;
  height: 18px;
  background: #2dd4bf;
  box-shadow:
    0 0 20px rgba(45, 212, 191, 0.5),
    26px 0 0 rgba(138, 180, 255, 0.55),
    0 26px 0 rgba(138, 180, 255, 0.32);
}

.voxel-portal::before {
  top: -11px;
  left: -11px;
}

.voxel-portal::after {
  right: -11px;
  bottom: -11px;
  transform: rotate(180deg);
}

.voxel-portal__screen {
  position: absolute;
  inset: 22px;
  display: grid;
  align-content: end;
  gap: 12px;
  padding: 28px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 2px, transparent 2px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 2px, transparent 2px),
    radial-gradient(circle at 76% 18%, rgba(45, 212, 191, 0.18), transparent 28%);
  background-size: 24px 24px, 24px 24px, auto;
  box-shadow: inset 6px 6px 0 rgba(255, 255, 255, 0.03), inset -8px -8px 0 rgba(2, 6, 23, 0.3);
}

.voxel-portal__screen span {
  color: #8ab4ff;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.voxel-portal__screen strong {
  max-width: 360px;
  color: #ffffff;
  font-size: clamp(1.45rem, 3vw, 2.5rem);
  line-height: 1.05;
}

.voxel-terrain {
  --ground-top: 40px;
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  height: 156px;
  pointer-events: none;
}

.ground-npc-track {
  position: absolute;
  z-index: 4;
  bottom: calc(100% - var(--ground-top));
  width: 44px;
  height: 68px;
  pointer-events: none;
  will-change: transform;
}

.ground-npc-track::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 7px;
  bottom: -3px;
  width: 30px;
  height: 5px;
  background: rgba(2, 6, 23, 0.44);
  box-shadow: 4px 0 0 rgba(2, 6, 23, 0.2);
}

.ground-npc-track--walk {
  left: -54px;
  animation: groundNpcWalkAcross 14s linear -1.7s infinite;
}

.ground-npc-track--run {
  right: -54px;
  animation: groundNpcRunAcross 10.5s linear -4s infinite;
}

.ground-npc {
  position: relative;
  width: 44px;
  height: 68px;
  filter: drop-shadow(2px 2px 0 rgba(2, 6, 23, 0.5));
  animation: groundNpcBob 420ms steps(2, end) infinite;
}

.ground-npc--run {
  animation: groundNpcRunBob 300ms steps(2, end) infinite;
}

.ground-npc__head,
.ground-npc__body,
.ground-npc__arm,
.ground-npc__leg {
  position: absolute;
  border: 2px solid #07111f;
  box-shadow: inset -3px -3px 0 rgba(2, 6, 23, 0.2), inset 2px 2px 0 rgba(255, 255, 255, 0.1);
}

.ground-npc__head {
  top: 0;
  left: 12px;
  width: 21px;
  height: 22px;
  background: #d7b48a;
}

.ground-npc__head::before {
  content: "";
  position: absolute;
  left: -2px;
  top: -2px;
  width: 21px;
  height: 7px;
  background: #0f1a2f;
  box-shadow: 3px 5px 0 -1px #0f1a2f;
}

.ground-npc__head::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 3px;
  width: 4px;
  height: 4px;
  background: #07111f;
}

.ground-npc__body {
  z-index: 2;
  top: 21px;
  left: 10px;
  width: 25px;
  height: 25px;
  background: linear-gradient(180deg, #2dd4bf 0 7px, #0f766e 7px 100%);
}

.ground-npc--run .ground-npc__body {
  background: linear-gradient(180deg, #8ab4ff 0 7px, #1d4ed8 7px 100%);
}

.ground-npc--run .ground-npc__head {
  background: #b98763;
}

.ground-npc__arm {
  z-index: 1;
  top: 23px;
  width: 8px;
  height: 25px;
  background: linear-gradient(180deg, #0f766e 0 11px, #d7b48a 11px 100%);
  transform-origin: top center;
  animation: groundNpcArm 420ms steps(2, end) infinite;
}

.ground-npc--run .ground-npc__arm {
  background: linear-gradient(180deg, #1d4ed8 0 11px, #b98763 11px 100%);
  animation-duration: 300ms;
}

.ground-npc__arm--left {
  left: 3px;
}

.ground-npc__arm--right {
  right: 3px;
  animation-direction: reverse;
}

.ground-npc__leg {
  top: 44px;
  width: 10px;
  height: 24px;
  background: linear-gradient(180deg, #173462 0 18px, #07111f 18px 100%);
  transform-origin: top center;
  animation: groundNpcLeg 420ms steps(2, end) infinite;
}

.ground-npc--run .ground-npc__leg {
  background: linear-gradient(180deg, #0f1a2f 0 18px, #2dd4bf 18px 100%);
}

.ground-npc--run .ground-npc__leg {
  animation-duration: 300ms;
}

.ground-npc__leg--left {
  left: 11px;
}

.ground-npc__leg--right {
  right: 10px;
  animation-direction: reverse;
}

.voxel-terrain::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 96px;
  background:
    linear-gradient(180deg, rgba(20, 184, 166, 0.88) 0 16px, rgba(72, 48, 32, 0.96) 16px 100%),
    linear-gradient(90deg, rgba(45, 212, 191, 0.22) 0 12.5%, rgba(15, 23, 42, 0.26) 12.5% 25%, rgba(120, 83, 48, 0.34) 25% 37.5%, rgba(15, 23, 42, 0.2) 37.5% 50%, rgba(45, 212, 191, 0.18) 50% 62.5%, rgba(15, 23, 42, 0.24) 62.5% 75%, rgba(51, 65, 85, 0.38) 75% 87.5%, rgba(15, 23, 42, 0.24) 87.5% 100%);
  background-size: auto, 160px 96px;
  box-shadow: 0 -3px 0 rgba(191, 212, 255, 0.16), 0 -22px 58px rgba(45, 212, 191, 0.08);
}

.voxel-terrain::after {
  content: "";
  position: absolute;
  left: -24px;
  right: -24px;
  top: 40px;
  height: 28px;
  background:
    linear-gradient(90deg, #14b8a6 0 48px, #0f766e 48px 96px, #2dd4bf 96px 128px, #0f766e 128px 180px);
  background-size: 180px 28px;
  box-shadow: 0 5px 0 rgba(2, 6, 23, 0.38);
}

.terrain-strip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 96px;
  height: 22px;
  background:
    linear-gradient(90deg, rgba(20, 184, 166, 0.85) 0 10%, rgba(45, 212, 191, 0.65) 10% 18%, rgba(15, 118, 110, 0.85) 18% 32%, rgba(96, 165, 250, 0.42) 32% 38%, rgba(15, 118, 110, 0.86) 38% 100%);
  background-size: 220px 22px;
  box-shadow: 0 -2px 0 rgba(191, 212, 255, 0.16), 0 6px 0 rgba(63, 47, 34, 0.78);
}

.voxel-block {
  position: absolute;
  bottom: 54px;
  width: 92px;
  height: 58px;
  border: 2px solid rgba(191, 212, 255, 0.14);
  background:
    linear-gradient(180deg, #0f766e 0 18px, #3f2f22 18px 100%);
  box-shadow:
    inset -10px -10px 0 rgba(2, 6, 23, 0.24),
    inset 8px 8px 0 rgba(255, 255, 255, 0.05),
    5px 5px 0 rgba(2, 6, 23, 0.58);
}

.block-a { left: 5%; height: 54px; }
.block-b { left: 19%; height: 78px; background: linear-gradient(180deg, #14b8a6 0 20px, #3f2f22 20px 100%); }
.block-c { left: 43%; width: 132px; height: 66px; }
.block-d { right: 22%; height: 88px; background: linear-gradient(180deg, #60a5fa 0 18px, #334155 18px 100%); }
.block-e { right: 6%; width: 118px; height: 62px; }

.voxel-tag {
  position: absolute;
  z-index: 3;
  padding: 9px 12px;
  border: 2px solid rgba(191, 212, 255, 0.22);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(30, 64, 175, 0.34), rgba(15, 26, 47, 0.78));
  color: rgba(248, 250, 252, 0.86);
  backdrop-filter: blur(14px);
  box-shadow: 4px 4px 0 rgba(2, 6, 23, 0.72), inset 3px 3px 0 rgba(255, 255, 255, 0.04);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  animation: voxelFloat 4.8s ease-in-out infinite;
}

.tag-web { left: 0; top: 34%; }
.tag-ui { right: 0; top: 34%; animation-delay: -1.1s; }
.tag-iot { left: 12%; bottom: 24%; animation-delay: -1.8s; }

.voxel-opening__scroll {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 10;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translateX(-50%);
  animation: voxelScrollPulse 1800ms ease-in-out infinite;
}

.voxel-opening__scroll::before,
.voxel-opening__scroll::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 10px 1px;
  background: currentColor;
  opacity: 0.62;
}

.voxel-opening__scroll:hover,
.voxel-opening__scroll:focus-visible {
  color: #ffffff;
}
:root {
  --reveal-distance: 28px;
  --reveal-duration: 700ms;
  --reveal-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.section {
  padding: 76px 0;
}

.section--compact {
  padding-top: 12px;
}

.section--tight-top {
  padding-top: 40px;
}

.section--soft {
  background: linear-gradient(180deg, rgba(226, 232, 240, 0.34), rgba(226, 232, 240, 0.14));
}

body.dark-theme .section--soft {
  background: linear-gradient(180deg, rgba(18, 33, 60, 0.62), rgba(18, 33, 60, 0.2));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: rgba(248, 250, 252, 0.72);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

body.dark-theme .site-header {
  background: rgba(9, 17, 31, 0.72);
  border-bottom-color: rgba(148, 163, 184, 0.1);
}

.navbar,
.nav-cluster,
.nav-links,
.hero-actions,
.contact-actions,
.footer-layout {
  display: flex;
  align-items: center;
}

.navbar {
  justify-content: space-between;
  min-height: 80px;
  gap: 24px;
}

.nav-shell {
  display: block;
}

.brand {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-cluster {
  gap: 16px;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 24px;
}

.nav-links a {
  position: relative;
  color: var(--text-soft);
  font-size: 0.96rem;
  font-weight: 600;
  padding-bottom: 4px;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

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

.nav-links a:hover::after,
.nav-links a:focus-visible::after,
.nav-links a.is-active::after {
  transform: scaleX(1);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(22, 61, 122, 0.26);
}

.theme-toggle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-soft);
  transition: background-color 0.2s ease, color 0.2s ease;
}

body.light-theme .theme-toggle__icon--sun,
body.dark-theme .theme-toggle__icon--moon {
  background: var(--text);
  color: var(--surface);
}

.hero {
  padding-top: 56px;
  padding-bottom: 56px;
}

.page-main {
  padding-bottom: 8px;
}

.home-main {
  scroll-margin-top: 92px;
}

.page-hero {
  padding-top: 96px;
  padding-bottom: 64px;
}

.hero-layout,
.about-layout,
.contact-layout {
  display: grid;
  gap: 32px;
}

.hero-layout {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.9fr);
  align-items: end;
  gap: 28px;
}

.content-grid {
  display: grid;
  gap: 28px;
}

.status-badge,
.eyebrow,
.panel-label,
.section-kicker,
.project-number,
.project-category {
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status-badge {
  display: inline-flex;
  margin: 0 0 20px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-soft);
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
}

.hero h1,
.page-title,
.section-heading h2,
.section-header h2,
.info-card h3,
.project-content h3 {
  margin: 0;
}

.hero h1 {
  font-size: clamp(4.5rem, 10vw, 8rem);
  line-height: 0.9;
  letter-spacing: -0.08em;
}

.page-eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-title {
  font-size: clamp(4.5rem, 9vw, 7.5rem);
  line-height: 0.92;
  letter-spacing: -0.07em;
}

.hero-subheadline {
  max-width: 14ch;
  margin: 20px 0 0;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  font-weight: 600;
  line-height: 1.18;
}

.page-subtitle,
.page-intro,
.hero-description,
.about-copy p,
.section-note,
.project-content p,
.fact-row span,
.contact-list a,
.hero-panel__text,
.info-card p,
.site-footer p {
  color: var(--text-soft);
}

.hero-description,
.page-intro,
.page-subtitle {
  max-width: 720px;
  margin: 20px 0 0;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.55;
}

.hero-actions,
.contact-actions {
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.96rem;
  font-weight: 700;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button--primary {
  color: var(--surface);
  background: var(--text);
  border-color: var(--text);
}

.button--secondary {
  background: var(--bg-elevated);
  color: var(--text);
}

.hero-panel,
.profile-card,
.facts-card,
.project-card,
.contact-card,
.info-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.hero-panel__mesh {
  position: relative;
  min-height: 272px;
  background: linear-gradient(135deg, #081325 0%, #173462 48%, #2b5aa0 100%);
}

body.dark-theme .hero-panel__mesh {
  background: linear-gradient(135deg, #081121 0%, #102646 48%, #274472 100%);
}

.mesh-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(1px);
}

.mesh-orb--one {
  top: 26px;
  right: 24px;
  width: 140px;
  height: 140px;
  background: rgba(255, 255, 255, 0.2);
}

.mesh-orb--two {
  left: -18px;
  bottom: -48px;
  width: 220px;
  height: 220px;
  background: rgba(125, 211, 252, 0.16);
}

.mesh-orb--three {
  left: 48%;
  bottom: 20px;
  width: 112px;
  height: 112px;
  background: rgba(191, 219, 254, 0.26);
}

.hero-panel__content,
.profile-card__content,
.facts-card,
.project-content,
.contact-card,
.info-card {
  padding: 28px;
}

.panel-label,
.section-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
}

body.dark-theme .metric {
  background: rgba(255, 255, 255, 0.02);
}

.metric__value {
  display: block;
  margin-bottom: 6px;
  font-size: 1.7rem;
  font-weight: 700;
  color: #ffffff;
}

.metric__label {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
}

.hero-panel__text {
  margin: 0;
}

.profile-card {
  align-self: stretch;
}

.profile-photo {
  padding: 20px 20px 0;
}

.profile-photo img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  object-position: center;
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
}

.profile-note {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.98rem;
}

.section-heading,
.section-header {
  margin-bottom: 24px;
}

.section-heading--compact,
.section-header--compact {
  margin-bottom: 0;
}

.section-heading h2,
.section-header h2 {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.section-heading--split {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
}

.section-note {
  max-width: 38ch;
  margin: 0;
  font-size: 1rem;
}

.about-layout {
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.8fr);
  align-items: start;
  gap: 24px;
}

.about-copy p {
  max-width: 58ch;
  margin: 0;
  font-size: 1.08rem;
}

.fact-row {
  display: grid;
  gap: 6px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.fact-row:first-of-type {
  padding-top: 2px;
  border-top: 0;
}

.fact-row strong {
  font-size: 1rem;
  color: var(--text);
}

.education-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.education-card:hover,
.education-card:focus-within {
  transform: translateY(-4px);
  border-color: rgba(22, 61, 122, 0.22);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.12);
}

.education-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  padding: 14px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-soft);
}

body.dark-theme .education-logo {
  background: rgba(255, 255, 255, 0.04);
}

.education-logo img {
  width: 100%;
  max-width: 60px;
  height: auto;
}

.education-content {
  display: grid;
  gap: 14px;
}

.education-content h3 {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.education-content p {
  margin: 0;
  color: var(--text-soft);
}

.education-meta {
  display: grid;
  gap: 8px;
}

.education-meta strong {
  color: var(--text);
}

.education-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 700;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.education-link:hover,
.education-link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(22, 61, 122, 0.26);
}

.reveal {
  opacity: 0;
  transition:
    opacity var(--reveal-duration) var(--reveal-ease),
    transform var(--reveal-duration) var(--reveal-ease);
  transition-delay: var(--delay, 0ms);
  will-change: opacity, transform;
}

.reveal-up {
  transform: translateY(var(--reveal-distance));
}

.reveal-left {
  transform: translateX(calc(var(--reveal-distance) * -1));
}

.reveal-right {
  transform: translateX(var(--reveal-distance));
}

.reveal.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

.exploration-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.contact-layout {
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.9fr);
  align-items: start;
  gap: 24px;
}

.contact-list {
  display: grid;
  gap: 16px;
}

.contact-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.contact-item:hover,
.contact-item:focus-visible {
  transform: translateY(-4px);
  color: var(--text);
  border-color: rgba(22, 61, 122, 0.24);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.12);
}

body.dark-theme .contact-item {
  background: rgba(255, 255, 255, 0.03);
}

body.dark-theme .contact-item:hover,
body.dark-theme .contact-item:focus-visible {
  border-color: rgba(138, 180, 255, 0.22);
  box-shadow: 0 24px 52px rgba(2, 6, 23, 0.34);
}

.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

body.dark-theme .contact-icon {
  background: rgba(255, 255, 255, 0.04);
}

.contact-icon svg {
  width: 28px;
  height: 28px;
}

.contact-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.contact-label {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-value {
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.2;
  word-break: break-word;
}

.contact-meta {
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 600;
}

.site-footer,
.footer {
  padding: 18px 0 36px;
}

.footer-layout {
  justify-content: flex-start;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

/* Voxel Night Portfolio World system */
.site-header {
  border-bottom: 2px solid var(--border);
  background:
    linear-gradient(rgba(191, 212, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(191, 212, 255, 0.035) 1px, transparent 1px),
    rgba(7, 17, 31, 0.78);
  background-size: 28px 28px, 28px 28px, auto;
  box-shadow: 0 14px 40px rgba(2, 6, 23, 0.22);
}

body.light-theme .site-header {
  background:
    linear-gradient(rgba(29, 78, 216, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 78, 216, 0.045) 1px, transparent 1px),
    rgba(238, 246, 253, 0.82);
}

.brand,
.nav-links a,
.theme-toggle,
.button,
.education-link,
.project-link-label,
.contact-meta {
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.brand {
  color: var(--text);
  text-shadow: 0 0 16px rgba(45, 212, 191, 0.18);
}

.nav-links a {
  color: var(--text-soft);
  font-size: 0.82rem;
}

.nav-links a::after {
  height: 3px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 14px rgba(45, 212, 191, 0.28);
}

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

.theme-toggle {
  border: var(--pixel-border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 4px 4px 0 rgba(2, 6, 23, 0.46), var(--shadow-soft);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: translate(-2px, -2px);
  border-color: rgba(45, 212, 191, 0.5);
  box-shadow: 6px 6px 0 rgba(2, 6, 23, 0.52), var(--glow);
}

.theme-toggle__icon {
  border-radius: 5px;
  font-size: 0.72rem;
}

body.light-theme .theme-toggle__icon--sun,
body.dark-theme .theme-toggle__icon--moon {
  color: #04111f;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
}

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

.page-main::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 18%, rgba(45, 212, 191, 0.1), transparent 22%),
    radial-gradient(circle at 90% 12%, rgba(138, 180, 255, 0.1), transparent 26%);
}

.section--soft {
  border-block: 2px solid var(--border);
  background:
    linear-gradient(rgba(191, 212, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(191, 212, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(17, 31, 56, 0.52), rgba(7, 17, 31, 0.18));
  background-size: 34px 34px, 34px 34px, auto;
}

body.light-theme .section--soft {
  background:
    linear-gradient(rgba(29, 78, 216, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 78, 216, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(231, 240, 249, 0.72), rgba(220, 232, 246, 0.32));
}

.status-badge,
.page-eyebrow,
.eyebrow,
.panel-label,
.section-kicker,
.project-category,
.project-number,
.contact-label {
  width: fit-content;
  padding: 6px 10px;
  border: 2px solid var(--border);
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  box-shadow: 3px 3px 0 rgba(2, 6, 23, 0.38);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.status-badge {
  border-radius: 5px;
}

.hero h1,
.page-title,
.section-heading h2,
.section-header h2 {
  color: var(--text);
  letter-spacing: 0.015em;
  text-transform: uppercase;
  text-shadow:
    0 0 24px rgba(45, 212, 191, 0.16),
    3px 3px 0 rgba(2, 6, 23, 0.34);
}

.hero-subheadline,
.page-subtitle {
  color: var(--accent-strong);
}

.button,
.education-link,
.project-link-label {
  border: 2px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 4px 4px 0 rgba(2, 6, 23, 0.5);
  color: var(--text);
  font-size: 0.82rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.button:hover,
.button:focus-visible,
.education-link:hover,
.education-link:focus-visible,
.project-link-label:hover,
.project-link-label:focus-visible {
  transform: translate(-2px, -2px);
  border-color: rgba(45, 212, 191, 0.55);
  box-shadow: 6px 6px 0 rgba(2, 6, 23, 0.58), var(--glow);
}

.button--primary {
  color: #04111f;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  border-color: rgba(191, 212, 255, 0.48);
}

.button--secondary,
.education-link {
  background: var(--surface);
  color: var(--text);
}

.hero-panel,
.profile-card,
.facts-card,
.education-card,
.project-card,
.contact-card,
.info-card,
.contact-item,
.metric {
  position: relative;
  border: var(--pixel-border);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(191, 212, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(191, 212, 255, 0.032) 1px, transparent 1px),
    linear-gradient(180deg, rgba(17, 31, 56, 0.88), rgba(7, 17, 31, 0.86));
  background-size: 30px 30px, 30px 30px, auto;
  box-shadow: 6px 6px 0 rgba(2, 6, 23, 0.42), var(--shadow);
}

body.light-theme .hero-panel,
body.light-theme .profile-card,
body.light-theme .facts-card,
body.light-theme .education-card,
body.light-theme .project-card,
body.light-theme .contact-card,
body.light-theme .info-card,
body.light-theme .contact-item,
body.light-theme .metric {
  background:
    linear-gradient(rgba(29, 78, 216, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 78, 216, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(247, 250, 254, 0.92), rgba(231, 240, 249, 0.88));
}

.profile-card::before,
.facts-card::before,
.education-card::before,
.project-card::before,
.contact-card::before,
.info-card::before {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 10px;
  height: 10px;
  background: var(--accent-2);
  box-shadow:
    -18px 0 0 rgba(138, 180, 255, 0.72),
    0 18px 0 rgba(45, 212, 191, 0.42);
  opacity: 0.62;
}

.education-card:hover,
.education-card:focus-within,
.project-card:hover,
.project-card:focus-within,
.contact-item:hover,
.contact-item:focus-visible {
  transform: translate(-2px, -4px);
  border-color: rgba(45, 212, 191, 0.52);
  box-shadow: 8px 8px 0 rgba(2, 6, 23, 0.52), var(--glow);
}

.profile-photo img,
.project-visual,
.image-visual img,
.education-logo,
.contact-icon {
  border-radius: 8px;
}

.profile-photo img,
.project-visual,
.education-logo,
.contact-icon {
  border: 2px solid var(--border);
}

.project-visual {
  background: linear-gradient(135deg, #07111f, #102646);
}

.placeholder-pattern span,
.placeholder-pattern--grid span {
  border-radius: 4px;
  background: rgba(191, 212, 255, 0.16);
}

.project-number {
  border-radius: 4px;
  background: rgba(7, 17, 31, 0.84);
}

.project-content h3,
.info-card h3,
.education-content h3 {
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.language-badge,
.skills-list span {
  border: 2px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  box-shadow: 3px 3px 0 rgba(2, 6, 23, 0.38);
  color: var(--text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-icon {
  background: var(--surface-strong);
  color: var(--accent-strong);
}

body.light-theme .contact-icon {
  background: var(--surface-strong);
}

.project-link-label,
.contact-label {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
}

.site-footer {
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.28));
  position: relative;
  z-index: 1;
}

.footer-layout {
  border-top: 2px solid var(--border);
}

.theme-ambience {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 1;
}

.theme-ambience__light,
.theme-ambience__dark {
  position: absolute;
  inset: 0;
  transition: opacity 280ms ease;
}

body.dark-theme .theme-ambience__light,
body.light-theme .theme-ambience__dark {
  opacity: 0;
}

body.light-theme .theme-ambience__light,
body.dark-theme .theme-ambience__dark {
  opacity: 1;
}

.theme-sun,
.theme-moon,
.theme-glow,
.theme-block,
.theme-cloud,
.theme-birds,
.theme-particle,
.theme-meteor,
.theme-stars span {
  position: absolute;
}

.theme-sun {
  top: clamp(92px, 12vw, 128px);
  right: clamp(72px, 10vw, 150px);
  z-index: 0;
  width: clamp(60px, 7vw, 90px);
  height: clamp(60px, 7vw, 90px);
  background:
    linear-gradient(135deg, rgba(255, 251, 234, 0.98), rgba(255, 221, 122, 0.82));
  box-shadow:
    0 0 34px rgba(255, 214, 102, 0.28),
    0 0 86px rgba(250, 204, 21, 0.16),
    inset -12px -12px 0 rgba(202, 138, 4, 0.14);
  clip-path: polygon(0 18%, 18% 18%, 18% 0, 82% 0, 82% 18%, 100% 18%, 100% 82%, 82% 82%, 82% 100%, 18% 100%, 18% 82%, 0 82%);
  opacity: 0.84;
}

.theme-sun::before,
.theme-sun::after,
.theme-moon::before,
.theme-moon::after {
  content: "";
  position: absolute;
  background: rgba(15, 23, 42, 0.12);
}

.theme-sun::before,
.theme-moon::before {
  width: 12px;
  height: 12px;
  left: 22%;
  top: 28%;
  box-shadow: 28px 20px 0 rgba(15, 23, 42, 0.08);
}

.theme-sun::after,
.theme-moon::after {
  width: 8px;
  height: 8px;
  right: 24%;
  top: 18%;
}

.theme-glow {
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.58;
}

.theme-glow--one {
  top: 92px;
  left: 4%;
  width: clamp(180px, 20vw, 280px);
  height: clamp(180px, 20vw, 280px);
  background: radial-gradient(circle, rgba(45, 212, 191, 0.16), transparent 68%);
}

.theme-glow--two {
  top: 280px;
  right: 10%;
  width: clamp(160px, 18vw, 240px);
  height: clamp(160px, 18vw, 240px);
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12), transparent 70%);
}

.theme-glow--three {
  top: 84px;
  right: 6%;
  width: clamp(160px, 16vw, 220px);
  height: clamp(160px, 16vw, 220px);
  background: radial-gradient(circle, rgba(138, 180, 255, 0.14), transparent 68%);
}

.theme-glow--four {
  top: 240px;
  left: 10%;
  width: clamp(180px, 20vw, 280px);
  height: clamp(180px, 20vw, 280px);
  background: radial-gradient(circle, rgba(45, 212, 191, 0.12), transparent 72%);
}

.theme-block {
  width: 18px;
  height: 18px;
  border: 1px solid color-mix(in srgb, var(--border-strong) 72%, transparent);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 60%, transparent), color-mix(in srgb, var(--accent-2) 34%, transparent));
  box-shadow:
    inset -4px -4px 0 rgba(2, 6, 23, 0.12),
    inset 3px 3px 0 rgba(255, 255, 255, 0.06),
    4px 4px 0 rgba(2, 6, 23, 0.16);
  opacity: 0.4;
  animation: ambienceBlockFloat 10s ease-in-out infinite;
}

.theme-block--one { top: 168px; left: 14%; animation-delay: -1.2s; }
.theme-block--two { top: 320px; right: 18%; width: 12px; height: 12px; animation-delay: -4.4s; }
.theme-block--three { top: 210px; left: 16%; animation-delay: -2.1s; }
.theme-block--four { top: 132px; right: 26%; width: 12px; height: 12px; animation-delay: -6s; }

.theme-block--three,
.theme-block--four {
  background:
    linear-gradient(135deg, rgba(138, 180, 255, 0.52), rgba(45, 212, 191, 0.26));
  opacity: 0.34;
}

.theme-cloud {
  z-index: 0;
  width: 44px;
  height: 18px;
  background: rgba(191, 212, 255, 0.12);
  box-shadow:
    22px 0 0 rgba(191, 212, 255, 0.1),
    44px 0 0 rgba(191, 212, 255, 0.08),
    12px -14px 0 rgba(191, 212, 255, 0.1),
    34px -14px 0 rgba(191, 212, 255, 0.08);
  opacity: 0.64;
}

.theme-cloud--one {
  top: 122px;
  left: 6%;
  transform: scale(1.8);
  animation: ambienceCloudDrift 26s linear infinite;
}

.theme-cloud--two {
  top: 184px;
  right: 18%;
  transform: scale(1.5);
  animation: ambienceCloudDrift 30s linear infinite reverse;
}

.theme-cloud--three {
  top: 268px;
  left: 34%;
  transform: scale(2);
  opacity: 0.44;
  animation: ambienceCloudDrift 34s linear infinite;
}

.theme-cloud--night-one {
  top: 166px;
  left: 12%;
  transform: scale(1.5);
  background: rgba(138, 180, 255, 0.08);
  box-shadow:
    22px 0 0 rgba(138, 180, 255, 0.06),
    44px 0 0 rgba(138, 180, 255, 0.05),
    12px -14px 0 rgba(138, 180, 255, 0.06),
    34px -14px 0 rgba(138, 180, 255, 0.05);
  opacity: 0.46;
  animation: ambienceCloudDrift 32s linear infinite;
}

.theme-cloud--night-two {
  top: 260px;
  right: 12%;
  transform: scale(1.7);
  background: rgba(45, 212, 191, 0.06);
  box-shadow:
    22px 0 0 rgba(45, 212, 191, 0.05),
    44px 0 0 rgba(45, 212, 191, 0.04),
    12px -14px 0 rgba(45, 212, 191, 0.05),
    34px -14px 0 rgba(45, 212, 191, 0.04);
  opacity: 0.34;
  animation: ambienceCloudDrift 38s linear infinite reverse;
}

.theme-birds {
  width: 120px;
  color: rgba(28, 59, 93, 0.42);
}

.theme-birds svg {
  width: 100%;
  height: auto;
}

.theme-birds path {
  fill: none;
  stroke: currentColor;
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-birds--one {
  top: 120px;
  left: 28%;
  animation: ambienceBirdGlide 22s linear infinite;
}

.theme-birds--two {
  top: 208px;
  right: 24%;
  width: 92px;
  opacity: 0.68;
  animation: ambienceBirdGlide 28s linear infinite reverse;
}

.theme-particle {
  width: 8px;
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.42);
  border-radius: 2px;
  opacity: 0.42;
  animation: ambienceParticleFloat 8s ease-in-out infinite;
}

.theme-particle--one { top: 164px; left: 18%; animation-delay: -1.2s; }
.theme-particle--two { top: 244px; right: 16%; animation-delay: -3.4s; }
.theme-particle--three { top: 332px; left: 64%; animation-delay: -2.2s; }
.theme-particle--four { top: 118px; right: 34%; animation-delay: -4.6s; }

.theme-moon {
  top: clamp(92px, 12vw, 128px);
  right: clamp(72px, 10vw, 150px);
  z-index: 0;
  width: clamp(58px, 7vw, 88px);
  height: clamp(58px, 7vw, 88px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(191, 212, 255, 0.78));
  box-shadow:
    0 0 36px rgba(191, 212, 255, 0.32),
    0 0 88px rgba(138, 180, 255, 0.2),
    inset -12px -12px 0 rgba(148, 163, 184, 0.18);
  clip-path: polygon(0 18%, 18% 18%, 18% 0, 82% 0, 82% 18%, 100% 18%, 100% 82%, 82% 82%, 82% 100%, 18% 100%, 18% 82%, 0 82%);
  animation: voxelMoonGlow 7s ease-in-out infinite;
}

.theme-stars {
  position: absolute;
  inset: 0;
}

.theme-stars span {
  width: 4px;
  height: 4px;
  background: rgba(226, 232, 240, 0.86);
  box-shadow: 0 0 14px rgba(191, 212, 255, 0.38);
  animation: voxelStarTwinkle 3.8s ease-in-out infinite;
}

.theme-stars span:nth-child(1) { top: 108px; left: 9%; animation-delay: -0.4s; }
.theme-stars span:nth-child(2) { top: 146px; left: 22%; animation-delay: -2.2s; }
.theme-stars span:nth-child(3) { top: 94px; left: 42%; animation-delay: -1.6s; }
.theme-stars span:nth-child(4) { top: 152px; left: 58%; animation-delay: -3.2s; }
.theme-stars span:nth-child(5) { top: 120px; left: 74%; animation-delay: -0.9s; }
.theme-stars span:nth-child(6) { top: 180px; left: 86%; animation-delay: -2.7s; }
.theme-stars span:nth-child(7) { top: 242px; left: 14%; animation-delay: -1.3s; }
.theme-stars span:nth-child(8) { top: 274px; left: 34%; animation-delay: -3.8s; }
.theme-stars span:nth-child(9) { top: 232px; left: 54%; animation-delay: -2.1s; }
.theme-stars span:nth-child(10) { top: 304px; left: 72%; animation-delay: -0.7s; }
.theme-stars span:nth-child(11) { top: 198px; left: 66%; animation-delay: -4.2s; }
.theme-stars span:nth-child(12) { top: 126px; left: 90%; animation-delay: -1.9s; }

.theme-stars span:nth-child(4n)::after {
  content: "";
  position: absolute;
  left: -4px;
  top: 1px;
  width: 12px;
  height: 2px;
  background: currentColor;
  opacity: 0.45;
}

.theme-meteor {
  width: 74px;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(191, 212, 255, 0.88), #ffffff);
  box-shadow: 0 0 16px rgba(138, 180, 255, 0.46);
  transform: rotate(-28deg) translateX(0);
  opacity: 0;
  animation: voxelMeteor 8s linear infinite;
}

.theme-meteor::before {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-50%);
  box-shadow: 0 0 18px rgba(45, 212, 191, 0.45);
}

.theme-meteor--one {
  top: 120px;
  left: 58%;
}

.theme-meteor--two {
  top: 196px;
  left: 72%;
  animation-delay: -3.8s;
}

@media (max-width: 760px) {
  .nav-links a {
    font-size: 0.78rem;
  }

  .theme-toggle,
  .button,
  .education-link {
    box-shadow: 3px 3px 0 rgba(2, 6, 23, 0.42);
  }
}

@media (max-width: 560px) {
  .hero-panel,
  .profile-card,
  .facts-card,
  .education-card,
  .project-card,
  .contact-card,
  .info-card,
  .contact-item {
    border-radius: 8px;
  }
}

/* Final design-language refinement: align portfolio pages with the intro world. */
.about-copy,
.page-hero .container,
.section-heading,
.section-header,
.contact-card,
.facts-card,
.education-card,
.info-card,
.profile-card,
.project-card {
  position: relative;
}

.page-hero .container::before,
.page-hero .container::after,
.section-heading::before,
.section-header::before {
  content: "";
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: var(--border-strong);
  opacity: 0.72;
}

.page-hero .container::before,
.section-heading::before,
.section-header::before {
  top: 12px;
  left: 12px;
  border-top: 2px solid;
  border-left: 2px solid;
}

.page-hero .container::after {
  right: 12px;
  bottom: 12px;
  border-right: 2px solid;
  border-bottom: 2px solid;
}

.page-hero .container {
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--border);
  border-radius: 14px;
  background:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 78%, transparent), color-mix(in srgb, var(--surface-strong) 70%, transparent));
  background-size: 32px 32px, 32px 32px, auto;
  box-shadow: var(--shadow-soft), var(--pixel-shadow);
  overflow: hidden;
}

.page-hero .container > * {
  position: relative;
  z-index: 1;
}

.section-heading,
.section-header {
  padding: 18px 20px 0;
  margin-bottom: 26px;
}

.section-heading::after,
.section-header::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: -10px;
  height: 1px;
  background: linear-gradient(90deg, var(--border-strong), transparent 72%);
  opacity: 0.85;
}

.section-note {
  padding-top: 4px;
}

.section-heading h2,
.section-header h2 {
  max-width: 14ch;
}

.section-kicker,
.page-eyebrow,
.eyebrow,
.panel-label {
  position: relative;
}

.section-kicker::before,
.page-eyebrow::before,
.panel-label::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  background: var(--accent-2);
  box-shadow: 10px 0 0 color-mix(in srgb, var(--accent) 52%, transparent);
  vertical-align: middle;
}

.profile-card,
.facts-card,
.education-card,
.project-card,
.contact-card,
.info-card,
.contact-item {
  overflow: hidden;
}

.profile-card::after,
.facts-card::after,
.education-card::after,
.project-card::after,
.contact-card::after,
.info-card::after,
.contact-item::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid color-mix(in srgb, var(--border) 65%, transparent);
  border-radius: calc(var(--radius) - 2px);
  opacity: 0.42;
  pointer-events: none;
}

.project-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 22%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0 2px, transparent 2px 10px);
  mix-blend-mode: screen;
  opacity: 0.28;
  pointer-events: none;
}

.project-content {
  min-height: 206px;
}

.project-link-label {
  margin-top: 8px;
}

.project-category,
.project-number,
.contact-label,
.language-badge {
  letter-spacing: 0.12em;
}

.language-grid {
  position: relative;
  padding: 10px 2px 4px;
}

.language-grid::before {
  content: "";
  position: absolute;
  inset: -6px 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, var(--border-strong), transparent 74%);
}

.language-badge {
  min-height: 42px;
  padding-inline: 14px;
  background:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px),
    var(--surface);
  background-size: 18px 18px, 18px 18px, auto;
}

.facts-card .fact-row strong,
.contact-value,
.education-content h3,
.info-card h3,
.project-content h3 {
  color: var(--text-strong);
}

.facts-card .fact-row {
  grid-template-columns: minmax(0, 120px) 1fr;
  align-items: start;
  gap: 10px 16px;
}

.facts-card .fact-row span {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.education-card,
.contact-card {
  box-shadow: var(--shadow), var(--pixel-shadow);
}

.contact-card {
  padding: 6px;
}

.contact-card .contact-list {
  position: relative;
  z-index: 1;
}

.contact-item {
  border-radius: 12px;
}

.contact-item .contact-copy {
  gap: 6px;
}

.contact-meta {
  font-size: 0.8rem;
}

.about-copy {
  padding: 24px 24px 26px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 76%, transparent), color-mix(in srgb, var(--surface-strong) 68%, transparent));
  background-size: 28px 28px, 28px 28px, auto;
  box-shadow: var(--shadow-soft), var(--pixel-shadow);
}

.about-copy p + p {
  margin-top: 16px;
}

.exploration-grid .info-card {
  min-height: 220px;
}

body[data-page="contact"] .section-header h2::after,
body[data-page="about"] .section-header h2::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 12px;
  background: color-mix(in srgb, var(--accent-2) 72%, transparent);
  box-shadow: 16px 0 0 color-mix(in srgb, var(--accent) 42%, transparent);
  vertical-align: middle;
}

body.light-theme .about-copy,
body.light-theme .page-hero .container {
  box-shadow: var(--shadow-soft), var(--pixel-shadow);
}

body.dark-theme .about-copy,
body.dark-theme .page-hero .container {
  box-shadow: var(--shadow), var(--pixel-shadow), 0 0 0 1px rgba(191, 212, 255, 0.04) inset;
}

@media (max-width: 980px) {
  .page-hero .container,
  .about-copy {
    padding: 22px;
  }

  .facts-card .fact-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 760px) {
  .section-heading,
  .section-header {
    padding-inline: 14px;
  }

  .section-heading::after,
  .section-header::after {
    left: 14px;
    right: 14px;
  }

  .page-hero .container,
  .about-copy {
    border-radius: 12px;
  }

  .project-content {
    min-height: auto;
  }
}

/* Final visual bug-fix pass: balanced light/dark portfolio surfaces. */
body {
  background:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px),
    radial-gradient(circle at 16% 10%, rgba(45, 212, 191, 0.09), transparent 24%),
    radial-gradient(circle at 86% 18%, rgba(138, 180, 255, 0.1), transparent 26%),
    linear-gradient(180deg, #020617 0%, var(--bg) 24%, #050b16 100%);
  background-attachment: fixed;
  background-size: 48px 48px, 48px 48px, auto, auto, auto;
}

body.light-theme {
  --bg: #e7f0fa;
  --bg-soft: #f2f7fc;
  --bg-elevated: rgba(248, 251, 255, 0.86);
  --surface: rgba(248, 251, 255, 0.92);
  --surface-strong: #eef5fc;
  --surface-soft: #e3edf8;
  --surface-muted: #d3e0ee;
  --text: #102033;
  --text-strong: #071426;
  --text-soft: #4f6278;
  --text-muted: #6d7f94;
  --accent: #2563eb;
  --accent-2: #0f766e;
  --accent-strong: #16376f;
  --accent-soft: rgba(15, 118, 110, 0.085);
  --bg-grid: rgba(29, 78, 216, 0.018);
  --border: rgba(30, 64, 175, 0.13);
  --border-strong: rgba(15, 118, 110, 0.24);
  --glow: 0 0 26px rgba(15, 118, 110, 0.1);
  --shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.06);
  --button-bg: linear-gradient(135deg, #0f766e, #2563eb);
  --button-text: #ffffff;
  --button-border: rgba(15, 118, 110, 0.28);
  --pixel-border: 1px solid rgba(30, 64, 175, 0.14);
  background:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px),
    radial-gradient(circle at 14% 12%, rgba(15, 118, 110, 0.07), transparent 24%),
    radial-gradient(circle at 86% 16%, rgba(37, 99, 235, 0.07), transparent 26%),
    linear-gradient(180deg, #f1f7fd 0%, var(--bg) 30%, #dce9f6 100%);
  background-attachment: fixed;
  background-size: 56px 56px, 56px 56px, auto, auto, auto;
}

body.dark-theme {
  --bg-grid: rgba(191, 212, 255, 0.028);
  --border: rgba(191, 212, 255, 0.15);
  --border-strong: rgba(45, 212, 191, 0.32);
  --shadow: 0 24px 64px rgba(2, 6, 23, 0.36);
  --shadow-soft: 0 14px 36px rgba(2, 6, 23, 0.26);
}

.site-header {
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px),
    color-mix(in srgb, var(--bg) 82%, transparent);
  background-size: 32px 32px, 32px 32px, auto;
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.16);
}

body.light-theme .site-header {
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.navbar {
  min-height: 74px;
}

.nav-links a {
  font-size: 0.83rem;
  letter-spacing: 0.08em;
}

.theme-toggle {
  min-height: 38px;
  padding: 4px;
  border: 1px solid var(--border);
  box-shadow: 3px 3px 0 rgba(2, 6, 23, 0.2), var(--shadow-soft);
}

body.light-theme .theme-toggle {
  box-shadow: 3px 3px 0 rgba(30, 64, 175, 0.1), var(--shadow-soft);
}

.theme-toggle__icon {
  min-width: 50px;
  padding: 6px 8px;
}

.hero {
  padding-top: clamp(44px, 6vw, 72px);
  padding-bottom: clamp(48px, 6vw, 72px);
}

.page-hero {
  padding-top: clamp(72px, 8vw, 104px);
  padding-bottom: clamp(44px, 6vw, 68px);
}

.hero h1 {
  font-size: clamp(4rem, 9vw, 8rem);
  line-height: 0.92;
  text-transform: none;
}

.page-title {
  font-size: clamp(3.5rem, 8vw, 7rem);
  line-height: 0.94;
}

.section-heading h2,
.section-header h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.05;
}

.hero h1,
.page-title,
.section-heading h2,
.section-header h2 {
  color: var(--text-strong);
  text-shadow: 0 0 18px rgba(45, 212, 191, 0.11);
}

body.light-theme .hero h1,
body.light-theme .page-title,
body.light-theme .section-heading h2,
body.light-theme .section-header h2 {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.hero-subheadline,
.page-subtitle,
.hero-description,
.page-intro,
.about-copy p,
.section-note,
.project-content p,
.info-card p,
.education-content p,
.contact-meta,
.site-footer p {
  color: var(--text-soft);
}

.status-badge,
.page-eyebrow,
.eyebrow,
.panel-label,
.section-kicker,
.project-category,
.project-number,
.contact-label {
  border: 1px solid var(--border);
  background: var(--accent-soft);
  box-shadow: 2px 2px 0 rgba(2, 6, 23, 0.16);
  color: var(--accent-strong);
}

body.light-theme .status-badge,
body.light-theme .page-eyebrow,
body.light-theme .eyebrow,
body.light-theme .panel-label,
body.light-theme .section-kicker,
body.light-theme .project-category,
body.light-theme .project-number,
body.light-theme .contact-label {
  box-shadow: 2px 2px 0 rgba(30, 64, 175, 0.08);
}

.button,
.education-link,
.project-link-label {
  border: 2px solid var(--button-border);
  background: var(--surface);
  box-shadow: 3px 3px 0 rgba(2, 6, 23, 0.24);
  color: var(--text);
}

.button--primary {
  color: var(--button-text);
  background: var(--button-bg);
  border-color: var(--button-border);
}

body.light-theme .button,
body.light-theme .education-link,
body.light-theme .project-link-label {
  box-shadow: 3px 3px 0 rgba(30, 64, 175, 0.1);
}

.button:hover,
.button:focus-visible,
.education-link:hover,
.education-link:focus-visible,
.project-link-label:hover,
.project-link-label:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 rgba(2, 6, 23, 0.28), var(--glow);
}

body.light-theme .button:hover,
body.light-theme .button:focus-visible,
body.light-theme .education-link:hover,
body.light-theme .education-link:focus-visible,
body.light-theme .project-link-label:hover,
body.light-theme .project-link-label:focus-visible {
  box-shadow: 5px 5px 0 rgba(30, 64, 175, 0.12), var(--glow);
}

.hero-panel,
.profile-card,
.facts-card,
.education-card,
.project-card,
.contact-card,
.info-card,
.contact-item,
.metric {
  border: 1px solid var(--border);
  background:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, transparent), color-mix(in srgb, var(--surface-strong) 84%, transparent));
  background-size: 34px 34px, 34px 34px, auto;
  box-shadow: var(--shadow);
}

.profile-card::before,
.facts-card::before,
.education-card::before,
.project-card::before,
.contact-card::before,
.info-card::before {
  width: 8px;
  height: 8px;
  box-shadow:
    -14px 0 0 color-mix(in srgb, var(--accent) 55%, transparent),
    0 14px 0 color-mix(in srgb, var(--accent-2) 45%, transparent);
  opacity: 0.5;
}

.education-card:hover,
.education-card:focus-within,
.project-card:hover,
.project-card:focus-within,
.contact-item:hover,
.contact-item:focus-visible {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow), var(--glow);
}

.profile-photo img {
  height: clamp(300px, 34vw, 360px);
}

.project-visual {
  min-height: 280px;
}

.image-visual img {
  height: 280px;
}

.project-number {
  top: 14px;
  left: 14px;
  background: color-mix(in srgb, var(--surface-strong) 88%, transparent);
  color: var(--text-strong);
}

.project-content {
  gap: 10px;
}

.project-content h3,
.info-card h3,
.education-content h3 {
  color: var(--text-strong);
  letter-spacing: 0;
  text-transform: none;
}

.language-badge,
.skills-list span {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 2px 2px 0 rgba(2, 6, 23, 0.14);
}

body.light-theme .language-badge,
body.light-theme .skills-list span {
  box-shadow: 2px 2px 0 rgba(30, 64, 175, 0.08);
}

.contact-item {
  background: var(--surface);
}

.contact-icon,
.education-logo {
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
}

.section--soft {
  border-block: 1px solid var(--border);
  background:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px),
    linear-gradient(180deg, color-mix(in srgb, var(--surface-soft) 44%, transparent), color-mix(in srgb, var(--bg) 18%, transparent));
  background-size: 42px 42px, 42px 42px, auto;
}

@media (max-width: 760px) {
  .theme-sun,
  .theme-moon {
    top: 86px;
    right: 18px;
  }

  .theme-glow--one,
  .theme-glow--three {
    width: 160px;
    height: 160px;
  }

  .theme-cloud--one {
    left: -4%;
  }

  .theme-cloud--two {
    right: 4%;
  }

  .theme-cloud--three {
    left: 18%;
    top: 236px;
  }

  .theme-birds--one {
    top: 136px;
    left: 18%;
  }

  .theme-birds--two {
    top: 224px;
    right: 10%;
  }

  .theme-cloud--night-one {
    left: 4%;
  }

  .theme-cloud--night-two {
    right: 4%;
  }

  .navbar {
    min-height: auto;
  }

  .hero h1 {
    font-size: clamp(3.3rem, 17vw, 5.5rem);
  }

  .page-title {
    font-size: clamp(3rem, 16vw, 5.4rem);
  }

  .theme-toggle__icon {
    min-width: 46px;
  }
}

@media (max-width: 560px) {
  .theme-glow--two,
  .theme-glow--four,
  .theme-cloud--three,
  .theme-cloud--night-two,
  .theme-birds--two,
  .theme-meteor--two,
  .theme-block--two,
  .theme-block--four {
    display: none;
  }

  .theme-stars span:nth-child(n + 9) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-cloud,
  .theme-birds,
  .theme-particle,
  .theme-block,
  .theme-moon,
  .theme-sun,
  .theme-stars span,
  .theme-meteor {
    animation: none !important;
  }
}

@keyframes ambienceCloudDrift {
  0%,
  100% {
    transform: translateX(0);
  }

  50% {
    transform: translateX(26px);
  }
}

@keyframes ambienceBirdGlide {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(18px, -6px, 0);
  }
}

@keyframes ambienceParticleFloat {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.22;
  }

  50% {
    transform: translateY(-12px);
    opacity: 0.48;
  }
}

@keyframes ambienceBlockFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes ambienceMoonGlow {
  0%,
  100% {
    opacity: 0.82;
    box-shadow: 0 0 26px rgba(138, 180, 255, 0.12);
  }

  50% {
    opacity: 0.96;
    box-shadow: 0 0 40px rgba(138, 180, 255, 0.18);
  }
}

@keyframes ambienceStarTwinkle {
  0%,
  100% {
    opacity: 0.34;
    transform: translateY(0);
  }

  50% {
    opacity: 0.95;
    transform: translateY(-2px);
  }
}

@keyframes ambienceMeteor {
  0%,
  76% {
    opacity: 0;
    transform: rotate(-28deg) translateX(0);
  }

  80% {
    opacity: 0.92;
  }

  92% {
    opacity: 0;
    transform: rotate(-28deg) translateX(-220px);
  }

  100% {
    opacity: 0;
    transform: rotate(-28deg) translateX(-220px);
  }
}

@keyframes voxelFadeDown {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes voxelFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes voxelSceneIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes voxelMoonGlow {
  0%,
  100% {
    opacity: 0.84;
    filter: drop-shadow(0 0 12px rgba(191, 212, 255, 0.2));
  }

  50% {
    opacity: 1;
    filter: drop-shadow(0 0 20px rgba(191, 212, 255, 0.34));
  }
}

@keyframes voxelStarTwinkle {
  0%,
  100% {
    opacity: 0.34;
    transform: translateY(0);
  }

  50% {
    opacity: 0.95;
    transform: translateY(-3px);
  }
}

@keyframes voxelMeteor {
  0%,
  74% {
    opacity: 0;
    transform: rotate(-28deg) translateX(0);
  }

  78% {
    opacity: 0.88;
  }

  88% {
    opacity: 0;
    transform: rotate(-28deg) translateX(-280px);
  }

  100% {
    opacity: 0;
    transform: rotate(-28deg) translateX(-280px);
  }
}

@keyframes loaderParticleTwinkle {
  0%,
  100% {
    opacity: 0.25;
    transform: translateY(0) scale(1);
  }

  50% {
    opacity: 0.95;
    transform: translateY(-8px) scale(1.25);
  }
}

@keyframes loaderBlockFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-14px);
  }
}

@keyframes loaderCubeBuild {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-6px) rotate(8deg);
  }
}

@keyframes loaderProgressScan {
  to {
    transform: translateX(100%);
  }
}

@keyframes voxelFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes groundNpcWalkAcross {
  to {
    transform: translateX(calc(100vw + 104px));
  }
}

/* Work archive: light editorial index. */
body[data-page="projects"] {
  overflow-x: clip;
  color: #1c1c1b;
  background: #f1f0eb;
}

body[data-page="projects"]::before {
  content: "";
  position: fixed;
  z-index: 100;
  inset: 0;
  background: #f1f0eb;
  transform-origin: bottom;
  pointer-events: none;
  animation: workPageWipe 720ms cubic-bezier(0.76, 0, 0.24, 1) both;
}

body[data-page="projects"] .home-nav {
  position: absolute;
  color: #1c1c1b;
}

body[data-page="projects"] .home-nav__links a {
  opacity: 0.58;
}

body[data-page="projects"] .home-nav__links a[aria-current="page"],
body[data-page="projects"] .home-nav__links a:hover,
body[data-page="projects"] .home-nav__links a:focus-visible {
  opacity: 1;
}

body[data-page="projects"] .home-nav__brand:focus-visible,
body[data-page="projects"] .home-nav__links a:focus-visible,
.work-row:focus-visible,
.work-contact a:focus-visible,
.work-footer a:focus-visible {
  outline: 1px solid #1c1c1b;
  outline-offset: 6px;
}

.work-main {
  overflow: clip;
  color: #1c1c1b;
  background: #f1f0eb;
  animation: workPageContent 500ms ease 300ms both;
}

.work-shell {
  width: 100%;
  padding-inline: clamp(28px, 4vw, 72px);
}

.work-label,
.work-row__number,
.work-row__type,
.work-index__count {
  margin: 0;
  color: rgba(28, 28, 27, 0.52);
  font-size: clamp(0.62rem, 0.68vw, 0.72rem);
  font-weight: 650;
  letter-spacing: 0.15em;
  line-height: 1.4;
  text-transform: uppercase;
}

.work-hero {
  min-height: 100vh;
  min-height: 100svh;
}

.work-hero__inner {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: clamp(128px, 16vh, 176px);
  padding-bottom: clamp(42px, 6vh, 64px);
}

.work-hero h1 {
  align-self: center;
  margin: 0 0 0 -0.07em;
  color: #1c1c1b;
  font-size: clamp(5rem, 11vw, 11rem);
  font-weight: 650;
  letter-spacing: -0.095em;
  line-height: 0.75;
  text-transform: uppercase;
}

.work-hero h1 span {
  display: block;
}

.work-hero h1 span:last-child {
  margin-left: 0.72em;
}

.work-hero__intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: end;
  padding-top: 32px;
  border-top: 1px solid rgba(28, 28, 27, 0.24);
}

.work-hero__intro p {
  max-width: 48ch;
  margin: 0;
  color: rgba(28, 28, 27, 0.68);
  font-size: clamp(0.82rem, 1vw, 1rem);
  line-height: 1.55;
}

.work-hero__intro p:last-child {
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.work-index {
  position: relative;
  padding-block: clamp(80px, 9vw, 140px);
  border-top: 1px solid rgba(28, 28, 27, 0.24);
}

.work-index__list {
  border-bottom: 1px solid rgba(28, 28, 27, 0.26);
}

.work-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 240px;
  gap: clamp(18px, 2.5vw, 42px);
  align-items: center;
  min-height: 120px;
  margin: 0;
  padding-block: clamp(24px, 2.3vw, 36px);
  border-top: 1px solid rgba(28, 28, 27, 0.26);
  color: rgba(28, 28, 27, 0.72);
  cursor: default;
  transition: color 380ms cubic-bezier(0.76, 0, 0.24, 1), opacity 380ms ease;
}

a.work-row {
  cursor: pointer;
}

.work-row h2 {
  margin: 0;
  font-size: clamp(3rem, 5.5vw, 6rem);
  font-weight: 540;
  letter-spacing: -0.075em;
  line-height: 0.9;
  transition: transform 440ms cubic-bezier(0.76, 0, 0.24, 1);
}

.work-row__type {
  justify-self: end;
  text-align: right;
  transition: color 360ms ease, transform 440ms cubic-bezier(0.76, 0, 0.24, 1);
}

.work-row__description {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.work-row__image {
  display: none;
}

.work-row.is-active {
  color: #111;
}

.work-row.is-active h2 {
  transform: translateX(14px);
}

.work-row.is-active .work-row__type {
  color: #668800;
  transform: translateX(-8px);
}

.work-index__list.has-active .work-row:not(.is-active) {
  opacity: 0.42;
}

.work-index__count {
  margin-top: 38px;
  text-align: right;
}

.work-preview {
  position: fixed;
  z-index: 18;
  top: 0;
  left: 0;
  width: clamp(400px, 32vw, 520px);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, -50%, 0) scale(0.96);
  transition: opacity 260ms ease, transform 360ms cubic-bezier(0.76, 0, 0.24, 1);
  will-change: transform;
}

.work-preview.is-visible {
  opacity: 1;
  transform: translate3d(-50%, -50%, 0) scale(1);
}

.work-preview__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: transparent;
  box-shadow: 0 24px 70px rgba(28, 28, 27, 0.18);
}

.work-preview__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 300ms ease, transform 360ms cubic-bezier(0.76, 0, 0.24, 1);
}

.work-preview__media img.is-active {
  opacity: 1;
  transform: scale(1);
}

.work-preview__cta {
  position: absolute;
  right: -18px;
  bottom: -18px;
  display: grid;
  place-items: center;
  width: clamp(72px, 6vw, 92px);
  height: clamp(72px, 6vw, 92px);
  border-radius: 50%;
  color: #111;
  background: #d7ff00;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.1em;
}

.work-contact {
  padding-block: clamp(112px, 14vw, 220px) clamp(80px, 10vw, 150px);
  border-top: 1px solid rgba(28, 28, 27, 0.24);
}

.work-contact__heading {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: end;
  margin-top: clamp(64px, 9vw, 136px);
  padding-bottom: clamp(48px, 5vw, 76px);
  border-bottom: 1px solid rgba(28, 28, 27, 0.3);
}

.work-contact h2 {
  margin: 0;
  font-size: clamp(4.3rem, 10vw, 10rem);
  font-weight: 590;
  letter-spacing: -0.09em;
  line-height: 0.76;
  text-transform: uppercase;
}

.work-contact h2 span {
  display: block;
}

.work-contact a {
  display: grid;
  place-items: center;
  width: clamp(150px, 14vw, 210px);
  aspect-ratio: 1;
  margin-bottom: -48%;
  border-radius: 50%;
  color: #f1f0eb;
  background: #1c1c1b;
  font-size: clamp(0.72rem, 0.85vw, 0.86rem);
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  transition: color 350ms ease, background 350ms ease, transform 450ms cubic-bezier(0.76, 0, 0.24, 1);
}

.work-contact a:hover,
.work-contact a:focus-visible {
  color: #111;
  background: #d7ff00;
  transform: scale(1.045);
}

.work-footer {
  padding-block: 34px;
  border-top: 1px solid rgba(28, 28, 27, 0.24);
  color: rgba(28, 28, 27, 0.58);
  background: #f1f0eb;
}

.work-footer .work-shell {
  display: flex;
  justify-content: space-between;
  gap: 32px;
}

.work-footer p,
.work-footer a {
  margin: 0;
  color: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes workPageWipe {
  0% { transform: scaleY(0); opacity: 1; }
  72% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

@keyframes workPageContent {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .work-shell {
    padding-inline: 20px;
  }

  .work-hero__inner {
    padding-top: 126px;
    padding-bottom: 28px;
  }

  .work-hero h1 {
    font-size: clamp(4.5rem, 22vw, 7rem);
  }

  .work-hero__intro {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .work-index {
    padding-block: 72px;
  }

  .work-row {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 14px 16px;
    min-height: 0;
    padding-block: 34px;
  }

  .work-row h2 {
    font-size: clamp(2.3rem, 11vw, 4rem);
  }

  .work-row__type,
  .work-row__description {
    position: static;
    grid-column: 2;
    justify-self: start;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    clip-path: none;
    text-align: left;
    white-space: normal;
  }

  .work-row__description {
    max-width: 42ch;
    margin: 0;
    color: rgba(28, 28, 27, 0.62);
    font-size: 0.9rem;
    line-height: 1.55;
  }

  .work-row__image {
    display: block;
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 12px;
    aspect-ratio: 16 / 10;
    object-fit: contain;
    object-position: center;
  }

  .work-row.is-active h2,
  .work-row.is-active .work-row__type {
    transform: none;
  }

  .work-index__list.has-active .work-row:not(.is-active) {
    opacity: 1;
  }

  .work-preview {
    display: none;
  }

  .work-contact__heading {
    grid-template-columns: 1fr;
    margin-top: 64px;
  }

  .work-contact h2 {
    font-size: clamp(3.8rem, 18vw, 6rem);
  }

  .work-contact a {
    width: 140px;
    margin: 12px 0 -82px auto;
  }

  .work-footer .work-shell {
    align-items: flex-start;
    flex-direction: column;
  }
}

.page-transition {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  color: #f2f0ea;
  background: #050505;
  transform: translateY(0);
  pointer-events: auto;
  transition: transform 700ms cubic-bezier(0.76, 0, 0.24, 1);
  will-change: transform;
}

.page-transition__label {
  display: flex;
  align-items: center;
  justify-content: center;
  font: inherit;
}

.page-transition__name {
  display: flex;
  justify-content: center;
  gap: 0.015em;
  font-family: inherit;
  font-size: clamp(4.5rem, 7vw, 6.875rem);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  transition: gap 500ms cubic-bezier(0.22, 1, 0.36, 1) 250ms;
}

.page-transition__character {
  display: inline-block;
  overflow: hidden;
  padding-block: 0.08em;
  margin-block: -0.08em;
}

.page-transition__letter {
  display: inline-block;
  opacity: 1;
  filter: blur(0);
  transform: translateY(0) skewY(0deg);
  transform-origin: left bottom;
  transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 280ms ease, filter 360ms ease;
  will-change: transform, opacity, filter;
}

.page-transition.is-idle {
  transform: translateY(100%);
  pointer-events: none;
  transition: none;
}

.page-transition.is-idle .page-transition__name {
  gap: 0.08em;
  transition: none;
}

.page-transition.is-idle .page-transition__letter {
  opacity: 0;
  filter: blur(6px);
  transform: translateY(110%) skewY(4deg);
  transition: none;
}

.page-transition.is-entering {
  transform: translateY(0);
  pointer-events: auto;
}

.page-transition.is-entering .page-transition__letter {
  transition-delay: calc(250ms + var(--character-index) * 40ms);
}

.page-transition.is-exiting {
  transform: translateY(-100%);
  transition-duration: 760ms;
  transition-delay: 180ms;
}

.page-transition.is-exiting .page-transition__letter {
  opacity: 0;
  filter: blur(4px);
  transform: translateY(-110%) skewY(-3deg);
  transition-duration: 360ms, 260ms, 320ms;
  transition-delay: calc(var(--character-reverse-index) * 32ms);
}

body[data-page="projects"]::before {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .page-transition {
    transform: none;
    opacity: 1;
    transition: opacity 140ms ease;
  }

  .page-transition.is-idle,
  .page-transition.is-exiting {
    visibility: hidden;
    opacity: 0;
    transform: none;
  }

  .page-transition.is-entering {
    opacity: 1;
    transform: none;
  }

  .page-transition__name,
  .page-transition.is-idle .page-transition__name {
    gap: 0.015em;
    transition: none;
  }

  .page-transition__letter,
  .page-transition.is-idle .page-transition__letter,
  .page-transition.is-entering .page-transition__letter,
  .page-transition.is-exiting .page-transition__letter {
    filter: none;
    transform: none;
    transition: opacity 100ms ease;
  }
}

@media (max-width: 700px) {
  .page-transition__name {
    font-size: clamp(2.625rem, 12vw, 4rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="projects"]::before {
    display: none;
  }

  .work-main {
    animation: none;
  }

  .work-row,
  .work-row h2,
  .work-row__type,
  .work-preview,
  .work-preview__media img,
  .work-contact a {
    transition: none;
  }
}

/* Phase 2: About page in the shared editorial system. */
body[data-page="about"] {
  overflow-x: clip;
  color: #f2efe8;
  background: #090909;
}

body[data-page="projects"] .work-hero,
body[data-page="experience"] .experience-hero,
body[data-page="about"] .about-hero,
body[data-page="contact"] .contact-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.editorial-hero-effect {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

body[data-page="projects"] .work-hero > :not(.editorial-hero-effect),
body[data-page="experience"] .experience-hero > :not(.editorial-hero-effect),
body[data-page="about"] .about-hero > :not(.editorial-hero-effect),
body[data-page="contact"] .contact-hero > :not(.editorial-hero-effect) {
  position: relative;
  z-index: 1;
}

body[data-page="projects"] .work-hero h1,
body[data-page="experience"] .experience-hero h1,
body[data-page="about"] .about-hero h1,
body[data-page="contact"] .contact-hero h1,
body[data-page="experience"] .experience-hero__copy,
body[data-page="about"] .about-hero__statement,
body[data-page="contact"] .contact-hero__statement {
  color: transparent;
  background-image: linear-gradient(105deg, #f2f0ea 12%, #cfd5db 30%, #7897bb 46%, #5eafbd 58%, #988aad 70%, #f2f0ea 88%);
  background-size: 240% 100%;
  background-position: 100% 50%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: editorialCosmicText 13s ease-in-out infinite alternate;
}

body[data-page="projects"] .work-hero h1 {
  background-size: 205% 100%;
  animation-duration: 9s;
}

body[data-page="experience"] .experience-hero h1,
body[data-page="experience"] .experience-hero__copy {
  animation-duration: 12s;
}

body[data-page="about"] .about-hero h1,
body[data-page="about"] .about-hero__statement {
  background-image: linear-gradient(105deg, #f2f0ea 18%, #d7d9dc 38%, #8da4ba 54%, #78a8af 64%, #f2f0ea 84%);
  background-size: 280% 100%;
  animation-duration: 18s;
}

body[data-page="contact"] .contact-hero h1,
body[data-page="contact"] .contact-hero__statement {
  animation-duration: 14s;
}

@keyframes editorialCosmicText {
  to { background-position: 0% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="projects"] .work-hero h1,
  body[data-page="experience"] .experience-hero h1,
  body[data-page="about"] .about-hero h1,
  body[data-page="contact"] .contact-hero h1,
  body[data-page="experience"] .experience-hero__copy,
  body[data-page="about"] .about-hero__statement,
  body[data-page="contact"] .contact-hero__statement {
    background-position: 50% 50%;
    animation: none;
  }
}

/* Experience page: organization, volunteer, and sports archive. */
body[data-page="experience"] {
  overflow-x: clip;
  color: #f2f0ea;
  background: #0b0b0b;
}

.experience-main,
.experience-footer {
  color: #f2f0ea;
  background: #0b0b0b;
}

.experience-shell {
  width: min(100%, 1600px);
  margin-inline: auto;
  padding-inline: clamp(24px, 3vw, 56px);
}

.page-experience .home-nav {
  position: absolute;
}

.page-experience .home-nav__links a {
  color: #f2f0ea;
}

.experience-hero {
  padding-block: clamp(150px, 18vh, 190px) clamp(84px, 9vw, 138px);
  border-bottom: 1px solid rgba(242, 240, 234, 0.14);
}

.experience-eyebrow,
.experience-section__heading > p,
.experience-table__head,
.experience-next > .experience-shell > p {
  color: rgba(126, 145, 160, 0.72);
  font-size: clamp(0.68rem, 0.76vw, 0.78rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}

.experience-eyebrow {
  margin: 0 0 clamp(30px, 4vw, 54px);
}

.experience-hero h1 {
  margin: 0;
  color: #f2f0ea;
  font-size: clamp(4.8rem, 10vw, 10rem);
  font-weight: 650;
  letter-spacing: -0.08em;
  line-height: 0.82;
}

.experience-hero__copy {
  width: min(100%, 38ch);
  margin: clamp(54px, 6vw, 92px) 0 0 auto;
  color: rgba(242, 240, 234, 0.62);
  font-size: clamp(1.05rem, 1.35vw, 1.35rem);
  line-height: 1.55;
}

.experience-section {
  padding-block: clamp(92px, 9vw, 148px);
  border-bottom: 1px solid rgba(242, 240, 234, 0.14);
}

.experience-section__heading {
  display: grid;
  grid-template-columns: minmax(180px, 28%) minmax(0, 1fr);
  gap: clamp(48px, 7vw, 120px);
  align-items: start;
  padding-bottom: clamp(56px, 6vw, 92px);
}

.experience-section__heading > p,
.experience-section__heading div > p {
  margin: 0;
}

.experience-section__heading h2 {
  margin: 0;
  color: #f2f0ea;
  font-size: clamp(3.4rem, 7vw, 7.5rem);
  font-weight: 650;
  letter-spacing: -0.07em;
  line-height: 0.9;
}

.experience-section__heading div > p {
  max-width: 46ch;
  margin-top: clamp(24px, 3vw, 38px);
  color: rgba(242, 240, 234, 0.58);
  font-size: clamp(0.95rem, 1.05vw, 1.1rem);
  line-height: 1.6;
}

.experience-table {
  border-bottom: 1px solid rgba(242, 240, 234, 0.16);
}

.experience-table__head,
.experience-row {
  display: grid;
  /* zero minimums: the fixed ones summed past 900px and pushed tablets (701-980px) sideways */
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 2fr) minmax(0, 1.25fr) minmax(0, 1.65fr);
  gap: clamp(22px, 3vw, 52px);
  align-items: start;
}

.experience-table__head {
  padding-block: 16px;
  border-top: 1px solid rgba(242, 240, 234, 0.16);
}

.experience-row {
  padding-block: clamp(26px, 3vw, 40px);
  border-top: 1px solid rgba(242, 240, 234, 0.16);
  transition: color 220ms ease;
}

.experience-row__period,
.experience-row__role {
  color: rgba(242, 240, 234, 0.46);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.45;
  text-transform: uppercase;
  transition: transform 220ms ease, color 220ms ease;
}

.experience-row h3 {
  margin: 0;
  color: rgba(242, 240, 234, 0.78);
  font-size: clamp(1.9rem, 2.8vw, 2.65rem);
  font-weight: 560;
  letter-spacing: -0.045em;
  line-height: 1;
  transition: color 220ms ease, transform 220ms ease;
}

.experience-row__description {
  margin: 0;
  color: rgba(242, 240, 234, 0.58);
  font-size: clamp(0.95rem, 1vw, 1.05rem);
  line-height: 1.6;
}

@media (hover: hover) {
  .experience-row:hover h3 {
    color: #f2f0ea;
    transform: translateX(4px);
  }

  .experience-row:hover .experience-row__role {
    color: rgba(242, 240, 234, 0.7);
    transform: translateX(4px);
  }
}

.experience-next {
  padding-block: clamp(88px, 10vw, 160px);
}

.experience-next > .experience-shell > p {
  margin: 0 0 24px;
}

.experience-next a {
  display: inline-flex;
  gap: 0.18em;
  color: #f2f0ea;
  font-size: clamp(2.8rem, 7vw, 7.5rem);
  font-weight: 650;
  letter-spacing: -0.065em;
  line-height: 0.95;
}

.experience-next a span {
  font-size: 0.55em;
}

.experience-footer {
  padding-block: 32px;
  border-top: 1px solid rgba(242, 240, 234, 0.16);
}

.experience-footer p {
  margin: 0;
  color: rgba(242, 240, 234, 0.46);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

@media (max-width: 700px) {
  .experience-shell {
    padding-inline: 20px;
  }

  .experience-hero {
    padding-block: 136px 76px;
  }

  .experience-hero h1 {
    font-size: clamp(3.8rem, 18vw, 5.8rem);
  }

  .experience-hero__copy {
    margin-top: 54px;
  }

  .experience-section {
    padding-block: 76px;
  }

  .experience-section__heading {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-bottom: 54px;
  }

  .experience-section__heading h2 {
    font-size: clamp(2.8rem, 14vw, 4.5rem);
  }

  .experience-table__head {
    display: none;
  }

  .experience-row {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-block: 30px;
  }

  .experience-row h3 {
    font-size: clamp(1.9rem, 9vw, 2.6rem);
  }

  .experience-next a {
    font-size: clamp(2.6rem, 13vw, 4.4rem);
  }
}

.home-nav__links a[aria-current="page"] {
  opacity: 1;
}

.home-nav__links a[aria-current="page"]::after {
  transform: scaleX(1);
}

.about-main {
  position: relative;
  overflow: clip;
  background: #090909;
}

.about-shell {
  width: 100%;
  padding-inline: clamp(28px, 3.5vw, 56px);
}

.about-hero {
  min-height: 82vh;
  min-height: 82svh;
  border-bottom: 1px solid rgba(242, 240, 232, 0.12);
  background: #090909;
}

.about-hero__inner {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 82vh;
  min-height: 82svh;
  padding-top: clamp(118px, 15vh, 154px);
  padding-bottom: clamp(34px, 5vh, 52px);
}

.about-hero .reveal {
  opacity: 0;
  transform: translateY(20px);
  animation: aboutHeroReveal 760ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--delay, 0ms);
}

@keyframes aboutHeroReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.about-chapter,
.about-section__label p,
.about-section__heading > p,
.about-education__title > p,
.about-exploration__item > p:first-child {
  margin: 0;
  color: rgba(242, 240, 232, 0.36);
  font-size: clamp(0.6rem, 0.66vw, 0.7rem);
  font-weight: 650;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.about-hero h1 {
  align-self: center;
  margin: 0 0 0 -0.07em;
  color: #f2efe8;
  font-size: clamp(5rem, 9vw, 9rem);
  font-weight: 650;
  letter-spacing: -0.085em;
  line-height: 0.82;
}

.about-hero__statement {
  justify-self: end;
  width: min(100%, 380px);
  margin: 0;
  color: rgba(242, 240, 232, 0.58);
  font-size: clamp(1.05rem, 1.35vw, 1.35rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.45;
}

.about-section {
  padding-block: clamp(110px, 10vw, 160px);
  color: #f2efe8;
  background: #090909;
}

.about-editorial-grid {
  display: grid;
  grid-template-columns: minmax(180px, 28%) minmax(0, 1fr);
  gap: clamp(48px, 7vw, 120px);
}

.about-section__label,
.about-section__heading {
  display: flex;
  align-items: baseline;
  gap: clamp(16px, 2vw, 32px);
}

.about-section__label h2,
.about-section__heading h2 {
  margin: 0;
  color: #f2efe8;
  font-size: clamp(0.78rem, 0.9vw, 0.96rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.about-introduction {
  border-top: 0;
}

.about-introduction__copy {
  max-width: 760px;
  margin: 0;
  color: #f2efe8;
  font-size: clamp(2rem, 3.3vw, 3.8rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.08;
}

.about-facts {
  padding-top: clamp(110px, 10vw, 160px);
  border-top: 1px solid rgba(242, 240, 232, 0.12);
}

.about-facts .about-section__label {
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(242, 240, 232, 0.12);
}

.about-facts__list {
  margin: 0;
}

.about-fact {
  display: grid;
  grid-template-columns: 308px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 72px);
  min-height: 82px;
  padding-block: 22px;
  border-top: 1px solid rgba(242, 240, 232, 0.12);
}

.about-fact:last-child {
  border-bottom: 1px solid rgba(242, 240, 232, 0.12);
}

.about-fact dt,
.about-fact dd {
  margin: 0;
}

.about-fact dt {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  color: rgba(242, 240, 232, 0.55);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.about-fact dt span {
  color: rgba(242, 240, 232, 0.35);
}

.about-fact dd {
  color: #f2efe8;
  font-size: clamp(1rem, 1.4vw, 1.45rem);
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.about-section__heading {
  justify-content: space-between;
  padding-bottom: clamp(24px, 3vw, 42px);
  border-bottom: 1px solid rgba(242, 240, 232, 0.12);
}

.about-section__heading h2 {
  font-size: clamp(2.8rem, 7vw, 7.5rem);
  font-weight: 650;
  letter-spacing: -0.065em;
  text-transform: uppercase;
}

.about-education__entry {
  display: grid;
  grid-template-columns: 120px minmax(280px, 34%) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 72px);
  align-items: start;
  padding-block: clamp(40px, 4vw, 56px);
  border-bottom: 1px solid rgba(242, 240, 232, 0.12);
}

.about-education__logo {
  display: block;
  width: clamp(48px, 4vw, 64px);
  padding: 8px;
  background: #f2efe8;
}

.about-education__logo img {
  width: 100%;
  height: auto;
}

.about-education__title h3 {
  margin: 18px 0 0;
  color: #f2efe8;
  font-size: clamp(2rem, 3.6vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.about-education__details {
  display: grid;
  gap: 12px;
}

.about-education__details p {
  margin: 0;
  color: rgba(242, 239, 232, 0.62);
  font-size: clamp(0.92rem, 1.05vw, 1.08rem);
  line-height: 1.55;
}

.about-education__details strong {
  color: #f2efe8;
  font-weight: 550;
}

.about-education__details .about-education__description {
  margin-top: clamp(20px, 3vw, 38px);
  color: rgba(242, 239, 232, 0.76);
  font-size: clamp(1.05rem, 1.45vw, 1.45rem);
  line-height: 1.45;
}

.about-text-link {
  display: inline-flex;
  gap: 14px;
  width: fit-content;
  margin-top: 18px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(242, 239, 232, 0.42);
  color: #f2efe8;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  transition: border-color 180ms ease, gap 220ms ease;
}

.about-text-link:hover,
.about-text-link:focus-visible {
  gap: 22px;
  border-color: #f2efe8;
}

.about-exploration__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid rgba(242, 240, 232, 0.12);
}

.about-exploration__item {
  min-height: 0;
  padding: clamp(40px, 4vw, 56px) clamp(28px, 3vw, 46px) clamp(40px, 4vw, 56px) 0;
}

.about-exploration__item + .about-exploration__item {
  padding-left: clamp(24px, 3vw, 46px);
  border-left: 1px solid rgba(242, 240, 232, 0.12);
}

.about-exploration__item h3 {
  max-width: 9ch;
  margin: clamp(46px, 5vw, 72px) 0 22px;
  color: #f2efe8;
  font-size: clamp(1.8rem, 3vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.about-exploration__item > p:last-child {
  max-width: 34ch;
  margin: 0;
  color: rgba(242, 239, 232, 0.6);
  font-size: 0.95rem;
  line-height: 1.55;
}

.about-tools {
  border-top: 1px solid rgba(242, 240, 232, 0.12);
  background: #0b0b0b;
}

.about-tools__heading p {
  margin: 0 0 clamp(24px, 3vw, 42px);
  color: rgba(126, 145, 160, 0.72);
  font-size: clamp(0.68rem, 0.76vw, 0.78rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}

.about-tools__heading h2 {
  margin: 0;
  color: #f2efe8;
  font-size: clamp(3rem, 5vw, 5rem);
  font-weight: 650;
  letter-spacing: -0.07em;
  line-height: 0.9;
}

.about-tools__list {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px 0;
  max-width: 980px;
}

.about-tools__list span {
  color: #f2efe8;
  font-size: clamp(1.45rem, 3vw, 3.3rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.about-tools__list span:not(:last-child)::after {
  content: "/";
  padding-inline: 0.32em;
  color: rgba(242, 239, 232, 0.24);
  font-weight: 300;
}

@media (max-width: 700px) {
  .about-tools__heading h2 {
    font-size: clamp(3rem, 14vw, 4.6rem);
  }
}

.about-footer {
  padding-block: 32px;
  border-top: 1px solid rgba(242, 239, 232, 0.18);
  color: rgba(242, 239, 232, 0.48);
  background: #090909;
}

.about-footer p {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .about-editorial-grid {
    grid-template-columns: 1fr;
    gap: 54px;
  }

  .about-education__entry {
    grid-template-columns: 90px minmax(0, 1fr);
  }

  .about-education__details {
    grid-column: 2;
  }
}

@media (max-width: 700px) {
  .about-shell {
    padding-inline: 20px;
  }

  .about-hero__inner {
    padding-top: 132px;
    padding-bottom: 28px;
  }

  .about-hero,
  .about-hero__inner {
    min-height: 78svh;
  }

  .about-hero h1 {
    font-size: clamp(4.8rem, 24vw, 7.5rem);
  }

  .about-hero__statement {
    justify-self: start;
    width: 92%;
  }

  .about-section {
    padding-block: 82px;
  }

  .about-introduction__copy {
    font-size: clamp(2rem, 9.5vw, 3.6rem);
  }

  .about-fact {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .about-fact dt {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .about-section__heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .about-education__entry {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 24px;
  }

  .about-education__logo {
    width: 56px;
  }

  .about-education__details {
    grid-column: 1 / -1;
  }

  .about-exploration__list {
    grid-template-columns: 1fr;
  }

  .about-exploration__item {
    min-height: 0;
    padding: 32px 0 42px;
  }

  .about-exploration__item + .about-exploration__item {
    padding-left: 0;
    border-top: 1px solid rgba(242, 239, 232, 0.2);
    border-left: 0;
  }

  .about-exploration__item h3 {
    margin-top: 42px;
  }

  .about-tools__list span {
    font-size: clamp(1.45rem, 7vw, 2.3rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-hero .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .about-text-link {
    transition: none;
  }
}

/* Phase 4: Shared editorial project system. */
.editorial-shell {
  width: 100%;
  padding-inline: clamp(24px, 3.5vw, 64px);
}

.editorial-index,
.work-hero__chapter,
.editorial-project__meta {
  margin: 0;
  color: rgba(242, 239, 232, 0.48);
  font-size: clamp(0.6rem, 0.66vw, 0.7rem);
  font-weight: 650;
  letter-spacing: 0.15em;
  line-height: 1.4;
  text-transform: uppercase;
}

.selected-work {
  padding-block: clamp(92px, 9vw, 138px);
  border-top: 1px solid rgba(242, 239, 232, 0.16);
  color: #f2efe8;
  background: #090909;
}

.selected-work > .editorial-shell,
.home-tools > .editorial-shell {
  padding-inline: clamp(28px, 3vw, 56px);
}

.selected-work__intro {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.86fr);
  gap: clamp(48px, 7vw, 118px);
  align-items: start;
  padding-bottom: clamp(68px, 7vw, 108px);
}

.selected-work__intro h2,
.home-tools h2 {
  margin: clamp(22px, 3vw, 42px) 0 0;
  color: #f2efe8;
  font-size: clamp(3.5rem, 6vw, 6.5rem);
  font-weight: 680;
  letter-spacing: -0.09em;
  line-height: 0.82;
}

.selected-work__intro > p {
  max-width: 36ch;
  margin: 0;
  color: rgba(242, 239, 232, 0.62);
  font-size: clamp(1.05rem, 1.35vw, 1.35rem);
  line-height: 1.5;
  padding-top: clamp(36px, 3vw, 46px);
}

.home-work-list {
  position: relative;
  border-bottom: 1px solid rgba(242, 239, 232, 0.2);
}

.home-work-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 210px;
  gap: clamp(18px, 2.2vw, 36px);
  align-items: center;
  min-height: 76px;
  padding-block: clamp(18px, 1.5vw, 24px);
  margin: 0;
  border-top: 1px solid rgba(242, 239, 232, 0.2);
  color: rgba(242, 239, 232, 0.72);
  cursor: default;
  transition: color 260ms ease, opacity 260ms ease;
}

a.home-work-row {
  cursor: pointer;
}

.home-work-row__number,
.home-work-row__type {
  color: rgba(242, 239, 232, 0.46);
  font-size: clamp(0.6rem, 0.66vw, 0.7rem);
  font-weight: 650;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
  transition: color 240ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-work-row__type {
  justify-self: end;
  text-align: right;
}

.home-work-row h3 {
  margin: 0;
  font-size: clamp(1.8rem, 3.2vw, 3.4rem);
  font-weight: 590;
  letter-spacing: -0.065em;
  line-height: 0.96;
  transition: transform 340ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-work-row.is-active {
  color: #f2efe8;
}

.home-work-row.is-active h3 {
  transform: translateX(12px);
}

.home-work-row.is-active .home-work-row__type {
  color: rgba(215, 255, 0, 0.72);
  transform: translateX(-8px);
}

.home-work-list.has-active .home-work-row:not(.is-active) {
  opacity: 0.38;
}

.home-work-row__image {
  display: none;
}

.home-work-preview {
  position: fixed;
  z-index: 12;
  top: 0;
  left: 0;
  width: clamp(360px, 30vw, 480px);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, -50%, 0) scale(0.96);
  transition: opacity 240ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.home-work-preview.is-visible {
  opacity: 1;
  transform: translate3d(-50%, -50%, 0) scale(1);
}

.home-work-preview__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(242, 239, 232, 0.16);
  background: transparent;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
}

.home-work-preview__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 320ms ease, transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-work-preview__media img.is-active {
  opacity: 1;
  transform: scale(1);
}

.home-work-preview__cta {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  color: #090909;
  background: #d7ff00;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.1em;
}

.home-work-preview__cta span {
  margin-left: 3px;
}

.editorial-link,
.view-all-work {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(242, 239, 232, 0.38);
  color: #f2efe8;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
  transition: gap 220ms ease, border-color 180ms ease;
}

.editorial-link {
  margin-top: clamp(30px, 4vw, 54px);
}

.editorial-link:hover,
.editorial-link:focus-visible,
.view-all-work:hover,
.view-all-work:focus-visible {
  gap: 24px;
  border-color: #f2efe8;
}

.view-all-work {
  margin-top: clamp(32px, 3vw, 48px);
  font-size: clamp(1rem, 1.5vw, 1.45rem);
  letter-spacing: 0.08em;
}

.home-tools {
  padding-block: clamp(80px, 7vw, 112px);
  border-top: 1px solid rgba(242, 239, 232, 0.18);
  color: #f2efe8;
  background: #0d0d0c;
}

.home-tools__layout {
  display: grid;
  grid-template-columns: minmax(280px, 35%) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 120px);
  align-items: start;
}

.home-tools h2 {
  font-size: clamp(3rem, 5vw, 5rem);
  line-height: 0.86;
}

.home-tools__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.34em 0;
  padding-top: 0;
}

.home-tools__list span {
  color: #f2efe8;
  font-size: clamp(1.25rem, 2vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.4;
}

.home-tools__list span:not(:last-child)::after {
  content: "/";
  padding-inline: 0.32em;
  color: rgba(242, 239, 232, 0.22);
  font-weight: 300;
}

@media (max-width: 900px) {
  .selected-work__intro,
  .home-tools__layout {
    grid-template-columns: 1fr;
  }

  .selected-work__intro > p {
    justify-self: end;
  }

}

@media (max-width: 700px) {
  .editorial-shell {
    padding-inline: 20px;
  }

  .selected-work {
    padding-block: 72px;
  }

  .home-tools {
    padding-block: 76px;
  }

  .selected-work__intro {
    gap: 48px;
    padding-bottom: 72px;
  }

  .selected-work__intro h2 {
    font-size: clamp(3.35rem, 16vw, 5.2rem);
  }

  .selected-work__intro > p {
    justify-self: start;
    padding-top: 0;
  }

  .home-work-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 16px;
    min-height: 0;
    padding-block: 30px;
  }

  .home-work-row h3 {
    font-size: clamp(2rem, 9vw, 3.2rem);
  }

  .home-work-row__type {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }

  .home-work-row__image {
    display: block;
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 16px;
    aspect-ratio: 16 / 10;
    object-fit: contain;
    object-position: center;
    background: #111;
  }

  .home-work-row.is-active h3,
  .home-work-row.is-active .home-work-row__type {
    transform: none;
  }

  .home-work-list.has-active .home-work-row:not(.is-active) {
    opacity: 1;
  }

  .home-work-preview {
    display: none;
  }

  .home-tools__layout {
    gap: 44px;
  }

  .home-tools h2 {
    font-size: clamp(3rem, 14vw, 4.6rem);
  }

  .home-tools__list span {
    font-size: clamp(1.25rem, 5.5vw, 1.8rem);
  }

}

@media (prefers-reduced-motion: reduce) {
  .home-work-row,
  .home-work-row h3,
  .home-work-row__type,
  .home-work-preview,
  .home-work-preview__media img {
    transition-duration: 0.01ms;
  }
  .editorial-link,
  .view-all-work {
    transition: none;
  }
}

/* Phase 3: Contact page in the shared editorial system. */
body[data-page="contact"] {
  overflow-x: clip;
  color: #f2efe8;
  background: #090909;
}

body[data-page="projects"] .page-main {
  padding-top: 88px;
}

.contact-main {
  overflow: clip;
  background: #090909;
}

.contact-shell {
  width: 100%;
  padding-inline: clamp(32px, 4vw, 64px);
}

.contact-hero {
  min-height: 100vh;
  min-height: 100svh;
  background: #090909;
}

.contact-hero__inner {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: clamp(128px, 17vh, 180px);
  padding-bottom: clamp(36px, 5vh, 56px);
}

.contact-chapter,
.contact-directory__heading > p,
.contact-row__number,
.contact-row__label,
.contact-row__action {
  margin: 0;
  color: rgba(242, 239, 232, 0.5);
  font-size: clamp(0.6rem, 0.66vw, 0.7rem);
  font-weight: 650;
  letter-spacing: 0.15em;
  line-height: 1.4;
  text-transform: uppercase;
}

.contact-hero h1 {
  align-self: center;
  margin: 0 0 0 -0.07em;
  color: #f2efe8;
  font-size: clamp(7rem, 18.5vw, 18rem);
  font-weight: 700;
  letter-spacing: -0.105em;
  line-height: 0.72;
}

.contact-hero__statement {
  justify-self: end;
  width: min(100%, 43rem);
  margin: 0;
  color: rgba(242, 239, 232, 0.76);
  font-size: clamp(1.45rem, 2.6vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
}

.contact-chapter,
.contact-hero h1,
.contact-hero__statement {
  opacity: 0;
  transform: translateY(20px);
  animation: contactHeroReveal 760ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.contact-hero h1 {
  animation-delay: 100ms;
}

.contact-hero__statement {
  animation-delay: 180ms;
}

@keyframes contactHeroReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.contact-directory {
  padding-block: clamp(100px, 13vw, 190px);
  border-top: 1px solid rgba(242, 239, 232, 0.18);
  background: #090909;
}

.contact-directory__heading {
  display: grid;
  grid-template-columns: minmax(180px, 0.65fr) minmax(0, 2fr);
  gap: clamp(48px, 8vw, 150px);
  padding-bottom: clamp(72px, 9vw, 130px);
}

.contact-directory__heading h2 {
  margin: 0;
  color: #f2efe8;
  font-size: clamp(3.3rem, 8vw, 8.5rem);
  font-weight: 650;
  letter-spacing: -0.075em;
  line-height: 0.85;
  text-transform: uppercase;
}

.contact-directory__heading div > p {
  max-width: 36ch;
  margin: 28px 0 0;
  color: rgba(242, 239, 232, 0.62);
  font-size: clamp(1rem, 1.25vw, 1.25rem);
  line-height: 1.5;
}

.contact-directory__list {
  border-bottom: 1px solid rgba(242, 239, 232, 0.2);
}

.contact-row {
  display: grid;
  grid-template-columns: 64px minmax(130px, 0.45fr) minmax(0, 1.35fr) auto;
  gap: clamp(20px, 3vw, 54px);
  align-items: center;
  padding-block: clamp(28px, 3.5vw, 52px);
  border-top: 1px solid rgba(242, 239, 232, 0.2);
}

.contact-row strong {
  color: #f2efe8;
  font-size: clamp(1.55rem, 3.6vw, 4rem);
  font-weight: 550;
  letter-spacing: -0.045em;
  line-height: 1;
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.contact-row__action {
  display: flex;
  gap: 14px;
  color: rgba(242, 239, 232, 0.66);
  transition: color 180ms ease, gap 220ms ease;
}

.contact-row:hover strong,
.contact-row:focus-visible strong {
  transform: translateX(8px);
}

.contact-row:hover .contact-row__action,
.contact-row:focus-visible .contact-row__action {
  gap: 22px;
  color: #f2efe8;
}

.contact-row:focus-visible {
  outline: 1px solid #f2efe8;
  outline-offset: 8px;
}

.contact-footer {
  padding-block: 32px;
  border-top: 1px solid rgba(242, 239, 232, 0.18);
  color: rgba(242, 239, 232, 0.48);
  background: #090909;
}

.contact-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.contact-footer p {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 700px) {
  body[data-page="projects"] .page-main {
    padding-top: 104px;
  }

  .contact-shell {
    padding-inline: 20px;
  }

  .contact-hero__inner {
    padding-top: 132px;
    padding-bottom: 28px;
  }

  .contact-hero h1 {
    font-size: clamp(4.6rem, 23vw, 7.2rem);
  }

  .contact-hero__statement {
    justify-self: start;
    width: 94%;
  }

  .contact-directory {
    padding-block: 88px;
  }

  .contact-directory__heading {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .contact-row {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 18px;
  }

  .contact-row strong,
  .contact-row__action {
    grid-column: 2;
  }

  .contact-row strong {
    overflow-wrap: anywhere;
  }

  .contact-footer__inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-chapter,
  .contact-hero h1,
  .contact-hero__statement {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .contact-row strong,
  .contact-row__action {
    transition: none;
  }
}

/* Strict above-the-fold rebuild: isolated from the legacy portfolio theme. */
body[data-page="home"] {
  position: relative;
  overflow-x: clip;
  background: #0b0b0b;
}

body[data-page="home"] .home-main {
  position: relative;
  isolation: isolate;
  background: transparent;
}

body[data-page="home"] .home-hero {
  background: transparent;
}

body[data-page="home"] .selected-work,
body[data-page="home"] .home-tools {
  position: relative;
  z-index: 2;
  background: #0b0b0b;
}

body[data-page="home"] .site-footer {
  position: relative;
  z-index: 2;
  background: #0b0b0b;
}

.home-nav {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  color: #f2efe8;
  opacity: 0;
  animation: homeHeroFade 500ms ease-out 700ms forwards;
}

.home-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 88px;
  padding: 0 clamp(24px, 3vw, 56px);
}

.home-nav__brand,
.home-nav__links a {
  color: inherit;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.13em;
  line-height: 1;
  text-transform: uppercase;
}

.site-wordmark {
  display: inline-flex;
  width: clamp(48px, 4vw, 64px);
  color: inherit;
  line-height: 1;
  text-decoration: none;
  transition: opacity 180ms ease;
}

.site-wordmark__logo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.site-wordmark:hover,
.site-wordmark:focus-visible {
  opacity: 0.76;
}

.home-nav__links {
  display: flex;
  align-items: center;
  gap: clamp(28px, 3.4vw, 64px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-nav__links a {
  position: relative;
  display: block;
  padding: 12px 0;
  opacity: 0.76;
  transition: opacity 180ms ease;
}

.home-nav__links a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 6px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-nav__links a:hover,
.home-nav__links a:focus-visible {
  opacity: 1;
}

.home-nav__links a:hover::after,
.home-nav__links a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.home-nav__brand:focus-visible,
.home-nav__links a:focus-visible,
.home-hero__scroll:focus-visible {
  outline: 1px solid #f2efe8;
  outline-offset: 6px;
}

.home-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  color: #f2efe8;
  background: #090909;
  touch-action: none;
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
  animation: homeHeroBackground 700ms ease-out forwards;
}

.home-hero::after {
  content: "MOVE / DRAG TO REVEAL";
  position: absolute;
  z-index: 4;
  bottom: 92px;
  left: 50%;
  color: rgba(242, 239, 232, 0.46);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
  opacity: 0;
  translate: -50% 5px;
  pointer-events: none;
  animation: homeHeroHint 2.4s ease 1.05s both;
  transition: opacity 180ms ease;
}

.home-hero.has-interacted::after {
  opacity: 0;
  animation: none;
}

.home-hero__canvas {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  padding: 88px clamp(24px, 3vw, 56px) clamp(28px, 3vw, 48px);
  touch-action: none;
}

.home-hero__portrait {
  --portrait-shift-x: 0px;
  --portrait-shift-y: 0px;
  position: absolute;
  z-index: 0;
  top: 4vh;
  bottom: 4vh;
  left: 0;
  width: 54vw;
  height: 92vh;
  object-fit: contain;
  object-position: center bottom;
  filter: saturate(0.66) contrast(1.08) brightness(0.52);
  opacity: 0.56;
  transform: none;
  animation: none;
  touch-action: none;
  will-change: transform;
}

.home-hero__mask {
  position: absolute;
  z-index: 1;
  top: 4vh;
  bottom: 4vh;
  left: 0;
  display: block;
  width: 54vw;
  height: 92vh;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  animation: homeHeroMaskIn 850ms cubic-bezier(0.22, 1, 0.36, 1) 80ms forwards;
  touch-action: none;
  will-change: opacity;
}

.home-hero__field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.home-hero__name {
  --field-light: 0;
  --field-x: -1000px;
  --field-y: -1000px;
  --field-shift-x: 0px;
  --field-shift-y: 0px;
  position: absolute;
  z-index: 2;
  top: 24vh;
  right: clamp(24px, 3vw, 56px);
  left: 51vw;
  margin: 0;
  font-size: clamp(4rem, 7vw, 7.5rem);
  font-weight: 700;
  letter-spacing: -0.075em;
  line-height: 0.78;
  text-transform: uppercase;
  color: transparent;
  background: radial-gradient(circle 180px at var(--field-x) var(--field-y),
    #fff 0%, #d7ff00 8%, #f5f1e9 34%, rgba(245, 241, 233, 0.92) 72%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: brightness(calc(0.96 + var(--field-light) * 0.1));
  text-shadow: none;
  translate: var(--field-shift-x) var(--field-shift-y);
}

.home-hero__name-line,
.home-hero__name-line > span {
  display: block;
}

.home-hero__name-line {
  overflow: hidden;
}

.home-hero__name-line--agoes {
  margin-left: 0.72em;
}

.home-hero__name-line > span {
  transform: translateY(108%);
  animation: homeHeroNameReveal 850ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.home-hero__name-line--agoes > span {
  animation-delay: 130ms;
}

.home-hero__statement,
.home-hero__disciplines,
.home-hero__meta,
.home-hero__scroll {
  position: absolute;
  z-index: 2;
  margin: 0;
  opacity: 0;
  transform: translateY(14px);
  animation: homeHeroFadeUp 650ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.home-hero__statement {
  --field-light: 0;
  --field-x: -1000px;
  --field-y: -1000px;
  --field-shift-x: 0px;
  --field-shift-y: 0px;
  top: 52vh;
  right: auto;
  left: 73vw;
  width: 10ch;
  font-size: clamp(1.25rem, 1.7vw, 2.1rem);
  font-weight: 450;
  letter-spacing: -0.035em;
  line-height: 1;
  animation-delay: 450ms;
  color: transparent;
  background: radial-gradient(circle 110px at var(--field-x) var(--field-y),
    #fff 0%, #72c9d7 12%, #f2efe8 38%, rgba(242, 239, 232, 0.82) 74%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: brightness(calc(0.96 + var(--field-light) * 0.08));
  text-shadow: none;
  translate: var(--field-shift-x) var(--field-shift-y);
}

.home-hero__disciplines,
.home-hero__meta,
.home-hero__scroll {
  bottom: clamp(28px, 3vw, 48px);
  font-size: clamp(0.62rem, 0.68vw, 0.74rem);
  font-weight: 600;
  letter-spacing: 0.13em;
  line-height: 1.55;
  text-transform: uppercase;
}

.home-hero__disciplines {
  left: clamp(24px, 3vw, 56px);
  display: block;
  animation-delay: 570ms;
}

.home-hero__disciplines p,
.home-hero__meta p {
  margin: 0;
}

.home-hero__disciplines span {
  padding: 0 0.6em;
  color: rgba(242, 239, 232, 0.35);
}

.home-hero__disciplines p + p {
  margin-top: 0.15em;
}

.home-hero__meta {
  left: 50%;
  display: flex;
  gap: clamp(24px, 3vw, 48px);
  color: rgba(242, 239, 232, 0.66);
  animation-delay: 680ms;
}

.home-hero__scroll {
  right: clamp(24px, 3vw, 56px);
  display: flex;
  gap: 16px;
  color: rgba(242, 239, 232, 0.76);
  animation-delay: 980ms;
  transition: color 180ms ease;
}

.home-hero__scroll span {
  transition: transform 220ms ease;
}

.home-hero__scroll:hover {
  color: #f2efe8;
}

.home-hero__scroll:hover span {
  transform: translateY(4px);
}

@keyframes homeHeroBackground {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes homeHeroNameReveal {
  to { transform: translateY(0); }
}

@keyframes homeHeroPortraitIn {
  to { opacity: 1; transform: translate3d(var(--portrait-shift-x), var(--portrait-shift-y), 0); }
}

@keyframes homeHeroMaskIn {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes homeHeroFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes homeHeroFade {
  to { opacity: 1; }
}

@keyframes homeHeroHint {
  0%, 8% { opacity: 0; translate: -50% 5px; }
  20%, 72% { opacity: 1; translate: -50% 0; }
  100% { opacity: 0; translate: -50% 0; }
}

@media (max-width: 900px) {
  .home-hero__name {
    left: 48vw;
    font-size: clamp(3.5rem, 8.5vw, 6rem);
  }

  .home-hero__meta {
    left: auto;
    right: 30%;
  }
}

@media (max-width: 700px) {
  .home-nav__inner {
    align-items: flex-start;
    min-height: 104px;
    padding: 22px 20px 0;
  }

  .home-nav__brand.site-wordmark {
    width: clamp(44px, 10vw, 52px);
    line-height: 1;
  }

  .home-nav__links {
    display: grid;
    flex: 0 0 178px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 18px;
    justify-items: start;
  }

  .home-nav__links a {
    padding: 5px 0 8px;
  }

  .home-nav__links a::after {
    bottom: 4px;
  }

  .home-hero__canvas {
    min-height: 100svh;
    padding: 104px 20px 24px;
  }

  .home-hero__name {
    top: 49vh;
    right: 20px;
    left: 20px;
    font-size: clamp(3.2rem, 14vw, 5rem);
    line-height: 0.76;
    letter-spacing: -0.085em;
  }

  .home-hero__name-line--agoes {
    margin-left: 26vw;
  }

  .home-hero__portrait {
    top: 9vh;
    bottom: auto;
    left: 0;
    width: 100%;
    height: 39vh;
    object-position: center center;
  }

  .home-hero__mask {
    top: 9vh;
    bottom: auto;
    left: 0;
    width: 100%;
    height: 39vh;
  }

  .home-hero__statement {
    top: 66vh;
    right: 20px;
    left: auto;
    width: 12ch;
    max-width: calc(100vw - 40px);
    font-size: clamp(1rem, 4.2vw, 1.35rem);
  }

  .home-hero__disciplines,
  .home-hero__meta,
  .home-hero__scroll {
    right: auto;
    left: 20px;
    font-size: 0.58rem;
  }

  .home-hero__disciplines {
    bottom: 108px;
    display: block;
  }

  .home-hero__meta {
    bottom: 62px;
    display: flex;
    gap: 18px;
  }

  .home-hero__scroll {
    right: auto;
    bottom: 20px;
    left: 20px;
  }

  .home-hero::after {
    content: "TOUCH / DRAG TO REVEAL";
    top: 43vh;
    bottom: auto;
    left: 20px;
    translate: 0 5px;
  }

  @keyframes homeHeroHint {
    0%, 8% { opacity: 0; translate: 0 5px; }
    20%, 72% { opacity: 1; translate: 0 0; }
    100% { opacity: 0; translate: 0 0; }
  }
}

@media (max-height: 650px) and (min-width: 701px) {
  .home-hero__name {
    top: 25vh;
    font-size: min(7vw, 6rem);
  }

  .home-hero__statement {
    top: 56vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-nav,
  .home-hero::before,
  .home-hero__portrait,
  .home-hero__mask,
  .home-hero__name-line > span,
  .home-hero__statement,
  .home-hero__disciplines,
  .home-hero__meta,
  .home-hero__scroll {
    animation: none;
  }

  .home-nav,
  .home-hero__portrait,
  .home-hero__mask,
  .home-hero__statement,
  .home-hero__disciplines,
  .home-hero__meta,
  .home-hero__scroll {
    opacity: 1;
    transform: none;
  }

  .home-hero::before {
    display: none;
  }

  .home-hero::after {
    display: none;
  }

  .home-hero__portrait {
    opacity: 0.52;
  }

  .home-hero__portrait,
  .home-hero__mask,
  .home-hero__name,
  .home-hero__name-line > span {
    transform: none;
    transition: none;
  }

}

/* Phase 1: cinematic intro, navigation, and homepage hero. */
body[data-page="intro"] {
  overflow: hidden;
  color: #f2efe8;
  background: #000;
}

.portfolio-intro {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 100svh;
  overflow: hidden;
  color: #f2efe8;
  background: #000;
  isolation: isolate;
}

.portfolio-intro__word,
.portfolio-intro__count {
  margin: 0;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}

.portfolio-intro__word {
  position: relative;
  width: min(90vw, 560px);
  height: 1.2em;
  overflow: hidden;
  font-size: clamp(1.2rem, 2.3vw, 2rem);
  letter-spacing: 0.22em;
  text-align: center;
}

.portfolio-intro__loading,
.portfolio-intro__enter {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  transform: translateY(100%);
}

.portfolio-intro__loading {
  animation: introLoadingIn 650ms cubic-bezier(0.22, 1, 0.36, 1) 150ms forwards;
}

.portfolio-intro__enter {
  letter-spacing: 0.16em;
  transition: opacity 400ms ease, transform 500ms cubic-bezier(0.22, 1, 0.36, 1), letter-spacing 550ms ease;
}

.portfolio-intro__count {
  position: absolute;
  top: calc(50% + 42px);
  color: rgba(242, 239, 232, 0.42);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
}

.portfolio-intro__fade {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 450ms ease;
}

.portfolio-intro.is-entering .portfolio-intro__loading { opacity: 0; transform: translateY(-100%); animation: none; transition: opacity 300ms ease, transform 450ms ease; }
.portfolio-intro.is-entering .portfolio-intro__enter { opacity: 1; transform: translateY(0); letter-spacing: 0.22em; }
.portfolio-intro.is-entering .portfolio-intro__count { opacity: 0; transition: opacity 250ms ease; }
.portfolio-intro.is-leaving .portfolio-intro__fade { opacity: 1; }

@keyframes introLoadingIn { to { opacity: 1; transform: translateY(0); letter-spacing: 0.28em; } }

@media (prefers-reduced-motion: reduce) {
  .portfolio-intro__loading { opacity: 1; transform: none; animation: none; }
  .portfolio-intro.is-entering .portfolio-intro__loading { opacity: 0; transform: none; }
  .portfolio-intro.is-entering .portfolio-intro__enter { opacity: 1; transform: none; }
}

@keyframes groundNpcRunAcross {
  to {
    transform: translateX(calc(-100vw - 104px));
  }
}

@keyframes groundNpcBob {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-2px);
  }
}

@keyframes groundNpcRunBob {
  0%,
  100% {
    transform: translateY(0) scaleX(-1);
  }

  50% {
    transform: translateY(-2px) scaleX(-1);
  }
}

@keyframes groundNpcArm {
  0%,
  100% {
    transform: rotate(-12deg);
  }

  50% {
    transform: rotate(12deg);
  }
}

@keyframes groundNpcLeg {
  0%,
  100% {
    transform: rotate(14deg);
  }

  50% {
    transform: rotate(-14deg);
  }
}

@keyframes voxelScrollPulse {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(8px);
  }
}

@media (max-width: 1100px) {
  .project-grid--featured,
  .exploration-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .voxel-moon {
    top: 92px;
    right: 52px;
    width: 58px;
    height: 58px;
    opacity: 0.72;
  }

  .voxel-stars span:nth-child(n + 9) {
    display: none;
  }

  .voxel-meteor {
    opacity: 0;
  }

  .voxel-opening__content {
    grid-template-columns: 1fr;
    gap: 28px;
    align-content: center;
    padding-top: 112px;
    padding-bottom: 92px;
    text-align: center;
  }

  .voxel-opening__copy,
  .voxel-opening__description {
    margin-left: auto;
    margin-right: auto;
  }

  .voxel-scene {
    width: min(620px, 100%);
    height: 420px;
    margin: 0 auto;
  }

  .voxel-portal {
    width: min(82%, 500px);
  }

  .hero-layout,
  .about-layout,
  .contact-layout,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .section-heading--split {
    display: grid;
    align-items: start;
  }

  .section--tight-top {
    padding-top: 28px;
  }

  .education-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header {
    position: static;
  }

  .navbar,
  .nav-cluster {
    flex-direction: column;
    align-items: flex-start;
  }

  .navbar {
    min-height: auto;
    padding: 16px 0;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 14px 18px;
  }

  .hero,
  .page-hero {
    padding-top: 28px;
  }

  .hero h1,
  .page-title {
    font-size: clamp(3.4rem, 18vw, 5.8rem);
  }

  .hero-subheadline {
    max-width: 100%;
  }
}

@media (max-width: 560px) {
  .voxel-moon {
    top: 94px;
    right: 22px;
    width: 44px;
    height: 44px;
  }

  .voxel-stars span {
    opacity: 0.5;
  }

  .voxel-stars span:nth-child(n + 7) {
    display: none;
  }

  .meteor-2,
  .meteor-3 {
    display: none;
  }

  .voxel-opening__topbar {
    top: 22px;
    left: 20px;
    right: 20px;
  }

  .voxel-opening__avatar {
    width: 60px;
    height: 60px;
  }

  .voxel-opening__menu {
    gap: 9px;
    font-size: 0.68rem;
  }

  .voxel-opening__menu i {
    width: 28px;
  }

  .voxel-opening__content {
    width: min(100% - 32px, 520px);
    padding-top: 96px;
    padding-bottom: 86px;
  }

  .voxel-opening__copy h1 {
    font-size: clamp(3.2rem, 17vw, 5.6rem);
  }

  .voxel-opening__subtitle {
    font-size: 1.15rem;
  }

  .voxel-opening__description {
    font-size: 0.92rem;
  }

  .voxel-scene {
    height: 330px;
  }

  .voxel-cube {
    width: 46px;
    height: 46px;
  }

  .voxel-cube::before {
    left: 6px;
    right: -8px;
    top: -10px;
    height: 10px;
  }

  .voxel-cube::after {
    top: -4px;
    right: -11px;
    width: 11px;
  }

  .voxel-portal {
    width: 88%;
    border-width: 3px;
  }

  .voxel-portal::before,
  .voxel-portal::after {
    width: 12px;
    height: 12px;
    box-shadow:
      0 0 16px rgba(45, 212, 191, 0.42),
      18px 0 0 rgba(138, 180, 255, 0.45),
      0 18px 0 rgba(138, 180, 255, 0.28);
  }

  .voxel-portal__screen {
    inset: 14px;
    padding: 18px;
  }

  .voxel-portal__screen strong {
    font-size: 1.28rem;
  }

  .voxel-terrain {
    --ground-top: 32px;
    bottom: 0;
    height: 118px;
  }

  .voxel-terrain::before {
    height: 76px;
  }

  .voxel-terrain::after {
    top: 32px;
    height: 22px;
  }

  .terrain-strip {
    bottom: 76px;
    height: 18px;
  }

  .voxel-block {
    width: 64px;
    height: 44px;
    bottom: 42px;
  }

  .block-c,
  .block-e {
    width: 84px;
  }

  .voxel-tag {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
  }

  .tag-iot {
    display: none;
  }

  .voxel-opening__scroll {
    bottom: 26px;
    font-size: 0.68rem;
    letter-spacing: 0.15em;
  }

  .container {
    width: min(1180px, 100%);
    padding-left: 20px;
    padding-right: 20px;
  }

  .section {
    padding: 64px 0;
  }

  .hero-panel,
  .profile-card,
  .facts-card,
  .education-card,
  .project-card,
  .contact-card,
  .info-card {
    border-radius: 24px;
  }

  .hero-panel__content,
  .profile-card__content,
  .facts-card,
  .education-card,
  .project-content,
  .contact-card,
  .info-card {
    padding: 22px;
  }

  .education-logo {
    width: 76px;
    height: 76px;
    border-radius: 20px;
  }

  .project-visual,
  .image-visual img {
    min-height: 240px;
    height: 240px;
  }

  .profile-photo {
    padding: 16px 16px 0;
  }

  .profile-photo img {
    height: 300px;
    border-radius: 24px;
  }

  .theme-toggle__icon {
    min-width: 52px;
    padding: 7px 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .reveal-up,
  .reveal-left,
  .reveal-right {
    opacity: 1;
    transform: none;
    transition: none;
    will-change: auto;
  }

  .project-card,
  .button,
  .theme-toggle,
  .education-link,
  .contact-item {
    transition-duration: 0.01ms;
  }

  .voxel-opening,
  .voxel-opening *,
  .voxel-opening__sky,
  .voxel-opening__grid,
  .voxel-moon,
  .voxel-stars *,
  .voxel-meteor,
  .ground-npc-track,
  .ground-npc,
  .ground-npc__leg,
  .world-loader,
  .world-loader * {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  .voxel-opening__avatar,
  .voxel-opening__menu,
  .voxel-opening__kicker,
  .voxel-opening__copy h1,
  .voxel-opening__subtitle,
  .voxel-opening__description,
  .voxel-opening__enter,
  .voxel-scene {
    opacity: 1;
    transform: none;
  }

  .ground-npc-track--walk {
    left: 16%;
  }

  .ground-npc-track--run {
    right: 16%;
  }

  .ground-npc--run {
    transform: scaleX(-1);
  }
}

/* Final voxel theme guards against older responsive component rules. */
.hero h1,
.page-title,
.section-heading h2,
.section-header h2 {
  letter-spacing: 0.015em;
}

.status-badge,
.theme-toggle,
.theme-toggle__icon,
.button,
.education-link,
.project-number,
.language-badge,
.skills-list span,
.contact-label,
.project-link-label {
  border-radius: 5px;
}

.hero-panel,
.profile-card,
.facts-card,
.education-card,
.project-card,
.contact-card,
.info-card,
.contact-item,
.metric,
.project-visual,
.image-visual img,
.profile-photo img,
.education-logo,
.contact-icon {
  border-radius: var(--radius);
}

@media (max-width: 560px) {
  .hero-panel,
  .profile-card,
  .facts-card,
  .education-card,
  .project-card,
  .contact-card,
  .info-card,
  .contact-item,
  .project-visual,
  .image-visual img,
  .profile-photo img,
  .education-logo,
  .contact-icon {
    border-radius: 8px;
  }
}

/* Work layout match: wide statement, controls, and four-column archive. */
body[data-page="projects"],
body[data-page="projects"] .work-main,
body[data-page="projects"] .work-footer {
  color: #f2f0e8;
  background: #0b0b0b;
}

body[data-page="projects"]::before {
  background: #0b0b0b;
}

body[data-page="projects"] .home-nav {
  color: #f2f0e8;
}

body[data-page="projects"] .home-nav__links a {
  color: #f2f0e8;
}

body[data-page="projects"] .home-nav__brand:focus-visible,
body[data-page="projects"] .home-nav__links a:focus-visible,
body[data-page="projects"] .work-row:focus-visible,
body[data-page="projects"] .work-contact a:focus-visible,
body[data-page="projects"] .work-footer a:focus-visible {
  outline-color: #f2f0e8;
}

body[data-page="projects"] .work-shell {
  padding-inline: clamp(32px, 8vw, 130px);
}

body[data-page="projects"] .home-nav__inner.work-shell {
  min-height: 92px;
}

body[data-page="projects"] .work-hero {
  min-height: 0;
  padding-top: clamp(190px, 24vh, 250px);
  padding-bottom: clamp(150px, 17vw, 240px);
}

body[data-page="projects"] .work-hero h1 {
  max-width: 1000px;
  margin: 0;
  color: #f2f0e8;
  font-size: clamp(4.5rem, 8vw, 8.5rem);
  font-weight: 450;
  letter-spacing: -0.065em;
  line-height: 0.97;
  text-transform: uppercase;
}

body[data-page="projects"] .work-hero h1 span:last-child {
  margin-left: 0;
}

body[data-page="projects"] .work-index {
  padding-block: 0 clamp(100px, 10vw, 160px);
  border-top: 0;
}

.work-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 36px;
}

/* filtered-out rows (initWorkFilters); beats the grid display set on .work-row */
.work-row[hidden] {
  display: none !important;
}

.work-filters,
.work-views {
  display: flex;
  align-items: center;
  gap: 10px;
}

.work-filters button,
.work-views button {
  display: inline-grid;
  place-items: center;
  height: 64px;
  border: 1px solid rgba(242, 240, 232, 0.18);
  color: rgba(242, 240, 232, 0.72);
  background: transparent;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 240ms ease, background 240ms ease, border-color 240ms ease;
}

.work-filters button {
  min-width: 104px;
  padding-inline: 34px;
  border-radius: 999px;
}

.work-views button {
  width: 64px;
  padding: 0;
  border-radius: 50%;
}

.work-filters button.is-active,
.work-views button.is-active {
  border-color: #f2f0e8;
  color: #111;
  background: #f2f0e8;
}

.work-filters button:not(.is-active):hover,
.work-filters button:not(.is-active):focus-visible,
.work-views button:not(.is-active):not(:disabled):hover,
.work-views button:not(.is-active):not(:disabled):focus-visible {
  border-color: rgba(242, 240, 232, 0.42);
  color: #f2f0e8;
}

.work-views button:disabled {
  cursor: default;
  opacity: 1;
}

.work-view-icon {
  position: relative;
  display: block;
  width: 20px;
  height: 16px;
}

.work-view-icon--list {
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.work-view-icon--list::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 0;
  left: 0;
  border-top: 2px solid currentColor;
}

.work-view-icon--grid {
  background: linear-gradient(currentColor 0 0) 0 0 / 8px 7px no-repeat,
    linear-gradient(currentColor 0 0) 100% 0 / 8px 7px no-repeat,
    linear-gradient(currentColor 0 0) 0 100% / 8px 7px no-repeat,
    linear-gradient(currentColor 0 0) 100% 100% / 8px 7px no-repeat;
}

.work-table {
  margin-top: clamp(90px, 9vw, 140px);
}

.work-table__header,
body[data-page="projects"] .work-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(140px, 1.1fr) minmax(170px, 1.4fr) minmax(60px, 0.65fr);
  gap: clamp(24px, 3vw, 52px);
  align-items: center;
}

.work-table__header {
  padding-bottom: 32px;
  color: rgba(242, 240, 232, 0.35);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

body[data-page="projects"] .work-index__list {
  border-bottom-color: rgba(242, 240, 232, 0.12);
}

body[data-page="projects"] .work-row {
  min-height: 108px;
  padding-block: 24px;
  border-top-color: rgba(242, 240, 232, 0.12);
  color: #f2f0e8;
}

body[data-page="projects"] .work-row h2 {
  color: #f2f0e8;
  font-size: clamp(1.8rem, 2.6vw, 2.7rem);
  font-weight: 450;
  letter-spacing: -0.045em;
  line-height: 1;
}

body[data-page="projects"] .work-row__type,
.work-row__focus,
.work-row__year {
  color: rgba(242, 240, 232, 0.55);
  font-size: clamp(0.92rem, 1.05vw, 1.08rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.35;
  text-transform: none;
}

body[data-page="projects"] .work-row__type {
  justify-self: start;
  text-align: left;
}

.work-row__year {
  justify-self: end;
}

body[data-page="projects"] .work-row.is-active h2 {
  transform: translateX(10px);
}

body[data-page="projects"] .work-row.is-active .work-row__type {
  color: #f2f0e8;
  transform: none;
}

body[data-page="projects"] .work-label {
  color: rgba(242, 240, 232, 0.35);
}

body[data-page="projects"] .work-contact__heading,
body[data-page="projects"] .work-footer {
  border-color: rgba(242, 240, 232, 0.12);
}

body[data-page="projects"] .work-contact a {
  color: #111;
  background: #f2f0e8;
}

body[data-page="projects"] .work-contact a:hover,
body[data-page="projects"] .work-contact a:focus-visible {
  color: #111;
  background: #d7ff00;
}

body[data-page="projects"] .work-footer {
  color: rgba(242, 240, 232, 0.55);
}

body[data-page="projects"] .work-preview {
  width: clamp(380px, 29vw, 480px);
}

body[data-page="projects"] .work-preview__cta {
  width: clamp(68px, 5vw, 84px);
  height: clamp(68px, 5vw, 84px);
}

@media (max-width: 768px) {
  body[data-page="projects"] .work-hero {
    padding-top: 174px;
    padding-bottom: 104px;
  }

  body[data-page="projects"] .work-hero h1 {
    font-size: clamp(3.35rem, 14vw, 5rem);
    line-height: 1;
  }

  .work-controls {
    align-items: flex-end;
    gap: 24px;
  }

  .work-filters {
    flex-wrap: wrap;
    gap: 8px;
  }

  .work-filters button {
    min-width: 0;
    height: 46px;
    padding-inline: 18px;
    font-size: 0.62rem;
  }

  .work-views {
    flex: 0 0 auto;
  }

  .work-views button {
    width: 46px;
    height: 46px;
  }

  .work-views button:not(.is-active) {
    display: none;
  }

  .work-table {
    margin-top: 76px;
  }

  .work-table__header {
    display: none;
  }

  body[data-page="projects"] .work-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 20px;
    min-height: 0;
    padding-block: 32px;
  }

  body[data-page="projects"] .work-row h2 {
    grid-column: 1 / -1;
    font-size: clamp(2.3rem, 11vw, 4rem);
  }

  body[data-page="projects"] .work-row__type,
  .work-row__focus {
    grid-column: 1;
  }

  body[data-page="projects"] .work-row__type {
    grid-row: 2;
  }

  .work-row__focus {
    grid-row: 3;
  }

  .work-row__year {
    grid-column: 2;
    grid-row: 2;
  }

  body[data-page="projects"] .work-row__description {
    display: none;
  }

  body[data-page="projects"] .work-row__image {
    grid-column: 1 / -1;
    margin-top: 18px;
  }
}

/* Scoped Work-page structural guard: desktop table never inherits touch stacking. */
.page-work .work-row__image,
.page-work .work-preview {
  display: none;
}

@media (min-width: 769px) and (hover: hover) and (pointer: fine) {
  .page-work .work-preview {
    display: block;
  }
}

@media (min-width: 1024px) {
  .page-work .work-table__header,
  .page-work .work-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(140px, 1.05fr) minmax(180px, 1.35fr) 80px;
    gap: clamp(24px, 3vw, 52px);
    align-items: center;
  }

  .page-work .work-table__header {
    padding-bottom: 32px;
  }

  .page-work .work-row {
    min-height: 100px;
    padding-block: 24px;
  }

  .page-work .work-row h2 {
    grid-column: auto;
    font-size: clamp(2rem, 2.6vw, 2.7rem);
  }

  .page-work .work-row__type,
  .page-work .work-row__focus,
  .page-work .work-row__year {
    grid-column: auto;
    grid-row: auto;
    font-size: clamp(0.88rem, 1.05vw, 1.04rem);
  }

  .page-work .work-row__year {
    justify-self: end;
  }

  .page-work .work-row__description,
  .page-work .work-row__image {
    display: none;
  }
}

@media (max-width: 768px) {
  .page-work .work-row__image {
    display: block;
  }
}

/* About-only type and education calibration. */
.page-about .about-chapter,
.page-about .about-section__label p,
.page-about .about-section__heading > p,
.page-about .about-education__title > p,
.page-about .about-exploration__item > p:first-child {
  color: rgba(242, 240, 232, 0.36);
  font-size: clamp(0.6875rem, 0.75vw, 0.8125rem);
  letter-spacing: 0.14em;
  line-height: 1.35;
}

.page-about .about-section__label h2 {
  font-size: clamp(0.78rem, 0.85vw, 0.9rem);
  letter-spacing: 0.075em;
}

.page-about .about-introduction__copy {
  max-width: 780px;
  font-size: clamp(2.75rem, 3.5vw, 4.25rem);
  font-weight: 480;
  letter-spacing: -0.05em;
  line-height: 1.08;
}

.page-about .about-fact dt {
  align-items: baseline;
  font-size: clamp(0.72rem, 0.78vw, 0.82rem);
  line-height: 1.45;
}

.page-about .about-fact dd {
  max-width: 760px;
  font-size: clamp(1rem, 1.15vw, 1.18rem);
  line-height: 1.45;
}

.page-about .about-section__heading {
  align-items: end;
  padding-bottom: clamp(28px, 3vw, 40px);
}

.page-about .about-section__heading h2 {
  max-width: 12ch;
  font-size: clamp(3.5rem, 6vw, 6.5rem);
  font-weight: 620;
  line-height: 0.88;
  text-align: right;
}

.page-about .about-education__entry {
  grid-template-columns: minmax(100px, 140px) minmax(280px, 1.1fr) minmax(0, 1.4fr);
  gap: clamp(32px, 4.5vw, 76px);
  align-items: start;
  padding-block: clamp(48px, 5vw, 72px);
}

.page-about .about-education__logo {
  display: block;
  width: clamp(64px, 5vw, 76px);
  padding: 0;
  background: transparent;
}

.page-about .about-education__logo img {
  display: block;
  width: 100%;
  height: auto;
}

.page-about .about-education__title {
  padding-top: 1px;
}

.page-about .about-education__title h3 {
  max-width: 11ch;
  margin-top: 16px;
  font-size: clamp(2.75rem, 3.8vw, 4rem);
  font-weight: 560;
  line-height: 0.98;
}

.page-about .about-education__details {
  gap: 10px;
  padding-top: 1px;
}

.page-about .about-education__details p {
  font-size: clamp(1rem, 1.05vw, 1.12rem);
  line-height: 1.55;
}

.page-about .about-education__details .about-education__description {
  max-width: 620px;
  margin-top: clamp(22px, 2.5vw, 34px);
  font-size: clamp(1.05rem, 1.3vw, 1.3rem);
  line-height: 1.55;
}

.page-about .about-text-link {
  margin-top: 22px;
}

.page-about .about-exploration__item h3 {
  font-size: clamp(1.9rem, 2.7vw, 2.9rem);
}

.page-about .about-exploration__item > p:last-child {
  font-size: clamp(0.95rem, 1vw, 1.08rem);
  line-height: 1.65;
}

.page-about .about-tools__list span {
  font-size: clamp(1.4rem, 2.6vw, 2.85rem);
  line-height: 1.12;
}

@media (max-width: 900px) {
  .page-about .about-education__entry {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 28px;
  }

  .page-about .about-education__details {
    grid-column: 1 / -1;
    padding-top: 12px;
  }
}

@media (max-width: 700px) {
  .page-about .about-introduction__copy {
    font-size: clamp(2.25rem, 9vw, 3.15rem);
  }

  .page-about .about-section__heading {
    gap: 24px;
  }

  .page-about .about-section__heading h2 {
    max-width: none;
    font-size: clamp(3rem, 14vw, 4.6rem);
    line-height: 0.92;
    text-align: left;
  }

  .page-about .about-education__entry {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 22px;
  }

  .page-about .about-education__logo {
    width: 64px;
  }

  .page-about .about-education__title h3 {
    max-width: 12ch;
    margin-top: 10px;
    font-size: clamp(2.15rem, 10vw, 3rem);
  }

  .page-about .about-education__details {
    grid-column: 1 / -1;
    padding-top: 16px;
  }
}

/* Shared editorial design system: canonical cross-page type, spacing, and grid. */
:root {
  --bg-primary: #0b0b0b;
  --text-primary: #f2f0e8;
  --text-secondary: rgba(242, 240, 232, 0.6);
  --text-muted: rgba(242, 240, 232, 0.38);
  --line: rgba(242, 240, 232, 0.12);
  --page-inline: clamp(28px, 3.5vw, 56px);
  --type-page-display: clamp(4.8rem, 8vw, 8.5rem);
  --type-home-display: clamp(4.5rem, 7vw, 7.5rem);
  --type-section-heading: clamp(3rem, 5vw, 5.5rem);
  --type-intro: clamp(2rem, 3vw, 3.6rem);
  --type-project-title: clamp(2rem, 3vw, 3.4rem);
  --type-body-large: clamp(1.1rem, 1.4vw, 1.35rem);
  --type-body: clamp(1rem, 1.15vw, 1.18rem);
  --type-meta: clamp(0.7rem, 0.75vw, 0.82rem);
  --section-space-lg: clamp(110px, 12vw, 180px);
  --section-space-md: clamp(80px, 8vw, 130px);
  --section-space-sm: clamp(48px, 5vw, 80px);
}

.page-home,
.page-work,
.page-about,
.page-contact,
.page-work .work-main,
.page-work .work-footer,
.page-about .about-main,
.page-contact .contact-main {
  color: var(--text-primary);
  background: var(--bg-primary);
}

.home-nav__inner,
.page-work .home-nav__inner.work-shell,
.work-shell,
.about-shell,
.contact-shell,
.editorial-shell,
.selected-work > .editorial-shell,
.home-tools > .editorial-shell {
  padding-inline: var(--page-inline);
}

.home-nav__inner,
.page-work .home-nav__inner.work-shell {
  min-height: 88px;
}

.site-wordmark {
  width: clamp(48px, 4vw, 64px);
  line-height: 1;
}

.home-nav__brand,
.home-nav__links a {
  font-size: clamp(0.75rem, 0.78vw, 0.875rem);
  font-weight: 650;
  letter-spacing: 0.1em;
}

.page-work .work-hero {
  padding-top: clamp(150px, 19vh, 190px);
  padding-bottom: var(--section-space-lg);
}

.page-work .work-hero h1,
.page-about .about-hero h1,
.page-contact .contact-hero h1 {
  color: var(--text-primary);
  font-size: var(--type-page-display);
  letter-spacing: -0.075em;
  line-height: 0.92;
}

.page-work .work-hero h1 {
  max-width: 13ch;
  font-weight: 500;
}

.page-about .about-hero h1,
.page-contact .contact-hero h1 {
  font-weight: 650;
}

.home-hero__name {
  font-size: var(--type-home-display);
}

.page-about .about-hero__statement {
  color: var(--text-secondary);
  font-size: var(--type-body-large);
  line-height: 1.5;
}

.page-contact .contact-hero__statement {
  width: min(100%, 22ch);
  color: var(--text-secondary);
  font-size: var(--type-intro);
  line-height: 1.08;
}

.selected-work__intro h2,
.home-tools h2,
.page-about .about-section__heading h2,
.page-contact .contact-directory__heading h2 {
  font-size: var(--type-section-heading);
  line-height: 0.96;
}

.page-about .about-introduction__copy {
  max-width: 24ch;
  font-size: var(--type-intro);
  line-height: 1.08;
}

.selected-work__intro > p,
.page-about .about-education__details p,
.page-about .about-exploration__item > p:last-child,
.page-contact .contact-directory__heading div > p {
  max-width: 70ch;
  font-size: var(--type-body);
  line-height: 1.55;
}

.page-about .about-education__details .about-education__description {
  max-width: 65ch;
  font-size: var(--type-body-large);
  line-height: 1.55;
}

.editorial-index,
.work-hero__chapter,
.editorial-project__meta,
.home-work-row__number,
.home-work-row__type,
.work-label,
.work-table__header,
.page-about .about-chapter,
.page-about .about-section__label p,
.page-about .about-section__heading > p,
.page-about .about-education__title > p,
.page-about .about-exploration__item > p:first-child,
.page-contact .contact-chapter,
.page-contact .contact-directory__heading > p,
.page-contact .contact-row__number,
.page-contact .contact-row__label,
.page-contact .contact-row__action {
  color: var(--text-muted);
  font-size: var(--type-meta);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

.selected-work,
.home-tools,
.page-about .about-section,
.page-contact .contact-directory {
  padding-block: var(--section-space-md);
}

.selected-work,
.home-tools,
.page-about .about-hero,
.page-about .about-facts,
.page-about .about-tools,
.page-about .about-section__heading,
.page-about .about-facts .about-section__label,
.page-about .about-fact,
.page-about .about-education__entry,
.page-about .about-exploration__list,
.page-about .about-exploration__item + .about-exploration__item,
.page-contact .contact-directory,
.page-contact .contact-directory__list,
.page-contact .contact-row,
.page-contact .contact-footer,
.page-work .work-index__list,
.page-work .work-row,
.page-work .work-contact__heading,
.page-work .work-footer {
  border-color: var(--line);
}

.page-contact .contact-directory__heading {
  padding-bottom: var(--section-space-sm);
}

.page-work .work-table {
  margin-top: var(--section-space-sm);
}

@media (max-width: 700px) {
  :root {
    --page-inline: 20px;
    --type-page-display: clamp(3.25rem, 14vw, 4.75rem);
    --type-home-display: clamp(3.2rem, 14vw, 5rem);
    --type-section-heading: clamp(2.5rem, 11vw, 3.5rem);
    --type-intro: clamp(1.625rem, 7vw, 2.25rem);
    --type-body-large: clamp(1.05rem, 4.5vw, 1.2rem);
    --type-body: clamp(1rem, 4.2vw, 1.125rem);
    --section-space-lg: clamp(88px, 22vw, 110px);
    --section-space-md: clamp(72px, 18vw, 92px);
    --section-space-sm: clamp(42px, 11vw, 60px);
  }

  .site-wordmark {
    width: clamp(44px, 10vw, 52px);
  }

  .page-work .work-hero {
    padding-top: 154px;
    padding-bottom: var(--section-space-lg);
  }

  .page-work .work-hero h1,
  .page-about .about-hero h1,
  .page-contact .contact-hero h1,
  .page-about .about-section__heading h2 {
    font-size: var(--type-page-display);
    line-height: 0.94;
  }

  .page-about .about-section__heading h2 {
    font-size: var(--type-section-heading);
  }

  .page-contact .contact-hero__statement {
    width: min(100%, 20ch);
  }
}

/* Page-scoped cosmic text fallback and reveal preservation. */
body.page-about .about-hero h1,
body.page-about .about-hero__statement,
body.page-contact .contact-hero h1,
body.page-contact .contact-hero__statement {
  color: #f2f0ea;
  background-image: none;
  -webkit-text-fill-color: currentColor;
}

body.page-about .about-hero h1,
body.page-about .about-hero__statement {
  animation-name: aboutHeroReveal, editorialCosmicText;
  animation-duration: 760ms, 18s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1), ease-in-out;
  animation-delay: var(--delay, 0ms), 0ms;
  animation-iteration-count: 1, infinite;
  animation-direction: normal, alternate;
  animation-fill-mode: forwards, none;
}

body.page-contact .contact-hero h1,
body.page-contact .contact-hero__statement {
  animation-name: contactHeroReveal, editorialCosmicText;
  animation-duration: 760ms, 14s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1), ease-in-out;
  animation-iteration-count: 1, infinite;
  animation-direction: normal, alternate;
  animation-fill-mode: forwards, none;
}

body.page-contact .contact-hero h1 {
  animation-delay: 100ms, 0ms;
}

body.page-contact .contact-hero__statement {
  animation-delay: 180ms, 0ms;
}

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  body.page-about .about-hero h1,
  body.page-about .about-hero__statement {
    color: #f2f0ea;
    background-image: linear-gradient(105deg, #f2f0ea 18%, #d7d9dc 38%, #8da4ba 54%, #78a8af 64%, #f2f0ea 84%);
    background-size: 280% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  body.page-contact .contact-hero h1,
  body.page-contact .contact-hero__statement {
    color: #f2f0ea;
    background-image: linear-gradient(105deg, #f2f0ea 12%, #cfd5db 30%, #7897bb 46%, #5eafbd 58%, #988aad 70%, #f2f0ea 88%);
    background-size: 240% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.page-about .about-hero h1,
  body.page-about .about-hero__statement,
  body.page-contact .contact-hero h1,
  body.page-contact .contact-hero__statement {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* Intro pool scene */
.pool-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: min(80vw, 980px, calc(80svh * 1.6));
  aspect-ratio: 16 / 10;
  /* starts small and dim (never black), grows and brightens with the LOADING count */
  transform: translate(-50%, -50%) scale(0.62);
  transform-origin: 50% 50%;
  filter: brightness(0.28);
  transition: transform 900ms cubic-bezier(0.76, 0, 0.24, 1);
  will-change: transform;
}

.pool-frame::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -9%;
  z-index: -1;
  height: 14%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.9), transparent 70%);
  filter: blur(18px);
  opacity: 0.9;
  transition: opacity 400ms ease;
}

.pool-canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 4px;
  background: #2ccfd6;
  box-shadow:
    0 30px 60px -28px rgba(0, 0, 0, 1),
    0 70px 120px -60px rgba(0, 0, 0, 1);
  cursor: pointer;
  touch-action: none;
}

.portfolio-intro .portfolio-intro__word {
  font-family: Anton, "Arial Narrow", Impact, sans-serif;
  font-weight: 400;
  z-index: 1;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(3, 30, 44, 0.55), 0 0 14px rgba(3, 30, 44, 0.35);
  pointer-events: none;
}

.portfolio-intro .portfolio-intro__count {
  z-index: 1;
  color: rgba(4, 41, 58, 0.7);
  pointer-events: none;
}

.portfolio-intro.is-diving .portfolio-intro__word,
.portfolio-intro.is-diving .portfolio-intro__count {
  opacity: 0;
  transition: opacity 300ms ease;
}

/* opening: one continuous zoom + brighten while LOADING counts (eased, not linear) */
.portfolio-intro.is-loading .pool-frame {
  transform: translate(-50%, -50%) scale(1);
  filter: brightness(1);
  transition:
    transform 2000ms cubic-bezier(0.45, 0, 0.2, 1),
    filter 2000ms cubic-bezier(0.45, 0, 0.2, 1);
}

/* final zoom keeps its own timing */
.portfolio-intro.is-diving .pool-frame {
  transition: transform 900ms cubic-bezier(0.76, 0, 0.24, 1);
}

.portfolio-intro.is-revealed .portfolio-intro__word,
.portfolio-intro.is-revealed .portfolio-intro__count {
  opacity: 0;
  transition: opacity 300ms ease;
}

.portfolio-intro.is-diving .pool-frame::after {
  opacity: 0;
}

@media (max-width: 720px) {
  .pool-frame {
    width: min(88vw, calc(70svh * 1.6));
  }
}

@media (prefers-reduced-motion: reduce) {
  .pool-frame {
    transition: none;
  }
}

/* Home hero centred portrait */
.home-hero::after {
  content: none;
}

/* layers: water field (back) -> name -> depth shadow -> portrait */
.home-hero__name {
  z-index: 1;
  right: 0;
  left: 0;
  width: auto;
  text-align: center;
  filter: none;
  /* solid, full-brightness letters */
  background: none;
  color: #f5f1e9;
  -webkit-text-fill-color: #f5f1e9;
  /* Anton: single weight, tall caps, so open the tracking and close the lines */
  font-family: Anton, "Arial Narrow", Impact, sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 0.9;
  opacity: 1;
}

.home-hero__name-line--agoes {
  margin-left: 0;
}

.home-hero__canvas::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 18vh;
  left: 50%;
  width: min(62vw, 980px);
  height: 74vh;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 55%, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.22) 45%, transparent 70%);
  filter: blur(24px);
  pointer-events: none;
}

.home-hero__portrait,
.home-hero__mask {
  -webkit-mask-image:
    linear-gradient(to bottom, #000 55%, transparent 97%),
    linear-gradient(to right, transparent 0%, #000 20%, #000 80%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, #000 55%, transparent 97%),
    linear-gradient(to right, transparent 0%, #000 20%, #000 80%, transparent 100%);
  mask-composite: intersect;
}

.home-hero__portrait {
  z-index: 3;
  /* solid: never see-through; dimming is done by brightness, not opacity */
  opacity: 1;
}

.home-hero__mask {
  z-index: 4;
}

@media (min-width: 701px) {
  .home-hero__portrait,
  .home-hero__mask {
    top: 10vh;
    bottom: auto;
    left: calc(50% - min(30vw, 480px));
    width: min(60vw, 960px);
    height: 82vh;
  }

  .home-hero__portrait {
    object-position: center bottom;
  }

  .home-hero__name {
    top: 20vh;
    font-size: clamp(4.25rem, 14.5vw, 16rem);
  }

  .home-hero__statement {
    top: auto;
    right: clamp(24px, 3vw, 56px);
    bottom: calc(clamp(28px, 3vw, 48px) + 4.6em);
    left: auto;
    z-index: 5;
    text-align: right;
  }

  .home-hero__disciplines,
  .home-hero__meta,
  .home-hero__scroll {
    z-index: 5;
  }

  .home-hero__meta {
    right: 0;
    left: 0;
    justify-content: center;
  }
}

@media (min-width: 701px) and (max-width: 900px) {
  .home-hero__portrait,
  .home-hero__mask {
    top: 14vh;
    left: 14vw;
    width: 72vw;
    height: 70vh;
  }

  .home-hero__name {
    top: 24vh;
    font-size: clamp(3.4rem, 15.3vw, 8.5rem);
  }

  .home-hero__statement {
    font-size: clamp(1rem, 2.2vw, 1.3rem);
  }

  .home-hero__disciplines {
    max-width: 34vw;
  }

  .home-hero__meta {
    flex-direction: column;
    align-items: center;
    gap: 2px;
  }
}

@media (max-width: 700px) {
  .home-hero__portrait,
  .home-hero__mask {
    top: 12vh;
    left: 4vw;
    width: 92vw;
    height: 54vh;
    object-position: center bottom;
  }

  .home-hero__name {
    top: 20vh;
    right: 0;
    left: 0;
    font-size: clamp(3.05rem, 19.5vw, 5.95rem);
  }

  .home-hero__canvas::before {
    top: 14vh;
    width: 96vw;
    height: 52vh;
  }

  .home-hero__statement,
  .home-hero__disciplines,
  .home-hero__meta,
  .home-hero__scroll {
    z-index: 5;
  }
}

/* Home: no entry animation, the page lands complete after the pool zoom */
body[data-page="home"] .home-nav,
body[data-page="home"] .home-hero__mask,
body[data-page="home"] .home-hero__statement,
body[data-page="home"] .home-hero__disciplines,
body[data-page="home"] .home-hero__meta,
body[data-page="home"] .home-hero__scroll {
  opacity: 1;
  transform: none;
  animation: none;
}

body[data-page="home"] .home-hero__name-line > span {
  transform: none;
  animation: none;
}

body[data-page="home"] .home-hero::before {
  opacity: 0;
  animation: none;
}

/* Intro pool: edges dissolve into the dark, dive transition into home */
:root {
  /* where the dive lands; the home hero starts on the same colour */
  --dive-landing: radial-gradient(ellipse at 50% 45%, #0c2a30 0%, #071a1e 48%, #040c0e 100%);
}

/* reflected teal light from the water, swaying with it (vars set in script.js) */
.pool-frame::before {
  content: "";
  position: absolute;
  inset: -22% -16%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(ellipse closest-side, rgba(38, 150, 160, var(--glow-a, 0.16)), rgba(20, 90, 98, calc(var(--glow-a, 0.16) * 0.35)) 55%, transparent 100%);
  transform: translate(var(--glow-x, 0%), var(--glow-y, 0%)) scale(var(--glow-s, 1));
  pointer-events: none;
}

/* no hard dark shadow or box edge: the deck now fades into the glow */
.pool-canvas {
  border-radius: 0;
  box-shadow: none;
}

.pool-frame::after {
  display: none;
}

.pool-dive {
  position: fixed;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  background: var(--dive-landing);
  opacity: 0;
  pointer-events: none;
}

.pool-dive span {
  position: absolute;
  bottom: -12px;
  width: var(--size);
  height: var(--size);
  border: 1px solid rgba(200, 240, 240, 0.45);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.5), rgba(160, 230, 230, 0.08) 60%, transparent);
  opacity: 0;
  animation: poolBubble var(--rise) cubic-bezier(0.3, 0, 0.6, 1) var(--delay) forwards;
}

/* underside of the water surface seen from just below: brightest toward the light (top left),
   rippled by the shared refraction filter, never a hard edge */
.pool-dive__surface {
  position: absolute;
  inset: -12% -10% 46%;
  background:
    radial-gradient(60% 70% at 36% 0%, rgba(196, 246, 240, 0.5), rgba(120, 214, 220, 0.2) 42%, transparent 72%),
    radial-gradient(90% 60% at 50% 0%, rgba(80, 180, 190, 0.18), transparent 70%);
  opacity: 0;
  transform-origin: 40% 0%;
  pointer-events: none;
}

@keyframes poolBubble {
  0% { opacity: 0; transform: translate(0, 0); }
  20% { opacity: 0.9; }
  100% { opacity: 0; transform: translate(6px, -70vh); }
}

/* home hero starts on the dive's landing colour, so the page change has no seam */
body[data-page="home"] .home-hero {
  background: var(--dive-landing);
}

/* Home hero: only logo, nav, name + portrait, and two quiet hints */
.home-hero__hint,
.home-hero__scroll {
  position: absolute;
  z-index: 5;
  bottom: clamp(24px, 3vw, 44px);
  margin: 0;
  color: rgba(242, 239, 232, 0.42);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  line-height: 1;
}

.home-hero__hint {
  left: clamp(24px, 3vw, 56px);
  text-transform: lowercase;
  pointer-events: none;
}

.home-hero__scroll {
  right: clamp(24px, 3vw, 56px);
  left: auto;
  text-transform: uppercase;
}

@media (max-width: 700px) {
  .home-hero__hint {
    left: 20px;
  }

  .home-hero__scroll {
    right: 20px;
    left: auto;
    bottom: clamp(24px, 3vw, 44px);
  }
}

/* moved out of the hero */
.selected-work__lede {
  margin: 0 0 18px;
  color: rgba(242, 239, 232, 0.7);
  font-size: clamp(1rem, 1.4vw, 1.35rem);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.site-footer .footer-layout {
  flex-wrap: wrap;
  gap: 8px 32px;
}

.footer-disciplines p,
.footer-meta {
  margin: 0;
  color: rgba(242, 239, 232, 0.5);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.6;
  text-transform: uppercase;
}

.footer-disciplines span,
.footer-meta span {
  padding: 0 0.5em;
  opacity: 0.6;
}

/* Hero: portrait on the pool floor, ripple menu */
@media (min-width: 701px) {
  .home-hero__portrait,
  .home-hero__mask {
    /* bottom lands on the underwater floor line, same size as before */
    top: 17vh;
    height: 82vh;
  }
}

@media (min-width: 701px) and (max-width: 900px) {
  .home-hero__portrait,
  .home-hero__mask {
    top: 24vh;
    height: 70vh;
  }
}

@media (max-width: 700px) {
  .home-hero__portrait,
  .home-hero__mask {
    top: 30vh;
    height: 54vh;
  }
}

/* ripple menu */
.ripple-menu__toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  color: inherit;
  font: inherit;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: none;
  border: 0;
  cursor: pointer;
}

.ripple-menu__icon svg {
  display: block;
  width: 28px;
  height: 18px;
  overflow: visible;
}

.ripple-menu__icon path {
  transition: d 420ms cubic-bezier(0.22, 1, 0.36, 1), transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
  animation: rippleMenuWave 3.4s ease-in-out infinite;
}

.ripple-menu__icon path:nth-child(2) { animation-delay: -1.1s; }
.ripple-menu__icon path:nth-child(3) { animation-delay: -2.2s; }

/* settle flat on hover, focus or while open */
.ripple-menu__toggle:hover .ripple-menu__icon path,
.ripple-menu__toggle:focus-visible .ripple-menu__icon path,
.ripple-menu__toggle[aria-expanded="true"] .ripple-menu__icon path {
  animation: none;
  transform: none;
}

.ripple-menu__toggle:hover .ripple-menu__icon path:nth-child(1),
.ripple-menu__toggle:focus-visible .ripple-menu__icon path:nth-child(1),
.ripple-menu__toggle[aria-expanded="true"] .ripple-menu__icon path:nth-child(1) { d: path("M2 4 L 26 4"); }

.ripple-menu__toggle:hover .ripple-menu__icon path:nth-child(2),
.ripple-menu__toggle:focus-visible .ripple-menu__icon path:nth-child(2),
.ripple-menu__toggle[aria-expanded="true"] .ripple-menu__icon path:nth-child(2) { d: path("M2 9 L 26 9"); }

.ripple-menu__toggle:hover .ripple-menu__icon path:nth-child(3),
.ripple-menu__toggle:focus-visible .ripple-menu__icon path:nth-child(3),
.ripple-menu__toggle[aria-expanded="true"] .ripple-menu__icon path:nth-child(3) { d: path("M2 14 L 26 14"); }

@keyframes rippleMenuWave {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-2.2px); }
}

.home-nav__inner .ripple-menu__panel {
  position: absolute;
  top: calc(100% - 12px);
  right: clamp(20px, 3vw, 56px);
  z-index: 25;
  display: grid;
  gap: 2px;
  min-width: 190px;
  margin: 0;
  padding: 14px 18px;
  list-style: none;
  background: rgba(6, 26, 32, 0.78);
  border: 1px solid rgba(140, 215, 215, 0.16);
  border-radius: 4px;
  backdrop-filter: blur(14px);
  /* opens like a ripple spreading from the button */
  clip-path: circle(0% at 86% 0%);
  opacity: 0;
  transform: translateY(-6px);
  transition:
    clip-path 560ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 320ms ease,
    transform 560ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-nav__inner .ripple-menu__panel.is-open {
  clip-path: circle(160% at 86% 0%);
  opacity: 1;
  transform: translateY(0);
}

.home-nav__inner .ripple-menu__panel li {
  overflow: hidden;
}

.home-nav__inner .ripple-menu__panel a {
  display: block;
  padding: 7px 0;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0;
  translate: 0 110%;
  transition: opacity 360ms ease, translate 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-nav__inner .ripple-menu__panel.is-open a {
  opacity: 1;
  translate: 0 0;
}

.home-nav__inner .ripple-menu__panel.is-open li:nth-child(1) a { transition-delay: 90ms; }
.home-nav__inner .ripple-menu__panel.is-open li:nth-child(2) a { transition-delay: 150ms; }
.home-nav__inner .ripple-menu__panel.is-open li:nth-child(3) a { transition-delay: 210ms; }
.home-nav__inner .ripple-menu__panel.is-open li:nth-child(4) a { transition-delay: 270ms; }

@media (prefers-reduced-motion: reduce) {
  .ripple-menu__icon path {
    animation: none;
  }

  .home-nav__inner .ripple-menu__panel,
  .home-nav__inner .ripple-menu__panel a {
    transition: none;
  }
}

/* Hero: head-only portrait, menu in the corner, quiet corner hints */
.home-nav__inner {
  justify-content: space-between;
}

/* the four links live only inside the panel */
.home-nav__inner .ripple-menu__panel {
  position: absolute;
  top: calc(100% - 12px);
  right: clamp(20px, 3vw, 56px);
  left: auto;
  z-index: 25;
  display: grid;
  flex: none;
  grid-template-columns: 1fr;
  justify-items: start;
  gap: 2px;
  min-width: 190px;
}

.ripple-menu__toggle {
  flex: none;
  margin-left: auto;
  background: none;
  background-color: transparent;
  border: 0;
  box-shadow: none;
  /* icon and label on one row */
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.ripple-menu__word {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  line-height: 1;
}

/* portrait cropped to the head, sitting low near the floor line */
.home-hero__portrait,
.home-hero__mask {
  object-fit: cover;
  object-position: 50% 12%;
}

@media (min-width: 701px) {
  .home-hero__portrait,
  .home-hero__mask {
    top: auto;
    bottom: 6vh;
    left: calc(50% - min(26vw, 400px));
    width: min(52vw, 800px);
    height: 62vh;
  }
}

@media (min-width: 701px) and (max-width: 900px) {
  .home-hero__portrait,
  .home-hero__mask {
    top: auto;
    bottom: 8vh;
    left: calc(50% - 30vw);
    width: 60vw;
    height: 52vh;
  }
}

@media (max-width: 700px) {
  .home-hero__portrait,
  .home-hero__mask {
    top: auto;
    bottom: 12vh;
    left: 8vw;
    width: 84vw;
    height: 40vh;
  }
}

/* both corner hints share one quiet style */
.home-hero__hint,
.home-hero__scroll {
  position: absolute;
  top: auto;
  bottom: clamp(24px, 3vw, 44px);
  z-index: 5;
  display: flex;
  gap: 10px;
  align-items: center;
  width: auto;
  margin: 0;
  color: rgba(242, 239, 232, 0.42);
  font-family: Inter, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  line-height: 1;
  text-align: left;
}

.home-hero__hint {
  right: auto;
  left: clamp(20px, 3vw, 56px);
  text-transform: lowercase;
  pointer-events: none;
}

.home-hero__scroll {
  right: clamp(20px, 3vw, 56px);
  left: auto;
  text-transform: uppercase;
}

/* Hero: portrait back to shoulders-up (shoulders never cropped) */
.home-hero__portrait,
.home-hero__mask {
  /* whole figure inside the frame again: no crop, shoulders never cut off */
  object-fit: contain;
  object-position: center bottom;
}

@media (min-width: 701px) {
  .home-hero__portrait,
  .home-hero__mask {
    top: auto;
    bottom: 1vh;
    left: calc(50% - min(30vw, 480px));
    width: min(60vw, 960px);
    height: 82vh;
  }
}

@media (min-width: 701px) and (max-width: 900px) {
  .home-hero__portrait,
  .home-hero__mask {
    bottom: 1vh;
    left: 14vw;
    width: 72vw;
    height: 70vh;
  }
}

@media (max-width: 700px) {
  .home-hero__portrait,
  .home-hero__mask {
    bottom: 2vh;
    left: 4vw;
    width: 92vw;
    height: 54vh;
  }
}

/* portrait slightly translucent: the letters read faintly through the face */
.home-hero__portrait,
.home-hero__mask {
  opacity: 0.85;
}

/* Home dive: one locked screen, the camera travels through the portrait into the tunnel */
html:has(body.page-home),
body.page-home {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

.page-home .selected-work,
.page-home .site-footer,
.page-home .home-hero::after {
  display: none;
}

.page-home .home-hero {
  height: 100vh;
  height: 100svh;
}

.page-home .home-hero__canvas {
  transform-origin: 50% 38%;
  will-change: transform, opacity;
}

.page-home .home-hero__field {
  transform-origin: 50% 46%;
}

.home-dive__title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.home-dive {
  position: absolute;
  inset: 0;
  z-index: 3;
  perspective: 900px;
  perspective-origin: 50% 46%;
  pointer-events: none;
}

.home-dive__door {
  position: absolute;
  top: 50%;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: -0.6em;
  color: inherit;
  font-family: Inter, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: clamp(2.6rem, 8vw, 8rem);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.035em;
  text-decoration: none;
  opacity: 0;
  transform-style: preserve-3d;
  will-change: transform, opacity;
  transition: color 240ms ease;
}

.home-dive__door--about {
  left: clamp(20px, 12vw, 200px);
}

.home-dive__door--contact {
  right: clamp(20px, 12vw, 200px);
  align-items: flex-end;
}

.home-dive__index {
  font-family: Inter, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  opacity: 0.5;
}

.home-dive.is-open .home-dive__door {
  pointer-events: auto;
}

.home-dive__door:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 10px;
}

@media (max-width: 700px) {
  .home-dive__door {
    font-size: clamp(2.2rem, 13vw, 4rem);
  }

  .home-dive__door--about {
    top: 36%;
    left: 8vw;
  }

  .home-dive__door--contact {
    top: 62%;
    right: 8vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .home-hero__canvas,
  .home-dive__door {
    transition: opacity 400ms ease, color 240ms ease;
  }
}

/* ==========================================================================
   Inner pages design system (Work, About, Experience, Contact).
   These pages are always deep water, so nothing here depends on the theme class.
   One set of tokens, one container, one type scale, one palette, one water scene.
   ========================================================================== */
:is(body.page-work, body.page-about, body.page-experience, body.page-contact) {
  --ds-bg: #061014;
  --ds-bg-2: #0b242a;
  --ds-text: #f2f7f7;
  --ds-muted: #9fb8bd;
  --ds-accent: #4dc9d0;
  --ds-line: rgba(159, 184, 189, 0.14);
  --ds-panel: rgba(11, 36, 42, 0.42);
  --ds-panel-hover: rgba(11, 36, 42, 0.68);
  --ds-max: 1320px;
  --ds-gutter: clamp(20px, 5vw, 72px);
  --ds-section: clamp(72px, 10vw, 136px);
  --ds-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ds-dur: 240ms;
  --ds-font: Inter, "Segoe UI", Helvetica, Arial, sans-serif;
  /* legacy tokens follow the palette */
  --accent: var(--ds-accent);
  --accent-strong: var(--ds-accent);
  --text: var(--ds-text);
  --text-strong: var(--ds-text);
  --text-soft: var(--ds-muted);
  --text-muted: var(--ds-muted);
  --border: var(--ds-line);
  --page-inline: var(--ds-gutter);
  --text-primary: var(--ds-text);
  color: var(--ds-text);
  font-family: var(--ds-font);
  /* brighter water near the surface, deep water below */
  background: linear-gradient(180deg, var(--ds-bg-2) 0, var(--ds-bg) 70vh) no-repeat, var(--ds-bg);
}

/* Water: the hero canvas is pinned behind the whole page; sections float in it */
:is(body.page-work, body.page-about, body.page-experience, body.page-contact) .editorial-hero-effect {
  position: fixed;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
}

:is(body.page-work, body.page-about, body.page-experience, body.page-contact) :is(.work-hero, .about-hero, .experience-hero, .contact-hero) {
  isolation: auto;
  min-height: 0;
}

:is(body.page-work, body.page-about, body.page-experience, body.page-contact) :is(main, main > section, main > section > div, main > section > header, main > footer, body > footer, .work-footer, .experience-footer, .contact-footer) {
  border-top-color: transparent;
  border-bottom-color: transparent;
  background-color: transparent;
  background-image: none;
  box-shadow: none;
}

/* Container: nav and content share the same edges */
:is(body.page-work, body.page-about, body.page-experience, body.page-contact) :is(.work-shell, .about-shell, .experience-shell, .contact-shell, .home-nav__inner) {
  box-sizing: border-box;
  width: 100%;
  max-width: calc(var(--ds-max) + 2 * var(--ds-gutter));
  margin-inline: auto;
  padding-inline: var(--ds-gutter);
}

/* Rhythm: same hero offset and section spacing on every page */
:is(body.page-work, body.page-about, body.page-experience, body.page-contact) main > section:first-of-type > [class*="shell"] {
  padding-block: clamp(128px, 18vh, 192px) clamp(48px, 7vw, 96px);
}

:is(body.page-work, body.page-about, body.page-experience, body.page-contact) main > section + section {
  padding-block: var(--ds-section);
}

/* Type scale */
:is(body.page-work, body.page-about, body.page-experience, body.page-contact) :is(h1, h2, h3, h4, p, li, a, button, input, textarea, label) {
  font-family: var(--ds-font);
}

:is(body.page-work, body.page-about, body.page-experience, body.page-contact) h1 {
  max-width: 14ch;
  font-size: clamp(2.5rem, 7vw, 6.5rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
  overflow-wrap: break-word;
}

:is(body.page-work, body.page-about, body.page-experience, body.page-contact) h2:not(.work-row h2) {
  font-size: clamp(1.875rem, 4vw, 3.5rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--ds-text);
  overflow-wrap: break-word;
}

/* label-column headings (About "01 / Introduction") must fit their narrow column */
body.page-about .about-editorial-grid .about-section__label h2 {
  font-size: clamp(1.5rem, 2.4vw, 2.25rem);
}

:is(body.page-work, body.page-about, body.page-experience, body.page-contact) h3,
body.page-work .work-row h2 {
  font-size: clamp(1.0625rem, 1.5vw, 1.3125rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ds-text);
}

:is(body.page-work, body.page-about, body.page-experience, body.page-contact) :is(main p, main li) {
  max-width: 68ch;
  line-height: 1.6;
  color: var(--ds-muted);
}

/* Hero headings and statements: white easing into cyan, no multicolour shimmer */
:is(body.page-work .work-hero h1, body.page-about .about-hero h1, body.page-experience .experience-hero h1, body.page-contact .contact-hero h1,
  body.page-about .about-hero__statement, body.page-contact .contact-hero__statement, body.page-experience .experience-hero__copy) {
  color: transparent;
  background-image: linear-gradient(100deg, var(--ds-text) 55%, var(--ds-accent) 130%);
  background-size: 100% 100%;
  background-position: 0 0;
  background-clip: text;
  -webkit-background-clip: text;
  animation: none;
}

/* ...but About and Contact heroes start at opacity 0 and rely on their reveal animation to appear */
@media (prefers-reduced-motion: no-preference) {
  body.page-about :is(.about-hero h1, .about-hero__statement) {
    animation: aboutHeroReveal 760ms cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0ms) forwards;
  }

  body.page-contact .contact-hero h1 {
    animation: contactHeroReveal 760ms cubic-bezier(0.22, 1, 0.36, 1) 100ms forwards;
  }

  /* p. lifts it past the :is() rule above, which takes the specificity of its strongest argument */
  body.page-contact .contact-hero p.contact-hero__statement {
    animation: contactHeroReveal 760ms cubic-bezier(0.22, 1, 0.36, 1) 180ms forwards;
  }
}

/* Links and buttons: one colour change, one timing, one focus ring */
:is(body.page-work, body.page-about, body.page-experience, body.page-contact) :is(a, button) {
  transition: color var(--ds-dur) var(--ds-ease), background-color var(--ds-dur) var(--ds-ease), border-color var(--ds-dur) var(--ds-ease), opacity var(--ds-dur) var(--ds-ease);
}

:is(body.page-work, body.page-about, body.page-experience, body.page-contact) main a:hover {
  color: var(--ds-accent);
}

:is(body.page-work, body.page-about, body.page-experience, body.page-contact) :is(a, button):focus-visible {
  outline: 1px solid var(--ds-accent);
  outline-offset: 4px;
}

/* Former lime CTAs move onto the palette */
.work-preview__cta,
.work-contact a:focus-visible,
body[data-page="projects"] .work-contact a:focus-visible {
  color: var(--ds-accent, #4dc9d0);
  border-color: var(--ds-accent, #4dc9d0);
}

/* Remaining dividers inside the content become palette hairlines */
:is(body.page-work, body.page-about, body.page-experience, body.page-contact) main [class*="shell"] * {
  border-color: var(--ds-line);
}

/* Project cards: faint panes of water over the scene */
body.page-work .work-row {
  background-color: var(--ds-panel);
}

body.page-work .work-row:hover,
body.page-work .work-row:focus-within {
  background-color: var(--ds-panel-hover);
}

/* Footers share one layout */
:is(.work-footer, .experience-footer, .contact-footer, body.page-about .site-footer) {
  padding-block: clamp(40px, 6vw, 72px);
  color: var(--ds-muted);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
}

/* Home dive destinations share the accent */
.home-dive__door:hover,
.home-dive__door:focus-visible {
  color: #4dc9d0;
}

/* ==========================================================================
   Underwater experience v2
   One water world: portal transitions, depth with scroll, surfacing reveals,
   gallery, nav, journey and contact feedback. Motion lives inside
   prefers-reduced-motion: no-preference; the reduced site stays still.
   ========================================================================== */

:root {
  --sea-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sea-sink: cubic-bezier(0.55, 0, 0.25, 1);
  --sea-accent: #4dc9d0;
  --sea-foam: #e9fbfc;
  /* one camera lens for portals, hero type and the spotlight */
  --sea-perspective: 1200px;
}

/* the camera's heading between spaces (data-portal, set per trip): deeper spaces lie below,
   so travelling down the room drifts up past the lens and the next one rises from beneath */
body {
  --portal-rise: -2vh;
  --portal-arrive: 3vh;
}

body[data-portal="up"] {
  --portal-rise: 2vh;
  --portal-arrive: -3vh;
}

/* --- Portal: the passage between pages is water, never a black curtain --- */
.page-transition {
  background:
    radial-gradient(120% 90% at 16% -12%, rgba(77, 201, 208, 0.14), transparent 55%),
    linear-gradient(180deg, #0b242a 0%, #061014 55%, #03090b 100%);
}

/* the opening of light the camera swims toward, then through */
.page-transition::before {
  content: "";
  position: absolute;
  inset: -25%;
  background: radial-gradient(closest-side, rgba(140, 224, 230, 0.16), rgba(77, 201, 208, 0.05) 45%, transparent 75%);
  opacity: 0;
  transform: scale(0.55);
  pointer-events: none;
}

/* the veil is the water just left: as dark as that space was (--veil-depth, set by the camera) */
.page-transition::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(1, 4, 6, 0.55), rgba(1, 4, 6, 0.85));
  opacity: var(--veil-depth, 0);
  pointer-events: none;
}

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

@media (prefers-reduced-motion: no-preference) {
  .page-transition,
  .page-transition.is-idle,
  .page-transition.is-entering,
  .page-transition.is-exiting {
    transform: none;
  }

  .page-transition {
    opacity: 1;
    visibility: visible;
    transition: opacity 600ms cubic-bezier(0.4, 0, 0.2, 1), visibility 0s;
  }

  .page-transition::before {
    opacity: 1;
    transform: scale(1.2);
  }

  .page-transition.is-idle {
    opacity: 0;
    visibility: hidden;
    transition: none;
  }

  .page-transition.is-idle::before {
    opacity: 0;
    transform: scale(0.55);
    transition: none;
  }

  .page-transition.is-entering {
    opacity: 1;
    visibility: visible;
    transition: opacity 560ms cubic-bezier(0.4, 0, 0.2, 1) 260ms, visibility 0s;
  }

  .page-transition.is-entering::before {
    opacity: 1;
    transform: scale(1.2);
    transition: transform 1000ms var(--sea-ease) 200ms, opacity 600ms ease 260ms;
  }

  .page-transition.is-exiting {
    opacity: 0;
    visibility: hidden;
    transition: opacity 820ms cubic-bezier(0.4, 0, 0.2, 1) 140ms, visibility 0s 960ms;
  }

  .page-transition.is-exiting::before {
    opacity: 0;
    transform: scale(2.4);
    transition: transform 1000ms cubic-bezier(0.4, 0, 0.2, 1), opacity 800ms ease 150ms;
  }

  /* leaving: the camera swims forward, so the room drifts toward it and past it, losing focus */
  .portal-target {
    transform-origin: 50% 40vh;
    transition: opacity 720ms cubic-bezier(0.4, 0, 0.2, 1), transform 900ms var(--sea-sink), filter 720ms ease;
  }

  body.portal-out .portal-target {
    opacity: 0;
    transform: perspective(var(--sea-perspective)) translate3d(0, var(--portal-rise), 160px);
    filter: blur(10px) brightness(0.6);
  }

  /* the move scales content toward the lens; clip it sideways so it never widens the page
     (a wider page flashes a horizontal scrollbar on desktop and zooms out phones mid-move).
     main's overflow never clips the pinned canvas: its containing block is the viewport. */
  :is(body.portal-out, body.portal-in) :is(main, body > header, body > footer) {
    overflow-x: clip;
  }

  /* the water itself stays sharp (its own warp is the refraction): the camera pushes into it */
  body.portal-out .editorial-hero-effect.portal-target {
    opacity: 0.6;
    transform: scale(1.08);
    filter: brightness(0.8);
  }

  /* arriving: the next room comes up out of the distance in the same water and settles into focus */
  body.portal-in .portal-target {
    opacity: 0;
    transform: perspective(var(--sea-perspective)) translate3d(0, var(--portal-arrive), -180px);
    filter: blur(10px);
    transition: none;
  }

  body.portal-in .editorial-hero-effect.portal-target {
    opacity: 0.4;
    transform: scale(1.04);
    filter: none;
  }

  body.portal-in.portal-in-go .portal-target {
    opacity: 1;
    transform: none;
    filter: none;
    transition: opacity 900ms ease 120ms, transform 1200ms var(--sea-ease) 80ms, filter 1000ms ease 80ms;
  }
}

/* <main> must never carry a transform: it holds the pinned water canvas and the cursor preview,
   and a filled transform turned it into their containing block (canvas stretched to the page
   height, preview offset from the cursor). The portal arrival now handles Work's entrance. */
.page-work .work-main {
  animation: none;
}

/* --- Depth: surface light recedes and the deep thickens as the page scrolls --- */
.sea-depth {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.sea-depth::before,
.sea-depth::after {
  content: "";
  position: absolute;
}

/* light from the surface, top left; moves slower than the page and fades with depth */
.sea-depth::before {
  inset: -12% -10% 0;
  background: radial-gradient(70% 55% at 12% 0%, rgba(120, 214, 220, 0.1), transparent 70%);
  opacity: calc(1 - var(--sea-depth, 0) * 0.85 - var(--sea-floor, 0) - var(--sea-carry, 0));
  transform: translate3d(0, calc(var(--sea-depth, 0) * -14vh), 0);
}

/* the deep: darker toward the edges and the bottom, thicker the further down */
.sea-depth::after {
  inset: 0;
  background:
    radial-gradient(130% 100% at 30% 0%, transparent 35%, rgba(1, 5, 7, 0.7) 100%),
    linear-gradient(180deg, transparent 0%, rgba(1, 5, 7, 0.55) 100%);
  /* --sea-carry: darkness carried in from the previous space, settling to zero after arrival */
  opacity: calc(var(--sea-floor, 0) + var(--sea-depth, 0) * 0.55 + var(--sea-carry, 0));
}

/* --- Reveal: content surfaces out of the water once, rising and coming into focus --- */
@media (prefers-reduced-motion: no-preference) {
  :root .reveal {
    filter: blur(var(--reveal-blur, 8px));
  }

  /* only while surfacing: once settled, each element's own hover/focus transitions apply again */
  :root .reveal:not(.is-settled) {
    transition:
      opacity 900ms var(--reveal-ease),
      transform 1000ms var(--reveal-ease),
      filter 900ms var(--reveal-ease),
      color 240ms ease,
      background-color 240ms ease;
    transition-delay: var(--delay, 0ms);
  }

  :root .reveal.is-visible {
    filter: blur(0);
  }

  :root .reveal.is-settled {
    filter: none;
    transition-delay: 0ms;
    will-change: auto;
  }
}

/* --- Depth images: surfacing from below, tipped back, dim and soft, then sharp (initDepthImages) ---
   --depth-drift keeps a few pixels of parallax while on screen; the slow transform transition gives it
   the drag of water. Same function list in both states so the browser interpolates, never jumps. */
@media (prefers-reduced-motion: no-preference) {
  .depth-image {
    opacity: 0;
    transform: perspective(var(--sea-perspective, 1200px)) translate3d(0, calc(26px + var(--depth-drift, 0px)), -40px) rotateX(5deg);
    transform-origin: 50% 100%;
    filter: blur(6px) brightness(0.6) saturate(0.75);
    transition:
      opacity 1000ms var(--reveal-ease) 160ms,
      transform 1300ms var(--reveal-ease) 160ms,
      filter 1100ms var(--reveal-ease) 160ms;
  }

  .depth-image.is-surfaced {
    opacity: 1;
    transform: perspective(var(--sea-perspective, 1200px)) translate3d(0, var(--depth-drift, 0px), 0) rotateX(0deg);
    filter: none;
  }
}

/* --- Work gallery --- */
@media (prefers-reduced-motion: no-preference) {
  /* the active row tips a fraction of a degree toward the cursor */
  :root .page-work .work-row.is-settled {
    transform: perspective(1400px) rotateX(0deg) rotateY(0deg);
    transition:
      opacity 360ms ease,
      transform 700ms var(--sea-ease),
      filter 360ms ease,
      color 380ms ease,
      background-color 240ms ease;
    transition-delay: var(--filter-delay, 0ms);
  }

  :root .page-work .work-row.is-settled.is-active {
    transform: perspective(1400px) rotateX(var(--row-rx, 0deg)) rotateY(var(--row-ry, 0deg)) translateZ(6px);
  }

  /* filters: leaving rows sink away, arriving rows surface in order */
  :root .page-work .work-row.is-filtering-out {
    opacity: 0;
    transform: translate3d(0, -10px, 0);
    filter: blur(6px);
  }

  :root .page-work .work-row.is-filtering-in {
    opacity: 0;
    transform: translate3d(0, 16px, 0);
    filter: blur(6px);
    transition: none;
  }

  /* the preview leans into its motion like a pane pulled through water */
  .page-work .work-preview,
  .page-work .work-preview.is-visible {
    transform: translate3d(-50%, -50%, 0) perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  }

  .page-work .work-preview {
    scale: 0.94;
    transition: opacity 320ms ease, scale 560ms var(--sea-ease);
  }

  .page-work .work-preview.is-visible {
    scale: 1;
  }

  /* image opens from the middle out, then drifts behind the frame (parallax) */
  .page-work .work-preview__media {
    clip-path: inset(16% 10% 16% 10%);
    transition: clip-path 680ms var(--sea-ease);
  }

  .page-work .work-preview.is-visible .work-preview__media {
    clip-path: inset(0);
  }

  .page-work .work-preview__media img.is-active {
    transform: translate3d(var(--drift-x, 0px), var(--drift-y, 0px), 0) scale(1.06);
  }

  /* light from the surface plays across the image, as if seen through the water */
  .page-work .work-preview__media::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
      linear-gradient(165deg, rgba(190, 240, 244, 0.16) 0%, transparent 32%),
      radial-gradient(60% 40% at 30% 20%, rgba(120, 220, 226, 0.12), transparent 70%),
      radial-gradient(50% 35% at 70% 80%, rgba(120, 220, 226, 0.08), transparent 70%);
    background-size: 100% 100%, 180% 180%, 160% 160%;
    mix-blend-mode: screen;
    opacity: 0;
    animation: seaPreviewLight 7s ease-in-out infinite alternate paused;
    transition: opacity 500ms ease 150ms;
  }

  .page-work .work-preview.is-visible .work-preview__media::after {
    opacity: 1;
    animation-play-state: running;
  }
}

@keyframes seaPreviewLight {
  to {
    background-position: 0 0, 100% 60%, 0% 100%;
  }
}

/* --- Nav: one line of light marks the current page and glides to the hovered link --- */
.home-nav__links.has-indicator {
  position: relative;
}

.home-nav__links.has-indicator a::after {
  display: none !important;
}

.home-nav__links .nav-current {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 1px;
  list-style: none;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--sea-accent) 22%, var(--sea-foam) 50%, var(--sea-accent) 78%, transparent);
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .home-nav__links .nav-current {
    transition: transform 520ms var(--sea-ease), width 520ms var(--sea-ease), opacity 300ms ease;
  }

  .home-nav__links.has-indicator a {
    transition: opacity 320ms ease, color 320ms ease;
  }
}

.home-nav__links.has-indicator a:hover,
.home-nav__links.has-indicator a:focus-visible {
  color: var(--sea-foam);
}

/* --- Experience: a thread of light descending past each milestone --- */
.experience-main {
  position: relative;
}

.experience-journey {
  position: absolute;
  z-index: 0;
  width: 1px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0, rgba(159, 184, 189, 0.14) 5%, rgba(159, 184, 189, 0.14) 95%, transparent);
}

.experience-journey__fill {
  position: absolute;
  inset: 0;
  transform: scaleY(var(--journey, 0));
  transform-origin: top;
  background: linear-gradient(180deg, rgba(77, 201, 208, 0.04), rgba(77, 201, 208, 0.55));
}

.experience-journey__lantern {
  position: absolute;
  top: calc(var(--journey, 0) * 100%);
  left: 50%;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--sea-foam) 0, rgba(77, 201, 208, 0.8) 35%, rgba(77, 201, 208, 0) 70%);
  box-shadow: 0 0 24px 6px rgba(77, 201, 208, 0.16);
  opacity: min(1, calc(var(--journey, 0) * 30));
}

.experience-journey__marker {
  position: absolute;
  left: 50%;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  border: 1px solid rgba(159, 184, 189, 0.35);
  border-radius: 50%;
  background: #061014;
}

.experience-journey__marker.is-reached {
  border-color: var(--sea-accent);
  background: var(--sea-accent);
  box-shadow: 0 0 0 4px rgba(77, 201, 208, 0.12);
}

:root .experience-section.is-reached .experience-section__heading > p {
  color: var(--sea-accent);
}

@media (prefers-reduced-motion: no-preference) {
  .experience-journey__marker {
    transition: background-color 600ms ease, border-color 600ms ease, box-shadow 600ms ease;
  }

  :root .experience-section .experience-section__heading > p {
    transition: color 600ms ease;
  }
}

/* --- Contact: light under the pointer, a ripple on press, details surfacing in turn --- */
.contact-row {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.contact-row::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--light-x, 50%) var(--light-y, 50%), rgba(77, 201, 208, 0.13), rgba(77, 201, 208, 0.04) 40%, transparent 70%);
  opacity: 0;
  transition: opacity 500ms ease;
}

.contact-row:hover::before,
.contact-row:focus-visible::before {
  opacity: 1;
}

:root .contact-row:hover .contact-row__action,
:root .contact-row:focus-visible .contact-row__action {
  color: var(--sea-accent);
}

.contact-ripple {
  position: absolute;
  z-index: -1;
  width: var(--ripple-size, 300px);
  aspect-ratio: 1;
  margin: calc(var(--ripple-size, 300px) / -2) 0 0 calc(var(--ripple-size, 300px) / -2);
  border: 1px solid rgba(120, 220, 226, 0.45);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(77, 201, 208, 0.1), transparent 60%);
  pointer-events: none;
  animation: seaContactRipple 900ms var(--sea-ease) forwards;
}

@keyframes seaContactRipple {
  from {
    opacity: 1;
    transform: scale(0.02);
  }

  to {
    opacity: 0;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .contact-row.reveal > :nth-child(1) { --i: 0; }
  .contact-row.reveal > :nth-child(2) { --i: 1; }
  .contact-row.reveal > :nth-child(3) { --i: 2; }
  .contact-row.reveal > :nth-child(4) { --i: 3; }

  /* translate (not transform) for the entrance, so the existing hover transform keeps working */
  .contact-row.reveal > :not(.contact-ripple) {
    opacity: 0;
    translate: 0 14px;
    transition:
      opacity 700ms ease calc(var(--delay, 0ms) + 120ms + var(--i, 0) * 70ms),
      translate 900ms var(--sea-ease) calc(var(--delay, 0ms) + 120ms + var(--i, 0) * 70ms),
      transform 240ms var(--sea-ease),
      color 240ms ease,
      gap 220ms ease;
  }

  .contact-row.reveal.is-visible > :not(.contact-ripple) {
    opacity: 1;
    translate: 0 0;
  }
}

/* ==========================================================================
   Underwater experience v3: depth typography and the project spotlight.
   The continuous camera lives in the portal and depth rules above
   (--sea-perspective, data-portal, --veil-depth, --sea-carry).
   ========================================================================== */

/* --- Depth typography: hero headings surface word by word (initDepthTypography) --- */
:is(body.page-work, body.page-about, body.page-experience, body.page-contact) {
  --hero-ink: linear-gradient(100deg, var(--ds-text) 55%, var(--ds-accent) 130%);
}

/* the heading itself stays put (its legacy entrance animations are retired); its words move */
:root .reveal.reveal-depth {
  position: relative;
  opacity: 1;
  transform: none;
  filter: none;
  background-image: none;
  animation: none !important;
}

/* each word paints its own slice of the heading's ink, positioned against the heading's box,
   so the white-to-cyan gradient stays continuous while the words move independently */
.reveal-depth .depth-word {
  display: inline-block;
  padding: 0.14em 0.05em;
  margin: -0.14em -0.05em;
  color: transparent;
  -webkit-text-fill-color: transparent;
  background-image: var(--hero-ink);
  background-repeat: no-repeat;
  background-size: var(--ink-w, 100%) var(--ink-h, 100%);
  background-position: calc(var(--ink-x, 0px) * -1) calc(var(--ink-y, 0px) * -1);
  -webkit-background-clip: text;
  background-clip: text;
}

/* eyebrow and statement: their legacy entrances are retired in favour of the shared reveal */
:root .reveal.reveal-depth-line {
  animation: none !important;
}

@media (prefers-reduced-motion: no-preference) {
  /* from deep below and tilted back, out of focus, into place */
  :root .reveal-depth .depth-word {
    opacity: 0;
    transform: perspective(var(--sea-perspective)) translate3d(0, 0.38em, -260px) rotateX(24deg);
    transform-origin: 50% 100%;
    filter: blur(12px);
    transition:
      opacity 1100ms ease,
      transform 1600ms var(--sea-ease),
      filter 1300ms var(--sea-ease);
    transition-delay: calc(var(--delay, 0ms) + var(--word-index, 0) * 90ms);
  }

  :root .reveal-depth.is-visible .depth-word {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }

  :root .reveal-depth.is-settled .depth-word {
    filter: none;
    transition-delay: 0ms;
  }

  :root .reveal.reveal-depth-line:not(.is-visible) {
    opacity: 0;
    transform: perspective(var(--sea-perspective)) translate3d(0, 0.7em, -140px);
    filter: blur(8px);
  }

  :root .reveal.reveal-depth-line.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* --- Project spotlight (Work) --- */
.spotlight-hint {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

html.spotlight-lock {
  overflow: hidden;
}

.spotlight {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  padding: clamp(84px, 11vh, 120px) var(--ds-gutter, 24px) clamp(24px, 5vh, 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  color: var(--ds-text, #f2f7f7);
}

/* display: grid above would otherwise override the hidden attribute */
.spotlight[hidden] {
  display: none;
}

.spotlight:not(.is-open) {
  pointer-events: none;
}

.spotlight [hidden] {
  display: none !important;
}

/* open water: the page has drifted past the lens, the pinned caustics still show through */
.spotlight__water {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(80% 60% at 16% 0%, rgba(77, 201, 208, 0.1), transparent 60%),
    linear-gradient(180deg, rgba(6, 18, 22, 0.62) 0%, rgba(3, 10, 12, 0.86) 100%);
  opacity: 0;
}

.spotlight.is-open .spotlight__water {
  opacity: 1;
}

.spotlight__close {
  position: fixed;
  top: clamp(20px, 3.4vh, 30px);
  right: var(--ds-gutter, 24px);
  z-index: 2;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  color: var(--ds-text, #f2f7f7);
  background: rgba(6, 18, 22, 0.5);
  border: 1px solid var(--ds-line, rgba(159, 184, 189, 0.14));
  border-radius: 999px;
  font: 650 0.75rem/1 var(--ds-font, Inter, sans-serif);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.spotlight__close span {
  font-size: 1.15rem;
  letter-spacing: 0;
}

.spotlight__frame {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
  gap: clamp(28px, 4vw, 72px);
  align-items: center;
  width: 100%;
  max-width: var(--ds-max, 1320px);
  margin-inline: auto;
  /* gaps around the content fall through to the water, which closes the spotlight */
  pointer-events: none;
}

.spotlight__frame > * {
  pointer-events: auto;
}

.spotlight__stage {
  margin: 0;
  transform: perspective(var(--sea-perspective)) rotateX(var(--sp-rx, 0deg)) rotateY(var(--sp-ry, 0deg));
}

.spotlight__media {
  position: relative;
  aspect-ratio: 16 / 10;
  max-height: 68vh;
  overflow: hidden;
  background: rgba(4, 14, 18, 0.72);
  box-shadow: 0 40px 120px rgba(0, 6, 8, 0.55);
}

.spotlight__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
}

.spotlight__media img.is-active {
  opacity: 1;
}

/* the same surface light as the hover preview, playing across the image */
.spotlight__media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(165deg, rgba(190, 240, 244, 0.14) 0%, transparent 32%),
    radial-gradient(60% 40% at 30% 20%, rgba(120, 220, 226, 0.1), transparent 70%),
    radial-gradient(50% 35% at 70% 80%, rgba(120, 220, 226, 0.07), transparent 70%);
  background-size: 100% 100%, 180% 180%, 160% 160%;
  mix-blend-mode: screen;
}

.spotlight__info {
  display: grid;
  gap: 18px;
  align-content: center;
}

.spotlight__count {
  margin: 0;
  color: var(--ds-muted, #9fb8bd);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.16em;
}

.spotlight__title {
  margin: 0;
  color: var(--ds-text, #f2f7f7);
  font-size: clamp(2.2rem, 3.6vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.spotlight__meta {
  margin: 0;
  color: var(--sea-accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.spotlight__description {
  max-width: 42ch;
  margin: 0;
  color: var(--ds-muted, #9fb8bd);
  font-size: clamp(0.98rem, 1.05vw, 1.08rem);
  line-height: 1.65;
}

.spotlight__visit {
  justify-self: start;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  padding-bottom: 6px;
  color: var(--ds-text, #f2f7f7);
  border-bottom: 1px solid rgba(77, 201, 208, 0.5);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.spotlight__visit:hover,
.spotlight__visit:focus-visible {
  color: var(--sea-accent);
  border-color: var(--sea-accent);
}

.spotlight__controls {
  position: relative;
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: var(--ds-max, 1320px);
  margin: clamp(20px, 4vh, 40px) auto 0;
}

.spotlight__step {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  color: var(--ds-text, #f2f7f7);
  background: transparent;
  border: 1px solid var(--ds-line, rgba(159, 184, 189, 0.14));
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
}

.spotlight__step:hover,
.spotlight__step:focus-visible,
.spotlight__close:hover,
.spotlight__close:focus-visible {
  color: var(--sea-accent);
  border-color: var(--sea-accent);
}

.spotlight__step:disabled {
  opacity: 0.35;
  cursor: default;
}

/* the hover preview hands its image to the spotlight */
body.spotlight-open .work-preview {
  opacity: 0 !important;
  transition: none !important;
}

@media (prefers-reduced-motion: no-preference) {
  .spotlight__water {
    transition: opacity 600ms ease;
  }

  .spotlight__stage {
    transition: transform 800ms var(--sea-ease);
  }

  .spotlight__media::after {
    animation: seaPreviewLight 7s ease-in-out infinite alternate;
  }

  .spotlight .spotlight__visit:hover,
  .spotlight .spotlight__visit:focus-visible {
    gap: 16px;
  }

  /* details surface in reading order once the image has arrived (scoped under .spotlight to
     outrank the site-wide link/button transition rule) */
  .spotlight .spotlight__info > *,
  .spotlight .spotlight__controls,
  .spotlight .spotlight__close {
    opacity: 0;
    translate: 0 14px;
    transition:
      opacity 600ms ease,
      translate 800ms var(--sea-ease),
      color 240ms ease,
      border-color 240ms ease,
      gap 240ms ease;
  }

  .spotlight.is-open .spotlight__info > *,
  .spotlight.is-open .spotlight__controls,
  .spotlight.is-open .spotlight__close {
    opacity: 1;
    translate: 0 0;
  }

  .spotlight.is-open .spotlight__close { transition-delay: 200ms, 200ms, 0ms, 0ms, 0ms; }
  .spotlight.is-open .spotlight__info > :nth-child(1) { transition-delay: 300ms, 300ms, 0ms, 0ms, 0ms; }
  .spotlight.is-open .spotlight__info > :nth-child(2) { transition-delay: 370ms, 370ms, 0ms, 0ms, 0ms; }
  .spotlight.is-open .spotlight__info > :nth-child(3) { transition-delay: 440ms, 440ms, 0ms, 0ms, 0ms; }
  .spotlight.is-open .spotlight__info > :nth-child(4) { transition-delay: 510ms, 510ms, 0ms, 0ms, 0ms; }
  .spotlight.is-open .spotlight__info > :nth-child(5) { transition-delay: 580ms, 580ms, 0ms, 0ms, 0ms; }
  .spotlight.is-open .spotlight__controls { transition-delay: 620ms, 620ms, 0ms, 0ms, 0ms; }
}

@media (max-width: 860px) {
  .spotlight {
    grid-template-rows: auto auto;
    align-items: start;
    padding-top: 88px;
  }

  .spotlight__frame {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .spotlight__media {
    max-height: 46vh;
  }

  .spotlight__title {
    font-size: clamp(1.9rem, 8vw, 2.6rem);
  }

  .spotlight__controls {
    margin-top: 28px;
  }
}

/* =====================================================================
   About: one continuous dive (initAboutStory). Sections are depths in the same water; the pinned
   canvas behind them dims and diffuses as the page scrolls, so there are no section backgrounds.
   ===================================================================== */
.about-story {
  --story-line: var(--ds-line);
  --story-muted: var(--ds-muted);
  --story-accent: var(--ds-accent);
}

.about-story__section {
  position: relative;
  padding-block: clamp(96px, 13vw, 190px);
  scroll-margin-top: 72px;
}

.about-story__head {
  margin-bottom: clamp(36px, 5vw, 72px);
}

.about-story .about-story__index,
.about-story .about-story__kicker {
  margin: 0 0 14px;
  color: var(--story-accent);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.about-story__title {
  margin: 0;
  color: var(--ds-text);
  font-family: Anton, Impact, sans-serif;
  font-size: clamp(2.6rem, 6.4vw, 6rem);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

/* hero cue: a drop slides down its line, pointing into the water below */
.about-story__cue {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: clamp(32px, 5vw, 56px);
  color: var(--story-muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color var(--ds-dur) ease;
}

.about-story__cue-line {
  position: relative;
  width: 1px;
  height: 44px;
  overflow: hidden;
  background: var(--story-line);
}

.about-story__cue-line::after {
  content: "";
  position: absolute;
  left: 0;
  top: -40%;
  width: 1px;
  height: 40%;
  background: linear-gradient(transparent, var(--story-accent));
}

.about-story__cue:hover,
.about-story__cue:focus-visible {
  color: var(--ds-text);
}

/* depth gauge: where in the dive the reader is; jumps between sections */
/* the text column keeps clear of it on wide screens; labels appear to its left only on hover or focus */
@media (min-width: 1101px) {
  .about-story .about-shell {
    padding-right: max(var(--ds-gutter), 96px);
  }
}

.about-gauge {
  position: fixed;
  z-index: 20;
  top: 50%;
  right: clamp(16px, 2.2vw, 36px);
  translate: 0 -50%;
}

.about-gauge ol {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0 0 0 1px;
  list-style: none;
  border-left: 1px solid var(--story-line);
}

.about-gauge a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0 8px 14px;
  color: rgba(159, 184, 189, 0.55);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color var(--ds-dur) ease;
}

.about-gauge a::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 50%;
  width: 3px;
  height: 0;
  background: var(--story-accent);
  translate: 0 -50%;
  transition: height 420ms var(--ds-ease);
}

.about-gauge em {
  font-style: normal;
  position: absolute;
  right: calc(100% + 18px);
  padding: 6px 10px;
  background: rgba(6, 16, 20, 0.86);
  pointer-events: none;
  opacity: 0;
  translate: 6px 0;
  transition: opacity var(--ds-dur) ease, translate 320ms var(--ds-ease);
  white-space: nowrap;
}

.about-gauge a:hover,
.about-gauge a:focus-visible,
.about-gauge a.is-current {
  color: var(--ds-text);
}

.about-gauge a.is-current::before {
  height: 100%;
}

.about-gauge a:hover em,
.about-gauge a:focus-visible em {
  opacity: 1;
  translate: 0 0;
}

/* 01 profile: portrait and introduction side by side */
.about-profile__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 7vw, 120px);
  align-items: center;
}

.about-profile__media {
  margin: 0;
}

.about-profile__frame {
  --tilt-x: 0;
  --tilt-y: 0;
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--ds-bg-2);
  transform: perspective(1100px) rotateX(calc(var(--tilt-y) * -5deg)) rotateY(calc(var(--tilt-x) * 7deg));
  box-shadow: 0 40px 100px rgba(0, 6, 8, 0.5);
}

.about-profile__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  scale: 1.08;
  translate: calc(var(--tilt-x) * -16px) calc(var(--tilt-y) * -16px);
}

/* underwater grade: light from the top left, deep teal settling at the bottom */
.about-profile__frame::before,
.about-profile__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.about-profile__frame::before {
  z-index: 1;
  background:
    linear-gradient(160deg, rgba(150, 230, 232, 0.16) 0%, transparent 38%),
    linear-gradient(180deg, transparent 45%, rgba(4, 20, 24, 0.62) 100%);
  mix-blend-mode: soft-light;
}

/* a patch of surface light follows the cursor across the photo */
.about-profile__frame::after {
  z-index: 2;
  background: radial-gradient(38% 30% at var(--light-x, 50%) var(--light-y, 40%), rgba(160, 236, 236, 0.16), transparent 70%);
  opacity: 0;
  transition: opacity 500ms ease;
}

.about-profile__frame.is-lit::after {
  opacity: 1;
}

.about-profile__media figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  margin-top: 18px;
  color: var(--ds-text);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.about-profile__media figcaption span {
  color: var(--story-muted);
  font-weight: 500;
}

.about-story .about-profile__copy {
  max-width: 30ch;
  margin: 0;
  color: var(--ds-text);
  font-size: clamp(1.3rem, 2.3vw, 2.15rem);
  font-weight: 500;
  line-height: 1.32;
  letter-spacing: -0.01em;
}

/* 02 at a glance: readouts that catch the light under the cursor */
.about-glance__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  margin: 0;
  border-top: 1px solid var(--story-line);
}

.about-glance__card {
  position: relative;
  min-height: 210px;
  padding: clamp(24px, 2.6vw, 36px);
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--story-line);
  transition: background-color 400ms ease, translate 500ms var(--ds-ease);
}

.about-glance__card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(260px circle at var(--light-x, 50%) var(--light-y, 0%), rgba(77, 201, 208, 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 400ms ease;
}

.about-glance__card:hover {
  background-color: var(--ds-panel);
  translate: 0 -4px;
}

.about-glance__card:hover::before {
  opacity: 1;
}

.about-glance__card dt {
  display: flex;
  gap: 14px;
  margin-bottom: 36px;
  color: var(--story-muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.about-glance__card dt span {
  color: var(--story-accent);
}

.about-glance__card dd {
  margin: 0;
  color: var(--ds-text);
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  line-height: 1.45;
}

/* 03 capabilities: chips drawn toward the cursor (--near from initAboutStory) */
.about-capabilities__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(36px, 6vw, 96px);
  align-items: start;
}

.about-capabilities__grid .about-story__head {
  margin-bottom: 0;
}

.about-capabilities__field {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-story .about-capabilities__field li {
  max-width: none;
  --near: 0;
  padding: 13px 20px;
  border: 1px solid color-mix(in srgb, var(--story-accent) calc(var(--near) * 70%), var(--story-line));
  border-radius: 999px;
  color: color-mix(in srgb, var(--ds-text) calc(55% + var(--near) * 45%), var(--story-muted));
  background: rgba(11, 36, 42, calc(0.22 + var(--near) * 0.4));
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: translate 420ms var(--ds-ease), border-color 300ms ease, color 300ms ease, background-color 300ms ease;
}

/* 04 education: a milestone on a line that fills as it is read (--milestone) */
.about-milestone__entry {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
}

.about-milestone__track {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 47px;
  width: 1px;
  background: var(--story-line);
}

.about-milestone__track span {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--story-accent), rgba(77, 201, 208, 0.2));
  transform: scaleY(var(--milestone, 0));
  transform-origin: top;
}

.about-milestone__marker {
  position: relative;
  display: grid;
  place-items: center;
  align-self: start;
  width: 96px;
  height: 96px;
  border: 1px solid var(--story-line);
  border-radius: 50%;
  background: var(--ds-bg);
}

.page-about .about-milestone__marker .about-education__logo {
  width: 54px;
}

.about-story .about-milestone__body h3 {
  margin: 0;
  color: var(--ds-text);
  font-size: clamp(1.8rem, 3.6vw, 3.4rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.about-milestone__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: clamp(28px, 4vw, 48px) 0;
  padding-block: 24px;
  border-block: 1px solid var(--story-line);
}

.about-milestone__facts dt {
  margin-bottom: 8px;
  color: var(--story-muted);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.about-milestone__facts dd {
  margin: 0;
  color: var(--ds-text);
  line-height: 1.45;
}

.about-story .about-milestone__copy {
  max-width: 62ch;
  margin: 0;
  color: var(--story-muted);
  line-height: 1.75;
}

/* 05 exploring: one interest open at a time */
.about-interests__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--story-line);
}

.about-story .about-interest {
  max-width: none;
  border-bottom: 1px solid var(--story-line);
}

.about-interest h3 {
  margin: 0;
}

.about-interest__toggle {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 32px;
  align-items: center;
  width: 100%;
  padding: clamp(22px, 3vw, 34px) 0;
  overflow: hidden;
  isolation: isolate;
  border: 0;
  color: var(--story-muted);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: color 300ms ease;
}

.about-interest__num {
  color: var(--story-accent);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.about-interest__name {
  font-size: clamp(1.5rem, 3.4vw, 3rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  transition: translate 500ms var(--ds-ease);
}

.about-interest__icon {
  position: relative;
  justify-self: end;
  width: 18px;
  height: 18px;
}

.about-interest__icon::before,
.about-interest__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transition: rotate 420ms var(--ds-ease);
}

.about-interest__icon::after {
  rotate: 90deg;
}

.about-interest.is-open .about-interest__icon::after {
  rotate: 0deg;
}

.about-interest__toggle:hover,
.about-interest__toggle:focus-visible,
.about-interest.is-open .about-interest__toggle {
  color: var(--ds-text);
}

.about-interest__toggle:hover .about-interest__name {
  translate: 10px 0;
}

.about-interest__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 520ms var(--ds-ease);
}

.about-interest.is-open .about-interest__panel {
  grid-template-rows: 1fr;
}

.about-interest__panel > div {
  overflow: hidden;
}

.about-story .about-interest__panel p {
  max-width: 54ch;
  margin: 0;
  padding: 0 32px clamp(26px, 3vw, 38px) 64px;
  color: var(--story-muted);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.7;
}

/* closing: on to Contact, or back to the surface */
.about-surface {
  padding-top: clamp(48px, 6vw, 96px);
}

.about-surface__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.about-surface__next {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 18px;
  padding: 10px 6px 10px 0;
  overflow: hidden;
  isolation: isolate;
  color: var(--ds-text);
  text-decoration: none;
}

.about-surface__label {
  color: var(--story-accent);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.about-surface__word {
  font-family: Anton, Impact, sans-serif;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.about-surface__next > [aria-hidden] {
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  transition: translate 420ms var(--ds-ease);
}

.about-surface__next:hover > [aria-hidden],
.about-surface__next:focus-visible > [aria-hidden] {
  translate: 10px 0;
}

.about-surface__top {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid var(--story-line);
  border-radius: 999px;
  color: var(--story-muted);
  background: rgba(11, 36, 42, 0.3);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 300ms ease, border-color 300ms ease, background-color 300ms ease;
}

.about-surface__top:hover,
.about-surface__top:focus-visible {
  border-color: rgba(77, 201, 208, 0.5);
  color: var(--ds-text);
  background: rgba(11, 36, 42, 0.6);
}

.about-story :is(a, button):focus-visible {
  outline: 1px solid var(--story-accent);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: no-preference) {
  .about-story__cue-line::after {
    animation: aboutCueDrop 2.4s var(--sea-sink, ease-in-out) infinite;
  }

  .about-profile__image {
    transition: translate 600ms var(--ds-ease), opacity 1000ms var(--reveal-ease) 160ms, transform 1300ms var(--reveal-ease) 160ms, filter 1100ms var(--reveal-ease) 160ms;
  }
}

@keyframes aboutCueDrop {
  0% { top: -40%; }
  70%, 100% { top: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .about-story *,
  .about-story *::before,
  .about-story *::after {
    transition-duration: 1ms !important;
  }
}

@media (max-width: 1100px) {
  .about-gauge {
    display: none;
  }
}

@media (max-width: 860px) {
  .about-profile__grid,
  .about-capabilities__grid {
    grid-template-columns: 1fr;
  }

  .about-profile__media {
    width: min(100%, 440px);
  }

  .about-story .about-profile__copy {
    max-width: none;
  }

  .about-milestone__facts {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 600px) {
  .about-story__section {
    padding-block: 88px;
  }

  .about-milestone__entry {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 20px;
  }

  .about-milestone__track {
    left: 31px;
  }

  .about-milestone__marker {
    width: 64px;
    height: 64px;
  }

  .page-about .about-milestone__marker .about-education__logo {
    width: 38px;
  }

  .about-interest__toggle {
    grid-template-columns: 44px minmax(0, 1fr) 24px;
  }

  .about-story .about-interest__panel p {
    padding-left: 44px;
    padding-right: 0;
  }

  .about-glance__card {
    min-height: 0;
  }

  .about-surface__inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* =====================================================================
   About + Contact: MON WALLET ocean atmosphere. Same water, bluer and more luminous: the shared
   tokens are retinted here, the water canvas uses SEA_TINT.ocean (script.js), and the existing
   .sea-depth layer carries the soft glows. No new elements.
   ===================================================================== */
:is(body.page-about, body.page-contact) {
  --ds-bg: #041c24;
  --ds-bg-2: #062832;
  --ds-panel: rgba(11, 48, 59, 0.45);
  --ds-panel-hover: rgba(18, 67, 80, 0.6);
}

/* luminous depth: light pooling from the surface at the top left, a fainter glow across the water,
   the floor settling into #073642 rather than black */
:is(body.page-about, body.page-contact) .sea-depth {
  background:
    radial-gradient(55% 42% at 16% 6%, rgba(54, 170, 189, 0.2), transparent 72%),
    radial-gradient(45% 38% at 86% 34%, rgba(29, 120, 136, 0.13), transparent 70%),
    radial-gradient(80% 55% at 50% 112%, rgba(7, 54, 66, 0.55), transparent 72%);
}

/* the deep thickens into dark teal, never black, so text keeps a calm, even ground */
:is(body.page-about, body.page-contact) .sea-depth::after {
  background:
    radial-gradient(130% 100% at 30% 0%, transparent 38%, rgba(3, 20, 26, 0.72) 100%),
    linear-gradient(180deg, transparent 0%, rgba(3, 20, 26, 0.5) 100%);
}

@media (prefers-reduced-motion: no-preference) {
  /* the glow breathes on a long, slow cycle (compositor-only: opacity and scale) */
  :is(body.page-about, body.page-contact) .sea-depth {
    animation: oceanBreathe 32s ease-in-out infinite alternate;
  }
}

@keyframes oceanBreathe {
  from { opacity: 0.88; scale: 1; }
  to { opacity: 1; scale: 1.04; }
}

/* =====================================================================
   Home portal: the centrepiece in place of the portrait (drawn by initHomeHeroPointer). Positioned
   with left/top, never a transform, because the script maps the room's light buffer onto it through
   offsetLeft/offsetTop. The dive zooms the stage on the portal's centre.
   ===================================================================== */
.page-home {
  --portal-size: min(66vmin, 640px);
  --portal-y: 46vh;
}

.page-home .home-hero__canvas {
  transform-origin: 50% var(--portal-y);
}

.home-portal {
  position: absolute;
  z-index: 1;
  top: calc(var(--portal-y) - var(--portal-size) / 2);
  left: calc(50% - var(--portal-size) / 2);
  display: block;
  width: var(--portal-size);
  height: var(--portal-size);
  pointer-events: none;
}

/* one quiet line under the opening */
.home-portal__line {
  position: absolute;
  z-index: 2;
  top: calc(var(--portal-y) + var(--portal-size) * 0.4);
  left: 0;
  width: 100%;
  margin: 0;
  color: rgba(200, 236, 236, 0.58);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-align: center;
  text-transform: uppercase;
  pointer-events: none;
}

/* the line drops away as soon as the dive begins */
.home-hero.is-diving .home-portal__line {
  opacity: 0;
  transition: opacity 400ms ease;
}

@media (max-width: 700px) {
  .page-home {
    --portal-size: min(86vw, 420px);
    --portal-y: 44vh;
  }
}

/* =====================================================================
   About + Contact: shared interactive reading (initReadingHighlight).
   Blocks opt in with data-reading. Screen readers get each block once from the hidden copy;
   the visible words carry a soft selection-style light that walks across them.
   ===================================================================== */
.reading-spoken {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  user-select: none;
}

/* the light sits behind the word: padding with an equal negative margin, so wrapping and spacing never move */
[data-reading] .reading-word {
  margin: 0 -0.14em;
  padding: 0.02em 0.14em 0.06em;
  border-radius: 0.28em;
  background-color: rgba(77, 201, 208, 0);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  transition: background-color 320ms ease, color 320ms ease;
}

[data-reading] .reading-word.is-read {
  color: #ffffff;
  background-color: rgba(77, 201, 208, 0.22);
}

/* big display titles take a lighter wash so the letterforms stay in front */
.about-story__title .reading-word.is-read,
.contact-directory__heading h2 .reading-word.is-read {
  background-color: rgba(77, 201, 208, 0.16);
}

/* interactive feedback, one language on both pages: cyan focus ring, light under the pointer */
:is(body.page-about, body.page-contact) main :is(a, button):focus-visible {
  outline: 1px solid var(--ds-accent);
  outline-offset: 4px;
}

.contact-row__action {
  transition: color 300ms ease;
}

.contact-row:hover .contact-row__action,
.contact-row:focus-visible .contact-row__action {
  color: var(--ds-text);
}

@media (prefers-reduced-motion: reduce) {
  [data-reading] .reading-word {
    transition: none;
  }
}

/* reading caret: a thin text cursor resting at the end of the lit word (initReadingHighlight).
   The element moves and shows/hides; its ::before draws the bar and carries the blink. */
.reading-caret {
  position: absolute;
  z-index: 30;
  top: 0;
  left: 0;
  width: 2px;
  height: 1em;
  margin-left: -1px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.reading-caret::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 1px;
  background: linear-gradient(180deg, rgba(232, 252, 252, 0.95), rgba(120, 220, 226, 0.85));
  box-shadow: 0 0 5px rgba(77, 201, 208, 0.3);
}

.reading-caret.is-on {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .reading-caret {
    transition: opacity 240ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1), height 220ms ease;
  }

  /* appearing: straight into place, no glide in from wherever it last was */
  .reading-caret.is-jump {
    transition: opacity 240ms ease;
  }

  .reading-caret.is-on::before {
    animation: readingCaretBlink 1.1s ease-in-out infinite alternate;
  }
}

@keyframes readingCaretBlink {
  0%, 35% { opacity: 1; }
  100% { opacity: 0.3; }
}
