/* ==========================================================
   Om Raj - portfolio
   Terminal / developer theme. No build step, no framework.
   ========================================================== */

:root {
  --bg: #0b0f14;
  --bg-2: #0e141b;
  --surface: #111820;
  --surface-2: #151d27;
  --border: #1f2a35;
  --border-2: #2a3846;
  --text: #d6e2ee;
  --muted: #7d8fa0;
  --accent: #3ddc97;
  --accent-2: #4cc9f0;
  --warn: #ffb454;
  --violet: #b794f6;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .6);
  --glow: 61, 220, 151;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 14px;
  --nav-h: 64px;
}

:root[data-theme="light"] {
  --bg: #f5f7fa;
  --bg-2: #eef2f6;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #dbe2ea;
  --border-2: #c7d1dc;
  --text: #1c2733;
  --muted: #5b6b7b;
  --accent: #0a8f5b;
  --accent-2: #0a78a6;
  --warn: #b26a00;
  --violet: #6b46c1;
  --shadow: 0 20px 40px -24px rgba(20, 40, 70, .35);
  --glow: 10, 143, 91;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
b, strong { font-weight: 600; color: var(--text); }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(var(--glow), .3); }

.container { width: min(1120px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
.prompt, .p { color: var(--accent); font-family: var(--mono); }
kbd {
  font-family: var(--mono); font-size: .72rem; padding: 1px 6px;
  border: 1px solid var(--border-2); border-bottom-width: 2px; border-radius: 5px;
  background: var(--surface-2); color: var(--muted);
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--accent); color: #04130c; padding: 8px 14px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 12px; text-decoration: none; }

/* ---------- Background layers ---------- */
.progress {
  position: fixed; inset: 0 auto auto 0; height: 3px; width: 0; z-index: 120;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: .35;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 75%);
}
.bg-glow {
  position: fixed; z-index: -1; pointer-events: none;
  width: 620px; height: 620px; left: 0; top: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--glow), .13), transparent 65%);
  transform: translate3d(calc(50vw - 310px), 80px, 0);
  transition: transform .25s ease-out;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100; height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .25s;
}
.nav.is-scrolled { border-bottom-color: var(--border); }
.nav__inner { height: 100%; width: min(1120px, 100% - 40px); margin-inline: auto; display: flex; align-items: center; gap: 24px; }
.brand { font-family: var(--mono); font-weight: 700; font-size: .95rem; color: var(--text); display: inline-flex; align-items: center; gap: 1px; }
.brand:hover { text-decoration: none; }
.brand__prompt { color: var(--accent); }
.brand__sep { color: var(--muted); }
.brand__path { color: var(--accent-2); }
.brand__dollar { color: var(--muted); margin: 0 6px 0 2px; }
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a {
  font-family: var(--mono); font-size: .82rem; color: var(--muted);
  padding: 6px 12px; border-radius: 8px; transition: color .2s, background .2s;
}
.nav__links a::before { content: "./"; opacity: .45; }
.nav__links a:hover, .nav__links a.is-active { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav__links a.is-active { color: var(--accent); }
.nav__actions { display: flex; align-items: center; gap: 8px; }
.kbd-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 9px;
  font-size: .78rem; color: var(--muted); transition: border-color .2s, color .2s;
}
.kbd-btn:hover { border-color: var(--accent); color: var(--text); }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  transition: border-color .2s, transform .2s;
}
.icon-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.nav__burger { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
:root[data-theme="light"] .icon-sun { display: none; }
:root[data-theme="light"] .icon-moon { display: block; }

.cursor {
  display: inline-block; width: 8px; height: 1.05em; margin-left: 3px; vertical-align: -2px;
  background: var(--accent); animation: blink 1.05s steps(1) infinite;
}
.cursor--lg { width: 10px; height: 1.1em; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Buttons / chips ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px;
  border-radius: 10px; font-weight: 600; font-size: .92rem; border: 1px solid transparent;
  transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: #03130b; box-shadow: 0 10px 26px -12px rgba(var(--glow), .8); }
.btn--primary:hover { box-shadow: 0 14px 30px -10px rgba(var(--glow), .9); }
.btn--ghost { background: var(--surface); border-color: var(--border-2); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); }
:root[data-theme="light"] .btn--primary { color: #fff; }

.chip {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: .76rem;
  padding: 4px 11px; border-radius: 999px; border: 1px solid var(--border-2); color: var(--muted);
  background: var(--surface-2); white-space: nowrap;
}
.chip--live { color: var(--accent); border-color: rgba(var(--glow), .4); background: rgba(var(--glow), .08); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(var(--glow), .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(var(--glow), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--glow), 0); } }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tags span {
  font-family: var(--mono); font-size: .74rem; color: var(--accent-2);
  padding: 3px 10px; border-radius: 6px; background: color-mix(in srgb, var(--accent-2) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-2) 22%, transparent);
}

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 8vw, 96px) 0 56px; }
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: .82rem; color: var(--muted); margin-bottom: 18px; }
.hero__title { font-size: clamp(2.5rem, 6.4vw, 4.6rem); line-height: 1.04; font-weight: 800; letter-spacing: -.03em; }
.grad { background: linear-gradient(100deg, var(--accent), var(--accent-2) 60%, var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__role { margin-top: 14px; font-family: var(--mono); font-size: clamp(1.05rem, 2.4vw, 1.4rem); min-height: 1.9em; }
.typed { color: var(--accent); font-weight: 700; }
.hero__lead { margin-top: 18px; max-width: 54ch; color: var(--muted); font-size: 1.06rem; }
.hero__lead strong { color: var(--text); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 26px; font-family: var(--mono); font-size: .84rem; }
.hero__links a { color: var(--muted); }
.hero__links a:hover { color: var(--accent); text-decoration: none; }

/* ---------- Terminal window ---------- */
.term {
  background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--radius);
  box-shadow: var(--shadow), 0 0 0 1px rgba(var(--glow), .04); overflow: hidden;
  transform-style: preserve-3d; transition: transform .2s ease-out;
}
.term__bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.tl { width: 12px; height: 12px; border-radius: 50%; }
.tl--r { background: #ff5f56; } .tl--y { background: #ffbd2e; } .tl--g { background: #27c93f; }
.term__title { margin-left: 10px; font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.term__body { padding: 20px 22px; font-family: var(--mono); font-size: .88rem; line-height: 1.85; min-height: 320px; }
.tline { display: block; white-space: pre-wrap; word-break: break-word; }
.tline .p { margin-right: 8px; }
.tline .out { color: var(--text); }
.tline .k { color: var(--accent-2); }
.tline .v { color: var(--warn); }
.tline .c { color: var(--muted); }
.term--flat .term__body { min-height: 0; }

/* ---------- Stats ---------- */
.stats { padding: 8px 0 24px; }
.stats__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.stat {
  padding: 18px 16px; border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  transition: transform .25s, border-color .25s;
}
.stat:hover { transform: translateY(-4px); border-color: var(--accent); }
.stat__num { font-family: var(--mono); font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700; color: var(--accent); line-height: 1.1; }
.stat__label { margin-top: 8px; font-size: .78rem; color: var(--muted); line-height: 1.45; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0 0; }
.section__head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 34px; }
.section__tag { font-family: var(--mono); font-size: .8rem; color: var(--muted); border: 1px solid var(--border-2); padding: 2px 8px; border-radius: 6px; }
.section__title { font-family: var(--mono); font-size: clamp(1.3rem, 3vw, 1.8rem); font-weight: 700; letter-spacing: -.01em; }
.section__title .prompt { margin-right: 8px; }

.card {
  position: relative; padding: 26px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: border-color .25s, transform .25s, box-shadow .25s;
}
.card:hover { border-color: var(--border-2); box-shadow: var(--shadow); }
/* mouse spotlight, position set from JS */
.spot::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--glow), .09), transparent 55%);
}
.spot:hover::after { opacity: 1; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 300px 1fr; gap: 44px; align-items: start; }
.photo { position: relative; margin: 0; width: 100%; max-width: 300px; }
.photo img {
  position: relative; z-index: 1; border-radius: 22px; border: 1px solid var(--border-2);
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 24%, var(--surface)), color-mix(in srgb, var(--accent-2) 20%, var(--surface)));
  aspect-ratio: 3 / 4; object-fit: cover; object-position: top center;
}
.photo__ring { position: absolute; inset: -10px; border-radius: 28px; z-index: 0; border: 1px dashed var(--border-2); }
.photo figcaption { position: absolute; z-index: 2; left: 12px; bottom: 12px; font-family: var(--mono); font-size: .74rem; padding: 3px 9px; border-radius: 6px; background: rgba(0, 0, 0, .55); color: #e6fff3; backdrop-filter: blur(6px); }
.about__text p { color: var(--muted); font-size: 1.04rem; margin-bottom: 16px; max-width: 68ch; }
.about__text strong { color: var(--text); }
.facts { margin-top: 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fact { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.fact__k { font-family: var(--mono); font-size: .72rem; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
.fact__v { font-size: .92rem; }

/* ---------- Timeline ---------- */
.timeline { position: relative; display: grid; gap: 22px; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--accent), var(--border-2) 70%, transparent); }
.job { position: relative; }
.job__node {
  position: absolute; left: -34px; top: 26px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent); box-shadow: 0 0 0 5px rgba(var(--glow), .12);
}
.job__node--past { border-color: var(--border-2); box-shadow: none; }
.job__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 16px; align-items: flex-start; margin-bottom: 14px; }
.job__role { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
.job__org { color: var(--accent-2); font-weight: 500; font-size: .95rem; }
.bullets { display: grid; gap: 11px; }
.bullets li { position: relative; padding-left: 22px; color: var(--muted); font-size: .96rem; }
.bullets li::before { content: ">"; position: absolute; left: 0; top: 0; font-family: var(--mono); color: var(--accent); font-weight: 700; }
.bullets b { color: var(--text); font-weight: 600; }

/* ---------- Skills ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filter {
  font-family: var(--mono); font-size: .8rem; padding: 7px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border-2); color: var(--muted); transition: all .2s;
}
.filter:hover { color: var(--text); border-color: var(--accent); }
.filter.is-active { background: var(--accent); border-color: var(--accent); color: #03130b; font-weight: 700; }
:root[data-theme="light"] .filter.is-active { color: #fff; }
.skills { display: flex; flex-wrap: wrap; gap: 10px; }
.skill {
  font-family: var(--mono); font-size: .86rem; padding: 8px 14px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  transition: transform .2s, border-color .2s, opacity .25s, background .2s; cursor: default;
}
.skill::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 9px; background: var(--accent); }
.skill[data-cat="fw"]::before { background: var(--accent-2); }
.skill[data-cat="db"]::before { background: var(--warn); }
.skill[data-cat="ai"]::before { background: var(--violet); }
.skill[data-cat="cloud"]::before { background: #ff7b72; }
.skill[data-cat="tools"]::before { background: var(--muted); }
.skill:hover { transform: translateY(-3px); border-color: var(--accent); }
.skill.is-hidden { display: none; }

/* ---------- Projects ---------- */
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.project { display: flex; flex-direction: column; }
.project:hover { transform: translateY(-5px); }
.project__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.project__name { font-family: var(--mono); font-size: 1.35rem; font-weight: 700; }
.project__sub { color: var(--muted); font-size: .92rem; }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 18px; font-family: var(--mono); font-size: .74rem; }
.flow span { padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text); }
.flow i { width: 16px; height: 1px; background: var(--accent); position: relative; }
.flow i::after { content: ""; position: absolute; right: 0; top: -3px; border-left: 5px solid var(--accent); border-top: 3.5px solid transparent; border-bottom: 3.5px solid transparent; }
.project .tags { margin-top: 20px; }
.link-arrow { margin-top: auto; padding-top: 20px; font-family: var(--mono); font-size: .88rem; font-weight: 700; color: var(--accent); display: inline-flex; gap: 6px; }
.link-arrow span { transition: transform .2s; }
.link-arrow:hover { text-decoration: none; }
.link-arrow:hover span { transform: translateX(5px); }

.earlier { margin-top: 26px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.earlier summary { list-style: none; cursor: pointer; padding: 16px 22px; font-family: var(--mono); font-size: .95rem; display: flex; align-items: center; gap: 8px; user-select: none; }
.earlier summary::-webkit-details-marker { display: none; }
.earlier summary::after { content: "+"; margin-left: auto; color: var(--accent); font-size: 1.2rem; transition: transform .2s; }
.earlier[open] summary::after { content: "-"; }
.earlier__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 4px 18px 20px; }
.mini {
  display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-2); color: var(--muted); font-size: .86rem; transition: border-color .2s, transform .2s;
}
.mini:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-3px); }
.mini b { color: var(--text); font-size: .95rem; }
.mini em { margin-top: auto; font-style: normal; font-family: var(--mono); font-size: .72rem; color: var(--accent-2); }

/* ---------- Competitive ---------- */
.ratings { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.rating {
  position: relative; display: flex; flex-direction: column; gap: 4px; padding: 20px; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text);
  transition: transform .25s, border-color .25s;
}
.rating:hover { text-decoration: none; transform: translateY(-4px); border-color: var(--accent); }
.rating__site { font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.rating__big { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; color: var(--accent); }
.rating__meta { font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.log { margin-top: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.log li { display: grid; grid-template-columns: 90px 1fr auto; gap: 14px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--border); font-size: .94rem; }
.log li:last-child { border-bottom: 0; }
.log__rank { font-family: var(--mono); font-weight: 700; color: var(--warn); }
.log__text { color: var(--muted); }
.log a { font-family: var(--mono); font-size: .78rem; border: 1px solid var(--border-2); padding: 3px 10px; border-radius: 6px; }

/* ---------- Education ---------- */
.edu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.edu__score { font-family: var(--mono); color: var(--muted); }
.edu__score b { color: var(--accent); font-size: 1.2rem; }

/* ---------- Contact ---------- */
.contact { padding-bottom: clamp(56px, 8vw, 96px); }
.contact__box { max-width: 780px; }
.contact__body { padding: 24px; }
.contact__body p { margin-bottom: 10px; word-break: break-word; }
.mail { color: var(--warn); }
.contact__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; font-family: var(--sans); }

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

/* ---------- Command palette ---------- */
.palette[hidden] { display: none; }
.palette { position: fixed; inset: 0; z-index: 300; display: grid; place-items: start center; padding: 14vh 16px 16px; background: rgba(4, 8, 12, .62); backdrop-filter: blur(6px); }
.palette__panel { width: min(560px, 100%); background: var(--surface); border: 1px solid var(--border-2); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; animation: pop .16s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.palette__search { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.palette__search input { flex: 1; background: transparent; border: 0; outline: 0; color: var(--text); font-family: var(--mono); font-size: .95rem; }
.palette__list { max-height: 340px; overflow-y: auto; padding: 8px; }
.palette__item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; font-family: var(--mono); font-size: .88rem; cursor: pointer; }
.palette__item small { margin-left: auto; color: var(--muted); font-size: .72rem; }
.palette__item.is-sel { background: rgba(var(--glow), .12); color: var(--accent); }
.palette__empty { padding: 18px; text-align: center; color: var(--muted); font-family: var(--mono); font-size: .86rem; }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 400; transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
  padding: 10px 18px; border-radius: 10px; background: var(--accent); color: #03130b; font-weight: 600; font-size: .88rem;
  transition: all .3s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
:root[data-theme="light"] .toast { color: #fff; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
.stats__grid .reveal:nth-child(2), .ratings .reveal:nth-child(2) { transition-delay: .06s; }
.stats__grid .reveal:nth-child(3), .ratings .reveal:nth-child(3) { transition-delay: .12s; }
.stats__grid .reveal:nth-child(4), .ratings .reveal:nth-child(4) { transition-delay: .18s; }
.stats__grid .reveal:nth-child(5) { transition-delay: .24s; }
.stats__grid .reveal:nth-child(6) { transition-delay: .3s; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .stats__grid { grid-template-columns: repeat(3, 1fr); }
  .ratings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .earlier__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .nav__burger { display: grid; }
  .kbd-btn { display: none; }
  .nav__links {
    position: absolute; top: var(--nav-h); left: 0; right: 0; margin: 0; flex-direction: column; gap: 0; padding: 8px 20px 16px;
    background: var(--bg); border-bottom: 1px solid var(--border); display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 12px 8px; }
  .nav__actions { margin-left: auto; }
  .about { grid-template-columns: 1fr; gap: 28px; }
  .photo { max-width: 240px; }
  .projects, .edu { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: 1fr; }
  .earlier__grid { grid-template-columns: 1fr; }
  .log li { grid-template-columns: 1fr auto; }
  .log__rank { grid-column: 1 / -1; }
  .card { padding: 20px; }
  .timeline { padding-left: 28px; }
  .job__node { left: -28px; }
  .timeline::before { left: 7px; }
  .term__body { font-size: .8rem; padding: 16px; min-height: 290px; }
}

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