:root {
  --font-display: "Iosevka Charon", "Iosevka Charon Medium", "Iosevka", "IBM Plex Sans", monospace;
  --font-body: "Iosevka Charon", "Iosevka Charon Medium", "Iosevka", "IBM Plex Sans", monospace;
  --font-intro: "Comic Relief", "Iosevka Charon", cursive;
  --bg: #04030a;
  --bg-soft: rgba(11, 15, 24, 0.74);
  --panel: rgba(15, 20, 32, 0.68);
  --panel-strong: rgba(19, 26, 40, 0.84);
  --surface: rgba(255, 255, 255, 0.06);
  --border: rgba(190, 206, 228, 0.12);
  --border-strong: rgba(176, 198, 228, 0.26);
  --text: #eef3fb;
  --muted: #b3bfd1;
  --accent: #cfd9e8;
  --accent-2: #90a7c7;
  --accent-3: #5f708b;
  --shadow: 0 34px 90px rgba(0, 0, 0, 0.52);
  --shadow-soft: 0 22px 40px rgba(0, 0, 0, 0.34);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --backdrop: blur(26px) saturate(160%);
  --cursor-x: 50vw;
  --cursor-y: 20vh;
  --pointer-rx: 0deg;
  --pointer-ry: 0deg;
  --scroll-y: 0px;
  --scroll-tilt: 0deg;
  --hero-progress: 0;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f3f6fb;
  --bg-soft: rgba(255, 255, 255, 0.84);
  --panel: rgba(252, 254, 255, 0.82);
  --panel-strong: rgba(255, 255, 255, 0.95);
  --surface: rgba(132, 149, 173, 0.08);
  --border: rgba(79, 96, 122, 0.12);
  --border-strong: rgba(95, 116, 145, 0.22);
  --text: #233042;
  --muted: #5d6d84;
  --accent: #5e7390;
  --accent-2: #92a6c3;
  --accent-3: #cbd5e4;
  --shadow: 0 24px 60px rgba(42, 54, 74, 0.14);
  --shadow-soft: 0 14px 30px rgba(42, 54, 74, 0.1);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 20%, rgba(159, 177, 206, 0.16), transparent 22%),
    radial-gradient(circle at 82% 16%, rgba(111, 130, 157, 0.14), transparent 24%),
    radial-gradient(circle at 58% 76%, rgba(188, 201, 220, 0.08), transparent 20%),
    radial-gradient(circle at 46% 34%, rgba(72, 87, 113, 0.14), transparent 30%),
    linear-gradient(180deg, #02040a 0%, #060b14 45%, #0a111b 100%);
  font-family: var(--font-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 300ms ease, color 220ms ease;
}

:root[data-theme="light"] body {
  background:
    radial-gradient(circle at 18% 20%, rgba(172, 189, 214, 0.2), transparent 24%),
    radial-gradient(circle at 82% 16%, rgba(145, 164, 194, 0.16), transparent 24%),
    radial-gradient(circle at 58% 76%, rgba(214, 223, 235, 0.14), transparent 20%),
    radial-gradient(circle at 46% 40%, rgba(241, 245, 251, 0.9), transparent 34%),
    linear-gradient(180deg, #f9fbff 0%, #f0f4fa 100%);
}

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

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

button,
input,
textarea {
  font: inherit;
}

.app-background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  perspective: 1400px;
}

:root.lite-motion .app-background {
  perspective: none;
}

.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(4, 3, 10, 0.98), rgba(12, 8, 24, 0.98));
  transition: opacity 700ms ease, visibility 700ms ease;
  overflow: hidden;
}

.intro-overlay.is-leaving {
  opacity: 0;
  visibility: hidden;
}

.intro-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

:root.lite-motion .intro-canvas {
  display: none;
}

.intro-content {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(92vw, 1040px);
  text-align: center;
  pointer-events: none;
}

.intro-kicker {
  margin: 0;
  color: rgba(230, 223, 255, 0.78);
  font-family: var(--font-intro);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.intro-word {
  margin: 0;
  font-family: var(--font-intro);
  font-size: clamp(4.4rem, 12vw, 10rem);
  line-height: 0.92;
  letter-spacing: -0.08em;
  font-weight: 900;
  color: #fbf8ff;
  text-shadow:
    0 0 24px rgba(255, 255, 255, 0.18),
    0 0 44px rgba(174, 193, 219, 0.12),
    0 0 54px rgba(109, 128, 156, 0.12);
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease;
}

.intro-word.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.intro-caption {
  margin: 0;
  font-family: var(--font-intro);
  color: rgba(247, 243, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
}



.scene-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.88;
  mix-blend-mode: screen;
  filter: saturate(1.25) blur(0.3px);
}

:root.lite-motion .scene-canvas {
  display: none;
}

.nebula-butterfly {
  display: none;
}

.nebula-core,
.nebula-body,
.nebula-wing {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-style: preserve-3d;
}

.nebula-core {
  width: 12rem;
  height: 12rem;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(243, 246, 252, 0.92) 0%, rgba(189, 202, 222, 0.48) 24%, rgba(112, 130, 158, 0.16) 58%, transparent 78%);
  transform: translate(-50%, -54%);
  filter: blur(10px);
  opacity: 0.82;
}

.nebula-body {
  width: 1.3rem;
  height: 29rem;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(245, 248, 252, 0.95), rgba(198, 208, 223, 0.7) 24%, rgba(122, 141, 167, 0.3) 58%, rgba(92, 109, 134, 0.22));
  box-shadow:
    0 0 24px rgba(194, 205, 221, 0.28),
    0 0 56px rgba(122, 141, 167, 0.16);
  transform: translate(-50%, -50%);
  opacity: 0.9;
}

.nebula-wing {
  width: 42rem;
  height: 18rem;
  opacity: 0.72;
  filter: blur(8px);
}

.nebula-wing::before,
.nebula-wing::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 52% 48% 58% 42% / 54% 38% 62% 46%;
}

.nebula-wing::before {
  background:
    radial-gradient(circle at 34% 46%, rgba(244, 247, 252, 0.82) 0%, rgba(186, 199, 219, 0.52) 12%, rgba(121, 139, 166, 0.24) 38%, transparent 66%),
    radial-gradient(circle at 74% 34%, rgba(108, 126, 153, 0.22), transparent 42%),
    radial-gradient(circle at 58% 68%, rgba(170, 185, 208, 0.16), transparent 46%);
  box-shadow: inset 0 0 80px rgba(130, 148, 176, 0.05);
}

.nebula-wing::after {
  inset: 12% 10%;
  border-radius: 46% 54% 60% 40% / 50% 34% 66% 50%;
  background:
    radial-gradient(circle at 52% 48%, rgba(255, 255, 255, 0.2), transparent 20%),
    radial-gradient(circle at 62% 38%, rgba(195, 206, 221, 0.22), transparent 30%),
    radial-gradient(circle at 34% 60%, rgba(114, 133, 159, 0.15), transparent 34%);
  opacity: 0.78;
  filter: blur(14px);
}

.nebula-wing-top {
  top: 34%;
}

.nebula-wing-bottom {
  top: 58%;
}

.nebula-wing-left {
  transform: translate(-96%, -50%) rotate(-22deg) skewX(-10deg);
}

.nebula-wing-right {
  transform: translate(-4%, -50%) rotate(22deg) scaleX(-1) skewX(-10deg);
}

.nebula-wing-top.nebula-wing-left {
  width: 40rem;
  height: 16rem;
}

.nebula-wing-top.nebula-wing-right {
  width: 40rem;
  height: 16rem;
}

.nebula-wing-bottom.nebula-wing-left {
  width: 34rem;
  height: 15rem;
  opacity: 0.54;
}

.nebula-wing-bottom.nebula-wing-right {
  width: 34rem;
  height: 15rem;
  opacity: 0.54;
}

.no-webgl-scene .scene-canvas {
  display: none;
}

:root[data-theme="light"] .scene-canvas {
  opacity: 0.92;
  mix-blend-mode: screen;
  filter: saturate(1.08) contrast(1.04) blur(0.2px);
}

:root[data-theme="light"] .nebula-butterfly {
  opacity: 0.7;
}

.depth-plane {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 60px;
  transform-style: preserve-3d;
}

.depth-plane-back {
  width: 120vw;
  height: 120vh;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 90px 90px;
  opacity: 0.1;
  transform:
    translate3d(-50%, -50%, -240px)
    rotateX(74deg)
    rotateZ(calc(var(--scroll-tilt) * -0.15));
}

.depth-plane-mid {
  width: 92vw;
  height: 92vh;
  border: 1px solid rgba(159, 177, 206, 0.12);
  background: radial-gradient(circle at center, rgba(159, 177, 206, 0.08), transparent 68%);
  opacity: 0.22;
  transform:
    translate3d(-50%, -50%, -120px)
    rotateX(74deg)
    rotateZ(calc(var(--scroll-tilt) * -0.1));
}

.depth-plane-front {
  width: 66vw;
  height: 66vh;
  border: 1px solid rgba(136, 157, 187, 0.14);
  background: radial-gradient(circle at center, rgba(136, 157, 187, 0.08), transparent 68%);
  opacity: 0.18;
  transform:
    translate3d(-50%, -50%, 0)
    rotateX(74deg)
    rotateZ(calc(var(--scroll-tilt) * -0.08));
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.7;
}

:root.lite-motion .depth-plane,
:root.lite-motion .grid-overlay,
:root.lite-motion .orb-c {
  display: none;
}

:root.lite-motion .orb {
  filter: blur(42px);
  opacity: 0.48;
}

.orb-a {
  top: -10rem;
  left: -8rem;
  width: 34rem;
  height: 34rem;
  background: rgba(145, 164, 192, 0.2);
}

.orb-b {
  top: 10%;
  right: -10rem;
  width: 34rem;
  height: 34rem;
  background: rgba(109, 128, 156, 0.18);
}

.orb-c {
  bottom: -10rem;
  left: 22%;
  width: 36rem;
  height: 36rem;
  background: rgba(191, 203, 220, 0.12);
}

:root[data-theme="light"] .orb {
  filter: blur(78px);
  opacity: 0.96;
}

:root[data-theme="light"] .orb-a {
  background: rgba(176, 194, 220, 0.34);
}

:root[data-theme="light"] .orb-b {
  background: rgba(136, 156, 186, 0.3);
}

:root[data-theme="light"] .orb-c {
  background: rgba(214, 223, 236, 0.28);
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 38px 38px;
  opacity: 0.22;
  mask-image: radial-gradient(circle at center, black 34%, transparent 82%);
}

:root[data-theme="light"] .grid-overlay {
  background-image:
    linear-gradient(rgba(63, 82, 111, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(63, 82, 111, 0.07) 1px, transparent 1px);
  opacity: 0.32;
}

:root[data-theme="light"] .cursor-glow {
  background:
    radial-gradient(360px circle at var(--cursor-x) var(--cursor-y), rgba(183, 198, 220, 0.18), transparent 58%),
    radial-gradient(280px circle at calc(var(--cursor-x) + 140px) calc(var(--cursor-y) + 60px), rgba(140, 159, 188, 0.14), transparent 60%),
    radial-gradient(320px circle at calc(var(--cursor-x) - 120px) calc(var(--cursor-y) - 40px), rgba(222, 230, 241, 0.14), transparent 62%);
}

.cursor-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(340px circle at var(--cursor-x) var(--cursor-y), rgba(159, 177, 206, 0.1), transparent 58%),
    radial-gradient(260px circle at calc(var(--cursor-x) + 140px) calc(var(--cursor-y) + 60px), rgba(109, 128, 156, 0.08), transparent 60%),
    radial-gradient(300px circle at calc(var(--cursor-x) - 120px) calc(var(--cursor-y) - 40px), rgba(201, 211, 226, 0.06), transparent 62%);
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 22px 22px 48px;
}

.site-header,
main,
.site-footer {
  width: min(100%, 1180px);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(15, 20, 32, 0.74), rgba(10, 14, 23, 0.8));
  border: 1px solid rgba(188, 201, 220, 0.12);
  border-radius: 999px;
  backdrop-filter: var(--backdrop);
  box-shadow: var(--shadow-soft);
}

:root.lite-motion .site-header,
:root.lite-motion .panel,
:root.lite-motion .site-nav,
:root.lite-motion .theme-toggle,
:root.lite-motion .menu-toggle {
  backdrop-filter: none;
}

:root[data-theme="light"] .site-header {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 248, 253, 0.94));
  border-color: rgba(112, 131, 160, 0.16);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-3) 55%, var(--accent-2));
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 16px 34px rgba(123, 142, 170, 0.28);
}

.brand-copy {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle,
.menu-toggle {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  backdrop-filter: blur(14px);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 11px;
  border-radius: 999px;
  cursor: pointer;
}

.theme-toggle span {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.toggle-dot {
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 18px rgba(255, 93, 177, 0.35);
}

.menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  font-family: var(--font-body);
  padding: 0.58rem 0.82rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 220ms ease, background-color 220ms ease, transform 220ms ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

:root[data-theme="light"] .site-nav a {
  color: #425269;
}

:root[data-theme="light"] .site-nav a:hover,
:root[data-theme="light"] .site-nav a.is-active {
  color: #172230;
  background: rgba(93, 115, 144, 0.12);
}

:root[data-theme="light"] .theme-toggle,
:root[data-theme="light"] .menu-toggle {
  background: rgba(236, 242, 249, 0.9);
  border-color: rgba(112, 131, 160, 0.16);
  color: #233042;
}

main {
  display: grid;
  gap: 28px;
  padding-top: 36px;
}

.panel {
  position: relative;
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-strong) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: var(--backdrop);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(244, 247, 252, 0.18), rgba(180, 194, 216, 0.1), rgba(109, 128, 156, 0.08), rgba(58, 73, 95, 0.08));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.hero-panel,
.page-hero,
.contact-shell,
.feature-card,
.archive-card,
.timeline-item,
.skill-card,
.credential-card,
.stat-card {
  overflow: hidden;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  align-items: center;
  gap: 20px;
  padding: 20px;
  min-height: auto;
  transform-style: preserve-3d;
}

.hero-panel-compact {
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: start;
  gap: 16px;
  padding: 16px 18px;
}

.hero-pin-section {
  position: relative;
  height: auto;
}

.hero-pin-sticky {
  position: relative;
  top: auto;
  height: auto;
  display: grid;
  align-items: center;
}

.hero-shell {
  display: grid;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-self: start;
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-2);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.05em;
  line-height: 0.95;
}

h1 {
  max-width: 11ch;
  font-size: clamp(1.95rem, 3.8vw, 3.35rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

h2 {
  max-width: 15ch;
  font-size: clamp(1.55rem, 2.8vw, 2.3rem);
  font-weight: 700;
}

h3 {
  font-size: clamp(1.14rem, 1.45vw, 1.42rem);
  font-weight: 700;
}

.hero-summary,
.page-summary,
.feature-copy p,
.archive-copy p,
.contact-copy p,
.timeline-body p {
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.8;
}

.hero-summary {
  max-width: 48ch;
  margin-top: 12px;
}

.hero-actions,
.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 16px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  min-height: 48px;
  padding: 0.82rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.94rem;
  font-weight: 700;
  transition: transform 220ms ease, box-shadow 220ms ease, background-color 220ms ease;
}

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

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-3) 52%, var(--accent-2));
  box-shadow: 0 20px 40px rgba(112, 130, 158, 0.22);
}

.button-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border);
}

.hero-stack {
  display: grid;
  gap: 16px;
  align-content: center;
  position: relative;
  z-index: 2;
}

.hero-copy-panel {
  max-width: 460px;
}

.hero-panel-compact .hero-copy-panel {
  max-width: none;
}

.hero-copy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.hero-copy-primary {
  display: grid;
  gap: 6px;
}

.hero-copy-secondary {
  display: grid;
  gap: 14px;
  align-content: start;
}

.hero-visual-stage {
  position: relative;
  display: grid;
  align-content: start;
  justify-items: end;
  min-height: auto;
  z-index: 2;
}

.hero-visual-stage-compact {
  justify-items: end;
}

.hero-visual-stage::before {
  content: "";
  position: absolute;
  width: min(28vw, 20rem);
  height: min(28vw, 20rem);
  right: 8%;
  top: 6%;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(188, 201, 220, 0.12) 0%, rgba(132, 150, 177, 0.08) 40%, transparent 72%);
  filter: blur(18px);
  opacity: 0.4;
  pointer-events: none;
}

.hero-visual-stage-compact::before {
  width: 9rem;
  height: 9rem;
  right: 0;
  top: 4%;
  opacity: 0.22;
}

.hero-portrait-wrap {
  position: relative;
  width: min(100%, 16rem);
  padding: 10px 10px 0;
  border-radius: calc(var(--radius-xl) + 4px);
  background: linear-gradient(180deg, rgba(19, 25, 38, 0.66), rgba(10, 14, 22, 0.34));
  transform:
    translate3d(var(--move-x, 0px), calc(var(--move-y, 0px) + var(--hero-shift, 0px)), 0)
    scale(var(--hero-scale, 1));
  transition: transform 220ms ease-out;
  isolation: isolate;
}

.hero-portrait-wrap-compact {
  width: min(100%, 12rem);
  padding: 6px 6px 0;
}

.hero-portrait-wrap::before {
  content: "";
  position: absolute;
  inset: auto 10% 16px 10%;
  height: 28px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.36), transparent 72%);
  filter: blur(16px);
  opacity: 0.72;
}

.hero-portrait-wrap::after {
  content: none;
}

.hero-portrait,
.card-visual {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius-xl) - 8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(173, 189, 213, 0.12), rgba(100, 117, 142, 0.08));
  box-shadow: var(--shadow-soft);
}

.hero-portrait::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(8, 12, 20, 0.02) 0%, rgba(8, 12, 20, 0.08) 58%, rgba(8, 12, 20, 0.2) 100%);
  pointer-events: none;
}

.hero-portrait::after {
  content: none;
}

.hero-portrait img,
.card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 800ms cubic-bezier(.2,.7,.2,1);
}

.hero-portrait {
  min-height: 270px;
  border-radius: calc(var(--radius-xl) + 2px);
  aspect-ratio: 4 / 5;
}

.hero-portrait-compact {
  min-height: 170px;
}

.hero-portrait img {
  position: relative;
  z-index: 0;
  object-position: center 10%;
  transform: scale(1);
  filter: saturate(1) contrast(1.01) brightness(0.98);
}

.hero-mini {
  padding: 18px 20px;
}

.hero-depth-card,
.hero-floating-card,
[data-depth] {
  transform:
    translate3d(var(--move-x, 0px), var(--move-y, 0px), 0)
    rotateX(var(--pointer-rx))
    rotateY(var(--pointer-ry));
  transition: transform 220ms ease-out;
  will-change: transform;
}

.hero-scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.hero-glow,
.hero-grid-card {
  position: absolute;
  border-radius: 28px;
  transform:
    translate3d(var(--move-x, 0px), var(--move-y, 0px), 0)
    rotateX(var(--pointer-rx))
    rotateY(var(--pointer-ry));
  transition: transform 220ms ease-out;
}

.hero-glow-a {
  width: 18rem;
  height: 18rem;
  top: 6%;
  right: 18%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(166, 184, 211, 0.18), transparent 68%);
  filter: blur(22px);
}

.hero-glow-b {
  width: 14rem;
  height: 14rem;
  bottom: 12%;
  left: 40%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(109, 128, 156, 0.16), transparent 68%);
  filter: blur(22px);
}

.hero-grid-card {
  border: 1px solid rgba(210, 220, 234, 0.08);
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    rgba(141, 158, 186, 0.03);
  background-size: 24px 24px, 24px 24px, auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hero-grid-card-a {
  width: 170px;
  height: 220px;
  top: 12%;
  right: 10%;
  transform:
    translate3d(var(--move-x, 0px), calc(var(--move-y, 0px) + (var(--hero-progress, 0) * -24px)), 0)
    rotateX(var(--pointer-rx))
    rotateY(var(--pointer-ry));
}

.hero-grid-card-b {
  width: 140px;
  height: 180px;
  bottom: 10%;
  right: 28%;
  transform:
    translate3d(var(--move-x, 0px), calc(var(--move-y, 0px) + (var(--hero-progress, 0) * 22px)), 0)
    rotateX(var(--pointer-rx))
    rotateY(var(--pointer-ry));
}

.hero-panel:hover .hero-portrait img,
.feature-card:hover .card-visual img,
.archive-card:hover .card-visual img,
.timeline-item:hover .card-visual img {
  transform: scale(1.04);
}

.hero-panel:hover .hero-portrait img {
  transform: scale(1.03);
}

.hero-panel:hover .hero-portrait-wrap {
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
}

.stats-grid,
.skills-grid,
.credentials-grid,
.archive-grid {
  display: grid;
  gap: 18px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  perspective: 1200px;
}

.stats-grid-compact {
  gap: 14px;
  margin-top: 18px;
}

.stat-card {
  padding: 18px 20px;
  transform:
    translateY(var(--section-lift, 0px))
    rotateX(calc((0.5 - var(--section-progress, 0.5)) * 10deg));
}

.stat-value {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.stat-label {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.5;
}

.section-shell {
  display: grid;
  gap: 18px;
}

.featured-work-stack {
  display: grid;
  gap: 18px;
}

.story-section {
  position: relative;
}

.story-section::after {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: -26px;
  height: 80px;
  background: radial-gradient(circle at center, rgba(143, 161, 189, 0.12), transparent 70%);
  filter: blur(24px);
  pointer-events: none;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
}

.text-link,
.link-row a {
  color: #f0d8ff;
  font-family: var(--font-body);
  font-weight: 700;
  transition: color 220ms ease;
}

.text-link:hover,
.link-row a:hover {
  color: #fff;
}

:root[data-theme="light"] .text-link,
:root[data-theme="light"] .link-row a {
  color: #6b1c59;
}

:root[data-theme="light"] .text-link:hover,
:root[data-theme="light"] .link-row a:hover {
  color: #24112f;
}

.feature-card,
.archive-card {
  display: grid;
  grid-template-columns: minmax(300px, 0.92fr) minmax(0, 1.08fr);
  gap: 24px;
  padding: 24px;
  transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
  transform: translateY(var(--section-lift, 0px));
}

.feature-card:hover,
.archive-card:hover,
.skill-card:hover,
.credential-card:hover,
.contact-shell:hover,
.timeline-item:hover,
.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

.card-visual {
  min-height: 320px;
}

.card-visual-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  min-height: 320px;
}

.card-visual-split img {
  width: 100%;
  height: 100%;
  min-height: 304px;
  border-radius: calc(var(--radius-xl) - 14px);
  object-fit: cover;
  object-position: center top;
}

.feature-visual-wrap {
  transform:
    translate3d(var(--move-x, 0px), calc(var(--move-y, 0px) + (var(--section-progress, 0) * -18px)), 0)
    scale(calc(1 + (var(--section-progress, 0) * 0.018)));
  transition: transform 220ms ease-out;
}

.card-visual img {
  min-height: 320px;
  object-position: center 30%;
}

.placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
}

.eyebrow-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  padding: 0.54rem 0.82rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.meta-line {
  margin: 8px 0 12px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.detail-list {
  margin: 18px 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
  font-family: var(--font-body);
}

.detail-list li {
  margin-bottom: 10px;
  line-height: 1.7;
}

.skills-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.skill-card,
.credential-card {
  padding: 24px;
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
  transform: translateY(var(--section-lift, 0px));
}

.skill-title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  padding: 0.62rem 0.82rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.88rem;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.credentials-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.credential-card {
  min-height: 180px;
}

.contact-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  gap: 24px;
  padding: 28px;
  transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
  transform: translateY(var(--section-lift, 0px));
}

.contact-form {
  display: grid;
  gap: 12px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: var(--font-body);
  padding: 1rem 1.05rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  outline: none;
  transition: border-color 220ms ease, box-shadow 220ms ease, background-color 220ms ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(124, 92, 255, 0.58);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(190, 198, 234, 0.72);
}

.page-hero {
  padding: 30px;
}

.page-hero h1 {
  max-width: 18ch;
}

.page-summary {
  margin-top: 18px;
  max-width: 60ch;
}

.archive-grid {
  grid-template-columns: 1fr;
}

.timeline {
  position: relative;
  display: grid;
  gap: 18px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 18px;
  padding: 24px;
  transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
  transform: translateY(var(--section-lift, 0px));
}

.timeline-rail {
  width: 12px;
  height: 12px;
  margin-top: 18px;
  margin-left: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 8px rgba(124, 92, 255, 0.16);
}

.timeline-content {
  display: grid;
  gap: 18px;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
}

.timeline-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: end;
}

.timeline-meta span {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  padding: 0.54rem 0.82rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.timeline-body {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 22px;
}

.timeline-visual {
  min-height: 260px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0 10px;
  margin-top: 42px;
  color: var(--muted);
}

@media (max-width: 1240px) {
  .hero-panel {
    gap: 18px;
    padding: 20px;
  }

  .hero-pin-section {
    height: auto;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-grid-compact {
    margin-top: 18px;
    gap: 16px;
  }

  .hero-portrait {
    min-height: 240px;
  }
}

.footer-note {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  min-height: 44px;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-weight: 700;
  transition: transform 220ms ease, border-color 220ms ease, background-color 220ms ease, color 220ms ease;
}

.footer-links a:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.08);
}

:root[data-theme="light"] .footer-links a {
  background: rgba(255, 255, 255, 0.72);
  color: #2d1832;
}

[data-reveal] {
  opacity: 0;
  filter: blur(10px);
  transition: opacity 700ms cubic-bezier(.2,.7,.2,1), filter 700ms cubic-bezier(.2,.7,.2,1);
}

[data-reveal].is-visible {
  opacity: 1;
  filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .cursor-glow {
    display: none;
  }

  .scene-canvas {
    display: none;
  }

  .hero-portrait-wrap,
  .hero-grid-card-a,
  .hero-grid-card-b,
  .feature-visual-wrap,
  .stat-card,
  .feature-card,
  .archive-card,
  .timeline-item,
  .skill-card,
  .credential-card,
  .contact-shell {
    transform: none !important;
  }

  .hero-pin-section {
    height: auto;
  }

  .hero-pin-sticky {
    position: relative;
    top: auto;
    height: auto;
  }
}

@media (max-width: 980px) {
  .hero-panel,
  .hero-visual-stage,
  .feature-card,
  .archive-card,
  .contact-shell,
  .timeline-body,
  .skills-grid,
  .credentials-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .section-head,
  .timeline-header,
  .site-footer {
    flex-direction: column;
    align-items: start;
  }

  .timeline-meta {
    align-items: start;
  }

  .hero-pin-section {
    height: auto;
  }

  .hero-pin-sticky {
    position: relative;
    top: auto;
    height: auto;
  }

  .stats-grid-compact {
    margin-top: 8px;
  }

  .hero-visual-stage {
    justify-items: center;
  }

  .hero-portrait-wrap {
    width: min(100%, 14rem);
  }

  .hero-portrait {
    min-height: 220px;
  }

  .hero-panel-compact {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hero-copy-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hero-visual-stage-compact {
    justify-items: start;
  }

  .hero-portrait-wrap-compact {
    width: min(100%, 9.5rem);
  }

  .hero-portrait-compact {
    min-height: 136px;
  }

}

@media (max-width: 760px) {
  .site-shell {
    padding: 12px 12px 32px;
  }

  main {
    gap: 20px;
    padding-top: 24px;
  }

  .site-header {
    top: 8px;
    padding: 9px 10px;
    border-radius: 16px;
  }

  .theme-toggle span:first-child,
  .theme-toggle span:last-child {
    display: none;
  }

  .brand-copy {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    background: var(--panel-strong);
    border: 1px solid var(--border);
    border-radius: 22px;
    backdrop-filter: var(--backdrop);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .hero-panel,
  .page-hero,
  .feature-card,
  .archive-card,
  .timeline-item,
  .skill-card,
  .credential-card,
  .contact-shell,
  .stat-card {
    padding: 18px;
  }

  h1 {
    font-size: clamp(1.72rem, 7vw, 2.2rem);
    max-width: 11.5ch;
  }

  h2 {
    font-size: clamp(1.35rem, 6vw, 1.8rem);
  }

  h3 {
    font-size: 1.08rem;
  }

  .hero-panel {
    gap: 18px;
    padding: 14px;
    min-height: auto;
  }

  .hero-copy-panel {
    max-width: none;
  }

  .hero-copy-grid {
    gap: 8px;
  }

  .hero-summary,
  .page-summary,
  .feature-copy p,
  .archive-copy p,
  .contact-copy p,
  .timeline-body p {
    font-size: 0.96rem;
    line-height: 1.7;
  }

  .hero-visual-stage {
    order: -1;
    min-height: auto;
    justify-items: stretch;
  }

  .hero-visual-stage-compact {
    order: 0;
    justify-items: start;
  }

  .hero-visual-stage::before {
    width: 15rem;
    height: 15rem;
    right: 50%;
    top: 0;
    transform: translateX(50%);
    opacity: 0.7;
  }

  .hero-actions {
    margin-top: 20px;
    width: 100%;
    gap: 10px;
  }

  .hero-actions .button {
    width: 100%;
    min-height: 50px;
  }

  .hero-glow,
  .hero-grid-card {
    display: none;
  }

  .hero-portrait,
  .card-visual {
    min-height: 240px;
  }

  .depth-plane-front,
  .depth-plane-mid,
  .depth-plane-back {
    width: 150vw;
  }

  .hero-portrait {
    min-height: 260px;
    aspect-ratio: 4 / 5;
  }

  .hero-portrait-wrap {
    width: 100%;
    padding: 8px 8px 0;
  }

  .hero-portrait-wrap-compact {
    width: min(100%, 8.5rem);
    padding: 5px 5px 0;
  }

  .hero-portrait-wrap::after {
    inset: 2.5% 4% 10% 4%;
  }

  .hero-portrait img {
    object-position: center 10%;
    transform: scale(1.02);
  }

  .hero-portrait-compact {
    min-height: 120px;
  }

  .section-head,
  .eyebrow-row {
    flex-direction: column;
    align-items: start;
  }

  .section-head {
    gap: 10px;
  }

  .feature-card,
  .archive-card,
  .timeline-body,
  .contact-shell {
    gap: 16px;
  }

  .card-visual-split {
    grid-template-columns: 1fr;
  }

  .card-visual-split img {
    min-height: 248px;
  }

  .card-visual {
    min-height: 260px;
  }

  .card-visual img {
    min-height: 260px;
  }

  .pill-list {
    gap: 8px;
  }

  .pill {
    font-size: 0.82rem;
    padding: 0.56rem 0.76rem;
  }

  .hero-pin-section {
    height: auto;
  }
}

@media (max-width: 520px) {
  .brand {
    gap: 10px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .brand-copy {
    font-size: 0.68rem;
  }

  .site-header {
    gap: 10px;
  }

  .header-actions {
    gap: 8px;
  }

  .theme-toggle {
    height: 34px;
    padding: 0 9px;
  }

  .hero-portrait-wrap-compact {
    width: min(100%, 7.75rem);
  }

  .hero-portrait-compact {
    min-height: 108px;
  }

  .toggle-dot {
    width: 13px;
    height: 13px;
  }

  .hero-panel,
  .page-hero,
  .feature-card,
  .archive-card,
  .timeline-item,
  .skill-card,
  .credential-card,
  .contact-shell,
  .stat-card {
    padding: 16px;
    border-radius: 24px;
  }

  .hero-portrait {
    min-height: 230px;
  }

  .stats-grid-compact {
    gap: 12px;
  }
}
