/* =========================================================================
   p.rite.sh — modern immersive personal showcase
   Design tokens
   ========================================================================= */
:root {
  --bg:        #05070f;          /* near-black navy */
  --bg-2:      #0a1024;
  --surface:   rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.08);
  --border:    rgba(160, 178, 214, 0.18);
  --border-2:  rgba(255, 255, 255, 0.10);
  --text:      #eef1f9;          /* cool white */
  --text-dim:  #cdd6ea;
  --text-mute: #98a2be;

  /* Palette — navy (trust) with black + silver accents */
  --navy:      #0f2350;
  --navy-lt:   #2c4a92;          /* bright azure highlight */
  --navy-deep: #0d1c47;
  --silver:    #c4cddf;
  --silver-lt: #e8eefb;
  --steel:     #8995b3;
  --accent:    var(--navy-lt);
  --accent-2:  var(--silver);
  --accent-3:  var(--silver-lt);
  --grad:      linear-gradient(120deg, #0f2350 0%, #2c4a92 42%, #c4cddf 78%, #cfdcf5 100%);

  --radius:    16px;
  --radius-sm: 12px;
  --maxw:      1140px;
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);

  --shadow:    0 30px 70px -28px rgba(0, 0, 6, 0.85);
  --glow-blue: 0 0 26px rgba(79, 123, 224, 0.4);
}

/* ---------- Light theme ------------------------------------------------ */
html[data-theme="light"] {
  --bg:        #eef1f8;          /* soft platinum daylight */
  --bg-2:      #e2e7f2;
  --surface:   rgba(20, 38, 92, 0.05);
  --surface-2: rgba(20, 38, 92, 0.10);
  --border:    rgba(29, 60, 140, 0.20);
  --border-2:  rgba(20, 38, 92, 0.12);
  --text:      #101a33;          /* deep navy ink */
  --text-dim:  #3e4d6b;
  --text-mute: #5f6b85;

  --navy:      #0f2350;
  --navy-lt:   #20407e;
  --navy-deep: #14306e;
  /* "silver" roles flip to navy so icons/accents read on a light surface */
  --silver:    #20407e;
  --silver-lt: #0f2350;
  --steel:     #5a6a90;
  --accent:    #142a60;
  --accent-2:  #20407e;
  --accent-3:  #0f2350;
  --grad:      linear-gradient(120deg, #0d2050 0%, #20407e 45%, #2e4d9a 100%);

  --shadow:    0 26px 60px -30px rgba(20, 38, 92, 0.40);
  --glow-blue: 0 0 26px rgba(47, 91, 183, 0.35);
}

/* Light-theme surface adjustments (anything that assumed a dark canvas) */
html[data-theme="light"] .bg-fallback {
  background:
    radial-gradient(62% 58% at 74% 16%, rgba(47, 91, 183, 0.16), transparent 60%),
    radial-gradient(54% 50% at 12% 86%, rgba(120, 150, 220, 0.12), transparent 60%),
    radial-gradient(90% 90% at 50% 40%, #f5f8fd, var(--bg) 82%);
}
html[data-theme="light"] body::after {
  background: radial-gradient(120% 90% at 50% -10%, transparent 62%, rgba(178, 193, 224, 0.30) 100%);
}
html[data-theme="light"] .grain { mix-blend-mode: multiply; opacity: 0.05; }
html[data-theme="light"] .site-header.scrolled {
  background: rgba(238, 241, 248, 0.78);
  border-bottom-color: var(--border);
}
html[data-theme="light"] .hero-title .grad {
  background: linear-gradient(var(--grad-angle), #0a1b44 0%, #2a4f9a 30%, #4f7be0 50%, #2a4f9a 72%, #0a1b44 100%);
  background-size: 220% 220%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
html[data-theme="light"] .intro-bar { background: rgba(20, 38, 92, 0.08); }
html[data-theme="light"] .cursor { mix-blend-mode: normal; border-color: rgba(29, 60, 140, 0.6); }
html[data-theme="light"] .cursor-dot { background: var(--navy); }
html[data-theme="light"] body.cursor-hover .cursor {
  background: rgba(29, 60, 140, 0.12); border-color: rgba(29, 60, 140, 0.85);
}

/* =========================================================================
   Reset & base
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.075rem);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: "Poppins", system-ui, sans-serif; line-height: 1.05; margin: 0; text-wrap: balance; }
p { text-wrap: pretty; }

/* Animatable gradient angle (CSS @property — cutting-edge, degrades gracefully) */
@property --grad-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 120deg;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }

/* =========================================================================
   Accessibility helpers
   ========================================================================= */
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 12px 18px;
  background: var(--text);
  color: var(--bg);
  border-radius: 10px;
  font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* Visible, high-contrast focus styles for keyboard users everywhere */
:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 6px;
}

/* =========================================================================
   Page-load intro / loader
   ========================================================================= */
.intro {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: none;            /* shown only when JS is available */
  place-items: center;
  transition: transform 0.9s var(--ease);
}
html.js .intro { display: grid; }
.intro.is-hidden { transform: translateY(-101%); pointer-events: none; }
.intro[hidden] { display: none; }
.intro-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.intro-brand {
  font-family: "Poppins", sans-serif;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--text-mute);
  padding-left: 0.34em;
}
.intro-count {
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  font-size: clamp(3rem, 11vw, 7rem);
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.intro-count::after {
  content: "%";
  font-size: 0.36em;
  margin-left: 6px;
  -webkit-text-fill-color: var(--text-mute);
  color: var(--text-mute);
}
.intro-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, 0.07); }
.intro-bar span { display: block; height: 100%; transform: scaleX(0); transform-origin: left; background: var(--grad); }
html.intro-active, html.intro-active body { overflow: hidden; }

/* =========================================================================
   Kinetic text reveal — masked line-rise
   ========================================================================= */
/* hero name: each line sits in a mask and rises after the intro lifts */
.hero-title .line { display: block; overflow: hidden; padding: 0.04em 0.04em 0.06em; margin: 0 -0.04em; }
.hero-title .line-inner { display: block; transition: transform 1s var(--ease); }
html.js .hero-title .line-inner { transform: translateY(118%); }
body.intro-done .hero-title .line-inner { transform: none; }
body.intro-done .hero-title .line:nth-child(1) .line-inner { transition-delay: 0.05s; }
body.intro-done .hero-title .line:nth-child(2) .line-inner { transition-delay: 0.16s; }

/* the rest of the hero fades/rises in sequence after the intro */
.hero-anim { transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
html.js .hero-anim { opacity: 0; transform: translateY(22px); }
body.intro-done .hero-eyebrow.hero-anim { opacity: 1; transform: none; transition-delay: 0.30s; }
body.intro-done .hero-portrait.hero-anim { opacity: 1; transform: none; transition-delay: 0.34s; }
body.intro-done .hero-tags.hero-anim { opacity: 1; transform: none; transition-delay: 0.44s; }
body.intro-done .hero-cta.hero-anim { opacity: 1; transform: none; transition-delay: 0.54s; }

/* section headings rise out of a mask when scrolled into view */
.section-title { overflow: hidden; }
.section-title .title-inner { display: block; transition: transform 0.95s var(--ease); }
html.js .section-title .title-inner { transform: translateY(110%); }
html.js .section-title.is-visible .title-inner { transform: none; }
body.motion-off .section-title .title-inner,
body.motion-off .hero-title .line-inner,
body.motion-off .hero-anim { transform: none !important; opacity: 1 !important; transition: none !important; }

/* =========================================================================
   3D background canvas + graceful fallback
   ========================================================================= */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  display: block;
}
.bg-fallback {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(62% 58% at 72% 18%, rgba(47, 91, 183, 0.28), transparent 62%),
    radial-gradient(52% 48% at 14% 84%, rgba(196, 205, 223, 0.07), transparent 60%),
    radial-gradient(85% 85% at 50% 45%, #0a1430, var(--bg) 82%);
}
/* subtle readability scrim over the canvas */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% -10%, transparent 50%, rgba(3, 3, 6, 0.6) 100%),
    linear-gradient(180deg, rgba(3,3,6,0.35) 0%, transparent 30%);
}

/* Fine film grain — adds an expensive, tactile texture */
.grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* =========================================================================
   Smooth (momentum) scroll wrapper — Lenis-style. When active, the wrapper is
   fixed and translated by a lerped scroll value; <body> gets an explicit height
   so the native scrollbar (and keyboard scroll) still work. Disabled for
   reduced-motion / motion-off, where the page falls back to native scrolling.
   ========================================================================= */
.smooth-wrap.is-smooth {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  will-change: transform;
}

/* =========================================================================
   Custom cursor — a precise ring + dot that grows over interactive elements
   (fine pointers only; hidden when motion is off).
   ========================================================================= */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 34px; height: 34px;
  margin: -17px 0 0 -17px;
  border: 1.5px solid rgba(196, 205, 223, 0.7);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate3d(-100px, -100px, 0) scale(1);
  transition: opacity 0.3s var(--ease), width 0.25s var(--ease), height 0.25s var(--ease),
              margin 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
  mix-blend-mode: difference;
}
.cursor-dot {
  position: absolute;
  top: 50%; left: 50%;
  width: 4px; height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: var(--silver-lt);
}
body.cursor-active .cursor { opacity: 1; }
body.cursor-hover .cursor {
  width: 58px; height: 58px; margin: -29px 0 0 -29px;
  background: rgba(196, 205, 223, 0.16);
  border-color: rgba(196, 205, 223, 0.9);
}
body.cursor-hover .cursor-dot { opacity: 0; }
/* hide the native cursor only when our custom one is live */
@media (pointer: fine) {
  body.cursor-active:not(.motion-off) { cursor: none; }
  body.cursor-active:not(.motion-off) a,
  body.cursor-active:not(.motion-off) button { cursor: none; }
}

/* =========================================================================
   Scroll progress bar — native CSS scroll-driven animation where supported,
   JS-driven fallback (--scroll-progress) otherwise.
   ========================================================================= */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(var(--scroll-progress, 0));
  background: var(--grad);
  z-index: 200;
  box-shadow: 0 0 12px rgba(79, 123, 224, 0.55);
}
@supports (animation-timeline: scroll()) {
  .scroll-progress {
    transform: scaleX(0);
    animation: progressGrow linear both;
    animation-timeline: scroll(root block);
  }
  @keyframes progressGrow { to { transform: scaleX(1); } }
}

/* =========================================================================
   Cursor-follow aurora glow (fine pointers only; disabled when motion off)
   ========================================================================= */
.cursor-aurora {
  position: fixed;
  top: 0; left: 0;
  width: 480px; height: 480px;
  margin: -240px 0 0 -240px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(circle, rgba(79, 123, 224, 0.18), rgba(196, 205, 223, 0.07) 42%, transparent 70%);
  filter: blur(24px);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  transform: translate3d(var(--cx, 50vw), var(--cy, 30vh), 0);
  will-change: transform;
}
@media (pointer: fine) { body:not(.motion-off) .cursor-aurora { opacity: 1; } }

/* =========================================================================
   Header / nav
   ========================================================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.3s var(--ease), backdrop-filter 0.3s var(--ease), border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(10, 10, 18, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
}
.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: "Poppins", sans-serif; font-weight: 700; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(140deg, #2c4a92, #0f2350);
  color: #f3f7ff;
  font-weight: 800;
  box-shadow: 0 6px 18px -6px rgba(79, 123, 224, 0.7);
}
.brand-text { letter-spacing: 0.02em; }

.nav-links { display: flex; gap: 26px; margin-left: auto; font-weight: 500; }
.nav-links a {
  color: var(--text-dim);
  position: relative;
  padding: 6px 2px;
  transition: color 0.2s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--text); }
.nav-links a:hover::after, .nav-links a:focus-visible::after { transform: scaleX(1); }

.icon-toggle {
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  padding: 0;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.icon-toggle:hover { color: var(--text); border-color: var(--accent); }
.icon-toggle svg { width: 18px; height: 18px; grid-area: 1 / 1; }
/* theme toggle shows the icon for the active mode */
.icon-toggle .icon-system, .icon-toggle .icon-sun, .icon-toggle .icon-moon { display: none; }
html[data-theme-mode="system"] .icon-toggle .icon-system { display: block; }
html[data-theme-mode="light"] .icon-toggle .icon-sun { display: block; }
html[data-theme-mode="dark"] .icon-toggle .icon-moon { display: block; }

.motion-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.85rem;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.motion-toggle:hover { color: var(--text); border-color: var(--accent-2); }
.motion-toggle-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 10px var(--accent-3);
}
.motion-toggle[aria-pressed="true"] .motion-toggle-dot { background: var(--text-mute); box-shadow: none; }
.motion-toggle strong { color: var(--text); font-weight: 600; }

@media (max-width: 640px) {
  .nav-links { display: none; }
  .motion-toggle { margin-left: auto; }
}

/* =========================================================================
   Scrollytelling chapter rail (scrollspy)
   ========================================================================= */
.rail {
  position: fixed;
  top: 50%;
  right: 30px;
  transform: translateY(-50%);
  z-index: 90;
}
.rail ol { display: flex; flex-direction: column; gap: 6px; counter-reset: none; }
.rail a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px;
  color: var(--text-mute);
  transition: color 0.25s var(--ease);
}
.rail-num {
  font-family: "Poppins", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  opacity: 0.6;
  width: 1.6em;
  text-align: right;
}
.rail-label {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.rail a::after {
  content: "";
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.45;
  transition: width 0.3s var(--ease), opacity 0.3s var(--ease);
}
.rail a:hover, .rail a:focus-visible { color: var(--text); }
.rail a:hover .rail-label, .rail a:focus-visible .rail-label { opacity: 1; transform: none; }
.rail a.is-active {
  color: var(--silver-lt);
}
.rail a.is-active .rail-num { opacity: 1; }
.rail a.is-active::after { width: 44px; opacity: 1; background: var(--navy-lt); box-shadow: var(--glow-blue); }
.rail a.is-active .rail-label { opacity: 1; transform: none; }
@media (max-width: 920px) { .rail { display: none; } }

/* Chapter number badge inside section kickers */
.chapter {
  font-family: "Poppins", sans-serif;
  font-size: 0.78rem;
  color: var(--steel);
  margin-right: 12px;
  padding-right: 12px;
  border-right: 1px solid var(--border);
  letter-spacing: 0.05em;
}

/* =========================================================================
   Layout primitives
   ========================================================================= */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(80px, 12vh, 150px) 0; position: relative; }

.section-kicker {
  display: inline-block;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 14px;
}
.section-title {
  font-size: clamp(1.9rem, 1.3rem + 2.8vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 16ch;
  margin-bottom: 22px;
}

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 120px 24px 80px;
}
.hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 56px;
}
.hero-portrait {
  position: relative;
  margin: 0;
  justify-self: end;
  width: 100%;
  max-width: 410px;
  aspect-ratio: 1 / 1;
}
.hero-portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
}
/* soft navy glow halo behind the portrait */
.hero-portrait::before {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: 30px;
  background: radial-gradient(60% 60% at 70% 25%, rgba(79,123,224,0.45), transparent 70%);
  filter: blur(26px);
  z-index: 0;
}
/* thin gradient frame accent */
.hero-portrait::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 23px;
  padding: 1px;
  background: linear-gradient(150deg, rgba(196,205,223,0.7), transparent 40%, rgba(79,123,224,0.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  z-index: 2;
  pointer-events: none;
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-portrait { order: -1; justify-self: start; max-width: 300px; }
}
@media (max-width: 540px) {
  .hero-portrait { max-width: 230px; }
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.9rem;
  color: var(--text-dim);
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  margin: 0 0 26px;
}
.hero-eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 10px var(--accent-3);
}
.hero-title {
  font-size: clamp(3.2rem, 1.4rem + 10.5vw, 9rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.92;
  margin: 0 0 26px;
}
.hero-title .grad {
  background: linear-gradient(var(--grad-angle), #0f2350 0%, #2c4a92 26%, #c2cff0 48%, #3a5ca8 72%, #0f2350 100%);
  background-size: 220% 220%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: flowGrad 11s ease-in-out infinite;
}
@keyframes flowGrad {
  0%   { --grad-angle: 105deg; background-position: 0% 50%; }
  50%  { --grad-angle: 150deg; background-position: 100% 50%; }
  100% { --grad-angle: 105deg; background-position: 0% 50%; }
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  font-size: clamp(0.95rem, 0.9rem + 0.4vw, 1.2rem);
  color: var(--text-dim);
  margin: 0 0 38px;
  font-weight: 500;
}
.hero-tags span:not([aria-hidden]) { color: var(--text); }
.hero-tags [aria-hidden] { color: var(--accent); }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}
/* vasly-style: deep -> lighter diagonal gradient + soft colour-matched shadow */
.btn-primary {
  background: linear-gradient(135deg, #0b1c44 0%, #2f5bb7 100%);
  background-size: 140% 140%;
  color: #f3f7ff;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(29, 60, 140, 0.40), 0 2px 6px rgba(0, 0, 0, 0.30);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(47, 91, 183, 0.50), 0 3px 8px rgba(0, 0, 0, 0.35);
  background-position: 100% 50%;
}
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--accent-2); background: var(--surface-2); }

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.scroll-hint-dot {
  width: 24px; height: 38px;
  border: 2px solid var(--border);
  border-radius: 14px;
  position: relative;
}
.scroll-hint-dot::after {
  content: "";
  position: absolute;
  top: 7px; left: 50%;
  width: 4px; height: 8px;
  border-radius: 2px;
  background: var(--accent);
  transform: translateX(-50%);
  animation: scrollDot 1.8s var(--ease) infinite;
}
@keyframes scrollDot {
  0% { opacity: 0; transform: translate(-50%, 0); }
  40% { opacity: 1; }
  80% { opacity: 0; transform: translate(-50%, 12px); }
  100% { opacity: 0; }
}

/* =========================================================================
   About
   ========================================================================= */
.about-lead {
  font-size: clamp(1.1rem, 1rem + 0.6vw, 1.5rem);
  color: var(--text-dim);
  max-width: 62ch;
  line-height: 1.6;
}
.about-lead strong { color: var(--text); font-weight: 600; }
.about-note {
  margin-top: 22px;
  max-width: 60ch;
  color: var(--text-mute);
  font-size: 1.02rem;
  line-height: 1.6;
  padding-left: 18px;
  border-left: 2px solid var(--border);
}
.about-note strong { color: var(--text-dim); font-weight: 600; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 56px;
}
.stat {
  padding: 28px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
}
.stat-num {
  display: block;
  font-family: "Poppins", sans-serif;
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3.2rem);
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.stat-label { display: block; margin-top: 10px; color: var(--text-mute); font-size: 0.95rem; }
@media (max-width: 680px) { .stats { grid-template-columns: 1fr; } }

/* =========================================================================
   Interests cards
   ========================================================================= */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 50px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  will-change: transform;
}
.card:hover, .card:focus-within {
  border-color: rgba(79, 123, 224, 0.5);
  box-shadow: var(--shadow), 0 0 0 1px rgba(79, 123, 224, 0.12) inset;
}
.card-body { padding: 22px 24px 26px; }

/* photo cards */
.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,7,15,0) 45%, rgba(5,7,15,0.55) 100%);
}
.card:hover .card-media img, .card:focus-within .card-media img { transform: scale(1.06); }

/* icon card (Gym) — icon centred in a media panel that matches the photos */
.card-media--icon {
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(79,123,224,0.18), transparent 60%),
    linear-gradient(160deg, #0e1b3e, #0a1226);
}
.card-media--icon::after { display: none; }
.card-icon {
  width: 64px; height: 64px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(79,123,224,0.22), rgba(79,123,224,0.04));
  border: 1px solid var(--border);
  color: var(--silver-lt);
  transition: box-shadow 0.3s var(--ease), color 0.3s var(--ease);
}
.card-icon svg { width: 30px; height: 30px; }
.card:hover .card-icon, .card:focus-within .card-icon {
  color: #ffffff;
  box-shadow: var(--glow-blue);
}
.card h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: 8px; }
.card p { color: var(--text-dim); font-size: 0.96rem; margin: 0; }

@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cards { grid-template-columns: 1fr; } }

/* =========================================================================
   Connect
   ========================================================================= */
.connect-lead { font-size: clamp(1.05rem, 1rem + 0.5vw, 1.35rem); color: var(--text-dim); max-width: 56ch; }
.connect-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 44px;
}
.link-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.link-card:hover, .link-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--accent-2);
  background: var(--surface-2);
}
.link-icon { width: 30px; height: 30px; fill: var(--text); flex-shrink: 0; }
.link-text { display: flex; flex-direction: column; }
.link-text strong { font-size: 1.15rem; font-weight: 600; }
.link-text span { color: var(--text-mute); font-size: 0.92rem; }
.link-arrow { margin-left: auto; font-size: 1.3rem; color: var(--text-mute); transition: transform 0.25s var(--ease), color 0.25s var(--ease); }
.link-card:hover .link-arrow, .link-card:focus-visible .link-arrow { transform: translateX(5px); color: var(--accent); }
@media (max-width: 600px) { .connect-links { grid-template-columns: 1fr; } }

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 40px; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
}
.footer-brand { font-family: "Poppins", sans-serif; font-weight: 700; margin: 0; }
.footer-copy { color: var(--text-mute); font-size: 0.9rem; margin: 0; }
.footer-top { margin-left: auto; color: var(--text-dim); font-size: 0.9rem; }
.footer-top:hover { color: var(--text); }

/* =========================================================================
   Scroll-reveal animation
   ========================================================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================================
   Reduced-motion & motion-off: disable all non-essential animation.
   Applied both via the OS preference and the in-page motion toggle
   (body.motion-off), so users always have explicit control (WCAG 2.2.2).
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-title .line-inner, .hero-anim, .section-title .title-inner {
    transform: none !important; opacity: 1 !important;
  }
  .intro { display: none !important; }
}

body.motion-off .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
body.motion-off .scroll-hint-dot::after { animation: none; }
body.motion-off * { scroll-behavior: auto; }

/* single centered connect card (Instagram removed) */
.connect-links--single { grid-template-columns: minmax(0, 420px); justify-content: center; }
/* =========================================================================
   Gradient-ify: section kicker, active rail tick, ghost-button border
   ========================================================================= */
.section-kicker {
  color: transparent;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
}
.section-kicker .chapter { -webkit-text-fill-color: var(--steel); }
.rail a.is-active::after { background: var(--grad); }
.btn-ghost { position: relative; border-color: transparent; }
.btn-ghost::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0.7;
  transition: opacity 0.2s var(--ease);
  pointer-events: none;
}
.btn-ghost:hover { border-color: transparent; }
.btn-ghost:hover::before { opacity: 1; }

/* Section kicker + chapter numbers: keep FLAT (not gradient) */
.section-kicker { background: none; color: var(--text); -webkit-text-fill-color: currentColor; }
.section-kicker .chapter { color: var(--text-mute); -webkit-text-fill-color: currentColor; }

/* About stat numbers: flat & readable (not gradient) */
.stat-num { background: none; color: var(--silver-lt); -webkit-text-fill-color: currentColor; }

/* Remove the scroll-cue indicator */
.scroll-hint { display: none !important; }

/* Text-size control (accessibility) — scales rem-based type */
html[data-text="lg"] { font-size: 115%; }
html[data-text="xl"] { font-size: 130%; }
.text-toggle span { font-family: "Poppins", sans-serif; font-weight: 700; font-size: 0.98rem; line-height: 1; }


/* Header control dropdowns (theme + text size) */
.ctrl-select {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 30px 8px 14px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23999' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.ctrl-select:hover { color: var(--text); border-color: var(--accent); }
.ctrl-select:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; }
.ctrl-select option { color: #1a1a1a; background: #ffffff; }


/* =========================================================================
   Display dropdown (theme + text size) — vasly-style
   ========================================================================= */
.theme-picker { position: relative; }
.theme-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-dim); font: inherit; line-height: 1;
  padding: 8px 11px; border-radius: 10px; cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.theme-toggle:hover { background: var(--surface-2); color: var(--text); border-color: var(--accent); }
.theme-toggle span[class^="icon-"] { display: none; }
.theme-toggle span[class^="icon-"] svg { width: 17px; height: 17px; display: block; }
html[data-theme-mode="system"] .theme-toggle .icon-system { display: inline-flex; }
html[data-theme-mode="light"] .theme-toggle .icon-sun { display: inline-flex; }
html[data-theme-mode="dark"] .theme-toggle .icon-moon { display: inline-flex; }
.theme-toggle .chev { font-size: 0.62rem; opacity: 0.7; }

.theme-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 210px; padding: 7px;
  background: var(--bg-2);
  border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow);
  z-index: 130;
}
.theme-menu[hidden] { display: none; }
.theme-menu > button {
  display: flex; align-items: center; gap: 11px; width: 100%;
  background: transparent; border: 0; cursor: pointer;
  padding: 9px 11px; border-radius: 9px;
  color: var(--text); font: inherit; font-size: 0.92rem; font-weight: 500;
  text-align: left; line-height: 1.3;
}
.theme-menu > button:hover { background: var(--surface-2); }
.theme-menu .m-icon { width: 18px; height: 18px; display: inline-grid; place-items: center; color: var(--text-dim); }
.theme-menu .m-icon svg { width: 17px; height: 17px; }
.theme-menu .check { margin-left: auto; color: var(--accent); font-weight: 700; visibility: hidden; }
.theme-menu > button[aria-checked="true"] .check { visibility: visible; }
.theme-menu > button[aria-checked="true"] { color: var(--text); }
.theme-menu > button[aria-checked="true"] .m-icon { color: var(--accent); }
.tm-sep { height: 1px; background: var(--border); margin: 7px 5px; }
.tm-label { margin: 0; padding: 6px 11px 3px; font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-mute); }
.tm-sizes { display: flex; gap: 5px; padding: 2px 6px 5px; }
.tm-sizes button {
  flex: 1; display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 0; cursor: pointer;
  background: transparent; border: 1px solid var(--border); border-radius: 8px;
  color: var(--text-dim); font-family: inherit; font-weight: 700;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}
.tm-sizes button:hover { background: var(--surface-2); color: var(--text); }
.tm-sizes button[aria-checked="true"] { border-color: var(--accent); color: var(--accent); }
:focus-visible.theme-toggle, .theme-menu button:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }


/* Remove decorative dots (motion button + "currently in" eyebrow) */
.motion-toggle-dot { display: none !important; }
.hero-eyebrow::before { content: none !important; }


/* Footer legal links (Privacy / Accessibility) */
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--text-dim); font-size: 0.9rem; text-decoration: none; transition: color 0.2s var(--ease); }
.footer-links a:hover, .footer-links a:focus-visible { color: var(--text); }
