/* ================================================================
   THOMAS LOVIN — site.css v11
   Design: Prismatic Dark — editorial type, animated blobs, glass
   Fonts:  Archivo (display) + Space Grotesk (body)
   Accent: color-mix() derivatives — auto-reactive, no RGB split
   ================================================================ */

/* ── CSS Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }

/* ── Design Tokens ──────────────────────────────────────────────── */
:root {
  /* Palette */
  --bg:    #000000;
  --bg-1:  #070707;
  --bg-2:  #0e0e0e;
  --bg-3:  #161616;
  --bg-4:  #202020;

  /* Text */
  --text:   rgba(255, 255, 255, 0.93);
  --text-2: rgba(255, 255, 255, 0.52);
  --text-3: rgba(255, 255, 255, 0.26);

  /* Borders */
  --border:   rgba(255, 255, 255, 0.07);
  --border-h: rgba(255, 255, 255, 0.16);

  /* Accent — user-controlled. All derivatives via color-mix() so they auto-update */
  --accent:      #d4b06a;
  --accent-rgb:  212, 176, 106;
  --accent-dim:  color-mix(in srgb, var(--accent) 10%, transparent);
  --accent-soft: color-mix(in srgb, var(--accent) 20%, transparent);
  --accent-glow: color-mix(in srgb, var(--accent) 32%, transparent);
  --accent-vivid: color-mix(in srgb, var(--accent) 88%, white);

  /* Typography */
  --font-heading: "Archivo", system-ui, -apple-system, sans-serif;
  --font-sans:    "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --fontSize:     16px;

  /* Layout */
  --max-w:  1160px;
  --nav-h:  72px;
  --pad-x:  24px;
  --sec-py: 88px;
  --r:      12px;
  --r-sm:   7px;
  --r-lg:   20px;
  --r-xl:   28px;
  --r-full: 9999px;

  /* Motion */
  --dur:    220ms;
  --dur-lg: 380ms;
  --ease:   cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* FX (JS-controlled) */
  --glow:         0.80;
  --noiseOpacity: 0.028;
  --mx: 0; --my: 0;

  /* Focus */
  --focus: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
}

/* ── Light mode ─────────────────────────────────────────────────── */
:root[data-mode="light"] {
  --bg:    #f7f6f2;
  --bg-1:  #ffffff;
  --bg-2:  #f0ede7;
  --bg-3:  #e6e2db;
  --bg-4:  #d9d4cc;
  --text:   rgba(14, 12, 10, 0.92);
  --text-2: rgba(14, 12, 10, 0.54);
  --text-3: rgba(14, 12, 10, 0.32);
  --border:   rgba(0, 0, 0, 0.08);
  --border-h: rgba(0, 0, 0, 0.18);
}

/* ── Base ───────────────────────────────────────────────────────── */
html {
  color-scheme: dark;
  font-family: var(--font-sans);
  font-size: var(--fontSize);
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
[data-mode="light"] { color-scheme: light; }
body { min-height: 100vh; overflow-x: hidden; }
html.no-scroll { overflow: hidden; }

/* ── Animated Background — floating blobs ───────────────────────── */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: var(--bg);
}

/* ── Canvas particle network ─────────────────────────────────────── */
.bg-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ── Animated dot grid — drifts diagonally ──────────────────────── */
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 35%, rgba(0,0,0,0.55) 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 35%, rgba(0,0,0,0.55) 0%, transparent 80%);
  animation: gridDrift 18s linear infinite;
  z-index: 0;
}
@keyframes gridDrift {
  0%   { background-position: 0px 0px; }
  100% { background-position: 40px 40px; }
}
[data-mode="light"] .bg-grid {
  background-image: radial-gradient(circle, rgba(0,0,0,0.05) 1px, transparent 1px);
}

/* ── Aurora sweep — horizontal light bands ───────────────────────── */
.bg-aurora {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.bg-aurora::before,
.bg-aurora::after {
  content: '';
  position: absolute;
  left: -20%; right: -20%;
  height: 35vh;
  border-radius: 50%;
  mix-blend-mode: screen;
}
.bg-aurora::before {
  top: -5vh;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--accent) 12%, transparent) 0%,
    rgba(88, 80, 236, 0.12) 50%,
    transparent 100%
  );
  animation: auroraBefore 12s ease-in-out infinite;
  filter: blur(40px);
}
.bg-aurora::after {
  bottom: 5vh;
  background: linear-gradient(0deg,
    rgba(168, 68, 220, 0.10) 0%,
    rgba(14, 165, 180, 0.08) 50%,
    transparent 100%
  );
  animation: auroraAfter 18s ease-in-out infinite;
  animation-delay: -6s;
  filter: blur(50px);
}
@keyframes auroraBefore {
  0%, 100% { transform: scaleX(1) translateY(0); opacity: 0.7; }
  33%  { transform: scaleX(1.12) translateY(3vh); opacity: 1; }
  66%  { transform: scaleX(0.95) translateY(-2vh); opacity: 0.85; }
}
@keyframes auroraAfter {
  0%, 100% { transform: scaleX(1) translateY(0); opacity: 0.6; }
  40%  { transform: scaleX(1.08) translateY(-4vh); opacity: 0.9; }
  70%  { transform: scaleX(0.97) translateY(3vh); opacity: 0.75; }
}

/* ── Blobs — floating color atmospheres ─────────────────────────── */
/* Mouse parallax via CSS translate property (composites with animation transform) */
.blob {
  position: absolute;
  border-radius: 50%;
  will-change: transform, filter;
  mix-blend-mode: screen;
  translate: var(--par-x, 0px) var(--par-y, 0px);
  transition: translate 0.1s linear;
}

/* Indigo/blue — top-left, slow hue drift */
.b1 {
  width: 65vw; height: 65vw;
  top: -20vh; left: -15vw;
  background: radial-gradient(circle at 40% 40%,
    rgba(88, 80, 236, calc(var(--glow) * 0.60)) 0%,
    transparent 68%
  );
  animation: driftBlob1 26s ease-in-out infinite, hueLoop 32s linear infinite;
}

/* Accent — top-right, reacts to user color */
.b2 {
  width: 55vw; height: 55vw;
  top: -10vh; right: -15vw;
  background: radial-gradient(circle at 55% 35%,
    color-mix(in srgb, var(--accent) calc(var(--glow) * 42%), transparent) 0%,
    transparent 65%
  );
  animation: driftBlob2 32s ease-in-out infinite, breathe 8s ease-in-out infinite;
  animation-delay: -9s, 0s;
}

/* Purple — mid-left */
.b3 {
  width: 48vw; height: 48vw;
  top: 30vh; left: -10vw;
  background: radial-gradient(circle at 45% 45%,
    rgba(168, 68, 220, calc(var(--glow) * 0.45)) 0%,
    transparent 65%
  );
  animation: driftBlob3 38s ease-in-out infinite, hueLoop 25s linear infinite reverse;
  animation-delay: -18s, -8s;
}

/* Teal — bottom-right */
.b4 {
  width: 42vw; height: 42vw;
  bottom: -8vh; right: 3vw;
  background: radial-gradient(circle at 50% 50%,
    rgba(14, 165, 180, calc(var(--glow) * 0.38)) 0%,
    transparent 65%
  );
  animation: driftBlob4 34s ease-in-out infinite, breathe 11s ease-in-out infinite;
  animation-delay: -25s, -3s;
}

/* Rose — center */
.b5 {
  width: 38vw; height: 38vw;
  top: 40vh; left: 30vw;
  background: radial-gradient(circle at 50% 50%,
    rgba(236, 72, 153, calc(var(--glow) * 0.28)) 0%,
    transparent 65%
  );
  animation: driftBlob5 46s ease-in-out infinite, hueLoop 40s linear infinite;
  animation-delay: -12s, -15s;
}

/* Blue center accent — fills mid-screen depth */
.b6 {
  width: 50vw; height: 50vw;
  top: 10vh; left: 20vw;
  background: radial-gradient(circle at 50% 50%,
    rgba(59, 130, 246, calc(var(--glow) * 0.22)) 0%,
    transparent 68%
  );
  animation: driftBlob6 52s ease-in-out infinite;
  animation-delay: -30s;
  filter: blur(120px);
}

/* Blob drift keyframes */
@keyframes driftBlob1 {
  0%, 100% { transform: translate(0%, 0%) scale(1);      filter: blur(100px) hue-rotate(0deg); }
  20%  { transform: translate(5%, 12%) scale(1.08);      filter: blur(110px) hue-rotate(30deg); }
  50%  { transform: translate(-5%, 20%) scale(0.93);     filter: blur(95px)  hue-rotate(80deg); }
  75%  { transform: translate(8%, 5%) scale(1.04);       filter: blur(105px) hue-rotate(45deg); }
}
@keyframes driftBlob2 {
  0%, 100% { transform: translate(0%, 0%) scale(1);      filter: blur(100px); }
  25%  { transform: translate(-8%, 9%) scale(0.91);      filter: blur(108px); }
  50%  { transform: translate(6%, -12%) scale(1.10);     filter: blur(95px);  }
  75%  { transform: translate(-10%, 3%) scale(1.03);     filter: blur(102px); }
}
@keyframes driftBlob3 {
  0%, 100% { transform: translate(0%, 0%) scale(1);      filter: blur(100px) hue-rotate(0deg); }
  33%  { transform: translate(12%, -8%) scale(1.11);     filter: blur(92px)  hue-rotate(-50deg); }
  66%  { transform: translate(-6%, -14%) scale(0.91);    filter: blur(110px) hue-rotate(-100deg); }
}
@keyframes driftBlob4 {
  0%, 100% { transform: translate(0%, 0%) scale(1);      filter: blur(100px); }
  25%  { transform: translate(-9%, -8%) scale(1.07);     filter: blur(95px);  }
  50%  { transform: translate(7%, 10%) scale(0.94);      filter: blur(108px); }
  75%  { transform: translate(-5%, 7%) scale(1.09);      filter: blur(100px); }
}
@keyframes driftBlob5 {
  0%, 100% { transform: translate(0%, 0%) scale(1);      filter: blur(100px) hue-rotate(0deg); }
  25%  { transform: translate(8%, -10%) scale(1.06);     filter: blur(95px)  hue-rotate(60deg); }
  50%  { transform: translate(-12%, 6%) scale(0.90);     filter: blur(112px) hue-rotate(120deg); }
  75%  { transform: translate(5%, 12%) scale(1.05);      filter: blur(98px)  hue-rotate(80deg); }
}
@keyframes driftBlob6 {
  0%, 100% { transform: translate(0%, 0%) scale(1); }
  33%  { transform: translate(-8%, -10%) scale(1.12); }
  66%  { transform: translate(10%, 8%) scale(0.88);  }
}

/* Shared breath — subtle scale pulse on some blobs */
@keyframes breathe {
  0%, 100% { opacity: 0.8; }
  50%       { opacity: 1.0; }
}

/* Color cycle — slowly drifts hue on certain blobs */
@keyframes hueLoop {
  from { filter: blur(100px) hue-rotate(0deg); }
  to   { filter: blur(100px) hue-rotate(360deg); }
}

/* Edge vignette — pulls focus inward */
.bg-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 40% at 0% 50%,   var(--bg) 0%, transparent 100%),
    radial-gradient(ellipse 90% 40% at 100% 50%,  var(--bg) 0%, transparent 100%),
    radial-gradient(ellipse 60% 30% at 50% 100%,  var(--bg) 0%, transparent 100%);
}

/* Noise grain — depth and texture */
.bg-grain {
  position: absolute;
  inset: -50%;
  width: 200%; height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: var(--noiseOpacity);
  animation: grainShift 10s steps(10) infinite;
}
@keyframes grainShift {
  0%   { transform: translate(0%, 0%); }
  10%  { transform: translate(-5%, -10%); }
  20%  { transform: translate(-15%, 5%); }
  30%  { transform: translate(7%, -25%); }
  40%  { transform: translate(-5%, 25%); }
  50%  { transform: translate(-15%, 10%); }
  60%  { transform: translate(15%, 0%); }
  70%  { transform: translate(0%, 15%); }
  80%  { transform: translate(3%, 35%); }
  90%  { transform: translate(-10%, 10%); }
  100% { transform: translate(0%, 0%); }
}

/* Light mode — tone down blobs */
[data-mode="light"] .blob { opacity: 0.18; }
[data-mode="light"] .bg-grain { opacity: 0.015; }
[data-mode="light"] .bg-vignette {
  background:
    radial-gradient(ellipse 90% 40% at 0% 50%,   var(--bg) 0%, transparent 100%),
    radial-gradient(ellipse 90% 40% at 100% 50%,  var(--bg) 0%, transparent 100%);
}

@media (prefers-reduced-motion: reduce) {
  .blob, .bg-grain { animation: none; }
}

/* ── Scrollbar ───────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--accent) 55%, transparent);
}

/* ── Custom cursor — accent-colored arrow ───────────────────────── */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 20px;
  height: 24px;
  pointer-events: none;
  z-index: 9999;
  background: var(--accent);
  clip-path: polygon(
    0% 0%,
    0% 78%,
    26% 57%,
    44% 98%,
    57% 88%,
    37% 48%,
    100% 48%
  );
  filter: drop-shadow(0 1px 6px color-mix(in srgb, var(--accent) 55%, transparent));
  transform-origin: 0 0;
  transition: background var(--dur), filter var(--dur), transform var(--dur) var(--ease);
  will-change: top, left;
}
.cursor-hover .cursor {
  transform: scale(1.18);
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--accent) 70%, transparent));
}
.cursor-click .cursor {
  transform: scale(0.78);
}

/* ── Layout ─────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}
.main {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--nav-h) + 8px);
}
.page { display: flex; flex-direction: column; }

/* ── Topbar — transparent, nav links float as centered pill ─────── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
}

.topbar-inner {
  display: flex;
  align-items: center;
  height: 100%;
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* Brand — always left */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}
.brand-mark {
  width: 36px; height: 36px;
  background: var(--accent);
  color: #000;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.06em;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.brand-mark::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(255,255,255,0.30) 0%, transparent 55%);
  border-radius: inherit;
  pointer-events: none;
}
.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-4deg);
  box-shadow: 0 0 0 3px var(--accent-glow), 0 8px 28px var(--accent-glow);
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  gap: 1px;
}
.brand-text strong {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.brand-text small {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 400;
}

/* Nav — centered floating pill */
.nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.60);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--r-full);
  z-index: 1;
  transition: background var(--dur-lg) var(--ease), border-color var(--dur-lg) var(--ease);
}
.nav:hover {
  background: rgba(0, 0, 0, 0.72);
  border-color: rgba(255, 255, 255, 0.15);
}
[data-mode="light"] .nav {
  background: rgba(247, 246, 242, 0.72);
  border-color: rgba(0, 0, 0, 0.12);
}
[data-mode="light"] .nav:hover {
  background: rgba(247, 246, 242, 0.88);
}

.navbtn {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}
.navbtn:hover {
  color: var(--text);
  background: rgba(255,255,255,0.08);
}
.navbtn.active {
  color: var(--text);
}
.navbtn.active::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px;
  background: var(--accent);
  border-radius: 50%;
}
[data-mode="light"] .navbtn:hover { background: rgba(0,0,0,0.07); }

/* Actions — always right */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  position: relative;
  z-index: 2;
}
.topbar-resume { font-size: 13px; }

/* ── Mobile Drawer ──────────────────────────────────────────────── */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.70);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility var(--dur) var(--ease);
}
.drawer.open { opacity: 1; visibility: visible; }
.drawer-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(340px, 92vw);
  background: var(--bg-2);
  border-left: 1px solid var(--border);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transform: translateX(100%);
  transition: transform var(--dur-lg) var(--ease);
}
.drawer.open .drawer-panel { transform: translateX(0); }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.drawer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.drawerlink {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 10px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: all var(--dur) var(--ease);
  cursor: pointer;
  text-align: center;
}
.drawerlink:hover, .drawerlink.active {
  background: var(--accent-dim);
  border-color: var(--accent-soft);
  color: var(--accent);
}
.drawer-resume {
  grid-column: 1 / -1;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  border-color: transparent;
}
.drawer-resume:hover {
  background: var(--accent-vivid);
  color: #000;
  border-color: transparent;
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--r-full);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--dur) var(--ease);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn:focus-visible { outline: none; box-shadow: var(--focus); }

/* Primary */
.btn-primary {
  background: var(--accent);
  color: #000;
  font-weight: 700;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.22) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.55s ease;
}
.btn-primary:hover {
  box-shadow: 0 0 0 3px var(--accent-glow), 0 8px 32px var(--accent-glow);
  transform: translateY(-1px);
}
.btn-primary:hover::before { transform: translateX(100%); }
.btn-primary:active { transform: translateY(0); box-shadow: none; }

/* Outline */
.btn-outline {
  background: rgba(255,255,255,0.04);
  border-color: var(--border-h);
  color: var(--text);
  backdrop-filter: blur(12px);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.26);
  transform: translateY(-1px);
}
.btn-outline:active { transform: translateY(0); }

/* Ghost */
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-2);
}
.btn-ghost:hover { background: rgba(255,255,255,0.07); color: var(--text); }

/* Icon only */
.iconbtn { width: 36px; height: 36px; padding: 0; border-radius: var(--r); }

/* ── Sections ────────────────────────────────────────────────────── */
.section {
  padding: var(--sec-py) 0;
  position: relative;
}
.section + .section::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--pad-x); right: var(--pad-x);
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    var(--border) 20%,
    var(--border) 80%,
    transparent
  );
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 36px;
}
.section-head h2 {
  font-family: var(--font-heading);
  font-size: clamp(22px, 2.8vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.1;
}
.section-sub {
  font-size: 13px;
  color: var(--text-3);
  font-weight: 400;
}

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
  min-height: calc(100vh - var(--nav-h));
  padding: 52px 0 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.hero-inner.hero-split {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 72px;
  align-items: center;
  position: relative;
  z-index: 1;
  margin-bottom: 64px;
}

.hero-copy { display: flex; flex-direction: column; gap: 24px; }

/* Kicker */
.kicker {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Display name — THOMAS (filled) + LOVIN (outlined in accent) */
.hero-h1 {
  font-family: var(--font-heading);
  font-size: clamp(68px, 9.8vw, 152px);
  font-weight: 900;
  letter-spacing: -0.058em;
  line-height: 0.89;
  display: flex;
  flex-direction: column;
}
.name-line-1 {
  display: block;
  color: var(--text);
}
.name-line-2 {
  display: block;
  -webkit-text-stroke: 2.5px var(--accent);
  color: transparent;
  text-shadow:
    0 0 50px color-mix(in srgb, var(--accent) 22%, transparent),
    0 0 100px color-mix(in srgb, var(--accent) 10%, transparent);
  transition: -webkit-text-stroke-color var(--dur), text-shadow var(--dur);
}

/* Role line */
.hero-role {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.hero-role-text {
  font-size: clamp(13px, 1.3vw, 15px);
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.hero-role-sep {
  width: 3px; height: 3px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  opacity: 0.7;
}

/* Lead */
.hero-lead {
  font-size: clamp(14px, 1.3vw, 16px);
  color: var(--text-2);
  line-height: 1.78;
  max-width: 500px;
  font-weight: 400;
}

/* CTAs */
.hero-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Location pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: 12px;
  color: var(--text-3);
  width: fit-content;
  backdrop-filter: blur(10px);
}
.pill-dot {
  width: 5px; height: 5px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.65); }
}

/* Profile card side */
.hero-side {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Stats band ──────────────────────────────────────────────────── */
.stats-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}
.stats-band::before {
  content: '';
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    color-mix(in srgb, var(--accent) 40%, transparent) 25%,
    color-mix(in srgb, var(--accent) 55%, transparent) 50%,
    color-mix(in srgb, var(--accent) 40%, transparent) 75%,
    transparent 100%
  );
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 36px 24px 28px;
  border-right: 1px solid var(--border);
  transition: background var(--dur) var(--ease);
  position: relative;
}
.stat:last-child { border-right: none; }
.stat:hover { background: rgba(255,255,255,0.02); }

.stat-sep { display: none; }

.stat-num {
  font-family: var(--font-heading);
  font-size: clamp(32px, 3.5vw, 52px);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  position: relative;
}

.stat-label {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.4;
}

/* ── Profile card — glass morphism ──────────────────────────────── */
.profile-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-top: 1px solid color-mix(in srgb, var(--accent) 28%, rgba(255,255,255,0.08));
  border-radius: var(--r-xl);
  padding: 26px;
  transform-style: preserve-3d;
  transition: border-color var(--dur-lg) var(--ease), box-shadow var(--dur-lg) var(--ease), transform var(--dur-lg) var(--ease);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 20px 60px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.07);
}
.profile-card:hover {
  border-color: rgba(255,255,255,0.16);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.07),
    0 32px 80px rgba(0,0,0,0.55),
    0 0 80px color-mix(in srgb, var(--accent) 8%, transparent),
    inset 0 1px 0 rgba(255,255,255,0.12);
}

.profile-card-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.profile-avatar-wrap { position: relative; flex-shrink: 0; }
.profile-img {
  width: 66px; height: 66px;
  border-radius: var(--r);
  object-fit: cover;
  background: var(--bg-3);
}
.profile-status-dot {
  position: absolute;
  bottom: -3px; right: -3px;
  width: 13px; height: 13px;
  background: #4ade80;
  border-radius: 50%;
  border: 2.5px solid rgba(0,0,0,0.6);
  animation: statusRing 3s ease-in-out infinite;
}
@keyframes statusRing {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0.5); }
  50%       { box-shadow: 0 0 0 6px rgba(74,222,128,0); }
}

.profile-id { flex: 1; min-width: 0; }
.profile-name {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 3px;
}
.profile-role-sub {
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.4;
  margin-bottom: 10px;
}
.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.profile-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: var(--r-full);
  border: 1px solid var(--accent-soft);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.profile-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 16px;
}
.profile-meta { display: flex; flex-direction: column; gap: 9px; }
.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
}
.meta-k {
  color: var(--text-3);
  font-weight: 500;
  flex-shrink: 0;
  min-width: 54px;
}
.meta-v { color: var(--text-2); text-align: right; line-height: 1.4; }

/* ── Currently card ──────────────────────────────────────────────── */
.currently-card {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: 4px var(--r-lg) var(--r-lg) 4px;
  overflow: hidden;
  transition: box-shadow var(--dur) var(--ease);
}
.currently-card:hover {
  box-shadow: 0 0 0 1px var(--accent-dim), 0 16px 48px rgba(0,0,0,0.4);
}

.currently-inner {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 24px 26px;
}
.currently-icon-wrap {
  width: 44px; height: 44px;
  border-radius: var(--r);
  background: var(--accent-dim);
  border: 1px solid var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  animation: iconPulse 4s ease-in-out infinite;
}
@keyframes iconPulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50%       { box-shadow: 0 0 0 8px transparent; }
}

.currently-body { flex: 1; min-width: 0; }
.currently-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-heading);
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin-bottom: 8px;
}
.currently-company { color: var(--accent); }
.currently-sep { margin: 0 5px; color: var(--text-3); }
.currently-desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
}

.currently-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  background: rgba(74,222,128,0.09);
  border: 1px solid rgba(74,222,128,0.22);
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 700;
  color: #4ade80;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}
.currently-badge-dot {
  width: 5px; height: 5px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse 1.8s ease-in-out infinite;
}

/* ── Preferences ─────────────────────────────────────────────────── */
.prefs {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: start;
}
.prefs-col { display: flex; flex-direction: column; gap: 14px; }

.prefs-group {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color var(--dur) var(--ease);
}
.prefs-group:hover { border-color: var(--border-h); }

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.field-key {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  flex-shrink: 0;
  min-width: 100px;
}
.field-val {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: flex-end;
}

.field-select {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  padding: 7px 10px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease);
  min-width: 144px;
}
.field-select:hover { border-color: var(--border-h); }
.field-select:focus { outline: none; box-shadow: var(--focus); border-color: var(--accent); }

.btn-group {
  display: flex;
  gap: 3px;
  background: var(--bg-3);
  padding: 3px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
}
.btn-opt {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: calc(var(--r-sm) - 2px);
  border: none;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.btn-opt.active {
  background: var(--bg-4);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.btn-opt:hover:not(.active) { color: var(--text-2); }

.field-range {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  border: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-3);
  outline: none;
}
.field-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 3px var(--accent-glow);
  transition: transform var(--dur) var(--ease);
}
.field-range::-webkit-slider-thumb:hover { transform: scale(1.22); }
.field-range::-moz-range-thumb {
  width: 17px; height: 17px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg);
}

.swatches-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.swatch {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--dur) var(--spring), box-shadow var(--dur) var(--ease);
}
.swatch[data-accent="#d4b06a"] { background: #d4b06a; }
.swatch[data-accent="#8fb5ff"] { background: #8fb5ff; }
.swatch[data-accent="#7bf0c2"] { background: #7bf0c2; }
.swatch[data-accent="#ff7a90"] { background: #ff7a90; }
.swatch[data-accent="#b08cff"] { background: #b08cff; }
.swatch[data-accent="#ffb86b"] { background: #ffb86b; }
.swatch[data-accent="#9ae6ff"] { background: #9ae6ff; }
.swatch[data-accent="#a6ff8f"] { background: #a6ff8f; }
.swatch[data-accent="#f472b6"] { background: #f472b6; }
.swatch[data-accent="#ffffff"] { background: #ffffff; }
.swatch:hover { transform: scale(1.24); }
.swatch.active {
  border-color: rgba(255,255,255,0.80);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.18);
}

.prefs-preview {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  position: sticky;
  top: calc(var(--nav-h) + 16px);
}
.preview-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
#codeBox {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  white-space: pre-wrap;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 14px;
  line-height: 1.7;
  min-height: 130px;
}

/* ── AI Q&A ──────────────────────────────────────────────────────── */
.qa { display: flex; flex-direction: column; gap: 14px; max-width: 680px; }
.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.field-control-lg {
  width: 100%;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  color: var(--text);
  padding: 16px 18px;
  font-size: 14px;
  line-height: 1.65;
  resize: vertical;
  min-height: 110px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field-control-lg::placeholder { color: var(--text-3); }
.field-control-lg:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.qa-actions { display: flex; gap: 10px; }
.qa-status { font-size: 13px; color: var(--text-3); min-height: 20px; }
.qa-answer {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-2);
  white-space: pre-wrap;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  line-height: 1.7;
  display: none;
}
.qa-answer:not(:empty) { display: block; }
.qa-warn { font-size: 12px; color: var(--text-3); line-height: 1.5; }

/* ── Footer ──────────────────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.footer::before {
  content: '';
  position: absolute;
  top: -1px; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    color-mix(in srgb, var(--accent) 45%, transparent) 30%,
    color-mix(in srgb, var(--accent) 45%, transparent) 70%,
    transparent
  );
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-3);
}
.footer-dot {
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 3s ease-in-out infinite;
}
.footer-right { display: flex; align-items: center; gap: 20px; }
.footer-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-3);
  text-decoration: none;
  transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
  cursor: pointer;
}
.footer-link:hover { color: var(--text); transform: translateY(-1px); }
.footer-link svg { flex-shrink: 0; }

/* ── Reveal animations ───────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-scale {
  opacity: 0;
  transform: scale(0.96) translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal-scale.visible { opacity: 1; transform: scale(1) translateY(0); }

.delay-1 { transition-delay: 80ms; }
.delay-2 { transition-delay: 160ms; }
.delay-3 { transition-delay: 240ms; }
.delay-4 { transition-delay: 320ms; }
.delay-5 { transition-delay: 400ms; }
.delay-6 { transition-delay: 480ms; }

/* Magnetic (JS-handled) */
.magnetic { transition: transform var(--dur-lg) var(--ease); }

/* ── Reduced motion ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-scale { opacity: 1; transform: none; transition: none; }
  .blob, .bg-grain { animation: none; }
  .pill-dot, .profile-status-dot, .currently-badge-dot,
  .footer-dot, .currently-icon-wrap { animation: none; }
  .btn-primary::before { display: none; }
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .nav { display: none; }
  .hero-inner.hero-split { grid-template-columns: 1fr; gap: 44px; margin-bottom: 48px; }
  .hero-side { justify-content: flex-start; }
  .profile-card { max-width: 480px; }
  .stats-band { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(3) { border-top: 1px solid var(--border); }
  .stat:nth-child(4) { border-right: none; border-top: 1px solid var(--border); }
}

@media (max-width: 768px) {
  :root { --sec-py: 56px; --pad-x: 16px; --nav-h: 60px; }
  .hero { padding: 36px 0 52px; }
  .hero-h1 { font-size: clamp(54px, 17vw, 80px); }
  .prefs { grid-template-columns: 1fr; }
  .prefs-preview { position: static; }
  .currently-inner { flex-direction: column; gap: 14px; }
  .brand-text { display: none; }
  .topbar-resume { display: none; }
  .stats-band { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: flex-start; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .stat { padding: 24px 16px 20px; }
}
