/* ============================================================
   THEME TOKENS
   ============================================================ */
:root {
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --max-w: 1080px;
  --radius: 14px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-theme="dark"] {
  --bg: #0a0a0f;
  --bg-elev: rgba(255, 255, 255, 0.03);
  --bg-card: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(0, 230, 150, 0.45);
  --text: #e8eaf0;
  --text-dim: #9aa0b0;
  --accent: #00e696;
  --accent-2: #38d6ff;
  --accent-soft: rgba(0, 230, 150, 0.12);
  --glow: rgba(0, 230, 150, 0.22);
  --nav-bg: rgba(10, 10, 15, 0.72);
  --grid-dot: rgba(255, 255, 255, 0.05);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --c3-empty: #1e2530;
  --bot-body: #252c38;
  --bot-screen: #0c1016;
}

html[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-elev: rgba(15, 20, 40, 0.03);
  --bg-card: #ffffff;
  --border: rgba(15, 20, 40, 0.1);
  --border-hover: rgba(0, 160, 110, 0.55);
  --text: #171a26;
  --text-dim: #5b6272;
  --accent: #00a06e;
  --accent-2: #0086c9;
  --accent-soft: rgba(0, 160, 110, 0.1);
  --glow: rgba(0, 160, 110, 0.14);
  --nav-bg: rgba(246, 247, 251, 0.8);
  --grid-dot: rgba(15, 20, 40, 0.06);
  --shadow: 0 12px 32px rgba(20, 30, 60, 0.1);
  --c3-empty: #dde2ec;
  --bot-body: #ffffff;
  --bot-screen: #171a26;
}

/* ============================================================
   BASE
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--font-mono); }
.accent { color: var(--accent); }

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

/* Skip link — visually hidden until keyboard-focused */
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 200;
  padding: 10px 18px;
  background: var(--accent); color: #06110c;
  font-family: var(--font-mono); font-size: 0.85rem; font-weight: 600;
  border-radius: 8px;
  transform: translateY(-200%);
  transition: transform 0.2s ease;
}
.skip-link:focus {
  transform: translateY(0);
  text-decoration: none; outline: 2px solid var(--text); outline-offset: 2px;
}

::selection { background: var(--accent); color: #06110c; }

/* ============================================================
   BACKGROUND DECOR
   ============================================================ */
.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

.bg-orb {
  position: fixed; z-index: -1; pointer-events: none;
  border-radius: 50%; filter: blur(110px); opacity: 0.55;
}
.bg-orb--1 {
  width: 480px; height: 480px; top: -160px; right: -120px;
  background: radial-gradient(circle, var(--glow), transparent 70%);
}
.bg-orb--2 {
  width: 420px; height: 420px; bottom: -180px; left: -140px;
  background: radial-gradient(circle, rgba(56, 214, 255, 0.12), transparent 70%);
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav__logo { font-weight: 700; font-size: 1.05rem; color: var(--text); }
.nav__logo:hover { text-decoration: none; }

.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a {
  color: var(--text-dim); font-size: 0.92rem; font-weight: 500;
  transition: color var(--transition);
}
.nav__links a:hover { color: var(--accent); text-decoration: none; }

.nav__cta {
  padding: 7px 16px; border: 1px solid var(--accent);
  border-radius: 8px; color: var(--accent) !important;
}
.nav__cta:hover { background: var(--accent-soft); }

.nav__actions { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  display: grid; place-items: center; width: 38px; height: 38px;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text-dim); cursor: pointer;
  transition: all var(--transition);
}
.theme-toggle:hover { color: var(--accent); border-color: var(--border-hover); }
html[data-theme="dark"] .icon-moon { display: none; }
html[data-theme="light"] .icon-sun { display: none; }

/* ---- EN ⇄ VI language toggle ---- */
.lang-toggle {
  display: grid; place-items: center; height: 38px; padding: 0 12px;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text-dim); cursor: pointer;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em;
  transition: all var(--transition);
}
.lang-toggle:hover { color: var(--accent); border-color: var(--border-hover); }

.nav__burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.nav__burger span {
  width: 22px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: 110px 24px 80px; }

.hero__kicker { color: var(--accent); font-size: 0.95rem; margin-bottom: 18px; }
.prompt { color: var(--text-dim); margin-right: 6px; }

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.2rem);
  font-weight: 700; line-height: 1.05; letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--text) 30%, var(--accent) 85%, var(--accent-2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 600; color: var(--text-dim); margin-top: 6px;
}

.hero__cursor {
  display: inline-block; width: 3px; height: 1em;
  background: var(--accent); margin-left: 6px; vertical-align: text-bottom;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero__tagline { color: var(--accent); font-size: 0.95rem; margin-top: 20px; }

.hero__bio {
  max-width: 620px; color: var(--text-dim);
  font-size: 1.08rem; margin-top: 16px;
}

.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }

.hero__socials { display: flex; gap: 14px; margin-top: 34px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 26px; border-radius: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  transition: all var(--transition); cursor: pointer;
}
.btn:hover { text-decoration: none; }

.btn--primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #06110c;
  box-shadow: 0 6px 24px var(--glow);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 32px var(--glow); }

.btn--ghost {
  border: 1px solid var(--border); color: var(--text);
  background: var(--bg-elev);
}
.btn--ghost:hover { border-color: var(--border-hover); color: var(--accent); transform: translateY(-2px); }

.btn--lg { padding: 15px 38px; font-size: 1.05rem; }

/* ============================================================
   SOCIAL ICONS
   ============================================================ */
.social-link {
  display: grid; place-items: center; width: 42px; height: 42px;
  border: 1px solid var(--border); border-radius: 11px;
  background: var(--bg-elev); color: var(--text-dim);
  transition: all var(--transition);
}
.social-link:hover {
  color: var(--accent); border-color: var(--border-hover);
  transform: translateY(-3px); text-decoration: none;
}
.social-link svg { width: 19px; height: 19px; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 90px 24px; }

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  font-weight: 700; margin-bottom: 42px;
  display: flex; align-items: baseline; gap: 12px;
}
.section__title::after {
  content: ""; flex: 1; height: 1px; max-width: 280px;
  background: linear-gradient(90deg, var(--border), transparent);
}
.section__title--center { justify-content: center; }
.section__title--center::after { display: none; }
.section__num { color: var(--accent); font-size: 0.75em; font-weight: 500; }

/* ============================================================
   ABOUT
   ============================================================ */
.about { display: grid; grid-template-columns: 1.7fr 1fr; gap: 56px; align-items: start; }
.about__text p { color: var(--text-dim); margin-bottom: 16px; font-size: 1.02rem; }
.about__text strong { color: var(--text); }
.about__loc { color: var(--accent); font-size: 0.88rem; }

.about__photo { display: flex; justify-content: center; }
.about__photo-frame {
  /* Balanced 4:5 portrait card — clean, minimal */
  position: relative; width: 250px; aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  transition: transform var(--transition), box-shadow var(--transition);
}
.about__photo-frame:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 44px var(--glow);
}
.about__photo-frame img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 22%; /* keep the face in frame */
  border-radius: var(--radius); border: 1px solid var(--border);
  filter: saturate(0.9);
  transition: filter var(--transition);
}
.about__photo-frame:hover img { filter: saturate(1.1); }

/* ============================================================
   SKILLS
   ============================================================ */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.skill-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
  transition: all var(--transition);
}
.skill-card:hover {
  border-color: var(--border-hover); transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.skill-card h3 {
  font-family: var(--font-mono); font-size: 0.85rem; font-weight: 500;
  color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.skill-card h3::before { content: "// "; color: var(--text-dim); }

.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tag {
  font-family: var(--font-mono); font-size: 0.8rem;
  padding: 5px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--text);
  border: 1px solid transparent;
  transition: border-color var(--transition);
}
.skill-tag:hover { border-color: var(--border-hover); }

/* ============================================================
   HERO STATS
   ============================================================ */
.hero__stats {
  display: flex; gap: 40px; flex-wrap: wrap;
  margin-top: 44px; padding-top: 28px;
  border-top: 1px solid var(--border);
}
.hero__stat { display: flex; flex-direction: column; }
.hero__stat-value {
  font-size: 1.7rem; font-weight: 700; color: var(--accent);
  line-height: 1.2;
}
.hero__stat-label {
  font-size: 0.82rem; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.07em;
}

/* ============================================================
   ABOUT HIGHLIGHTS
   ============================================================ */
.about__highlights {
  list-style: none; margin: 6px 0 20px;
  display: grid; gap: 10px;
}
.about__highlights li {
  display: flex; align-items: baseline; gap: 10px;
  padding: 10px 14px; border-radius: 10px;
  background: var(--bg-elev); border: 1px solid var(--border);
  font-size: 0.93rem; color: var(--text-dim);
  transition: border-color var(--transition), transform var(--transition);
}
.about__highlights li:hover { border-color: var(--border-hover); transform: translateX(4px); }
.about__highlights strong { color: var(--text); white-space: nowrap; }
.hl__icon { flex-shrink: 0; }

/* ============================================================
   SPOTLIGHT (featured projects)
   ============================================================ */
.spotlight { display: grid; gap: 72px; margin-bottom: 80px; }

.spotlight__item {
  display: grid; grid-template-columns: 1.15fr 1fr;
  gap: 40px; align-items: center;
}
.spotlight__item--flip .spotlight__media { order: 2; }
.spotlight__item--flip .spotlight__content { order: 1; }

.spotlight__media {
  display: block; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.spotlight__media:hover {
  transform: translateY(-5px); border-color: var(--border-hover);
  box-shadow: 0 18px 48px var(--glow);
}
.spotlight__media img {
  display: block; width: 100%; height: auto;
  filter: saturate(0.95);
  transition: filter var(--transition), transform 0.5s ease;
}
.spotlight__media:hover img { filter: saturate(1.05); transform: scale(1.02); }

.spotlight__label {
  color: var(--accent); font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 8px;
}
.spotlight__title {
  font-family: var(--font-display); font-size: 1.55rem; font-weight: 700;
}
.spotlight__title a { color: var(--text); }
.spotlight__title a:hover { color: var(--accent); text-decoration: none; }

.spotlight__tagline {
  color: var(--text-dim); font-style: italic;
  font-size: 0.98rem; margin: 4px 0 16px;
}

.spotlight__desc {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px 22px;
  box-shadow: var(--shadow);
}
.spotlight__desc p { color: var(--text-dim); font-size: 0.95rem; }

.spotlight__tech { margin-top: 18px; }
.spotlight__links { margin-top: 16px; }
.spotlight__links a svg { width: 20px; height: 20px; }

/* ---- Terminal mockup (for featured projects without a screenshot) ---- */
.spotlight__media--terminal { background: transparent; box-shadow: none; border: none; }
.spotlight__media--terminal:hover { box-shadow: none; }

.terminal {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border);
  background: #0d1117;
  box-shadow: var(--shadow);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.spotlight__media--terminal:hover .terminal {
  border-color: var(--border-hover);
  box-shadow: 0 18px 48px var(--glow);
}
html[data-theme="light"] .terminal { background: #14181f; }

.terminal__bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px; background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.terminal__dot { width: 11px; height: 11px; border-radius: 50%; }
.terminal__dot--r { background: #ff5f57; }
.terminal__dot--y { background: #febc2e; }
.terminal__dot--g { background: #28c840; }
.terminal__title {
  margin-left: 10px; font-size: 0.72rem; color: rgba(255, 255, 255, 0.45);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.terminal__body {
  padding: 18px 20px; font-size: 0.78rem; line-height: 1.9;
  color: #b6bcc8; overflow-x: auto;
}
.tl { white-space: pre; }
.tl--cmd { color: #e8eaf0; }
.tl__prompt { color: #00e696; }
.tl--ok { color: #00e696; }

/* Sub-heading between spotlight and grid */
.projects__sub {
  font-size: 0.9rem; font-weight: 500; color: var(--text-dim);
  letter-spacing: 0.05em; margin-bottom: 24px;
}

/* ============================================================
   GITHUB CONTRIBUTIONS HEATMAP
   ============================================================ */
.contrib { margin-top: 56px; }
.contrib .projects__sub { margin-bottom: 16px; }

.contrib__card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  transition: border-color var(--transition);
}
.contrib__card:hover { border-color: var(--border-hover); }

/* AI agent console — the "agent" types its analysis above the graph */
.contrib__console { font-size: 0.76rem; line-height: 1.7; margin-bottom: 10px; }
.contrib__console:empty { display: none; }
.contrib__console .cl--cmd { color: var(--text); }
.contrib__console .cl__prompt { color: var(--accent); }
.contrib__console .cl__caret {
  display: inline-block; width: 7px; height: 0.95em;
  background: var(--accent); margin-left: 2px; vertical-align: text-bottom;
  animation: caretBlink 1s steps(2) infinite;
}
.contrib__console .cl--out { color: var(--text-dim); animation: clIn 0.3s ease both; }
.contrib__console .cl--out::before { content: "> "; color: var(--accent-2); }
.contrib__console .cl--out b { color: var(--accent); font-weight: 700; }
@keyframes caretBlink { 50% { opacity: 0; } }
@keyframes clIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

.contrib__graph {
  display: flex; gap: 3px; overflow-x: auto;
  padding-bottom: 6px; scrollbar-width: thin;
}
.contrib__week { display: flex; flex-direction: column; gap: 3px; flex-shrink: 0; }

.contrib__day {
  display: block; width: 11px; height: 11px; border-radius: 2.5px;
  background: var(--bg-elev);
  outline: 1px solid var(--border); outline-offset: -1px;
  transition: transform var(--transition);
}
.contrib__day:hover { transform: scale(1.35); }
.contrib__day--empty { background: transparent; outline: none; }

.contrib__day.lv1 { background: color-mix(in srgb, var(--accent) 28%, transparent); outline: none; }
.contrib__day.lv2 { background: color-mix(in srgb, var(--accent) 52%, transparent); outline: none; }
.contrib__day.lv3 { background: color-mix(in srgb, var(--accent) 76%, transparent); outline: none; }
.contrib__day.lv4 { background: var(--accent); outline: none; box-shadow: 0 0 6px var(--glow); }

.contrib__foot {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px; margin-top: 14px;
}
.contrib__total { font-size: 0.78rem; color: var(--accent); }
.contrib__legend {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.72rem; color: var(--text-dim);
}
.contrib__legend .contrib__day { width: 10px; height: 10px; }
.contrib__legend .contrib__day:hover { transform: none; }

.contrib__fallback { width: 100%; height: auto; display: block; }

/* ---- 3D isometric skyline (one pre-projected SVG — no CSS 3D) ---- */
.contrib__iso { display: block; width: 100%; max-width: 700px; height: auto; margin: 0 auto; }

.iso { --c: var(--c3-empty); }
.iso.lv1 { --c: color-mix(in srgb, var(--accent) 32%, var(--c3-empty)); }
.iso.lv2 { --c: color-mix(in srgb, var(--accent) 55%, var(--c3-empty)); }
.iso.lv3 { --c: color-mix(in srgb, var(--accent) 78%, var(--c3-empty)); }
.iso.lv4 { --c: var(--accent); }
.iso__t { fill: var(--c); }
.iso__f { fill: color-mix(in srgb, var(--c) 68%, #000); }
.iso__s { fill: color-mix(in srgb, var(--c) 46%, #000); }
.iso:hover .iso__t { fill: color-mix(in srgb, var(--c) 70%, #fff); }

/* ---- Staggered "skyline rising" reveal (per-bar delay via --d) ---- */
.contrib__iso .iso,
.contrib__iso .bot-wrap,
.contrib__iso .flame,
.contrib__iso .iso__month { opacity: 0; }

.contrib__iso--live .iso {
  opacity: 1;
  animation: isoRise 0.55s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: calc(var(--d, 0) * 10ms);
}
.contrib__iso--live .bot-wrap { animation: contribFadeIn 0.5s ease 0.8s forwards; }
.contrib__iso--live .flame { animation: contribFadeIn 0.4s ease 0.95s forwards; }
.contrib__iso--live .iso__month { animation: contribFadeIn 0.6s ease 0.6s forwards; }

@keyframes isoRise { from { opacity: 0; transform: translateY(16px); } }
@keyframes contribFadeIn { to { opacity: 1; } }

/* ---- Month labels along the front-bottom edge ---- */
.iso__month { fill: var(--text-dim); font: 8.5px var(--font-mono); letter-spacing: 0.08em; }

/* ---- Fire crowning the best day ---- */
/* Fire-grain gradients run from deep embers at the base up to
   white-hot yellow at the crown (defs live in the generated SVG) */
.iso--fire .iso__f { fill: url(#fireF); }
.iso--fire .iso__s { fill: url(#fireS); }
.iso--fire .iso__t {
  fill: #ffe9a0;
  animation: fireTopHeat 1.2s ease-in-out infinite;
}
.iso--fire:hover .iso__t { fill: #fff6d8; animation: none; }

@keyframes fireTopHeat {
  0%, 100% { fill: #ffe9a0; }
  50% { fill: #ffd166; }
}

/* Kimetsu no Yaiba flame tongues wrapping the burning bar — layered
   ukiyo-e colors: crimson edge, orange body, golden core. Tongues drawn
   before the faces peek out from behind, the rest crawl up the front */
.kny__edge { fill: #c81e1e; opacity: 0.95; }
.kny__body { fill: #ff7a1a; }
.kny__core {
  fill: #ffd54d;
  transform-box: fill-box; transform-origin: 50% 95%;
  animation: knyCore 0.5s ease-in-out infinite alternate;
}
.ftongue__sway {
  transform-box: fill-box; transform-origin: 50% 96%;
  animation: knySway 1s ease-in-out infinite;
}
@keyframes knySway {
  0%, 100% { transform: rotate(0deg) scaleY(1); }
  30% { transform: rotate(-5deg) scaleY(1.12); }
  55% { transform: rotate(3.5deg) scaleY(0.93); }
  80% { transform: rotate(-2deg) scaleY(1.06); }
}
@keyframes knyCore {
  from { transform: scaleY(1); }
  to { transform: scaleY(0.8); }
}

/* Ukiyo-e sparkles dancing around the crown flame */
.flame__spk {
  fill: #ffe08a;
  transform-box: fill-box; transform-origin: center;
  animation: spkTwinkle 1.4s ease-in-out infinite;
}
.flame__spk--2 { animation-delay: 0.6s; }
@keyframes spkTwinkle {
  0%, 100% { opacity: 0.3; transform: scale(0.7) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.25) rotate(45deg); }
}

/* Heat aura wrapping the whole bar */
.fire-aura {
  fill: #ff7b1c; opacity: 0.14;
  transform-box: fill-box; transform-origin: center;
  animation: flameGlow 1.5s ease-in-out infinite;
}

.flame__glow {
  fill: #ff7b1c; opacity: 0.2;
  transform-box: fill-box; transform-origin: center;
  animation: flameGlow 1.6s ease-in-out infinite;
}
.flame__ember {
  fill: #ffc94d; opacity: 0;
  animation: emberRise 2.1s ease-out infinite;
}
.flame__ember--2 { animation-delay: 0.7s; }
.flame__ember--3 { animation-delay: 1.4s; }

@keyframes flameGlow {
  0%, 100% { opacity: 0.14; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(1.15); }
}
@keyframes emberRise {
  0% { opacity: 0; transform: translateY(0); }
  15% { opacity: 0.9; }
  100% { opacity: 0; transform: translateY(-9px); }
}

/* ---- Streak stat chips ---- */
.contrib__stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.stat-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 13px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg-elev); font-size: 0.72rem; color: var(--text-dim);
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
}
.stat-chip:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }
.stat-chip b { color: var(--accent); font-weight: 600; }

/* ---- Cute little robot sitting on the latest day ----
   7s life cycle: gentle bob → crouch → JUMP (squash & stretch)
   → hang time → landing squish → happy rebound. The shadow
   breathes in counter-phase and sparks pop mid-air. */
.bot {
  transform-box: fill-box; transform-origin: 50% 100%;
  animation: botLife 7s ease-in-out infinite;
}

/* Follow-through: antenna lags behind the body like a springy whip */
.bot__antenna {
  transform-box: fill-box; transform-origin: 50% 100%;
  animation: botAntenna 7s ease-in-out infinite;
}

/* Both arms fly up in a "yay!" mid-air, then settle with overshoot */
.bot__arm-r { transform-box: fill-box; transform-origin: 50% 10%; animation: botArmR 7s ease-in-out infinite; }
.bot__arm-l { transform-box: fill-box; transform-origin: 50% 8%; animation: botArmL 7s ease-in-out infinite; }

/* Legs tuck up into the body while airborne */
.bot__legs { transform-box: fill-box; transform-origin: 50% 0%; animation: botLegs 7s ease-in-out infinite; }

/* Secondary action: eyes glance around while idle, look up mid-jump */
.bot__eyelook { animation: botEyeLook 7s ease-in-out infinite; }

.bot__shell { fill: var(--bot-body); stroke: var(--accent); stroke-width: 1; }
.bot__limb { fill: var(--bot-body); stroke: var(--accent); stroke-width: 0.8; }
.bot__screen { fill: var(--bot-screen); }
.bot__eye { fill: var(--accent); }
.bot__cheek { fill: var(--accent-2); opacity: 0.55; }
.bot__stem { stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; }
.bot__ant {
  fill: var(--accent); transform-box: fill-box; transform-origin: center;
  animation: botPulse 1.8s ease-in-out infinite, botAntJump 7s ease-in-out infinite;
}
.bot__heart {
  fill: var(--accent-2); transform-box: fill-box; transform-origin: center;
  animation: botHeart 1.6s ease-in-out infinite;
}
.bot__eyes { transform-box: fill-box; transform-origin: center; animation: botBlink 4.4s infinite; }
.bot__armwave { transform-box: fill-box; transform-origin: 50% 92%; animation: botWave 2.6s ease-in-out infinite; }

/* Soft shadow under the robot — shrinks while airborne */
.bot__shadow {
  fill: #000; opacity: 0.28;
  transform-box: fill-box; transform-origin: center;
  animation: botShadow 7s ease-in-out infinite;
}

/* Celebration sparks that pop while the robot is mid-air */
.bot__spark { opacity: 0; transform-box: fill-box; transform-origin: center; }
.bot__spark--1 { fill: #ffd866; animation: botSpark 7s ease-out infinite; }
.bot__spark--2 { fill: var(--accent); animation: botSpark 7s ease-out infinite 0.12s; }
.bot__spark--3 { fill: var(--accent-2); animation: botSpark 7s ease-out infinite 0.24s; }

/* ---- AI helper crew: sleeper, pusher, victory bot, UFO, speech bubble ---- */

/* Sleeper bot — nightcap, gentle breathing, snore bubble, drifting z's */
.sbot__eye { stroke: var(--accent); stroke-width: 0.9; fill: none; stroke-linecap: round; }
.sbot__mouth { stroke: var(--accent); stroke-width: 0.7; fill: none; stroke-linecap: round; }
.sbot__cap { fill: var(--accent-2); opacity: 0.85; }
.sbot__pom { fill: var(--accent); }
.sbot__body {
  transform-box: fill-box; transform-origin: center bottom;
  animation: sbotBreathe 3.4s ease-in-out infinite;
}
.sbot__snore {
  fill: none; stroke: var(--accent-2); stroke-width: 0.7;
  transform-box: fill-box; transform-origin: center bottom;
  animation: sbotSnore 3.4s ease-in-out infinite;
}
.sbot__z {
  font: 700 6px var(--font-mono); fill: var(--text-dim);
  animation: sbotZ 2.8s ease-in-out infinite;
}
.sbot__z--2 { font-size: 7.5px; animation-delay: 1.4s; }
@keyframes sbotBreathe {
  0%, 100% { transform: scale(1, 1); }
  50% { transform: scale(1.02, 1.06); }
}
@keyframes sbotSnore {
  0%, 15% { opacity: 0; transform: scale(0.3); }
  45% { opacity: 0.9; transform: scale(1); }
  60% { opacity: 0.9; transform: scale(1.25); }
  70%, 100% { opacity: 0; transform: scale(1.5); } /* pop! */
}
@keyframes sbotZ {
  0% { opacity: 0; transform: translateY(2px); }
  35% { opacity: 0.9; }
  100% { opacity: 0; transform: translateY(-5px); }
}

/* Pusher bot — hard hat, determined brows, scrambling legs, flying sweat,
   wobbling commit block (it keeps slipping back, bless its little servos) */
.pbot__bob { animation: pbotPush 1.6s ease-in-out infinite; }
.pbot__block { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 0.8; }
.pbot__hash { font: 700 2.6px var(--font-mono); fill: var(--accent); text-anchor: middle; }
.pbot__hat { fill: #ffb347; stroke: #d97706; stroke-width: 0.5; }
.pbot__brow { stroke: var(--accent); stroke-width: 0.8; fill: none; stroke-linecap: round; }
.pbot__block-w {
  transform-box: fill-box; transform-origin: center bottom;
  animation: pbotBlockWobble 1.6s ease-in-out infinite;
}
.pbot__leg { transform-box: fill-box; transform-origin: center top; }
.pbot__leg--1 { animation: pbotScramble 0.32s ease-in-out infinite alternate; }
.pbot__leg--2 { animation: pbotScramble 0.32s ease-in-out infinite alternate-reverse; }
.pbot__sweat {
  fill: var(--accent-2); opacity: 0;
  animation: pbotSweat 1.6s ease-out infinite;
}
.pbot__sweat--2 { animation-delay: 0.55s; }
@keyframes pbotPush {
  0% { transform: translate(0, 0); }
  55% { transform: translate(2.2px, -1.1px); } /* heave... */
  70% { transform: translate(1.4px, -0.7px); } /* ...slip! */
  100% { transform: translate(0, 0); }
}
@keyframes pbotBlockWobble {
  0%, 100% { transform: rotate(0deg); }
  55% { transform: rotate(-4deg); }
  75% { transform: rotate(2.5deg); }
}
@keyframes pbotScramble {
  from { transform: rotate(-16deg); }
  to { transform: rotate(16deg); }
}
@keyframes pbotSweat {
  0%, 30% { opacity: 0; transform: translate(0, 0); }
  50% { opacity: 0.9; }
  100% { opacity: 0; transform: translate(-2.5px, -3px); }
}

/* Victory bot — arms up, happy face, hopping beside its streak flag */
.vbot__smile { stroke: var(--accent); stroke-width: 0.7; fill: none; stroke-linecap: round; }
.vbot__hop {
  transform-box: fill-box; transform-origin: center bottom;
  animation: vbotHop 1s cubic-bezier(0.36, 0, 0.4, 1) infinite;
}
.vbot__spark { opacity: 0; transform-box: fill-box; transform-origin: center; }
.vbot__spark--1 { fill: #ffd866; animation: vbotSpark 2s ease-out infinite; }
.vbot__spark--2 { fill: var(--accent-2); animation: vbotSpark 2s ease-out infinite 0.7s; }
@keyframes vbotHop {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  15% { transform: translateY(0.6px) scale(1.08, 0.85); } /* squash */
  45% { transform: translateY(-3.2px) scale(0.95, 1.08); } /* boing */
  75% { transform: translateY(0) scale(1, 1); }
}
@keyframes vbotSpark {
  0%, 20% { opacity: 0; transform: scale(0.4) rotate(0deg); }
  45% { opacity: 1; transform: scale(1.15) rotate(40deg); }
  75%, 100% { opacity: 0; transform: scale(0.5) rotate(80deg); }
}

/* UFO patrol — dome pilot, blinking underlights, pulsing scanner beam */
.ufo__hull { fill: var(--bot-body); stroke: var(--accent); stroke-width: 1; }
.ufo__dome { fill: var(--bot-screen); stroke: var(--accent); stroke-width: 0.8; }
.ufo__beam { fill: var(--accent); opacity: 0.13; animation: ufoBeam 1.6s ease-in-out infinite; }
.ufo__light { fill: var(--accent-2); animation: ufoLight 1.2s linear infinite; }
.ufo__light--2 { animation-delay: 0.4s; }
.ufo__light--3 { animation-delay: 0.8s; }
.ufo__bob { animation: ufoBob 3s ease-in-out infinite; }
@keyframes ufoBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2.5px); }
}
@keyframes ufoBeam {
  0%, 100% { opacity: 0.1; }
  50% { opacity: 0.3; }
}
@keyframes ufoLight {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}

/* Streak flag */
.cflag__pole { stroke: var(--text-dim); stroke-width: 1; stroke-linecap: round; }
.cflag__cloth {
  fill: var(--accent);
  transform-box: fill-box; transform-origin: left center;
  animation: cflagWave 1.8s ease-in-out infinite;
}
@keyframes cflagWave {
  0%, 100% { transform: scaleX(1); }
  50% { transform: scaleX(0.8) skewY(4deg); }
}

.bot-bubble { opacity: 0; transition: opacity 0.28s ease; }
.bot-bubble--in { opacity: 1; }
.bot-bubble__box { fill: var(--bot-body); stroke: var(--accent); stroke-width: 0.8; }
.bot-bubble__tail { fill: var(--bot-body); stroke: var(--accent); stroke-width: 0.8; }
.bot-bubble__text { font: 500 7.5px var(--font-mono); fill: var(--text); text-anchor: middle; }

@keyframes botLife {
  0% { transform: translateY(0) rotate(0) scale(1, 1); }
  12% { transform: translateY(-2px) rotate(-1deg) scale(1, 1); }
  24% { transform: translateY(0) rotate(0) scale(1, 1); }
  36% { transform: translateY(-2px) rotate(1deg) scale(1, 1); }
  46% { transform: translateY(0) rotate(0) scale(1, 1); animation-timing-function: ease-in; }
  53% { transform: translateY(1.5px) rotate(0) scale(1.12, 0.76); animation-timing-function: cubic-bezier(0.1, 0.8, 0.3, 1); } /* deep crouch */
  59% { transform: translateY(-16px) rotate(-5deg) scale(0.92, 1.14); animation-timing-function: cubic-bezier(0.3, 0.6, 0.6, 1); } /* explosive leap */
  64% { transform: translateY(-18px) rotate(3deg) scale(1.02, 0.98); animation-timing-function: cubic-bezier(0.7, 0, 1, 0.6); } /* weightless apex */
  71% { transform: translateY(0.5px) rotate(0) scale(1.16, 0.74); animation-timing-function: cubic-bezier(0.1, 0.9, 0.3, 1); } /* gravity slam */
  77% { transform: translateY(-3.5px) rotate(-2deg) scale(0.95, 1.08); } /* happy rebound */
  82% { transform: translateY(0) rotate(1.5deg) scale(1.04, 0.97); }
  86% { transform: translateY(0) rotate(-1deg) scale(0.99, 1.01); }  /* settle wiggle */
  90%, 100% { transform: translateY(0) rotate(0) scale(1, 1); }
}
@keyframes botAntenna {
  0%, 10%, 22%, 34%, 46% { transform: rotate(0); }
  16% { transform: rotate(3deg); }
  28% { transform: rotate(-3deg); }
  53% { transform: rotate(14deg); }    /* bends as the body crouches */
  59% { transform: rotate(-22deg); }   /* whips back on launch */
  64% { transform: rotate(9deg); }
  71% { transform: rotate(18deg); }    /* whips forward on landing */
  77% { transform: rotate(-10deg); }
  83% { transform: rotate(4deg); }
  89%, 100% { transform: rotate(0); }
}
@keyframes botArmR {
  0%, 50% { transform: rotate(0); }
  53% { transform: rotate(22deg); }    /* wind-up behind the body */
  59% { transform: rotate(-150deg); }  /* YAY! */
  64% { transform: rotate(-165deg); }
  71% { transform: rotate(-18deg); }
  77% { transform: rotate(12deg); }    /* overshoot */
  83%, 100% { transform: rotate(0); }
}
@keyframes botArmL {
  0%, 50% { transform: rotate(0); }
  53% { transform: rotate(-22deg); }
  59% { transform: rotate(150deg); }
  64% { transform: rotate(165deg); }
  71% { transform: rotate(18deg); }
  77% { transform: rotate(-12deg); }
  83%, 100% { transform: rotate(0); }
}
@keyframes botLegs {
  0%, 50% { transform: translateY(0) scaleY(1); }
  53% { transform: translateY(0) scaleY(0.8); }          /* compressed */
  59% { transform: translateY(-1px) scaleY(1.15); }      /* stretch on launch */
  62%, 66% { transform: translateY(-3px) scaleY(0.68); } /* tucked in mid-air */
  71% { transform: translateY(0) scaleY(0.85); }         /* absorb landing */
  77%, 100% { transform: translateY(0) scaleY(1); }
}
@keyframes botEyeLook {
  0%, 8%, 20%, 30%, 42%, 50% { transform: translate(0, 0); }
  12%, 16% { transform: translate(1.2px, 0); }      /* glance right */
  34%, 38% { transform: translate(-1.2px, 0.2px); } /* glance left */
  53% { transform: translate(0, 1px); }             /* focus down, ready */
  58%, 66% { transform: translate(0, -1.2px); }     /* look up — wheee! */
  71% { transform: translate(0, 0.8px); }
  77%, 100% { transform: translate(0, 0); }
}
@keyframes botShadow {
  0%, 46%, 83%, 100% { transform: scale(1); opacity: 0.28; }
  53% { transform: scale(1.12); opacity: 0.34; }
  59% { transform: scale(0.55); opacity: 0.12; }
  64% { transform: scale(0.5); opacity: 0.1; }
  71% { transform: scale(1.18); opacity: 0.36; }
  77% { transform: scale(0.95); opacity: 0.26; }
}
@keyframes botSpark {
  0%, 55% { opacity: 0; transform: translateY(4px) scale(0.3); }
  60% { opacity: 1; transform: translateY(-2px) scale(1.15); }
  68% { opacity: 1; transform: translateY(-7px) scale(1); }
  76%, 100% { opacity: 0; transform: translateY(-11px) scale(0.4); }
}
@keyframes botAntJump {
  0%, 50%, 80%, 100% { transform: scale(1); }
  60% { transform: scale(1.7); }
  68% { transform: scale(1.45); }
}
@keyframes botHeart {
  0%, 100% { transform: scale(1); }
  18% { transform: scale(1.3); }
  36% { transform: scale(1); }
}
@keyframes botBlink { 0%, 91%, 100% { transform: scaleY(1); } 94% { transform: scaleY(0.15); } 97% { transform: scaleY(1); } }
@keyframes botWave {
  0%, 55%, 100% { transform: rotate(0deg); }
  65% { transform: rotate(-18deg); }
  75% { transform: rotate(10deg); }
  85% { transform: rotate(-14deg); }
}
@keyframes botPulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

/* ---- Generated LiDAR cross-section (Ground Binary Classification) ---- */
.terminal__body--lidar { padding: 12px 12px 8px; }
.lidar { display: block; width: 100%; height: auto; }
.lidar__grid { stroke: rgba(255, 255, 255, 0.06); stroke-dasharray: 3 6; }
.lidar__raw { fill: #8a94a6; opacity: 0.3; }
.lidar__g { fill: #00e696; opacity: 0.9; }
.lidar__ng { fill: #38d6ff; opacity: 0.7; }
.lidar__key-raw { fill: #8a94a6; }
.lidar__key-g { fill: #00e696; }
.lidar__key-ng { fill: #38d6ff; }
.lidar__legend text { fill: rgba(255, 255, 255, 0.45); font: 10px var(--font-mono); }
.lidar__scan { stroke: #00e696; stroke-width: 1.2; opacity: 0.45; }

/* ---- Generated 3D LiDAR scan (LiDAR Ground ML) ---- */
.l3d { max-height: 340px; margin: 0 auto; }
.l3d__raw { fill: #8a94a6; opacity: 0.28; }
.l3d__gnd { fill: #00e696; opacity: 0.85; }
.l3d__veg { fill: #a3e635; opacity: 0.85; }
.l3d__bld { fill: #fb923c; opacity: 0.9; }
.l3d__key-gnd { fill: #00e696; }
.l3d__key-veg { fill: #a3e635; }
.l3d__key-bld { fill: #fb923c; }
.l3d__beam { fill: #00e696; opacity: 0.08; }
.l3d__front { stroke: #00e696; stroke-width: 1; opacity: 0.55; }
.l3d__hull { fill: #1f2a37; stroke: #00e696; stroke-width: 0.8; }
.l3d__arm { stroke: #00e696; stroke-width: 0.8; }
.l3d__rotor {
  fill: #00e696; opacity: 0.5;
  transform-box: fill-box; transform-origin: center;
  animation: l3dRotor 0.4s linear infinite;
}
.l3d__blink { fill: #ff6b6b; animation: l3dBlink 1.1s ease-in-out infinite; }
@keyframes l3dRotor {
  0%, 100% { transform: scaleX(1); }
  50% { transform: scaleX(0.25); }
}
@keyframes l3dBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.15; } }

@media (prefers-reduced-motion: reduce) {
  .bot, .bot__eyes, .bot__eyelook, .bot__armwave, .bot__arm-r, .bot__arm-l, .bot__legs, .bot__antenna,
  .bot__ant, .bot__heart, .bot__shadow, .bot__spark, .ftongue__sway, .kny__core, .flame__spk,
  .fire-aura, .flame__glow, .flame__ember, .iso--fire .iso__t,
  .l3d__rotor, .l3d__blink,
  .sbot__z, .sbot__body, .sbot__snore, .pbot__bob, .pbot__block-w, .pbot__leg,
  .pbot__sweat, .vbot__hop, .vbot__spark, .ufo__bob, .ufo__beam, .ufo__light,
  .cflag__cloth,
  .contrib__console .cl__caret, .contrib__console .cl--out { animation: none; }
  .sbot__z { opacity: 0.7; }
  .sbot__snore, .pbot__sweat, .vbot__spark { opacity: 0; }
  .contrib__iso .iso, .contrib__iso .bot-wrap, .contrib__iso .flame, .contrib__iso .iso__month {
    opacity: 1; animation: none;
  }
  .bot-bubble { transition: none; }
}

/* ============================================================
   PROJECTS
   ============================================================ */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.project-card {
  display: flex; flex-direction: column;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
  transition: all var(--transition); position: relative; overflow: hidden;
}
.project-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0; transition: opacity var(--transition);
}
.project-card:hover {
  border-color: var(--border-hover); transform: translateY(-5px);
  box-shadow: var(--shadow);
}
.project-card:hover::before { opacity: 1; }

.project-card--featured { grid-column: span 1; }

.project-card__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.project-card__folder { color: var(--accent); }
.project-card__links { display: flex; gap: 12px; align-items: center; }
.project-card__links a {
  color: var(--text-dim); display: grid; place-items: center;
  transition: color var(--transition);
}
.project-card__links a:hover { color: var(--accent); }
.project-card__stars {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-dim);
}
.project-card__stars svg { color: var(--accent); }
.project-card__stars[hidden] { display: none; }

.project-card h3 {
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 600;
  margin-bottom: 10px;
}
.project-card h3 a { color: var(--text); }
.project-card h3 a:hover { color: var(--accent); text-decoration: none; }

.project-card p { color: var(--text-dim); font-size: 0.93rem; flex: 1; }

.project-card__tech {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px;
}
.project-card__tech span {
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--accent);
}

.projects__more { text-align: center; margin-top: 40px; }

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline { position: relative; max-width: 720px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px;
  width: 2px; background: linear-gradient(180deg, var(--accent), var(--border));
  border-radius: 2px;
}

.timeline-item { position: relative; padding: 0 0 38px 40px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: 0; top: 6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent);
  box-shadow: 0 0 12px var(--glow);
}

.timeline-item__period {
  font-family: var(--font-mono); font-size: 0.8rem;
  color: var(--accent); letter-spacing: 0.04em;
}
.timeline-item__title {
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 600;
  margin-top: 4px;
}
.timeline-item__org { color: var(--text-dim); font-size: 0.9rem; }
.timeline-item__kind {
  display: inline-block; margin-left: 8px; padding: 2px 10px;
  font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase;
  letter-spacing: 0.06em; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}
.timeline-item__desc { color: var(--text-dim); font-size: 0.93rem; margin-top: 8px; }

/* ============================================================
   CONTACT
   ============================================================ */
.section--contact { text-align: center; padding-bottom: 120px; }
.contact__lead { color: var(--text-dim); font-size: 1.1rem; margin-bottom: 32px; }
.contact__socials { display: flex; justify-content: center; gap: 14px; margin-top: 40px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px; text-align: center;
  color: var(--text-dim); font-size: 0.82rem;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .skills, .projects { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1fr; }
  .about__photo { order: -1; }
  .spotlight { gap: 56px; }
  .spotlight__item { grid-template-columns: 1fr; gap: 22px; }
  .spotlight__item--flip .spotlight__media { order: 0; }
  .spotlight__item--flip .spotlight__content { order: 1; }
}

@media (max-width: 640px) {
  .skills, .projects { grid-template-columns: 1fr; }
  .hero { padding-top: 72px; }
  .section { padding: 64px 24px; }
  .hero__stats { gap: 26px; }
  .hero__stat-value { font-size: 1.4rem; }
  .terminal__body { font-size: 0.68rem; padding: 14px; }

  .nav__burger { display: flex; }
  .nav__links {
    position: fixed; inset: 64px 0 auto 0; z-index: 99;
    flex-direction: column; gap: 4px; padding: 16px 24px 24px;
    background: var(--nav-bg);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-130%); transition: transform var(--transition);
  }
  .nav__links.open { transform: none; }
  .nav__links a { padding: 12px 0; font-size: 1.05rem; width: 100%; }
  .nav__cta { text-align: center; margin-top: 8px; }
}
