/* ==========================================================
   KAJ Jacobs, portfolio
   Palette: black / white / lime accent. Dark by default,
   light theme via the toggle (html[data-theme="light"]).
   ========================================================== */

:root {
  --bg: #0b0c0a;
  --bg-2: #111310;
  --card: #151714;
  --card-hover: #1a1d18;
  --line: #262a23;
  --text: #f4f5f0;
  --muted: #9ba196;
  --lime: #b8f23a;
  --lime-soft: rgba(184, 242, 58, 0.12);
  --on-lime: #0b0c0a;
  --link: #b8f23a;
  --chip: #1b1e19;
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);

  --font-display: "Bricolage Grotesque", "Geist", system-ui, sans-serif;
  --font-body: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --radius: 22px;
  --wrap: 1180px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #fafaf6;
  --bg-2: #f2f3ed;
  --card: #ffffff;
  --card-hover: #f7f8f2;
  --line: #e2e5da;
  --text: #0b0c0a;
  --muted: #5a6055;
  --lime-soft: rgba(120, 170, 20, 0.12);
  --link: #3f6e00;
  --chip: #f0f2ea;
  --shadow: 0 30px 60px -35px rgba(20, 30, 10, 0.35);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
strong { font-weight: 600; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--lime); color: var(--on-lime); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: clamp(18px, 4vw, 32px); }
.mono { font-family: var(--font-mono); letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.98;
}
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--lime); color: var(--on-lime); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

.dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--lime); box-shadow: 0 0 0 0 rgba(184, 242, 58, 0.6);
  animation: pulse 2.2s infinite; flex: none;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(184, 242, 58, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(184, 242, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(184, 242, 58, 0); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px;
  font: 600 0.98rem/1 var(--font-body);
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn-sm { padding: 9px 16px; font-size: 0.9rem; }
.btn-lg { padding: 16px 26px; font-size: 1.05rem; }
.btn-lime { background: var(--lime); color: var(--on-lime); }
.btn-lime:hover { background: #c8ff4d; }
.btn-ghost { color: var(--text); border-color: var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--text); }
.btn-dark { background: #0b0c0a; color: #f4f5f0; }
.btn-dark-ghost { background: transparent; color: #0b0c0a; border-color: rgba(11, 12, 10, 0.35); }
.btn-dark-ghost:hover { border-color: #0b0c0a; }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; border: 1px solid var(--line); background: transparent;
  color: var(--text); cursor: pointer; transition: border-color 0.2s;
}
.icon-btn:hover { border-color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i-moon { display: none; }
:root[data-theme="light"] .i-sun { display: none; }
:root[data-theme="light"] .i-moon { display: block; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { font: 800 1.55rem/1 var(--font-display); letter-spacing: -0.04em; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-dot { color: var(--lime); }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 999px;
  color: var(--muted); font-size: 0.95rem; font-weight: 500;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--chip); text-decoration: none; }
.nav-cta-mobile { display: none; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.menu-btn { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(40px, 7vw, 90px) 0 40px; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(600px 400px at 85% 20%, var(--lime-soft), transparent 70%),
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: auto, 56px 56px, 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
  opacity: 0.7;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 5vw, 72px); align-items: center; }

.status {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.82rem; color: var(--muted); background: var(--bg-2);
}
.hero h1 { font-size: clamp(3.2rem, 8.4vw, 6.6rem); margin: 22px 0 18px; }
.lime-dot { color: var(--lime); }
.label-chip {
  display: inline-flex; align-items: center;
  background: var(--lime); color: var(--on-lime);
  padding: 8px 14px; border-radius: 8px;
  font-size: clamp(0.95rem, 1.6vw, 1.1rem); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.rotator { margin-left: 0.5ch; font-weight: 600; }
.caret { display: inline-block; width: 2px; height: 1.1em; background: var(--on-lime); margin-left: 3px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.lede { margin-top: 22px; max-width: 34em; font-size: 1.12rem; color: var(--muted); }
.lede strong, .lede a { color: var(--text); }
.lede a { text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.socials { display: flex; gap: 10px; margin-top: 26px; }
.socials a {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--muted); transition: color 0.2s, border-color 0.2s, transform 0.2s;
}
.socials a:hover { color: var(--lime); border-color: var(--lime); transform: translateY(-2px); }
.socials svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.socials svg.fill { fill: currentColor; stroke: none; }

.portrait { position: relative; max-width: 440px; margin-left: auto; width: 100%; padding: 0 0 28px 28px; }
.portrait-panel {
  position: absolute; inset: 40px 0 0 0; border-radius: 32px; background: var(--lime);
  transform: rotate(3deg);
}
.portrait-img {
  position: relative; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%;
  border-radius: 28px; box-shadow: var(--shadow);
}
.float {
  position: absolute; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  font-size: 0.88rem; color: var(--muted);
  animation: bob 6s ease-in-out infinite;
}
.float strong { font: 800 1.3rem/1 var(--font-display); color: var(--text); }
.float-a { left: -6px; bottom: 90px; flex-direction: column; align-items: flex-start; gap: 2px; }
.float-b { right: -14px; top: 26px; animation-delay: -3s; }
.flag { width: 24px; height: 17px; border-radius: 3px; flex: none; }
.emoji .flag { width: 34px; height: 24px; margin-top: 4px; }
@keyframes bob { 50% { transform: translateY(-8px); } }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); margin: clamp(48px, 7vw, 80px) 0 0;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2);
}
.stats > div { padding: 24px 26px; border-left: 1px solid var(--line); }
.stats > div:first-child { border-left: 0; }
.stats dt { font: 800 clamp(2rem, 3.6vw, 2.8rem)/1 var(--font-display); letter-spacing: -0.03em; color: var(--lime); }
:root[data-theme="light"] .stats dt { color: var(--text); }
.stats dd { margin: 10px 0 0; font-size: 0.92rem; color: var(--muted); }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden; border-block: 1px solid var(--line); margin-top: 56px; padding: 18px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: scroll 40s linear infinite; }
.marquee span {
  font: 700 clamp(1.3rem, 2.4vw, 1.9rem)/1 var(--font-display); letter-spacing: -0.02em;
  color: var(--muted); padding: 0 26px; display: flex; align-items: center; gap: 52px; white-space: nowrap;
}
.marquee span::after { content: "✦"; color: var(--lime); font-size: 0.7em; margin-right: -26px; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 128px) 0 0; }
.section-head { margin-bottom: clamp(32px, 4vw, 52px); }
.eyebrow { color: var(--lime); font-size: 0.85rem; margin-bottom: 14px; }
:root[data-theme="light"] .eyebrow { color: var(--link); }
.section h2 { font-size: clamp(2.5rem, 6vw, 4.6rem); }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(150px, auto); gap: 16px; }
.tile {
  position: relative; padding: 26px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  color: var(--text);
}
a.tile:hover { transform: translateY(-4px); border-color: var(--lime); text-decoration: none; }
.tile-story { grid-column: span 2; grid-row: span 2; justify-content: flex-end; font-size: 1.1rem; gap: 16px; }
.tile-story p:first-child { font: 600 clamp(1.35rem, 2.2vw, 1.7rem)/1.3 var(--font-display); letter-spacing: -0.02em; }
.tile-story p + p { color: var(--muted); }
.tile-now { grid-column: span 2; }
.tile-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.tile-big { font: 800 clamp(1.5rem, 2.4vw, 1.9rem)/1.1 var(--font-display); letter-spacing: -0.03em; margin-top: auto; }
.tile .muted { font-size: 0.9rem; }
.now-list { display: grid; gap: 12px; margin-top: 10px; }
.now-list li { display: grid; grid-template-columns: 90px 1fr; gap: 12px; align-items: baseline; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.now-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.now-list span { color: var(--muted); font-size: 0.88rem; font-family: var(--font-mono); }
.tile-lime { background: var(--lime); border-color: var(--lime); color: var(--on-lime); }
.tile-lime .tile-label { color: rgba(11, 12, 10, 0.7); }
.tile-lime img { width: 48px; height: 48px; border-radius: 12px; }
a.tile-lime:hover { border-color: var(--text); }

/* ---------- Featured project ---------- */
.feature {
  display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(28px, 4vw, 56px); align-items: center;
  padding: clamp(24px, 4vw, 48px); border-radius: 28px;
  background:
    radial-gradient(500px 300px at 100% 0%, var(--lime-soft), transparent 70%),
    var(--card);
  border: 1px solid var(--line);
}
.feature-title { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.feature-title img { width: 64px; height: 64px; border-radius: 16px; }
.feature-title h3 { font: 800 clamp(2.6rem, 5vw, 3.6rem)/1 var(--font-display); letter-spacing: -0.04em; }
.feature-kicker { color: var(--lime); font-size: 0.82rem; margin-bottom: 14px; }
:root[data-theme="light"] .feature-kicker { color: var(--link); }
.feature-desc { color: var(--muted); font-size: 1.05rem; }
.mini-stats { display: flex; gap: 28px; margin: 24px 0; flex-wrap: wrap; }
.mini-stats li { display: flex; flex-direction: column; }
.mini-stats strong { font: 800 1.9rem/1 var(--font-display); letter-spacing: -0.03em; }
.mini-stats span { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
.feature .chips { margin-bottom: 28px; }

.shot { position: relative; max-width: 500px; width: 100%; margin-inline: auto; }
.shot::before {
  content: ""; position: absolute; inset: 12% -6% -4% -6%; z-index: 0;
  background: radial-gradient(closest-side, rgba(184, 242, 58, 0.22), transparent);
  filter: blur(30px); pointer-events: none;
}
.browser {
  position: relative; z-index: 1; display: block; border-radius: 14px; overflow: hidden;
  border: 1px solid #262c36; background: #0d1117; box-shadow: var(--shadow);
  transition: transform 0.35s ease, border-color 0.35s ease;
}

.browser:hover { transform: translateY(-6px); border-color: var(--lime); text-decoration: none; }
.browser img { width: 100%; height: auto; }
.browser-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; background: #161b22; border-bottom: 1px solid #262c36; }
.browser-bar i { width: 11px; height: 11px; border-radius: 50%; background: #3a404a; }
.browser-bar i:first-child { background: #ff5f57; } .browser-bar i:nth-child(2) { background: #febc2e; } .browser-bar i:nth-child(3) { background: #28c840; }
.browser-bar span { margin: 0 auto; padding: 4px 16px; border-radius: 6px; background: #0d1117; color: #8b949e; font-size: 0.78rem; }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 6px 12px; border-radius: 999px; background: var(--chip); border: 1px solid var(--line);
  font: 500 0.82rem/1.2 var(--font-mono); color: var(--text);
}

/* ---------- Project cards ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 16px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 26px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line);
  color: var(--text); transition: transform 0.25s ease, border-color 0.25s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--lime); text-decoration: none; }
.card-links { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.85rem; }
.card-links a { color: var(--link); }
.card h3 { font: 700 1.4rem/1.15 var(--font-display); letter-spacing: -0.02em; }
.card p { color: var(--muted); font-size: 0.95rem; }
.card .chips { margin-top: auto; padding-top: 8px; }
.card-kicker { font-size: 0.75rem !important; text-transform: uppercase; letter-spacing: 0.06em; }
.card-arrow {
  position: absolute; top: 20px; right: 20px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--line); color: var(--muted);
  transition: background 0.25s, color 0.25s, transform 0.25s;
}
.card:hover .card-arrow { background: var(--lime); color: var(--on-lime); border-color: var(--lime); transform: rotate(45deg); }

/* ---------- Timeline ---------- */
.timeline { display: grid; gap: 0; border-top: 1px solid var(--line); }
.job { display: grid; grid-template-columns: 0.8fr 1.6fr; gap: 32px; padding: 36px 0; border-bottom: 1px solid var(--line); }
.job-head h3 { font: 700 clamp(1.4rem, 2.4vw, 1.9rem)/1.15 var(--font-display); letter-spacing: -0.025em; }
.job-head p { font-size: 0.82rem; margin-top: 8px; }
.roles { display: grid; gap: 28px; }
.role { position: relative; padding-left: 22px; border-left: 2px solid var(--line); }
.role::before { content: ""; position: absolute; left: -6px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--bg); border: 2px solid var(--lime); }
.role:first-child::before { background: var(--lime); }
.role-title { font-weight: 600; font-size: 1.1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pill { font: 500 0.7rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; padding: 5px 9px; border-radius: 999px; background: var(--lime-soft); color: var(--lime); border: 1px solid rgba(184, 242, 58, 0.35); }
:root[data-theme="light"] .pill { color: var(--link); border-color: rgba(63, 110, 0, 0.3); }
.date { color: var(--muted); font-size: 0.82rem; margin: 4px 0 12px; }
.role ul { display: grid; gap: 8px; }
.role li { position: relative; padding-left: 20px; color: var(--muted); font-size: 0.98rem; }
.role li::before { content: "→"; position: absolute; left: 0; color: var(--lime); }
:root[data-theme="light"] .role li::before { color: var(--link); }
.role li strong { color: var(--text); }

/* ---------- Skills + education ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.skill-group { padding: 26px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.skill-group h3 { font: 700 1.25rem/1.2 var(--font-display); letter-spacing: -0.02em; margin-bottom: 16px; }
.edu {
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; align-items: center; margin-top: 16px;
  padding: clamp(24px, 3.5vw, 40px); border-radius: var(--radius); background: var(--card); border: 1px solid var(--line);
}
.edu h3 { font: 700 clamp(1.4rem, 2.6vw, 2rem)/1.15 var(--font-display); letter-spacing: -0.025em; margin-bottom: 8px; }
.edu .date { margin-top: 0; }
.edu .small { margin-top: 14px; }
.edu-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.edu-facts li { padding: 16px; border-radius: 16px; background: var(--chip); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.edu-facts strong { font: 800 1.5rem/1 var(--font-display); color: var(--lime); }
:root[data-theme="light"] .edu-facts strong { color: var(--text); }
.edu-facts span { font-size: 0.78rem; color: var(--muted); line-height: 1.3; }

/* ---------- Beyond ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tiles li {
  display: flex; flex-direction: column; gap: 4px; padding: 24px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); transition: transform 0.25s ease, border-color 0.25s;
}
.tiles li:hover { transform: translateY(-3px) rotate(-0.5deg); border-color: var(--lime); }
.emoji { font-size: 1.8rem; margin-bottom: 8px; }
.tiles strong { font: 700 1.15rem/1.2 var(--font-display); }
.tiles span:last-child { color: var(--muted); font-size: 0.92rem; }

.posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.posts iframe { width: 100%; min-height: 560px; border: 0; border-radius: var(--radius); background: #fff; }

/* ---------- Contact ---------- */
.contact { padding-bottom: clamp(56px, 8vw, 96px); }
.contact-card {
  position: relative; overflow: hidden;
  padding: clamp(36px, 6vw, 80px); border-radius: 32px;
  background: var(--lime); color: var(--on-lime);
}
.contact-card::after {
  content: "✦"; position: absolute; right: -0.1em; bottom: -0.3em;
  font: 800 clamp(12rem, 30vw, 22rem)/1 var(--font-display); color: rgba(11, 12, 10, 0.07);
  pointer-events: none;
}
.contact-card .eyebrow { color: rgba(11, 12, 10, 0.65); }
.contact-card h2 { font-size: clamp(2.8rem, 8vw, 6rem); }
.contact-card .lede { color: rgba(11, 12, 10, 0.75); }
.email-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; position: relative; z-index: 1; }
.contact-links { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 28px; font-size: 0.9rem; position: relative; z-index: 1; }
.contact-links a { color: var(--on-lime); font-weight: 500; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 28px 0; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 0.88rem; color: var(--muted); }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .browser { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .feature { grid-template-columns: 1fr; }
  .browser { transform: none; }
  .edu { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .menu-btn { display: inline-grid; }
  .nav-resume { display: none; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 2px; padding: 12px clamp(18px, 4vw, 32px) 20px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; font-size: 1.05rem; }
  .nav-cta-mobile { display: block; }
  .nav-cta-mobile a { color: var(--lime); }

  .hero-grid { grid-template-columns: 1fr; }
  .portrait { order: -1; max-width: 280px; margin: 0 auto; }
  .float-a { left: -8px; bottom: 50px; }
  .float-b { right: -20px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats > div:nth-child(3) { border-left: 0; }
  .stats > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .job { grid-template-columns: 1fr; gap: 18px; }
  .skills-grid { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .bento, .cards, .tiles { grid-template-columns: 1fr; }
  .tile-story, .tile-now { grid-column: auto; grid-row: auto; }
  .stats > div { padding: 18px; }
  .edu-facts { grid-template-columns: 1fr 1fr 1fr; }
  .hero-ctas .btn { flex: 1 1 auto; justify-content: center; }
  .float-b { display: none; }
}

/* LinkedIn post embeds */
.posts {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}
.posts iframe {
  width: 100%;
  max-width: 504px;
  border: 0;
  border-radius: 12px;
  background: #fff;
}
