/* =========================================================
   Gautam Kumar Pandey | Portfolio
   Palette: deep navy, warm paper, signal red
   ========================================================= */

:root {
  --navy: #0F2238;
  --navy-2: #173352;
  --ink: #0E1A2B;
  --paper: #F5F2EB;
  --paper-2: #ECE7DC;
  --white: #FFFFFF;

  --text: #1B2433;
  --muted: #5A6577;
  --line: rgba(14, 26, 43, .12);

  --on-dark: #E9EEF5;
  --on-dark-muted: #9FB0C5;
  --line-dark: rgba(233, 238, 245, .14);

  --accent: #D9452F;
  --accent-ink: #B8351F;
  --accent-soft: #F4A48F;

  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;

  --container: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius: 16px;
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.no-scroll { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.sr-only {
  position: absolute; 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: -9999px; top: 12px; z-index: 100;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 8px;
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { left: 12px; }

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

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: 600 15px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s var(--ease), background-color .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn span { transition: transform .25s var(--ease); }
.btn:hover span { transform: translateX(3px); }
.btn[download]:hover span { transform: translateY(2px); }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); }

.btn-ghost { border-color: rgba(233, 238, 245, .4); color: var(--on-dark); }
.btn-ghost:hover { border-color: var(--on-dark); background: rgba(233, 238, 245, .06); }

.btn-small { padding: 10px 18px; font-size: 14px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  color: var(--on-dark);
  transition: background-color .3s, color .3s, box-shadow .3s;
}
.site-header.is-scrolled,
.site-header.menu-open {
  background: rgba(245, 242, 235, .9);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  color: var(--text);
  box-shadow: 0 1px 0 var(--line);
}

.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
}

.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; font-weight: 600; letter-spacing: -.01em;
}
.brand-mark {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: 1.5px solid currentColor; border-radius: 50%;
  font: 500 10.5px/1 var(--mono); letter-spacing: .08em;
}

.nav-links {
  display: flex; align-items: center; gap: 30px;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a:not(.btn) {
  position: relative;
  text-decoration: none; font-size: 15px; font-weight: 500;
  opacity: .8; transition: opacity .2s;
}
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav-links a:not(.btn):hover,
.nav-links a.is-active { opacity: 1; }
.nav-links a:not(.btn):hover::after,
.nav-links a.is-active::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px; padding: 0;
  background: none; border: 0; color: inherit; cursor: pointer;
  position: relative;
}
.nav-toggle .bar {
  position: absolute; left: 11px; width: 22px; height: 1.5px; background: currentColor;
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.nav-toggle .bar:nth-of-type(2) { top: 18px; }
.nav-toggle .bar:nth-of-type(3) { top: 25px; }
.nav-toggle[aria-expanded="true"] .bar:nth-of-type(2) { top: 21.5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-of-type(3) { top: 21.5px; transform: rotate(-45deg); }

/* ---------- Eyebrow ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font: 500 12.5px/1.4 var(--mono);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--on-dark-muted);
  margin-bottom: 28px;
}
.dot {
  flex: none; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(217, 69, 47, .22);
}

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background:
    radial-gradient(900px 600px at 82% 18%, rgba(46, 88, 136, .45), transparent 65%),
    var(--navy);
  color: var(--on-dark);
  padding: calc(var(--header-h) + clamp(48px, 8vw, 96px)) 0 clamp(80px, 9vw, 120px);
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }

.hero-route {
  stroke-dashoffset: 0;
  animation: sail 40s linear infinite;
}
@keyframes sail { to { stroke-dashoffset: -640; } }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .8fr);
  gap: clamp(40px, 7vw, 100px);
  align-items: center;
}

.hero h1 { font-weight: 400; margin-bottom: 28px; }
.hero-name {
  display: block;
  font: 600 clamp(17px, 1.6vw, 20px)/1.3 var(--sans);
  letter-spacing: .01em;
  margin-bottom: 18px;
  color: var(--on-dark);
}
.hero-tagline {
  display: block;
  font-family: var(--serif);
  font-size: clamp(50px, 7.2vw, 100px);
  line-height: .98;
  letter-spacing: -.02em;
}
.hero-tagline em { font-style: italic; color: var(--accent-soft); }

.lede {
  max-width: 34em;
  font-size: clamp(17px, 1.5vw, 19px);
  color: var(--on-dark-muted);
  margin-bottom: 28px;
}

.hero-creds {
  display: flex; flex-wrap: wrap; gap: 8px;
  list-style: none; padding: 0; margin: 0 0 36px;
}
.hero-creds li {
  font-size: 13.5px; font-weight: 500;
  padding: 7px 14px;
  border: 1px solid var(--line-dark); border-radius: 999px;
  background: rgba(233, 238, 245, .04);
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* Portrait */
.hero-portrait { position: relative; margin: 0; max-width: 440px; justify-self: end; width: 100%; }
.hero-portrait::before {
  content: ""; position: absolute; inset: -16px 16px 46px -16px;
  border: 1px solid var(--line-dark); border-radius: 26px;
  pointer-events: none;
}
.portrait-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 20px; overflow: hidden;
  background: var(--white);
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, .7);
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }

.portrait-badge {
  position: absolute; left: -36px; bottom: 74px;
  display: grid; gap: 2px;
  padding: 14px 18px 15px;
  background: var(--paper); color: var(--ink);
  border-radius: 14px;
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .55);
  font-size: 13.5px; line-height: 1.35;
}
.portrait-badge strong { font-size: 15px; }
.portrait-badge span:last-child { color: var(--muted); }
.badge-label {
  display: flex; align-items: center; gap: 7px;
  font: 500 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 6px;
}
.badge-label::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: #2DB37A;
  box-shadow: 0 0 0 3px rgba(45, 179, 122, .2);
}

.hero-portrait figcaption {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: 18px;
  font: 400 12px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--on-dark-muted);
}

/* ---------- Metrics ---------- */
.metrics { background: var(--paper); border-bottom: 1px solid var(--line); }
.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.metric { padding: 48px 28px; border-left: 1px solid var(--line); }
.metric:first-child { border-left: 0; padding-left: 0; }
.metric-num {
  display: block;
  font-family: var(--serif);
  font-size: clamp(46px, 5vw, 66px); line-height: 1;
  color: var(--ink);
  margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
}
.metric-label { display: block; font-size: 14.5px; line-height: 1.5; color: var(--muted); max-width: 24ch; }

/* ---------- Sections ---------- */
.section { padding: clamp(84px, 11vw, 140px) 0; }
.section-alt { background: var(--paper-2); }

.section-head {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 20px;
  padding-bottom: 22px; margin-bottom: clamp(40px, 6vw, 64px);
  border-bottom: 1px solid var(--line);
}
.section-index { font: 500 13px/1 var(--mono); letter-spacing: .12em; color: var(--accent); }
.section-head h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(42px, 5.4vw, 68px); line-height: 1; letter-spacing: -.015em;
  color: var(--ink);
}
.section-note { margin-left: auto; font-size: 14.5px; color: var(--muted); }

/* ---------- About ---------- */
.about-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 90px);
  margin-bottom: clamp(70px, 9vw, 110px);
}
.about-statement {
  font-family: var(--serif);
  font-size: clamp(30px, 3.4vw, 44px); line-height: 1.12; letter-spacing: -.01em;
  color: var(--ink);
}
.about-statement em { color: var(--accent); }
.about-body p { margin-bottom: 18px; color: #2E3848; }

.sector-list {
  display: flex; flex-wrap: wrap; gap: 10px;
  list-style: none; padding: 0; margin: 28px 0 0;
}
.sector-list li {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 16px 9px 10px;
  background: var(--white); border: 1px solid var(--line); border-radius: 999px;
  font-size: 14.5px; font-weight: 500;
}
.sector-icon {
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--navy); color: #fff;
}
.sector-icon svg { width: 14px; height: 14px; }

/* Voyage timeline */
.voyage-label {
  font: 500 12.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 34px;
}
.voyage-list {
  position: relative;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px;
  list-style: none; padding: 0; margin: 0;
}
.voyage-list::before {
  content: ""; position: absolute; left: 0; right: 0; top: 41px; height: 0;
  border-top: 1.5px dashed rgba(14, 26, 43, .28);
  transform: scaleX(0); transform-origin: left;
  transition: transform 1.6s var(--ease) .2s;
}
.voyage.is-visible .voyage-list::before,
html:not(.js) .voyage-list::before { transform: scaleX(1); }

.waypoint { position: relative; }
.wp-year { display: block; font: 500 13px/1 var(--mono); letter-spacing: .08em; color: var(--muted); margin-bottom: 14px; }
.wp-dot {
  position: relative; z-index: 1; display: block;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--navy);
  margin-bottom: 20px;
}
.waypoint h3 { font-size: 17px; font-weight: 600; color: var(--ink); margin-bottom: 4px; letter-spacing: -.005em; }
.waypoint p { font-size: 14.5px; line-height: 1.5; color: var(--muted); max-width: 22ch; }

.waypoint.is-current .wp-dot { background: var(--accent); border-color: var(--accent); }
.waypoint.is-current .wp-dot::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 1.5px solid var(--accent);
  animation: ping 2.4s var(--ease) infinite;
}
.waypoint.is-current .wp-year { color: var(--accent); }
@keyframes ping {
  0% { transform: scale(.7); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* ---------- Experience ---------- */
.role {
  display: grid; grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  padding: 52px 0;
  border-top: 1px solid var(--line);
}
.role:first-child { border-top: 0; padding-top: 0; }
.role:last-child { padding-bottom: 0; }

.role-meta { position: sticky; top: calc(var(--header-h) + 28px); align-self: start; }
.role-dates {
  font: 500 12.5px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}
.role-org { font-size: 21px; font-weight: 600; line-height: 1.25; color: var(--ink); letter-spacing: -.01em; }
.role-context { font-size: 14.5px; color: var(--muted); margin-top: 4px; }

.role-body h3 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(30px, 3.2vw, 40px); line-height: 1.08; letter-spacing: -.01em;
  color: var(--ink); margin-bottom: 26px;
}
.role-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.role-points li { position: relative; padding-left: 28px; color: #2E3848; }
.role-points li::before {
  content: ""; position: absolute; left: 0; top: .82em;
  width: 14px; height: 1.5px; background: var(--accent);
}
.role-points strong { color: var(--ink); font-weight: 600; }

/* ---------- Projects ---------- */
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }

.project {
  display: flex; flex-direction: column;
  padding: clamp(26px, 3vw, 36px);
  background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.project:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 28px 60px -30px rgba(14, 26, 43, .4);
}

.project-kicker {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font: 500 11.5px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 18px; margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.project-kicker span:first-child { color: var(--accent); }

.project-figure {
  font-family: var(--serif);
  font-size: clamp(44px, 4.4vw, 56px); line-height: 1;
  color: var(--ink); margin-bottom: 16px;
}
.project h3 {
  font-size: 20px; font-weight: 600; line-height: 1.32; letter-spacing: -.01em;
  color: var(--ink); margin-bottom: 12px;
}
.project p:not(.project-kicker):not(.project-figure) { font-size: 15.5px; color: var(--muted); margin-bottom: 24px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: auto 0 0; }
.tags li {
  font-size: 12.5px; font-weight: 500;
  padding: 5px 12px; border-radius: 999px;
  background: var(--paper); border: 1px solid var(--line);
}

/* Featured project */
.project--featured {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  background: var(--navy); color: var(--on-dark); border-color: transparent;
  position: relative; overflow: hidden;
}
.project--featured::after {
  content: ""; position: absolute; right: -120px; top: -120px;
  width: 360px; height: 360px; border-radius: 50%;
  border: 1px solid var(--line-dark);
  box-shadow: 0 0 0 60px rgba(233, 238, 245, .025), 0 0 0 120px rgba(233, 238, 245, .02);
  pointer-events: none;
}
.project--featured .project-lead { display: flex; flex-direction: column; }
.project--featured .project-kicker { color: var(--on-dark-muted); border-color: var(--line-dark); }
.project--featured .project-kicker span:first-child { color: var(--accent-soft); }
.project--featured h3 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(30px, 3vw, 40px); line-height: 1.1; letter-spacing: -.01em;
  color: #fff;
}
.project.project--featured p:not(.project-kicker):not(.project-figure) { color: var(--on-dark-muted); }
.project--featured .tags li { background: rgba(233, 238, 245, .06); border-color: var(--line-dark); color: var(--on-dark); }

.project-stats { display: grid; align-content: center; gap: 0; position: relative; z-index: 1; }
.project-stats > div {
  display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 18px;
  padding: 18px 0; border-bottom: 1px solid var(--line-dark);
}
.project-stats > div:last-child { border-bottom: 0; }
.stat-num { font-family: var(--serif); font-size: clamp(38px, 4vw, 54px); line-height: 1; color: #fff; min-width: 3.4em; }
.stat-label { font-size: 14.5px; color: var(--on-dark-muted); }

/* ---------- Skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.skill-group {
  padding: clamp(26px, 3vw, 34px);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
}
.skill-group--wide { grid-column: span 2; }
.skill-group h3 {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1;
  color: var(--ink); margin-bottom: 22px;
}
.sg-letter {
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--navy); color: #fff;
  font: 500 12px/1 var(--mono);
}
.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.chips li {
  font-size: 14.5px; font-weight: 500;
  padding: 9px 15px; border-radius: 10px;
  background: var(--white); border: 1px solid var(--line);
  transition: border-color .2s, transform .2s var(--ease);
}
.chips li:hover { border-color: var(--accent); transform: translateY(-1px); }

/* ---------- Education ---------- */
.edu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.edu {
  position: relative;
  padding: 30px 30px 32px;
  border-top: 3px solid var(--navy);
  background: var(--white);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 1px 0 var(--line), 0 0 0 1px var(--line) inset;
}
.edu:first-child { border-top-color: var(--accent); }
.edu-years {
  font: 500 12.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 22px;
}
.edu h3 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(28px, 2.6vw, 34px); line-height: 1.08;
  color: var(--ink); margin-bottom: 12px;
}
.edu-school { font-size: 15.5px; color: var(--muted); }

/* ---------- Contact ---------- */
.contact {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(800px 500px at 10% 0%, rgba(46, 88, 136, .4), transparent 65%),
    var(--navy);
  color: var(--on-dark);
  padding: clamp(90px, 12vw, 150px) 0 40px;
}
.contact-grid {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 100px); align-items: end;
}
.contact h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(46px, 6.2vw, 86px); line-height: 1; letter-spacing: -.02em;
  margin-bottom: 26px;
}
.contact h2 em { color: var(--accent-soft); }
.contact-lede { font-size: 18px; color: var(--on-dark-muted); margin-bottom: 34px; max-width: 30em; }

.contact-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-dark); }
.contact-list li {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center; gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-dark);
}
.contact-list .label {
  font: 500 11.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--on-dark-muted);
}
.contact-list a, .contact-list li > span:not(.label) {
  font-weight: 500; text-decoration: none; overflow-wrap: anywhere;
}
.contact-list a {
  text-decoration-line: underline; text-decoration-color: transparent;
  text-underline-offset: 5px; text-decoration-thickness: 1.5px;
  transition: text-decoration-color .2s;
}
.contact-list a:hover { text-decoration-color: var(--accent); }

.copy-btn {
  font: 500 11.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--on-dark); background: transparent;
  border: 1px solid var(--line-dark); border-radius: 999px;
  padding: 8px 12px; cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.copy-btn:hover { border-color: var(--on-dark); background: rgba(233, 238, 245, .06); }
.copy-btn.is-copied { border-color: #2DB37A; color: #7FE0B4; }

.footer {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: clamp(80px, 10vw, 120px); padding-top: 26px;
  border-top: 1px solid var(--line-dark);
  font-size: 14px; color: var(--on-dark-muted);
}
.footer a { text-decoration: none; }
.footer a:hover { color: var(--on-dark); }

/* ---------- Reveal on scroll ---------- */
.js .reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
/* Keep the hover lift on cards once revealed */
.js .project.reveal.is-visible:hover { transform: translateY(-4px); transition-delay: 0s; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .portrait-badge { left: -20px; }
}

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-portrait { justify-self: start; max-width: 380px; margin-top: 12px; margin-left: 16px; }
  .portrait-badge { left: auto; right: -16px; bottom: 70px; }

  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .metric { padding: 36px 24px; }
  .metric:nth-child(odd) { border-left: 0; padding-left: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }

  .about-grid { grid-template-columns: 1fr; }

  .voyage-list { grid-template-columns: 1fr; gap: 28px; padding-left: 34px; }
  .voyage-list::before {
    left: 7px; right: auto; top: 6px; bottom: 6px; height: auto;
    border-top: 0; border-left: 1.5px dashed rgba(14, 26, 43, .28);
    transform: scaleY(0); transform-origin: top;
  }
  .voyage.is-visible .voyage-list::before, html:not(.js) .voyage-list::before { transform: scaleY(1); }
  .wp-dot { position: absolute; left: -34px; top: 0; margin: 0; }
  .wp-year { margin-bottom: 8px; }
  .waypoint p { max-width: none; }

  .role { grid-template-columns: 1fr; gap: 16px; }
  .role-meta { position: static; }

  .project-grid { grid-template-columns: 1fr; }
  .project--featured { grid-template-columns: 1fr; }

  .skills-grid { grid-template-columns: 1fr; }
  .skill-group--wide { grid-column: auto; }

  .edu-grid { grid-template-columns: 1fr; }

  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 28px;
    background: var(--paper); color: var(--text);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 30px 40px -30px rgba(14, 26, 43, .35);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s, transform .25s var(--ease), visibility 0s .25s;
  }
  .site-header.menu-open .nav-links {
    opacity: 1; visibility: visible; transform: none;
    transition: opacity .25s, transform .25s var(--ease), visibility 0s;
  }
  .nav-links li { border-bottom: 1px solid var(--line); }
  .nav-links li:last-child { border-bottom: 0; padding-top: 20px; }
  .nav-links a:not(.btn) { display: block; padding: 16px 0; font-size: 17px; }
  .nav-links a:not(.btn)::after { display: none; }
  .nav-links .btn { width: 100%; justify-content: center; padding: 14px 20px; font-size: 15px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand-name { display: none; }
  .hero-portrait { max-width: 300px; }
  .portrait-badge { right: -12px; bottom: 64px; padding: 12px 14px; }
  .hero-portrait figcaption { font-size: 11px; }
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; }

  .metrics-grid { grid-template-columns: 1fr; }
  .metric, .metric:nth-child(odd) { padding: 28px 0; border-left: 0; }
  .metric:not(:last-child) { border-bottom: 1px solid var(--line); }
  .metric-label { max-width: none; }

  .section-note { margin-left: 0; width: 100%; }

  .contact-list li { grid-template-columns: 1fr auto; gap: 6px 12px; }
  .contact-list .label { grid-column: 1 / -1; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .hero-bg, .hero-cta, .copy-btn, .skip-link { display: none !important; }
  .hero, .contact, .project--featured { background: #fff !important; color: #000 !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}
