/* Trần Nhật Anh (Violet Tran) — portfolio
   Palette: light = cool off-white paper, deep cyan + violet accents (default);
            dark  = deep navy base, Go-cyan + violet accents.
   Type: Space Grotesk (display), Inter (body), JetBrains Mono (code). */

/* Light is the default even without JS or a stored choice. Accents are
   darkened versions of the dark-theme hues so text stays above WCAG AA. */
:root,
[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f6fa;
  --glass: rgba(255, 255, 255, 0.62);
  --glass-hi: rgba(15, 23, 42, 0.05);
  --line: rgba(15, 23, 42, 0.1);
  --line-hi: rgba(15, 23, 42, 0.22);
  --text: #0f1729;
  --text-dim: #4b5568;
  --chip-muted: #334155;
  --code: #1e293b;
  --cyan: #0b7193;
  --cyan-soft: rgba(11, 113, 147, 0.08);
  --cyan-line: rgba(11, 113, 147, 0.25);
  --cyan-glow: rgba(11, 113, 147, 0.28);
  --violet: #6a46d9;
  --violet-soft: rgba(106, 70, 217, 0.08);
  --hl-a: linear-gradient(105deg, #0b7193 10%, #2f63d8 95%);
  --hl-b: linear-gradient(105deg, #6a46d9 5%, #b0249f 95%);
  --on-accent: #ffffff;
  --btn-bg: linear-gradient(120deg, #0b7193, #4f46e5);
  --btn-shadow: 0 8px 22px rgba(49, 84, 196, 0.22);
  --btn-shadow-hi: 0 12px 30px rgba(49, 84, 196, 0.32);
  --mark-shadow: 0 4px 16px rgba(79, 70, 229, 0.25);
  --bar-bg: rgba(245, 246, 250, 0.6);
  --bar-solid: rgba(245, 246, 250, 0.86);
  --menu-bg: rgba(255, 255, 255, 0.98);
  --menu-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  --panel-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
  --shell-top: rgba(15, 23, 42, 0.035);
  --spot: rgba(79, 70, 229, 0.06);
  --swatch-glow: 0.25;
  --sel: rgba(106, 70, 217, 0.2);
  --sel-text: inherit;
  --aura-a: rgba(14, 165, 233, 0.12);
  --aura-b: rgba(139, 92, 246, 0.12);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.12 0 0 0 0 0.25 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --grain-opacity: 0.45;
  --glow-bg: radial-gradient(circle, rgba(106, 70, 217, 0.07) 0%, rgba(14, 165, 233, 0.05) 38%, transparent 70%);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070b16;
  --glass: rgba(150, 165, 200, 0.055);
  --glass-hi: rgba(150, 165, 200, 0.1);
  --line: rgba(150, 165, 200, 0.15);
  --line-hi: rgba(150, 165, 200, 0.32);
  --text: #eef2f8;
  --text-dim: #98a3b8;
  --chip-muted: #c3cbdb;
  --code: #c9d3e6;
  --cyan: #29c4e8;
  --cyan-soft: rgba(41, 196, 232, 0.13);
  --cyan-line: rgba(41, 196, 232, 0.25);
  --cyan-glow: rgba(41, 196, 232, 0.55);
  --violet: #a78bfa;
  --violet-soft: rgba(167, 139, 250, 0.14);
  --hl-a: linear-gradient(105deg, #29c4e8 10%, #a5f0ff 95%);
  --hl-b: linear-gradient(105deg, #a78bfa 5%, #f0abfc 95%);
  --on-accent: #04121a;
  --btn-bg: linear-gradient(120deg, #29c4e8, #7dd3fc);
  --btn-shadow: 0 8px 26px rgba(41, 196, 232, 0.3);
  --btn-shadow-hi: 0 12px 34px rgba(41, 196, 232, 0.45);
  --mark-shadow: 0 0 22px rgba(120, 160, 250, 0.35);
  --bar-bg: rgba(7, 11, 22, 0.5);
  --bar-solid: rgba(7, 11, 22, 0.85);
  --menu-bg: rgba(7, 11, 22, 0.97);
  --menu-shadow: none;
  --panel-shadow: none;
  --shell-top: rgba(3, 6, 16, 0.5);
  --spot: rgba(150, 170, 220, 0.09);
  --swatch-glow: 0.6;
  --sel: rgba(167, 139, 250, 0.4);
  --sel-text: #fff;
  --aura-a: rgba(41, 196, 232, 0.1);
  --aura-b: rgba(167, 139, 250, 0.1);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --grain-opacity: 0.6;
  --glow-bg: radial-gradient(circle, rgba(167, 139, 250, 0.085) 0%, rgba(41, 196, 232, 0.045) 38%, transparent 70%);
}

:root {
  --r: 18px;
  --r-sm: 11px;
  --f-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --out: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(16px, 5vw, 56px);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }
ul, ol { list-style: none; }
strong { color: var(--text); font-weight: 600; }
::selection { background: var(--sel); color: var(--sel-text); }

.ico { width: 18px; height: 18px; flex: none; }

/* ---------- fixed background layers ---------- */

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  display: block;
  /* Shown as-is when WebGL is unavailable or motion is reduced. */
  background:
    radial-gradient(1100px 650px at 80% -5%, var(--aura-a), transparent 60%),
    radial-gradient(900px 600px at 0% 100%, var(--aura-b), transparent 60%),
    var(--bg);
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: -2;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: var(--grain);
}

.glow {
  position: fixed;
  left: 0;
  top: 0;
  width: 560px;
  height: 560px;
  margin: -280px 0 0 -280px;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
  background: var(--glow-bg);
  transform: translate3d(50vw, 35vh, 0);
  opacity: 0;
  transition: opacity 0.5s;
}
.glow.on { opacity: 1; }

/* ---------- accessibility ---------- */

.skip {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--cyan);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s;
}
.skip:focus { transform: none; }

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

/* ---------- top bar ---------- */

.bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px var(--gutter);
  background: var(--bar-bg);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}
.bar.solid {
  background: var(--bar-solid);
  border-bottom-color: var(--line);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-right: auto;
  text-decoration: none;
  font-family: var(--f-display);
  font-weight: 700;
}
.logo-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--on-accent);
  background: linear-gradient(140deg, var(--cyan), var(--violet));
  box-shadow: var(--mark-shadow);
}
.logo-text { font-size: 16px; }

.menu { display: flex; gap: 4px; }
.menu a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}
.menu a:hover,
.menu a.here { color: var(--text); background: var(--glass-hi); }

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--glass);
  cursor: pointer;
}
.burger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.3s var(--out), opacity 0.2s;
}

/* Hidden without JS: the button can't do anything then. */
.theme-btn {
  display: none;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--glass);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.js .theme-btn { display: grid; }
.theme-btn:hover { border-color: var(--line-hi); background: var(--glass-hi); color: var(--violet); }
.theme-btn .ico { width: 19px; height: 19px; }
/* Show the theme a click switches to. */
.theme-btn .i-sun,
[data-theme="dark"] .theme-btn .i-moon { display: none; }
[data-theme="dark"] .theme-btn .i-sun { display: block; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s var(--out), box-shadow 0.25s, background 0.25s, border-color 0.25s;
}
.btn-sm { padding: 8px 15px; font-size: 13.5px; }
.btn-sm .ico { width: 16px; height: 16px; }

.btn-solid {
  color: var(--on-accent);
  background: var(--btn-bg);
  box-shadow: var(--btn-shadow);
}
.btn-solid:hover { transform: translateY(-2px); box-shadow: var(--btn-shadow-hi); }

.btn-line {
  color: var(--text);
  background: var(--glass);
  border-color: var(--line);
}
.btn-line:hover { transform: translateY(-2px); background: var(--glass-hi); border-color: var(--line-hi); }

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

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Capped so very tall windows don't strand the content in empty space. */
  min-height: max(640px, min(100svh, 1000px));
  padding: 128px var(--gutter) 88px;
  text-align: center;
}
.hero-wrap { max-width: 1000px; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(8px);
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 500;
}
.beacon {
  position: relative;
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: #34d399;
}
.beacon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #34d399;
  animation: ping 2s var(--out) infinite;
}
@keyframes ping {
  0% { transform: scale(1); opacity: 0.7; }
  80%, 100% { transform: scale(3); opacity: 0; }
}

.hero-h {
  margin-bottom: 24px;
  font-family: var(--f-display);
  font-size: clamp(34px, 6.2vw, 70px);
  font-weight: 700;
  line-height: 1.07;
  letter-spacing: -0.025em;
}
.hl, .hl-alt {
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hl { background-image: var(--hl-a); }
.hl-alt { background-image: var(--hl-b); }

.hero-lede {
  max-width: 700px;
  margin: 0 auto 36px;
  color: var(--text-dim);
  font-size: clamp(16px, 2vw, 19px);
}
.tech-line {
  display: block;
  margin-top: 14px;
  color: var(--cyan);
  font-family: var(--f-mono);
  font-size: 0.8em;
  letter-spacing: 0.01em;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 56px;
}

.figures {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 820px;
  margin: 0 auto;
}
.figure {
  padding: 18px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--glass);
  backdrop-filter: blur(8px);
}
.figure dt {
  font-family: var(--f-display);
  font-size: clamp(24px, 3.2vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.figure dd { margin-top: 4px; color: var(--text-dim); font-size: 13px; line-height: 1.4; }

.down {
  position: absolute;
  left: 50%;
  bottom: 24px;
  color: var(--text-dim);
  animation: drift 2.6s var(--out) infinite;
}
.down .ico { width: 24px; height: 24px; }
@keyframes drift {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.55; }
  50% { transform: translate(-50%, 9px); opacity: 1; }
}

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

.block {
  max-width: 1120px;
  margin: 0 auto;
  padding: 88px var(--gutter);
}
.block-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 40px;
}
.block-idx {
  color: var(--violet);
  font-family: var(--f-mono);
  font-size: 14px;
}
.block-head h2 {
  font-family: var(--f-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--glass);
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.3s, transform 0.35s var(--out);
}
.panel:hover { border-color: var(--line-hi); }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips li {
  padding: 4px 11px;
  border: 1px solid var(--cyan-line);
  border-radius: 999px;
  background: var(--cyan-soft);
  color: var(--cyan);
  font-family: var(--f-mono);
  font-size: 11.5px;
  line-height: 1.6;
}
.chips.muted li {
  border-color: var(--line);
  background: var(--glass-hi);
  color: var(--chip-muted);
}

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

.about {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 22px;
}
.about .panel > p { color: var(--text-dim); }
.about .panel > p + p { margin-top: 14px; }

.shell { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.shell-top {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--shell-top);
}
.shell-top i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-hi); }
.shell-top i:nth-child(1) { background: #fb7185; }
.shell-top i:nth-child(2) { background: #fbbf24; }
.shell-top i:nth-child(3) { background: #34d399; }
.shell-top span {
  margin-left: auto;
  color: var(--text-dim);
  font-family: var(--f-mono);
  font-size: 12px;
}
.shell pre {
  flex: 1;
  padding: 20px;
  overflow-x: auto;
  color: var(--code);
  font-family: var(--f-mono);
  font-size: 13.5px;
  line-height: 1.95;
  white-space: pre-wrap;
}
.shell b { color: var(--violet); font-weight: 600; }
.caret {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  vertical-align: text-bottom;
  background: var(--cyan);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- experience ---------- */

.track {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-left: 30px;
}
.track::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--violet) 60%, transparent);
  opacity: 0.55;
}
.job { position: relative; }
.job::before {
  content: "";
  position: absolute;
  left: -29px;
  top: 33px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2.5px solid var(--cyan);
  background: var(--bg);
  box-shadow: 0 0 14px var(--cyan-glow);
}
.job-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 16px;
}
.job-top h3 {
  font-family: var(--f-display);
  font-size: 19px;
  font-weight: 600;
}
.at { color: var(--text-dim); font-weight: 500; }
.when { color: var(--cyan); font-family: var(--f-mono); font-size: 13px; white-space: nowrap; }
.job-where { margin: 4px 0 14px; color: var(--text-dim); font-size: 14px; }
.job .chips { margin-bottom: 16px; }
.points li {
  position: relative;
  margin-bottom: 8px;
  padding-left: 22px;
  color: var(--text-dim);
  font-size: 15px;
}
.points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--violet);
  transform: rotate(45deg);
}
.points a, .certs a {
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-color: var(--cyan-line);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.points a:hover, .certs a:hover { text-decoration-color: currentColor; }

/* ---------- projects ---------- */

.grid-projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.proj {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}
.proj-lead {
  grid-column: span 2;
  background:
    radial-gradient(640px 280px at 90% -25%, var(--violet-soft), transparent 60%),
    var(--glass);
}
/* Pointer spotlight; --sx/--sy are set from main.js. */
.proj::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(420px 220px at var(--sx, 50%) var(--sy, 0%), var(--spot), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s;
}
.proj:hover::after { opacity: 1; }
.proj-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.proj h3 {
  min-width: 0;
  font-family: var(--f-display);
  font-size: 21px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.proj-link {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text-dim);
  transition: color 0.2s, border-color 0.2s, transform 0.2s var(--out);
}
.proj-link:hover { color: var(--cyan); border-color: var(--cyan); transform: translateY(-2px); }
.proj p { flex: 1; color: var(--text-dim); font-size: 15px; }
.proj-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  color: var(--violet);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  transition: gap 0.25s var(--out);
}
.proj-more .ico { width: 16px; height: 16px; }
.proj-more:hover { gap: 10px; }

/* ---------- skills ---------- */

.grid-skills {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
}
.span-2 { grid-column: span 2; }
.skillset h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-family: var(--f-display);
  font-size: 17px;
  font-weight: 600;
}
.swatch { width: 10px; height: 10px; flex: none; border-radius: 3px; }
.s-cyan { background: var(--cyan); box-shadow: 0 0 10px color-mix(in srgb, var(--cyan) calc(var(--swatch-glow) * 100%), transparent); }
.s-violet { background: var(--violet); box-shadow: 0 0 10px color-mix(in srgb, var(--violet) calc(var(--swatch-glow) * 100%), transparent); }
.s-amber { background: #fbbf24; box-shadow: 0 0 10px color-mix(in srgb, #fbbf24 calc(var(--swatch-glow) * 100%), transparent); }
.s-pink { background: #f472b6; box-shadow: 0 0 10px color-mix(in srgb, #f472b6 calc(var(--swatch-glow) * 100%), transparent); }
.s-green { background: #34d399; box-shadow: 0 0 10px color-mix(in srgb, #34d399 calc(var(--swatch-glow) * 100%), transparent); }

.certs li { color: var(--text-dim); font-size: 15px; }
.certs li + li { margin-top: 8px; }

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

.reach {
  padding: clamp(32px, 6vw, 72px) clamp(20px, 6vw, 72px);
  text-align: center;
  background:
    radial-gradient(720px 320px at 50% -30%, var(--cyan-soft), transparent 65%),
    var(--glass);
}
.reach .block-idx { display: block; margin-bottom: 14px; }
.reach-h {
  max-width: 780px;
  margin: 0 auto 16px;
  font-family: var(--f-display);
  font-size: clamp(28px, 4.4vw, 46px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.reach-lede { max-width: 560px; margin: 0 auto 32px; color: var(--text-dim); }
.reach .cta-row { margin-bottom: 32px; }
.reach-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 26px;
  color: var(--text-dim);
  font-size: 14px;
}
.reach-links li, .reach-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.reach-links a { text-decoration: none; transition: color 0.2s; }
.reach-links a:hover { color: var(--cyan); }
.reach-links .ico { width: 16px; height: 16px; }

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

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 20px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px var(--gutter) 40px;
  border-top: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 13px;
}
.foot-mono { font-family: var(--f-mono); font-size: 12px; }

/* ---------- scroll reveal ---------- */

/* Hidden only once JS confirms it will reveal them, so no-JS visitors see everything. */
.js .fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s var(--out), transform 0.75s var(--out);
}
.js .fade-up.in { opacity: 1; transform: none; }

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

@media (max-width: 960px) {
  .menu a { padding: 8px 10px; }
  .about { grid-template-columns: 1fr; }
  .figures { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .menu {
    position: fixed;
    top: 70px;
    left: 12px;
    right: 12px;
    flex-direction: column;
    gap: 2px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--menu-bg);
    box-shadow: var(--menu-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.25s, transform 0.3s var(--out), visibility 0s 0.3s;
  }
  .menu.open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.25s, transform 0.3s var(--out);
  }
  .menu a { padding: 12px 16px; font-size: 15px; }
  .burger { display: flex; }
  .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .bar { gap: 10px; }
  .logo-text { display: none; }

  .wide-only { display: none; }
  .grid-projects, .grid-skills { grid-template-columns: 1fr; }
  .proj-lead, .span-2 { grid-column: auto; }
  .block { padding-top: 64px; padding-bottom: 64px; }
  .panel { padding: 22px; }
  .shell { padding: 0; }
  .track { padding-left: 24px; }
  .track::before { left: 4px; }
  .job::before { left: -25px; top: 28px; }
  .glow { display: none; }
}

@media (max-width: 420px) {
  .status { font-size: 12.5px; padding: 8px 14px; text-align: left; }
  .cta-row .btn { flex: 1 1 auto; }
  .figure { padding: 14px 8px; }
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  .js .fade-up { opacity: 1; transform: none; }
  .glow { display: none; }
}
