/* ==========================================================================
   MAIN.CSS — finnjones.me
   "Liquid Glass — Warm Aurora"
   Translucent glass surfaces floating over a slow, warm aurora backdrop.
   System typography (SF Pro on Apple platforms). Light theme only —
   fixed cream palette, independent of the OS colour-scheme preference.
   ========================================================================== */

/* ---------------------------------------------------------------- tokens */

:root {
  /* — base surface & ink (warm cream, light — the only theme) ————————— */
  --bg: #f6f1ea;
  --text-primary: #1c1713;
  --text-secondary: #5b544c;
  --text-tertiary: #71685c; /* muted, still ≥4.5:1 on cream */

  /* — warm accent ————————————————————————————————————————————————————
     --accent is the vivid terracotta for fills, dots, glows and focus;
     --accent-text is the deepened tone reserved for accent as small text,
     where fill brightness would fail contrast. */
  --accent: #d2683a;
  --accent-text: #b04f28; /* ≥4.5:1 on cream — accent as label/link text */
  --accent-strong: #a84a24; /* accent-text hover — deeper still */
  --accent-dim: rgba(210, 104, 58, 0.12);

  /* — glass material ——————————————————————————————————————————————— */
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-bg-hover: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.75);
  --glass-rim: rgba(255, 255, 255, 0.95); /* specular leading (top) edge */
  --glass-edge-lo: rgba(90, 55, 30, 0.1); /* refracted trailing (bottom) edge */
  --glass-blur: 22px;
  /* vibrancy — how the material lifts colour + light passing through it */
  --glass-vibrancy: saturate(150%) brightness(1.02);

  /* — elevation (soft ambient float) ——————————————————————————————— */
  --elevate: 0 10px 40px rgba(90, 55, 30, 0.12),
    0 2px 8px rgba(90, 55, 30, 0.08);
  --elevate-hover: 0 20px 60px rgba(90, 55, 30, 0.18),
    0 4px 14px rgba(90, 55, 30, 0.1);

  /* — atmosphere ——————————————————————————————————————————————————— */
  --veil: rgba(255, 250, 244, 0.28); /* soft edge wash for legibility */
  --aurora-1: rgba(245, 166, 35, 0.34); /* amber  */
  --aurora-2: rgba(255, 122, 89, 0.3); /* coral  */
  --aurora-3: rgba(224, 78, 138, 0.24); /* magenta */
  --aurora-4: rgba(255, 184, 96, 0.28); /* gold   */

  /* — type (full system stack) ————————————————————————————————————— */
  --font-sans: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI",
    Roboto, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;

  /* — space (4px rhythm) ——————————————————————————————————————————— */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --section-y: clamp(5rem, 11vw, 8.5rem);

  /* — measure ————————————————————————————————————————————————————— */
  --container: 1120px;
  --container-narrow: 720px;

  /* — radius (continuous, glass-appropriate) ——————————————————————— */
  --radius-md: 16px;
  --radius-card: 24px;
  --radius-panel: 28px;
  --radius-pill: 999px;

  /* — motion ——————————————————————————————————————————————————————— */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.16, 1, 0.3, 1); /* expo-out — lively, no overshoot */
  --dur-fast: 200ms;
  --dur: 380ms;
  --dur-slow: 620ms;

  color-scheme: light;
}

/* ------------------------------------------------------------------ base */

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

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

body {
  position: relative;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* — the refractive backdrop: a slow, warm aurora ———————————————————— */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(38% 40% at 18% 22%, var(--aurora-1), transparent 60%),
    radial-gradient(42% 44% at 82% 18%, var(--aurora-2), transparent 62%),
    radial-gradient(48% 50% at 72% 84%, var(--aurora-3), transparent 60%),
    radial-gradient(40% 42% at 24% 80%, var(--aurora-4), transparent 60%);
  background-size: 165% 165%;
  background-position: 0% 0%;
  filter: saturate(118%);
  transform: scale(1);
  will-change: background-position, transform, filter;
  animation:
    auroraDrift 40s ease-in-out infinite alternate,
    auroraBreathe 14s ease-in-out infinite;
  pointer-events: none;
}

/* edge veil keeps text legible where the aurora is brightest */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(130% 120% at 50% 0%, transparent 42%, var(--veil));
  pointer-events: none;
}

@keyframes auroraDrift {
  0% {
    background-position: 0% 0%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 50% 100%;
  }
}

/* a slow inhale/exhale: the aurora swells and softly brightens, then settles */
@keyframes auroraBreathe {
  0%,
  100% {
    transform: scale(1);
    filter: saturate(118%) brightness(1);
  }
  50% {
    transform: scale(1.06);
    filter: saturate(126%) brightness(1.06);
  }
}

h1,
h2,
h3 {
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

a:hover {
  color: var(--accent-text);
}

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

::selection {
  background: var(--accent-dim);
  color: var(--text-primary);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-8);
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-8);
}

/* mono utility — section labels, dates, indices */
.mono-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-feature-settings: "tnum" 1;
  color: var(--text-tertiary);
}

.accent {
  color: var(--accent-text);
}

/* — shared glass surface ————————————————————————————————————————————— */
.glass,
.navbar-inner,
.btn,
.project-row,
.currently-panel,
.social-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) var(--glass-vibrancy);
  -webkit-backdrop-filter: blur(var(--glass-blur)) var(--glass-vibrancy);
  border: 1px solid var(--glass-border);
  /* glass thickness: a bright specular leading edge, a refracted trailing
     edge, and soft ambient elevation — the light bending through the pane */
  box-shadow: inset 0 1px 0 var(--glass-rim),
    inset 0 -1px 1px var(--glass-edge-lo), var(--elevate);
}

/* solid-backdrop fallback where backdrop-filter is unsupported */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .navbar-inner,
  .btn,
  .project-row,
  .currently-panel,
  .social-card {
    background: color-mix(in srgb, var(--bg) 82%, transparent);
  }
}

/* --------------------------------------------------------------- navbar */

.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: var(--space-3);
}

/* floating glass bar */
.navbar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: box-shadow var(--dur) var(--ease-out),
    background var(--dur) var(--ease-out),
    backdrop-filter var(--dur) var(--ease-out);
}

/* thicken the glass once content is scrolling behind it */
.navbar.scrolled .navbar-inner {
  background: var(--glass-bg-hover);
  backdrop-filter: blur(30px) var(--glass-vibrancy);
  -webkit-backdrop-filter: blur(30px) var(--glass-vibrancy);
  box-shadow: inset 0 1px 0 var(--glass-rim),
    inset 0 -1px 1px var(--glass-edge-lo), var(--elevate-hover);
}

.nav-brand {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.nav-brand:hover {
  color: var(--accent-text);
}

.nav-links {
  display: flex;
  gap: var(--space-6);
}

.nav-link {
  position: relative;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-dim);
}

/* ------------------------------------------------------------------ hero */

.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 9rem var(--space-8) var(--space-24);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
  margin-bottom: var(--space-6);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) var(--glass-vibrancy);
  -webkit-backdrop-filter: blur(var(--glass-blur)) var(--glass-vibrancy);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-rim),
    inset 0 -1px 1px var(--glass-edge-lo);
  color: var(--text-secondary);
}

.hero-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.hero-name {
  font-size: clamp(3.25rem, 9.5vw, 7rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  margin-bottom: var(--space-6);
}

.hero-sub {
  max-width: 34rem;
  font-size: 1.1875rem;
  line-height: 1.55;
  margin-bottom: var(--space-10);
}

.hero-ctas {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ------------------------------------------------------------------- btn */

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text-primary);
  transition: background var(--dur) var(--ease-out),
    transform var(--dur) var(--spring), box-shadow var(--dur) var(--ease-out),
    scale 160ms var(--ease-out), color var(--dur) var(--ease-out);
}

.btn:hover {
  background: var(--glass-bg-hover);
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 var(--glass-rim),
    inset 0 -1px 1px var(--glass-edge-lo), var(--elevate-hover);
}

/* droplet compression on press — `scale` composes with the JS magnet transform */
.btn:active {
  transform: translateY(0);
  scale: 0.965;
}

/* primary — warm tinted glass that glows */
.btn-solid {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--accent) 30%, transparent),
    color-mix(in srgb, var(--accent) 18%, transparent)
  );
  border-color: color-mix(in srgb, var(--accent) 45%, var(--glass-border));
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 var(--glass-rim),
    0 8px 28px var(--accent-dim), var(--elevate);
}

.btn-solid:hover {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--accent) 42%, transparent),
    color-mix(in srgb, var(--accent) 26%, transparent)
  );
  box-shadow: inset 0 1px 0 var(--glass-rim),
    0 12px 36px var(--accent-dim), var(--elevate-hover);
}

/* -------------------------------------------------------------- sections */

.section {
  padding: var(--section-y) 0;
}

.section + .section {
  padding-top: 0;
}

.section-head {
  max-width: var(--container);
  margin: 0 auto var(--space-12);
  padding: 0 var(--space-8);
}

.section-index {
  display: block;
  margin-bottom: var(--space-4);
  color: var(--accent-text);
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

/* --------------------------------------------------------- project rows */

.projects {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-8);
  display: grid;
  gap: var(--space-5);
}

.project-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 470px);
  gap: var(--space-12);
  align-items: center;
  border-radius: var(--radius-card);
  padding: var(--space-10) var(--space-12);
  transition: transform var(--dur) var(--ease-out),
    background var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}

.project-row:hover {
  background: var(--glass-bg-hover);
  transform: translateY(-4px);
  box-shadow: inset 0 1px 0 var(--glass-rim),
    inset 0 -1px 1px var(--glass-edge-lo), var(--elevate-hover);
  color: inherit;
}

.project-index {
  display: block;
  margin-bottom: var(--space-5);
  color: var(--accent-text);
}

.project-title {
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-3);
}

.project-desc {
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
  max-width: 26rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.75rem;
  white-space: nowrap;
}

.project-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: color var(--dur) var(--ease-out);
}

.project-cta::after {
  content: "→";
  transition: transform var(--dur) var(--spring);
}

.project-row:hover .project-cta {
  color: var(--accent-text);
}

.project-row:hover .project-cta::after {
  transform: translateX(4px);
}

.project-media {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 1px 0 var(--glass-rim);
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}

.project-row:hover .project-media img {
  transform: scale(1.04);
}

/* ------------------------------------------------------- currently strip */

.currently {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-8);
}

.currently-panel {
  border-radius: var(--radius-panel);
  padding: var(--space-10) var(--space-12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  flex-wrap: wrap;
}

.currently-text {
  color: var(--text-primary);
  font-weight: 500;
  margin-top: var(--space-3);
}

.currently-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--accent-text);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-out);
}

.currently-link:hover {
  color: var(--accent-strong);
}

/* -------------------------------------------------------------- page hero */

.page-hero {
  padding: 11rem 0 var(--space-16);
  position: relative;
  overflow: hidden;
}

.page-hero-title {
  position: relative;
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}

/* ------------------------------------------------------------- about page */

.about-intro {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: var(--space-16);
  align-items: start;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-8);
}

.about-portrait {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 1px 0 var(--glass-rim), var(--elevate);
}

.about-portrait img {
  width: 100%;
  filter: saturate(1.02) contrast(1.02);
}

.about-para {
  margin-bottom: var(--space-5);
  max-width: 38rem;
}

.about-para:first-of-type {
  margin-top: var(--space-4);
}

.about-para:last-child {
  margin-bottom: 0;
}

/* -------------------------------------------------------------- timeline */

.timeline {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-8);
  position: relative;
}

.timeline-item {
  position: relative;
  padding: 0 0 var(--space-12) var(--space-10);
  border-left: 1px solid var(--glass-border);
}

.timeline-item:last-child {
  padding-bottom: var(--space-2);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 0.4rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim), 0 0 12px var(--accent);
}

.timeline-date {
  display: block;
  margin-bottom: var(--space-3);
}

.timeline-role {
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.4;
  color: var(--text-primary);
}

.timeline-company {
  color: var(--text-tertiary);
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: var(--space-4);
}

.timeline-highlights {
  list-style: none;
}

.timeline-highlights li {
  position: relative;
  padding-left: var(--space-5);
  margin-bottom: var(--space-2);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.timeline-highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 0.5rem;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

/* ------------------------------------------------------------ contact page */

.contact-panel {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-8);
}

.contact-statement {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: var(--space-6) 0 var(--space-10);
  max-width: 22ch;
}

.email-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: clamp(1.125rem, 3vw, 1.625rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--accent-text);
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-16);
  background-image: linear-gradient(var(--accent-text), var(--accent-text));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  transition: color var(--dur) var(--ease-out),
    background-size var(--dur) var(--ease-out);
}

.email-link:hover {
  color: var(--accent-strong);
  background-size: 0% 1px;
}

.social-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.social-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) var(--space-8);
  border-radius: var(--radius-md);
  transition: transform var(--dur) var(--ease-out),
    background var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}

.social-card:hover {
  background: var(--glass-bg-hover);
  transform: translateY(-3px);
  box-shadow: inset 0 1px 0 var(--glass-rim),
    inset 0 -1px 1px var(--glass-edge-lo), var(--elevate-hover);
}

.social-card .mono-label {
  color: var(--text-primary);
}

.social-card-arrow {
  color: var(--text-tertiary);
  transition: color var(--dur) var(--ease-out),
    transform var(--dur) var(--spring);
}

.social-card:hover .social-card-arrow {
  color: var(--accent-text);
  transform: translateX(4px);
}

/* ---------------------------------------------------------------- footer */

.footer {
  border-top: 1px solid var(--glass-border);
  margin-top: var(--section-y);
  padding: var(--space-12) 0 var(--space-16);
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.footer-brand {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.footer-links {
  display: flex;
  gap: var(--space-6);
}

.footer-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--text-tertiary);
  width: 100%;
  margin-top: var(--space-4);
}

/* --------------------------------------------------- dynamic-load states */

[data-slot] {
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease-out);
}

body.profile-loaded [data-slot] {
  opacity: 1;
}

[data-slot="projects"],
[data-slot="experience"] {
  min-height: 8rem;
}

.load-fallback {
  color: var(--text-tertiary);
}

.load-fallback a {
  color: var(--accent-text);
}

/* ---------------------------------------------------------------- motion */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.anim-fade-up {
  animation: fadeUp var(--dur-slow) var(--ease-out) both;
}

.anim-delay-1 {
  animation-delay: 0.08s;
}

.anim-delay-2 {
  animation-delay: 0.16s;
}

.anim-delay-3 {
  animation-delay: 0.24s;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  body::before {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ------------------------------------------------- cursor reactivity (FX) */
/* All motion is damped in JS (an inertial lerp loop). CSS consumes the
   already-smoothed variables, so tracked transforms carry NO transition —
   a transition on top of per-frame updates is what causes rubber-banding. */

/* a soft warm light that trails the pointer, lighting the aurora behind glass */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 760px;
  height: 760px;
  margin: -380px 0 0 -380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(210, 104, 58, 0.1), transparent 66%);
  transform: translate3d(var(--cursor-x, -50vw), var(--cursor-y, -50vh), 0);
  pointer-events: none;
  z-index: -1;
  mix-blend-mode: multiply;
  will-change: transform;
}

/* aurora parallaxes gently opposite the pointer (var is pre-smoothed) */
body.cursor-fx::before {
  translate: calc((var(--mx, 0.5) - 0.5) * -12px)
    calc((var(--my, 0.5) - 0.5) * -12px);
}

/* hero depth planes — `translate` so the fade-up `transform` keeps running */
body.cursor-fx .hero-eyebrow {
  translate: calc((var(--mx, 0.5) - 0.5) * 22px)
    calc((var(--my, 0.5) - 0.5) * 13px);
}

body.cursor-fx .hero-name {
  translate: calc((var(--mx, 0.5) - 0.5) * 14px)
    calc((var(--my, 0.5) - 0.5) * 8px);
}

body.cursor-fx .hero-sub {
  translate: calc((var(--mx, 0.5) - 0.5) * 9px)
    calc((var(--my, 0.5) - 0.5) * 5px);
}

/* magnetic controls — transform driven by the JS loop, so no transform
   transition here (keep only the colour/surface transitions) */
body.cursor-fx .btn {
  transition: background var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out), scale 160ms var(--ease-out),
    color var(--dur) var(--ease-out);
  will-change: transform, scale;
}

body.cursor-fx .nav-link {
  display: inline-block;
  transition: color var(--dur-fast) var(--ease-out);
  will-change: transform;
}

/* tilt-reactive glass — likewise transform is JS-driven, not transitioned */
body.cursor-fx .project-row,
body.cursor-fx .social-card,
body.cursor-fx .currently-panel {
  transition: background var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out);
  transform-style: preserve-3d;
  will-change: transform;
}

/* keep content above the moving specular sheen */
.project-row,
.social-card,
.currently-panel {
  position: relative;
}

.project-row > *,
.social-card > *,
.currently-panel > * {
  position: relative;
  z-index: 1;
}

/* soft specular highlight that eases across the glass with the pointer */
.project-row::after,
.social-card::after,
.currently-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at var(--px, 50%) var(--py, 50%),
    rgba(255, 255, 255, 0.09),
    transparent 55%
  );
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
  pointer-events: none;
  mix-blend-mode: screen;
}

body.cursor-fx .project-row:hover::after,
body.cursor-fx .social-card:hover::after,
body.cursor-fx .currently-panel:hover::after {
  opacity: 1;
}

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

/* ------------------------------------------------------------- responsive */

@media (max-width: 991px) {
  .project-row {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    padding: var(--space-8);
  }

  .project-media {
    order: -1;
  }

  .about-intro {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .about-portrait {
    max-width: 360px;
  }
}

@media (max-width: 767px) {
  .page-hero {
    padding: 9rem 0 var(--space-12);
  }

  .hero-inner {
    padding-top: 8rem;
  }

  .social-cards {
    grid-template-columns: 1fr;
  }

  .currently-panel {
    padding: var(--space-8);
  }
}

@media (max-width: 479px) {
  .container,
  .container-narrow,
  .hero-inner,
  .section-head,
  .projects,
  .currently,
  .timeline,
  .contact-panel,
  .footer-inner,
  .about-intro {
    padding-left: var(--space-5);
    padding-right: var(--space-5);
  }

  .nav-links {
    gap: var(--space-4);
  }

  .project-row {
    padding: var(--space-6);
  }

  .timeline-item {
    padding-left: var(--space-8);
  }
}
