/* ==========================================================================
   Yashraj Singh Rajawat — portfolio design system
   Colour carries meaning: cyan = work & data, violet = education & learning.
   Radius hierarchy: chips 4px, buttons 8px, cards 12px.
   ========================================================================== */

:root {
  --bg: #0F131A;
  --bg-tint: #121720;
  --panel: #161B24;
  --panel-2: #1A202B;
  --line: #273042;
  --line-soft: #1E2532;
  --line-strong: #3A4659;
  --text: #E7EAF0;
  --text-soft: #C7CDD8;
  --muted: #9AA3B2;
  --cyan: #5FC9E8;
  --cyan-hi: #86D8EF;
  --cyan-ink: #06131A;
  --cyan-wash: rgba(95, 201, 232, 0.08);
  --cyan-edge: rgba(95, 201, 232, 0.42);
  --violet: #9A8CF5;
  --violet-wash: rgba(154, 140, 245, 0.10);

  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "IBM Plex Sans Condensed", "IBM Plex Sans", "Arial Narrow", system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.3125rem;
  --step-3: clamp(1.6rem, 1.25rem + 1.4vw, 2.35rem);
  --step-4: clamp(2.2rem, 1.4rem + 3.2vw, 3.4rem);
  --step-5: clamp(2.6rem, 1.2rem + 4.2vw, 4.4rem);

  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 40px);
  --header-h: 64px;
  --section-y: clamp(64px, 9vw, 116px);
  --radius-chip: 4px;
  --radius-btn: 8px;
  --radius-card: 12px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  background: var(--bg);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; }
strong { font-weight: 600; color: var(--text); }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--cyan); color: var(--cyan-ink); padding: 10px 16px; border-radius: var(--radius-btn); font-weight: 600;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.icon { flex: none; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: var(--radius-btn);
  font-weight: 500; font-size: 0.975rem; line-height: 1.2; text-align: center;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.btn--primary { background: var(--cyan); color: var(--cyan-ink); }
.btn--primary:hover { background: var(--cyan-hi); }
.btn--outline { border-color: var(--line-strong); color: var(--text); }
.btn--outline:hover { border-color: var(--cyan-edge); color: var(--cyan-hi); background: var(--cyan-wash); }
.btn--ghost { background: rgba(255,255,255,.035); border-color: var(--line); color: var(--text-soft); }
.btn--ghost:hover { border-color: var(--cyan-edge); color: var(--cyan-hi); }
.btn--small { min-height: 38px; padding: 0 14px; font-size: var(--step--1); }

/* ---------------------------------------------------------------- chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 0.8125rem; line-height: 1; padding: 7px 10px; border-radius: var(--radius-chip);
  border: 1px solid var(--line); color: var(--text-soft); background: rgba(255,255,255,.02);
  transition: border-color .25s var(--ease), color .25s var(--ease), background-color .25s var(--ease);
}
.chips--quiet .chip { color: var(--muted); }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(15, 19, 26, 0.82);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line-soft);
}
.site-header__inner {
  height: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter);
  display: flex; align-items: center; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; letter-spacing: 0.02em; }
.mark { color: var(--cyan); }
.mark__in { fill: var(--text); }
.mark__hidden { fill: var(--cyan); }
.mark__out { fill: var(--violet); }

.site-nav { margin-left: auto; }
.site-nav__list { display: flex; gap: 2px; }
.site-nav__link {
  display: block; padding: 8px 11px; border-radius: 6px; font-size: 0.925rem; color: var(--muted);
  position: relative; transition: color .2s var(--ease);
}
.site-nav__link:hover { color: var(--text); }
.site-nav__link.is-active { color: var(--text); }
.site-nav__link.is-active::after {
  content: ""; position: absolute; left: 11px; right: 11px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--cyan);
}
.site-nav__mobile-extras { display: none; }

.site-header__actions { display: flex; align-items: center; gap: 6px; }
.icon-link {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-btn);
  color: var(--muted); transition: color .2s var(--ease), background-color .2s var(--ease);
}
.icon-link:hover { color: var(--text); background: rgba(255,255,255,.05); }
.site-header__actions .btn { margin-left: 6px; }
.menu-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius-btn);
  background: transparent; cursor: pointer; place-items: center;
}
.menu-line { transition: transform .25s var(--ease); transform-origin: 12px 12px; }
.menu-toggle[aria-expanded="true"] .menu-line--a { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-line--b { transform: translateY(-4px) rotate(-45deg); }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; padding-block: clamp(28px, 5vw, 72px) clamp(40px, 6vw, 80px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto 40%; height: 120%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(40, 90, 140, 0.20), transparent 70%);
}
.hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero__disciplines { display: flex; flex-wrap: wrap; font-size: 0.8125rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.hero__disciplines span + span::before { content: "•"; color: var(--cyan); margin: 0 0.7em; }
.hero__name {
  margin-top: 18px; font-size: var(--step-5); font-weight: 600; line-height: 0.98; letter-spacing: -0.02em;
}
.hero__name span { display: block; }
.hero__title {
  margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px;
  font-family: var(--font-display); font-weight: 500; font-size: clamp(1.25rem, 1rem + 0.9vw, 1.6rem); color: var(--text);
}
.hero__title-sep { width: 1px; height: 1.1em; background: var(--cyan); }
.hero__tagline { margin-top: 22px; font-size: var(--step-2); line-height: 1.45; color: var(--text-soft); max-width: 34ch; }
.hero__intro { margin-top: 14px; color: var(--muted); max-width: 56ch; }
.hero__cta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero__links { margin-top: 22px; display: flex; gap: 22px; font-size: 0.925rem; color: var(--muted); }
.hero__links a { display: inline-flex; align-items: center; gap: 7px; padding-block: 6px; transition: color .2s var(--ease); }
.hero__links a:hover { color: var(--cyan-hi); }

.hero__visual { position: relative; width: 100%; max-width: 620px; aspect-ratio: 1 / 1; justify-self: end; }
.hero__network { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__portrait {
  position: absolute; top: 50%; right: 2%; width: 50%; aspect-ratio: 1 / 1; transform: translateY(-50%);
  border-radius: 50%; overflow: hidden; background: #cfd0d2;
  box-shadow: 0 0 0 1px var(--cyan-edge), 0 0 0 9px rgba(95, 201, 232, 0.05), 0 30px 90px -24px rgba(95, 201, 232, 0.35);
}
.hero__portrait img { width: 100%; height: 100%; object-fit: cover; }

.hero__stack { display: none; }
.hero__facts {
  margin-top: clamp(36px, 5vw, 56px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.hero__fact { padding: 20px 20px 4px 0; }
.hero__fact + .hero__fact { padding-left: 20px; border-left: 1px solid var(--line-soft); }
.hero__fact dt { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.1; }
.hero__fact dd { margin-top: 4px; font-size: var(--step--1); color: var(--muted); max-width: 22ch; }

/* one orchestrated load sequence */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__copy > * { opacity: 0; transform: translateY(10px); animation: rise .7s var(--ease) forwards; }
  .js .hero__copy > :nth-child(2) { animation-delay: .06s; }
  .js .hero__copy > :nth-child(3) { animation-delay: .14s; }
  .js .hero__copy > :nth-child(4) { animation-delay: .22s; }
  .js .hero__copy > :nth-child(5) { animation-delay: .28s; }
  .js .hero__copy > :nth-child(6) { animation-delay: .34s; }
  .js .hero__copy > :nth-child(7) { animation-delay: .40s; }
  .js .hero__portrait { opacity: 0; animation: portrait .9s .15s var(--ease) forwards; }
  .js .hero__network { opacity: 0; animation: fade 1.4s .35s var(--ease) forwards; }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes fade { to { opacity: 1; } }
@keyframes portrait { from { opacity: 0; transform: translateY(-50%) scale(.97); } to { opacity: 1; transform: translateY(-50%) scale(1); } }

/* ---------------------------------------------------------------- sections */
.section { padding-block: var(--section-y); }
.section--tint { background: var(--bg-tint); border-block: 1px solid var(--line-soft); }
.section__head { margin-bottom: clamp(28px, 4vw, 48px); }
.section__head h2 { font-size: var(--step-4); }
.section__lede { margin-top: 12px; color: var(--muted); max-width: 62ch; font-size: var(--step-1); line-height: 1.55; }
.section__head--split { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 40px; }

/* ---------------------------------------------------------------- about */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 0 clamp(24px, 5vw, 72px); }
.about .section__head { margin-bottom: 24px; }
.about__body p { font-size: var(--step-1); line-height: 1.7; color: var(--text-soft); max-width: 64ch; }
.about__body p + p { margin-top: 1em; }
.story { grid-column: 1 / -1; margin-top: clamp(48px, 6vw, 72px); }
.story__title { font-size: var(--step-2); font-weight: 500; color: var(--muted); font-family: var(--font-sans); letter-spacing: 0; }
.story__steps { margin-top: 24px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: s; position: relative; }
.story__steps::before {
  content: ""; position: absolute; top: 17px; left: 18px; right: 18px; height: 1px;
  background: linear-gradient(90deg, var(--cyan-edge), var(--line) 55%, var(--violet));
}
.story__step { position: relative; padding-right: 8px; }
.story__index {
  position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--cyan-edge); background: var(--bg); color: var(--cyan); font-family: var(--font-display); font-weight: 600;
}
.story__step:last-child .story__index { border-color: var(--violet); color: var(--violet); }
.story__stage { margin-top: 16px; font-family: var(--font-display); font-weight: 600; font-size: var(--step-2); }
.story__evidence { margin-top: 6px; color: var(--muted); font-size: 0.95rem; max-width: 30ch; }

/* ---------------------------------------------------------------- impact ledger */
.ledger { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 5vw, 64px); }
.ledger__row {
  display: grid; grid-template-columns: minmax(0, 13.5rem) minmax(0, 1fr); gap: 4px 24px; align-items: baseline;
  padding: 22px 0; border-top: 1px solid var(--line);
}
.ledger__figure { font-family: var(--font-display); font-weight: 600; white-space: nowrap; font-size: clamp(1.4rem, 1.1rem + 0.8vw, 1.8rem); line-height: 1.1; letter-spacing: -0.01em; }
.ledger__unit { color: var(--cyan); font-weight: 500; }
.ledger__what { color: var(--muted); font-size: 0.95rem; margin-top: 2px; }
.ledger__where { grid-column: 2; font-size: 0.8125rem; color: var(--muted); opacity: .8; margin-top: 4px; }

/* ---------------------------------------------------------------- experience */
.org { padding-top: clamp(28px, 4vw, 40px); border-top: 1px solid var(--line); }
.org + .org { margin-top: clamp(48px, 6vw, 72px); }
.org__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; }
.org__name { font-size: var(--step-3); }
.org__meta { color: var(--muted); font-size: 0.95rem; }
.org__role { margin-top: 10px; font-family: var(--font-display); font-weight: 500; font-size: var(--step-2); color: var(--cyan); }
.org__intro { margin-top: 32px; font-size: var(--step--1); color: var(--muted); font-weight: 500; }
.org__highlights { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 40px; max-width: 1040px; }
.org__role + .org__highlights { margin-top: 20px; }
.org__highlights li { position: relative; padding-left: 20px; color: var(--text-soft); }
.org__highlights li::before { content: ""; position: absolute; left: 0; top: 0.78em; width: 8px; height: 2px; background: var(--cyan); }
.org .chips { margin-top: 24px; }

/* promotion staircase */
.ladder { margin-top: 28px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 10px; max-width: 900px; }
.ladder__step {
  --h: calc(104px + var(--step) * 40px);
  min-height: var(--h); padding: 18px 18px 16px; border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, var(--panel-2), rgba(22, 27, 36, 0.35));
  border: 1px solid var(--line); border-bottom: 0; border-top: 2px solid var(--line-strong);
  transform-origin: bottom;
}
.ladder__step.is-current { border-top-color: var(--cyan); background: linear-gradient(180deg, rgba(95, 201, 232, 0.10), rgba(22, 27, 36, 0.35)); }
.ladder__title { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); line-height: 1.25; }
.ladder__dates { margin-top: 6px; font-size: var(--step--1); color: var(--muted); }
.ladder__badge { margin-top: 10px; display: inline-block; font-size: 0.75rem; font-weight: 600; color: var(--cyan); }
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] .ladder__step { transform: scaleY(0.2); opacity: 0; transition: transform .7s var(--ease), opacity .5s var(--ease); transition-delay: calc(var(--step) * 140ms); }
  .js [data-reveal].is-in .ladder__step { transform: none; opacity: 1; }
}

/* ---------------------------------------------------------------- capabilities & stack */
.capabilities { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.capability { padding: clamp(22px, 3vw, 32px); border-radius: var(--radius-card); background: var(--panel); border: 1px solid var(--line); border-top: 2px solid var(--cyan); }
.capability h3 { font-size: var(--step-3); }
.capability__lead { margin-top: 8px; color: var(--muted); }
.capability ul { margin-top: 18px; display: grid; gap: 10px; }
.capability li { position: relative; padding-left: 20px; color: var(--text-soft); font-size: 0.975rem; }
.capability li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 8px; height: 2px; background: var(--cyan); }

.stack-groups { margin-top: clamp(40px, 5vw, 56px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px 28px; }
.stack-group { border-top: 1px solid var(--line); padding-top: 18px; }
.stack-group__title { font-size: var(--step-1); }
.stack-group__evidence { margin-top: 6px; color: var(--muted); font-size: var(--step--1); min-height: 3em; }
.stack-group .chips { margin-top: 14px; }

/* ---------------------------------------------------------------- projects */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter {
  min-height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent;
  color: var(--muted); cursor: pointer; font-size: var(--step--1); font-weight: 500;
  transition: color .2s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease);
}
.filter:hover { color: var(--text); border-color: var(--line-strong); }
.filter[aria-pressed="true"] { color: var(--cyan-hi); border-color: var(--cyan-edge); background: var(--cyan-wash); }

.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.project {
  display: flex; flex-direction: column; padding: clamp(22px, 3vw, 30px); border-radius: var(--radius-card);
  background: var(--panel); border: 1px solid var(--line);
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease), opacity .3s var(--ease);
}
.project--lead { border-top: 2px solid var(--cyan); }
.project__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 20px; align-items: start; }
.project__context { grid-column: 1; font-size: var(--step--1); color: var(--cyan); font-weight: 500; }
.project__title { grid-column: 1; font-size: var(--step-2); line-height: 1.2; }
.project__metric { grid-column: 2; grid-row: 1 / span 2; text-align: right; font-size: 0.8125rem; color: var(--muted); line-height: 1.3; max-width: 10rem; }
.project__metric strong { display: block; font-family: var(--font-display); font-size: 1.25rem; color: var(--cyan-hi); white-space: nowrap; }
.project__summary { margin-top: 14px; color: var(--text-soft); }
.project__detail { margin-top: 18px; display: grid; gap: 12px; font-size: 0.95rem; }
.project__detail dt { font-size: 0.8125rem; font-weight: 600; color: var(--text); }
.project__detail dd { color: var(--muted); margin-top: 2px; }
.project__detail ul { display: grid; gap: 3px; }
.project__detail li { position: relative; padding-left: 14px; }
.project__detail li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); }
.chips--project { margin-top: 20px; }
.project__actions { margin-top: auto; padding-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.project__note { font-size: var(--step--1); color: var(--muted); }
.project:hover { border-color: var(--cyan-edge); box-shadow: 0 0 0 1px rgba(95, 201, 232, 0.12), 0 22px 60px -30px rgba(95, 201, 232, 0.45); }
.project:hover .chip { border-color: rgba(95, 201, 232, 0.3); color: var(--text); }
.project:hover .btn--ghost { border-color: var(--cyan-edge); color: var(--cyan-hi); background: var(--cyan-wash); }
@media (prefers-reduced-motion: no-preference) {
  .project:hover { transform: translateY(-3px); }
  .project.is-entering { animation: fade .35s var(--ease); }
}
.projects__empty { color: var(--muted); padding: 24px 0; }

/* ---------------------------------------------------------------- github */
.repos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.repo {
  position: relative; display: flex; flex-direction: column; padding: 20px 22px; border-radius: var(--radius-card);
  background: var(--panel); border: 1px solid var(--line); transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.repo:hover, .repo:focus-within { border-color: var(--cyan-edge); background: var(--panel-2); }
.repo__link { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); line-height: 1.25; }
.repo__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.repo__link:focus-visible { outline: none; }
.repo__link:focus-visible::after { outline: 2px solid var(--cyan); outline-offset: 2px; }
.repo__flag { margin-top: 6px; font-size: 0.75rem; font-weight: 600; color: var(--cyan); }
.repo__desc {
  margin-top: 8px; color: var(--muted); font-size: 0.925rem;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.repo__topics { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.75rem; color: var(--cyan-hi); }
.repo__meta { margin-top: auto; padding-top: 14px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.8125rem; color: var(--muted); }
.repo__meta > span { display: inline-flex; align-items: center; gap: 5px; }
.repo__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); }
.repos__note { margin-top: 18px; font-size: var(--step--1); color: var(--muted); }

/* ---------------------------------------------------------------- education & journey */
.education { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.degree { padding: clamp(22px, 3vw, 30px); border-radius: var(--radius-card); background: var(--panel); border: 1px solid var(--line); border-top: 2px solid var(--violet); }
.degree__period { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: var(--step--1); color: var(--muted); }
.degree__badge { font-size: 0.75rem; font-weight: 600; color: var(--violet); padding: 3px 8px; border-radius: var(--radius-chip); background: var(--violet-wash); }
.degree__institution { margin-top: 12px; font-size: var(--step-3); }
.degree__name { margin-top: 8px; color: var(--text-soft); font-size: var(--step-1); }
.degree__detail { margin-top: 6px; color: var(--muted); }

.journey { margin-top: clamp(56px, 7vw, 88px); }
.journey__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 24px; }
.journey__head h3 { font-size: var(--step-3); }
.journey__legend { display: flex; gap: 20px; font-size: var(--step--1); color: var(--muted); }
.journey__legend li { display: inline-flex; align-items: center; gap: 8px; }
.journey__legend li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; }
.journey__legend .is-work::before { background: var(--cyan); }
.journey__legend .is-education::before { border: 2px solid var(--violet); }

.journey__rail { margin-top: 32px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; position: relative; }
.journey__rail::before { content: ""; position: absolute; top: 6px; left: 0; right: 0; height: 1px; background: var(--line-strong); transform-origin: left; }
.journey__item { position: relative; padding-top: 30px; }
.journey__item::before { content: ""; position: absolute; top: 0; left: 0; width: 13px; height: 13px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px var(--bg); }
.journey__item--education::before { background: var(--bg); border: 2px solid var(--violet); }
.journey__when { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); }
.journey__item--education .journey__when { color: var(--violet); }
.journey__title { margin-top: 6px; font-size: 0.95rem; color: var(--text-soft); line-height: 1.35; }
.journey__org { margin-top: 4px; font-size: var(--step--1); color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .js .journey__rail[data-reveal]::before { transform: scaleX(0); transition: transform 1.1s var(--ease); }
  .js .journey__rail[data-reveal].is-in::before { transform: none; }
  .js .journey__rail[data-reveal] .journey__item { opacity: 0; transform: translateY(6px); transition: opacity .5s var(--ease), transform .5s var(--ease); transition-delay: calc(var(--i) * 120ms + 150ms); }
  .js .journey__rail[data-reveal].is-in .journey__item { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------- certifications */
.certs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cert { display: flex; flex-direction: column; padding: 22px; border-radius: var(--radius-card); background: var(--panel); border: 1px solid var(--line); transition: border-color .25s var(--ease); }
.cert:hover { border-color: var(--line-strong); }
.cert--wide { grid-column: 2 / span 2; grid-row: 2 / span 2; }
.cert__issuer { font-size: var(--step--1); font-weight: 600; color: var(--cyan); }
.cert__title { margin-top: 6px; font-size: var(--step-2); line-height: 1.2; }
.cert__date { color: var(--muted); font-weight: 500; }
.cert__note { margin-top: 8px; font-size: var(--step--1); color: var(--muted); }
.cert__badges { margin-top: 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cert__badges li > * { display: flex; align-items: center; justify-content: space-between; gap: 6px; height: 100%; font-size: 0.875rem; padding: 8px 10px; border-radius: 6px; background: rgba(255,255,255,.03); border: 1px solid var(--line-soft); color: var(--text-soft); }
.cert__badge-link { transition: border-color .2s var(--ease), color .2s var(--ease); }
.cert__badge-link .icon { color: var(--cyan); }
.cert__badge-link:hover { border-color: var(--cyan-edge); color: var(--cyan-hi); }
.cert .chips { margin-top: 14px; }
.cert__links { margin-top: auto; padding-top: 18px; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.cert__link { display: inline-flex; align-items: center; gap: 6px; font-size: var(--step--1); font-weight: 500; color: var(--text-soft); align-self: flex-start; }
.cert__link:hover { color: var(--cyan-hi); }

/* ---------------------------------------------------------------- resume */
.resume {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px;
  padding: clamp(26px, 4vw, 44px); border-radius: var(--radius-card); border: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(95, 201, 232, 0.07), rgba(154, 140, 245, 0.05) 60%, transparent), var(--panel);
}
.resume__text h2 { font-size: var(--step-4); }
.resume__text p { margin-top: 10px; color: var(--muted); max-width: 52ch; font-size: var(--step-1); }
.resume__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------------------------------------------------------------- contact */
.section--contact { position: relative; border-top: 1px solid var(--line-soft); }
.contact { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px clamp(32px, 6vw, 80px); align-items: center; }
.contact__text h2 { font-size: var(--step-4); max-width: 14ch; }
.contact__lede { margin-top: 16px; font-size: var(--step-1); color: var(--text-soft); max-width: 46ch; }
.contact__where { margin-top: 10px; color: var(--muted); max-width: 52ch; }
.contact__channels { display: grid; gap: 10px; }
.channel {
  display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 14px; align-items: center;
  padding: 16px 18px; border-radius: var(--radius-card); border: 1px solid var(--line); background: var(--panel);
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.channel .icon { grid-row: span 2; color: var(--cyan); }
.channel__label { font-size: 0.8125rem; color: var(--muted); }
.channel__value { font-weight: 500; overflow-wrap: anywhere; }
.channel:hover { border-color: var(--cyan-edge); background: var(--panel-2); }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line-soft); padding-block: 40px 48px; background: var(--bg); }
.site-footer__inner { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: start; }
.site-footer__name { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); }
.site-footer__role { color: var(--text-soft); font-size: var(--step--1); margin-top: 2px; }
.site-footer__stack { color: var(--muted); font-size: 0.8125rem; margin-top: 8px; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: 0.925rem; color: var(--muted); }
.site-footer__links a:hover { color: var(--cyan-hi); }
.site-footer__legal { grid-column: 1 / -1; font-size: 0.8125rem; color: var(--muted); padding-top: 20px; border-top: 1px solid var(--line-soft); }

/* ---------------------------------------------------------------- 404 */
.notfound { min-height: calc(100svh - var(--header-h) - 220px); display: grid; align-items: center; padding-block: 72px; }
.notfound__inner { max-width: 760px; }
.notfound__chart { width: min(320px, 80%); height: auto; margin-bottom: 28px; }
.notfound__axes path { stroke: var(--line-strong); fill: none; stroke-width: 1.5; }
.notfound__points circle { fill: var(--muted); opacity: .7; }
.notfound__fit { stroke: var(--cyan); stroke-width: 1.5; stroke-dasharray: 5 5; fill: none; }
.notfound__outlier { fill: var(--violet); }
.notfound__code { color: var(--cyan); font-weight: 500; }
.notfound h1 { margin-top: 10px; font-size: var(--step-4); max-width: 20ch; }
.notfound__text { margin-top: 16px; color: var(--muted); font-size: var(--step-1); max-width: 52ch; }
.notfound__actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }

/* ==========================================================================
   Responsive — mobile is designed, not compressed
   ========================================================================== */
@media (max-width: 1180px) {
  .site-header__actions .icon-link { display: none; }
}

@media (max-width: 1100px) {
  .menu-toggle { display: inline-grid; }
  .site-header__actions .icon-link { display: inline-grid; }
  .site-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; margin: 0;
    max-height: calc(100svh - var(--header-h)); overflow-y: auto;
    padding: 12px var(--gutter) 28px; background: rgba(15, 19, 26, 0.97);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    visibility: hidden; opacity: 0; transform: translateY(-6px);
    transition: opacity .22s var(--ease), transform .22s var(--ease), visibility 0s linear .22s;
  }
  .site-nav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .site-nav__list { flex-direction: column; gap: 0; }
  .site-nav__link { padding: 14px 4px; font-size: var(--step-1); color: var(--text-soft); border-bottom: 1px solid var(--line-soft); border-radius: 0; }
  .site-nav__link.is-active { color: var(--cyan-hi); }
  .site-nav__link.is-active::after { display: none; }
  .site-nav__mobile-extras { display: grid; gap: 16px; margin-top: 22px; }
  .site-nav__social { display: flex; gap: 24px; color: var(--muted); }
  .site-nav__social a { display: inline-flex; align-items: center; gap: 8px; padding-block: 6px; }
  /* Without JavaScript the menu stays reachable as a static list */
  .no-js .menu-toggle { display: none; }
  .no-js .site-header { height: auto; position: static; }
  .no-js .site-nav { position: static; visibility: visible; opacity: 1; transform: none; background: none; border: 0; padding: 0 0 12px; max-height: none; }
  .no-js .site-header__inner { flex-wrap: wrap; height: auto; padding-block: 12px; }
  .no-js .site-nav__list { flex-direction: row; flex-wrap: wrap; }
  .no-js .site-nav__link { border: 0; padding: 6px 10px 6px 0; font-size: var(--step--1); }
  .no-js .site-nav__mobile-extras { display: none; }

  .stack-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .repos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .certs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cert__badges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cert--wide { grid-column: 1 / -1; grid-row: auto; }
}

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { order: -1; max-width: 400px; justify-self: center; aspect-ratio: 16 / 10; }
  .hero__portrait { right: auto; left: 50%; width: auto; height: 86%; transform: translate(-50%, -50%); }
  @media (prefers-reduced-motion: no-preference) {
    @keyframes portrait { from { opacity: 0; transform: translate(-50%, -50%) scale(.97); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
  }
  .hero__stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 32px; }
  .hero__stack li { font-size: 0.8125rem; padding: 6px 10px; border-radius: var(--radius-chip); border: 1px solid var(--line); color: var(--text-soft); }
  .hero__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 28px; }
  .hero__fact:nth-child(3) { padding-left: 0; border-left: 0; }
  .hero__fact:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .about { grid-template-columns: 1fr; }
  .story__steps { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  .story__steps::before { display: none; }
  .ledger { grid-template-columns: 1fr; }
  .capabilities { grid-template-columns: 1fr; }
  .projects { grid-template-columns: 1fr; }
  .education { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .org__highlights { grid-template-columns: 1fr; }
  .journey__rail { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 36px; }
  .journey__rail::before { display: none; }
}

@media (max-width: 640px) {
  :root { --header-h: 60px; }
  .site-header__actions .icon-link, .site-header__actions .btn { display: none; }
  .hero__visual { aspect-ratio: 4 / 3; max-width: 340px; }
  .hero__portrait { height: 78%; }
  .hero__name { max-width: none; }
  .hero__cta .btn { flex: 1 1 100%; }
  .story__steps { grid-template-columns: 1fr; }
  .story__evidence { max-width: none; }
  .ledger__row { grid-template-columns: 1fr; }
  .ledger__where { grid-column: 1; }
  /* staircase becomes a vertical progression, most recent on top */
  .ladder { grid-template-columns: 1fr; gap: 8px; }
  .ladder__step { --h: auto; min-height: 0; border-radius: 10px; border: 1px solid var(--line); border-left: 2px solid var(--line-strong); padding: 14px 16px; }
  .ladder__step:nth-child(1) { order: 3; margin-right: 32px; }
  .ladder__step:nth-child(2) { order: 2; margin-right: 16px; }
  .ladder__step:nth-child(3) { order: 1; }
  .ladder__step.is-current { border-left-color: var(--cyan); border-top-color: var(--line); }
  .stack-groups { grid-template-columns: 1fr; gap: 28px; }
  .stack-group__evidence { min-height: 0; }
  .project__head { grid-template-columns: 1fr; }
  .project__metric { grid-column: 1; grid-row: auto; text-align: left; max-width: none; margin-top: 8px; }
  .project__metric strong { display: inline; margin-right: 6px; }
  .repos, .certs { grid-template-columns: 1fr; }
  .cert--wide { grid-column: auto; grid-row: auto; }
  .journey__rail { grid-template-columns: 1fr; row-gap: 0; padding-left: 4px; }
  .journey__rail::before { display: block; top: 0; bottom: 0; left: 10px; right: auto; width: 1px; height: auto; transform-origin: top; }
  .journey__item { padding: 0 0 26px 34px; }
  .journey__item::before { top: 4px; left: 4px; }
  .resume__actions .btn { flex: 1 1 100%; }
  .site-footer__inner { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

@media (max-width: 640px) {
  .hero__title { flex-direction: column; align-items: flex-start; gap: 2px; }
  .hero__title-sep { display: none; }
}
