/* Dark editorial, neon accents. Accent changes with mood. Body text always passes WCAG AA. */
:root {
  --bg: #07070b;
  --panel: #0e0e16;
  --panel-2: #14141f;
  --ink: #ecebf5;            /* 17:1 on --bg */
  --muted: #a9a7c0;          /* 8.3:1 on --bg */
  --line: #262640;
  --accent: #c6ff3d;         /* acid lime */
  --accent-ink: #07070b;     /* text on accent fills */
  --hot: #ff3d7f;
  --cyan: #3df2ff;
  --radius: 4px;
  --max: 1120px;
  --display: "Archivo Black", "Arial Black", Impact, "Helvetica Neue", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", Consolas, "SFMono-Regular", Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* Mood sets the accent. Each value is legible on --bg and on --accent-ink. */
[data-mood="tired"]   { --accent: #b48cff; }
[data-mood="curious"] { --accent: #c6ff3d; }
[data-mood="focused"] { --accent: #3df2ff; }
[data-mood="joyful"]  { --accent: #ff3d7f; }

/* Registering the accent lets the mood change glide instead of snapping. */
@property --accent { syntax: "<color>"; inherits: true; initial-value: #c6ff3d; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); transition: --accent .8s var(--ease); }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  transition: color .5s var(--ease);
}

/* Faint grid and scanlines give the cyberpunk texture without hurting reading. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: .22;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(255,255,255,.025) 2px 3px);
}

a { color: var(--accent); text-underline-offset: 4px; }

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--accent);
  color: var(--accent-ink);
  padding: .5rem .9rem;
  font-family: var(--mono);
  z-index: 200;
}
.skip-link:focus { top: 1rem; }

.muted { color: var(--muted); }
.small { font-size: .9rem; }
.dim { color: var(--muted); }
.num { color: var(--accent); font-family: var(--mono); }

/* Ticker */
.ticker {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--accent);
  white-space: nowrap;
}
.ticker-track {
  display: inline-block;
  padding: .45rem 0;
  animation: ticker 38s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span { margin-right: 2.5rem; }
.ticker-track span::before { content: "/ "; color: var(--hot); }
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: .9rem 1.25rem;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--display);
  font-size: 1.2rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: .02em;
}
.blink { color: var(--accent); animation: blink 1.1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.site-header nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.site-header nav a {
  color: var(--ink);
  text-decoration: none;
  font-family: var(--mono);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.site-header nav a:hover { color: var(--accent); }

/* Hero */
/* Hero: a night city in fog. The artwork sits behind two overlays so the text stays legible. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  max-width: none;
  margin: 0;
  padding: clamp(3.5rem, 10vw, 7.5rem) max(1.25rem, calc((100% - var(--max)) / 2 + 1.25rem)) clamp(3rem, 7vw, 5rem);
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--hero-art, none) center bottom / cover no-repeat;
  opacity: .85;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(7,7,11,.94) 0%, rgba(7,7,11,.72) 45%, rgba(7,7,11,.3) 100%),
    linear-gradient(to bottom, rgba(7,7,11,0) 55%, var(--bg) 100%);
}
/* Slow diagonal rain, very faint. */
.rain {
  position: absolute;
  inset: -20% -10%;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(104deg, transparent 0 46px, rgba(205, 200, 240, .09) 46px 47px);
  opacity: .5;
  animation: rain 2.4s linear infinite;
}
@keyframes rain {
  from { transform: translate(0, 0); }
  to { transform: translate(-47px, 120px); }
}
.kicker {
  font-family: var(--mono);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  margin: 0 0 1rem;
}
.hero h1 {
  position: relative;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.6rem, 9vw, 7rem);
  line-height: .95;
  letter-spacing: -.02em;
  margin: 0 0 1.5rem;
  text-transform: uppercase;
}
/* Glitch: two offset copies of the name, shown only on hover or focus. */
.glitch { display: inline-block; }
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  opacity: 0;
  pointer-events: none;
}
.glitch::before { color: var(--cyan); clip-path: inset(0 0 60% 0); }
.glitch::after  { color: var(--hot); clip-path: inset(55% 0 0 0); }
.glitch:hover::before, .glitch:focus-visible::before { opacity: .8; transform: translate(-4px, 0); animation: glitch-a .5s steps(3) 1; }
.glitch:hover::after,  .glitch:focus-visible::after  { opacity: .8; transform: translate(4px, 0); animation: glitch-b .5s steps(3) 1; }
@keyframes glitch-a { 0%{clip-path: inset(10% 0 70% 0)} 50%{clip-path: inset(40% 0 30% 0)} 100%{clip-path: inset(0 0 60% 0)} }
@keyframes glitch-b { 0%{clip-path: inset(70% 0 5% 0)} 50%{clip-path: inset(20% 0 55% 0)} 100%{clip-path: inset(55% 0 0 0)} }

.lede {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  line-height: 1.4;
  max-width: 34ch;
  margin: 0 0 2.5rem;
  color: var(--ink);
}

.mood-question { font-family: var(--mono); color: var(--accent); margin: 0 0 .6rem; font-size: .95rem; }
.mood-buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.mood-buttons button {
  font-family: var(--mono);
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .55rem 1rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: transform .2s var(--ease), background-color .25s, color .25s, border-color .25s;
}
.mood-buttons button:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }
.mood-buttons button[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.mood-line {
  margin: .9rem 0 0;
  min-height: 2.6em;
  max-width: 56ch;
  color: var(--muted);
}

/* Sections */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6rem) 1.25rem;
  border-top: 1px solid var(--line);
}
.section-head { max-width: 62ch; margin-bottom: 2.2rem; }
h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -.015em;
  text-transform: uppercase;
  margin: 0 0 .8rem;
}
h3 { font-size: 1.05rem; margin: 0 0 .4rem; }
.sub {
  font-family: var(--mono);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent);
  margin: 2.2rem 0 .8rem;
}

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.6rem; }
.filters button {
  font-family: var(--mono);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .4rem .8rem;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.filters button:hover { color: var(--ink); border-color: var(--ink); }
.filters button[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

/* Portfolio cards */
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
}
.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.3rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
/* Corner brackets: the HUD touch. */
.card::before, .card::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--accent);
  opacity: 0;
  transition: opacity .25s;
}
.card::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.card::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 14px 36px -20px var(--accent);
}
.card:hover::before, .card:hover::after { opacity: 1; }
.card .idx { font-family: var(--mono); font-size: .75rem; color: var(--muted); }
.card h3 { font-family: var(--display); font-weight: 400; font-size: 1.2rem; line-height: 1.15; text-transform: uppercase; letter-spacing: -.01em; }
.card p { margin: 0; }
.card .why { color: var(--muted); font-family: var(--serif); font-style: italic; font-size: .98rem; }
.card .meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: auto; padding-top: .6rem; }
.status {
  font-family: var(--mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .2rem .5rem;
  border: 1px solid var(--accent);
  color: var(--accent);
}
.tag { font-family: var(--mono); font-size: .75rem; color: var(--muted); }

/* Blog */
.posts { border-top: 1px solid var(--line); }
.post { border-bottom: 1px solid var(--line); }
.post summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 7rem 1fr auto;
  gap: 1rem;
  align-items: baseline;
  padding: 1.2rem .2rem;
}
.post summary::-webkit-details-marker { display: none; }
.post summary:hover h3 { color: var(--accent); }
.post summary:focus-visible { outline-offset: -2px; }
.post .date { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.post h3 { font-family: var(--serif); font-size: clamp(1.25rem, 2.6vw, 1.7rem); line-height: 1.2; margin: 0 0 .3rem; font-weight: 600; }
.post .excerpt { margin: 0; color: var(--muted); font-size: .98rem; }
.post .toggle { font-family: var(--mono); font-size: .8rem; color: var(--accent); white-space: nowrap; }
.post[open] .toggle::after { content: " −"; }
.post:not([open]) .toggle::after { content: " +"; }
.post .body { padding: 0 0 1.6rem 8rem; max-width: 70ch; }
.post .body p { margin: 0 0 .9rem; }
.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--hot);
  border: 1px solid var(--hot);
  padding: .1rem .4rem;
  margin-left: .5rem;
  vertical-align: middle;
}

/* About */
.about {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
}
.about-main h2 { margin-bottom: 1rem; }
.lede-small { font-family: var(--serif); font-size: 1.2rem; line-height: 1.5; max-width: 52ch; margin: 0; }
.principles { padding: 0 0 0 1.2rem; margin: 0; display: grid; gap: .8rem; }
.principles li::marker { color: var(--accent); font-family: var(--mono); }
.principles strong { display: block; }
.principles span { color: var(--muted); }
/* Portrait: cyan/magenta duotone, scanlines and corner brackets. */
.portrait { margin: 0 0 1.6rem; }
.portrait-frame {
  position: relative;
  width: min(220px, 100%);
  aspect-ratio: 1;
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
}
.portrait-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.25) brightness(.95);
  mix-blend-mode: luminosity;
}
.portrait-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg, var(--cyan), var(--hot));
  mix-blend-mode: color;
  opacity: .75;
}
.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 3px, rgba(0,0,0,.28) 3px 4px);
}
.portrait-frame i { position: absolute; width: 16px; height: 16px; border: 2px solid var(--accent); z-index: 3; }
.portrait-frame i.tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.portrait-frame i.br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.portrait-cap {
  margin: .6rem 0 0;
  font-family: var(--mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
}
.portrait:hover .portrait-frame img { animation: glitch-img .4s steps(3) 1; }
@keyframes glitch-img {
  0% { transform: translateX(0); }
  33% { transform: translateX(-3px); }
  66% { transform: translateX(3px); }
  100% { transform: translateX(0); }
}

.facts { margin: 0; display: grid; gap: 1rem; }
.facts div { border-left: 2px solid var(--accent); padding: .2rem 0 .2rem 1rem; background: var(--panel); }
.facts dt { font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); }
.facts dd { margin: 0; }
.currently ul { padding-left: 1.2rem; margin: 0; }
.currently li { margin: .35rem 0; }
@media (min-width: 880px) {
  .about { grid-template-columns: 1.25fr .75fr; align-items: start; }
}

/* Contact */
.contact h2 { max-width: 20ch; }
.button {
  display: inline-block;
  margin-top: .6rem;
  padding: .85rem 1.5rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  text-decoration: none;
  border-radius: var(--radius);
  transition: transform .2s var(--ease), box-shadow .25s;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }

/* Footer */
.social { list-style: none; display: flex; flex-wrap: wrap; gap: 1.2rem; padding: 0; margin: 1.6rem 0 0; }
.social:empty { display: none; }
.social a { font-family: var(--mono); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink); }
.social a:hover { color: var(--accent); }

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
  border-top: 1px solid var(--line);
}
.thanks { font-family: var(--serif); font-size: 1.3rem; min-height: 1.6em; color: var(--accent); margin: 0 0 .4rem; }

/* Reveal on scroll. Visible by default if JS is off or motion is reduced. */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(3px);
  transition:
    opacity .9s var(--ease) var(--d, 0ms),
    transform .9s var(--ease) var(--d, 0ms),
    filter .9s var(--ease) var(--d, 0ms);
}
.js .reveal.in { opacity: 1; transform: none; filter: none; }

/* Scroll progress: a thin neon line across the top of the page. */
.scroll-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 120;
  background: linear-gradient(90deg, var(--cyan), var(--accent), var(--hot));
  box-shadow: 0 0 12px var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* Section entry: a neon hairline draws across each section top, and headings unmask. */
.section { position: relative; }
.section::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--cyan) 60%, transparent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 1.4s var(--ease);
}
.section.seen::before { transform: scaleX(1); }
.js .reveal h2 { clip-path: inset(0 0 100% 0); transition: clip-path 1s var(--ease) .15s; }
.js .reveal.in h2 { clip-path: inset(-10% -5% -25% -5%); }

/* Hero: artwork drifts slower than the page, and the text rises in order. */
.hero::before { inset: -18% 0 0 0; transform: translate3d(0, var(--parallax, 0px), 0); will-change: transform; }
.hero > :nth-child(n+2) { animation: rise .9s var(--ease) both; }
.hero h1 { animation: rise 1s var(--ease) .1s both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.role {
  font-family: var(--mono);
  font-size: .95rem;
  color: var(--accent);
  letter-spacing: .02em;
  margin: 0 0 1rem;
}

/* Stats: counted up on scroll, in a hairline grid. */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  max-width: 760px;
  margin: 0 0 2.5rem;
}
.stat { background: color-mix(in srgb, var(--bg) 84%, transparent); padding: .9rem 1rem 1rem; margin: 0; backdrop-filter: blur(4px); }
.stat-n {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.stat-l {
  margin: .45rem 0 0;
  font-family: var(--mono);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  line-height: 1.4;
}

/* Experience timeline: the rail draws as you scroll (--draw is set from script.js). */
.timeline { position: relative; padding-left: 2rem; }
.rail { position: absolute; left: .45rem; top: .6rem; bottom: 0; width: 2px; background: var(--line); }
.rail i {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--accent), var(--cyan));
  transform-origin: top;
  transform: scaleY(var(--draw, 0));
  box-shadow: 0 0 10px var(--accent);
}
.xp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.6rem; }
.xp { position: relative; }
.xp::before {
  content: "";
  position: absolute;
  left: -1.86rem;
  top: .4rem;
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent);
  background: var(--bg);
  border-radius: 50%;
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.xp:hover::before { background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.xp-head {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1rem;
  font-family: var(--mono);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
}
.xp-place { color: var(--muted); }
.xp-company {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  line-height: 1.1;
  text-transform: uppercase;
  margin: .4rem 0 .15rem;
}
.xp-role { margin: 0 0 .8rem; font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 1.05rem; }
.xp-points { margin: 0 0 1rem; padding-left: 1.1rem; max-width: 72ch; }
.xp-points li { margin-bottom: .35rem; }
.xp-points li::marker { color: var(--accent); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0; }
.chip {
  font-family: var(--mono);
  font-size: .72rem;
  padding: .2rem .55rem;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: var(--radius);
  transition: border-color .25s, color .25s, transform .25s var(--ease);
}
.chip:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* Filter change: cards fade out, then the new set fades in. */
.grid { transition: opacity .18s var(--ease), transform .18s var(--ease); }
.grid.swap-out { opacity: 0; transform: translateY(6px); }

.posts-empty {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0;
  padding: 1.2rem 0;
  border-top: 1px solid var(--line);
}
.post[open] .body { animation: unfold .5s var(--ease); }
@keyframes unfold {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .post summary { grid-template-columns: 1fr auto; }
  .post summary .date { grid-column: 1 / -1; order: -1; }
  .post .body { padding-left: 0; }
  .site-header { flex-direction: column; gap: .6rem; }
  .site-header nav { gap: .5rem .9rem; justify-content: center; }
  .stats { grid-template-columns: 1fr 1fr; max-width: 100%; }
  .stat-n { font-size: 1.9rem; }
  .timeline { padding-left: 1.3rem; }
  .rail { left: .25rem; }
  .xp::before { left: -1.4rem; }
  .xp-points { padding-left: .9rem; }
  .mood-buttons button { padding: .5rem .75rem; }
  h2 { font-size: clamp(1.7rem, 8vw, 2.4rem); }
  .hero h1 { font-size: clamp(2.3rem, 13vw, 3.4rem); }
  .section, .site-footer { padding-left: 1rem; padding-right: 1rem; }
}
/* Keep every grid column inside the viewport on narrow screens. */
.grid > *, .xp-list > *, .timeline > * { min-width: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: .01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; filter: none; }
  .card:hover, .mood-buttons button:hover, .button:hover, .chip:hover { transform: none; }
  .glitch:hover::before, .glitch:hover::after { opacity: 0; }
  .rain { display: none; }
  .hero::before { transform: none; }
  .rail i { transform: scaleY(1); }
  html { transition: none; }
}
