/* ============================================================
   Hendrik Joël — CV site
   Light, professional. No frameworks, no external assets.
   ============================================================ */

:root {
  --navy:        #1f3a5f;
  --navy-deep:   #16293f;
  --accent:      #2f6fb0;
  --ink:         #101720;
  --ink-soft:    #3c4855;
  --muted:       #6a7684;
  --line:        #e4e8ee;
  --line-soft:   #eef1f5;
  --bg:          #ffffff;
  --bg-alt:      #f6f8fa;
  --bg-chip:     #eef2f7;

  --wrap:        1120px;
  --radius:      14px;
  --radius-sm:   8px;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  --shadow-sm: 0 1px 2px rgba(16, 23, 32, .05), 0 1px 3px rgba(16, 23, 32, .04);
  --shadow-md: 0 4px 12px rgba(16, 23, 32, .07), 0 2px 4px rgba(16, 23, 32, .04);
  --shadow-lg: 0 18px 45px rgba(16, 23, 32, .10), 0 4px 12px rgba(16, 23, 32, .05);

  --header-h: 68px;
}

/* ── reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px;
  border-radius: var(--radius-sm); text-decoration: none;
  transition: top .16s ease;
}
.skip-link:focus { top: 12px; }

/* ── header ────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-stuck { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }

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

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--navy); color: #fff;
  font-family: var(--serif); font-size: 14px; letter-spacing: .02em;
}
.brand-name { font-weight: 600; letter-spacing: -.01em; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  position: relative;
  padding: 7px 11px;
  font-size: 14.5px; font-weight: 500; color: var(--ink-soft);
  text-decoration: none; border-radius: var(--radius-sm);
  transition: color .16s ease, background-color .16s ease;
}
.nav a:hover { color: var(--ink); background: var(--bg-alt); }
.nav a.is-active { color: var(--navy); }
.nav a.is-active::after {
  content: ""; position: absolute; left: 11px; right: 11px; bottom: 2px;
  height: 2px; border-radius: 2px; background: var(--navy);
}
.nav .nav-cv {
  margin-left: 8px; padding: 7px 15px;
  color: #fff; background: var(--navy); font-weight: 600;
}
.nav .nav-cv:hover { color: #fff; background: var(--navy-deep); }
.nav .nav-cv.is-active::after { display: none; }

.nav-toggle { display: none; width: 42px; height: 42px; border-radius: var(--radius-sm); }
.nav-toggle span {
  display: block; width: 20px; height: 2px; margin: 4px auto;
  background: var(--ink); border-radius: 2px;
  transition: transform .22s ease, opacity .18s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── hero ──────────────────────────────────────────────── */
.hero { padding: clamp(56px, 9vw, 104px) 0 clamp(48px, 7vw, 88px); }

.hero-grid {
  display: grid; gap: clamp(32px, 5vw, 64px);
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: center;
}

.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(44px, 7vw, 76px);
  line-height: 1.03; letter-spacing: -.025em; font-weight: 600;
  color: var(--navy-deep);
}

.lede {
  margin-top: 20px; max-width: 56ch;
  font-size: clamp(17px, 1.5vw, 19.5px); line-height: 1.68; color: var(--ink-soft);
}

.hero-meta {
  margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px;
  font-size: 14.5px; color: var(--muted);
}

.hero-actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  border: 1px solid transparent;
  transition: transform .16s ease, background-color .16s ease,
              border-color .16s ease, box-shadow .16s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--navy-deep); box-shadow: var(--shadow-lg); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }
.btn-lg { padding: 15px 30px; font-size: 16.5px; }

.social { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 22px; }
.social.center { justify-content: center; }
.social a {
  font-size: 14.5px; font-weight: 500; color: var(--ink-soft);
  text-decoration: none; padding-bottom: 2px;
  border-bottom: 1px solid var(--line);
  transition: color .16s ease, border-color .16s ease;
}
.social a:hover { color: var(--navy); border-bottom-color: var(--navy); }

.hero-photo { position: relative; justify-self: center; max-width: 360px; width: 100%; }
.hero-photo::after {
  content: ""; position: absolute; inset: 16px -16px -16px 16px; z-index: -1;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--bg-chip), #dde4ed);
}
.hero-photo img {
  width: 100%; border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  object-fit: cover; aspect-ratio: 4 / 5;
}

/* ── sections ──────────────────────────────────────────── */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line-soft); }

.section-title {
  display: flex; align-items: baseline; gap: 14px;
  font-family: var(--serif); font-size: clamp(28px, 3.4vw, 38px);
  font-weight: 600; letter-spacing: -.02em; color: var(--navy-deep);
  margin-bottom: 12px;
}
.section-title .num {
  font-family: var(--sans); font-size: 13px; font-weight: 700;
  letter-spacing: .12em; color: var(--accent);
}
.section-intro { color: var(--muted); margin-bottom: 34px; font-size: 15.5px; }
.section-title + .about-grid,
.section-title + .feature,
.section-title + .timeline,
.section-title + .skills { margin-top: 34px; }

.sub-title {
  margin: 64px 0 28px;
  font-family: var(--serif); font-size: 24px; font-weight: 600;
  letter-spacing: -.015em; color: var(--navy-deep);
}

/* ── about ─────────────────────────────────────────────── */
.about-grid {
  display: grid; gap: clamp(32px, 5vw, 60px);
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: start;
}
.prose p { color: var(--ink-soft); max-width: 62ch; }
.prose p + p { margin-top: 16px; }
.prose strong { color: var(--ink); font-weight: 600; }

.facts { border-top: 1px solid var(--line); }
.facts > div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts dt {
  font-size: 12.5px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 3px;
}
.facts dd { font-size: 15.5px; font-weight: 500; color: var(--ink); }

/* ── research feature ──────────────────────────────────── */
.feature {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(24px, 3.6vw, 42px);
  box-shadow: var(--shadow-sm);
}
.feature-head {
  display: flex; flex-wrap: wrap; gap: 28px;
  justify-content: space-between; align-items: flex-start;
  padding-bottom: 24px; border-bottom: 1px solid var(--line-soft);
}
.feature-head h3 {
  font-family: var(--serif); font-size: clamp(22px, 2.6vw, 29px);
  line-height: 1.28; font-weight: 600; letter-spacing: -.015em; color: var(--navy-deep);
}
.feature-head h3 span { font-size: .74em; color: var(--ink-soft); font-weight: 400; }
.feature-org { margin-top: 10px; font-size: 15px; color: var(--muted); font-style: italic; }

.feature-stats { display: flex; gap: 32px; }
.feature-stats div { text-align: right; }
.feature-stats strong {
  display: block; font-family: var(--serif); font-size: 30px;
  font-weight: 600; color: var(--accent); line-height: 1.1;
}
.feature-stats span { font-size: 12.5px; color: var(--muted); }

.ticks { margin-top: 24px; display: grid; gap: 12px; }
.ticks li {
  position: relative; padding-left: 28px; color: var(--ink-soft); font-size: 15.5px;
}
.ticks li::before {
  content: ""; position: absolute; left: 4px; top: .62em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); opacity: .55;
}

.citation {
  margin-top: 26px; padding: 16px 20px;
  background: var(--bg-alt); border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 14.5px; color: var(--ink-soft);
}
.citation strong { color: var(--navy); }

/* ── project cards (index) ─────────────────────────────── */
.projects { display: grid; gap: 14px; }

.project-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: start; gap: 24px;
  padding: 26px clamp(20px, 3vw, 30px);
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.project-card:hover {
  border-color: #c6d2e0; box-shadow: var(--shadow-md); transform: translateY(-2px);
}
.project-card:hover h3 { color: var(--accent); }
.project-card:hover .arrow { background: var(--navy); }
.project-card:hover .arrow::before,
.project-card:hover .arrow::after { background: #fff; }

.project-card h3 {
  font-size: 19.5px; font-weight: 650; letter-spacing: -.012em; color: var(--navy-deep);
  transition: color .18s ease;
}
.project-blurb { margin-top: 7px; font-size: 15px; color: var(--ink-soft); max-width: 62ch; }

.project-card-side {
  display: flex; flex-direction: column; align-items: flex-end; gap: 14px;
}
.project-year {
  font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap;
}

.arrow {
  position: relative; width: 30px; height: 30px; flex: none;
  border-radius: 50%; background: var(--bg-chip);
  transition: background-color .18s ease;
}
.arrow::before {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 12px; height: 2px; border-radius: 2px; background: var(--navy);
  transform: translate(-50%, -50%);
  transition: background-color .18s ease;
}
.arrow::after {
  content: ""; position: absolute; top: 50%; left: calc(50% + 2px);
  width: 8px; height: 8px; border-right: 2px solid var(--navy); border-top: 2px solid var(--navy);
  transform: translate(-50%, -50%) rotate(45deg);
  transition: border-color .18s ease;
}
.project-card:hover .arrow::after { border-color: #fff; }

/* tier headings inside the projects section */
.tier-label {
  display: flex; align-items: center; gap: 16px;
  margin: 52px 0 20px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
}
.tier-label:first-of-type { margin-top: 0; }
.tier-label::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

/* tier 2 — professional: two up, slightly lighter than featured */
.projects.two-up {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.projects.two-up .project-card { padding: 24px 26px; }
.projects.two-up .project-card h3 { font-size: 18px; }

/* tier 3 — coursework: compact, three up, no blurb weight */
.projects.compact {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
/* single column: content stacks, meta becomes a footer row */
.projects.compact .project-card {
  grid-template-columns: 1fr; grid-template-rows: 1fr auto;
  padding: 22px 22px 18px; gap: 16px; align-items: start;
}
.projects.compact .project-card h3 { font-size: 16.5px; }
.projects.compact .project-blurb { margin-top: 7px; font-size: 14.5px; max-width: none; }
.projects.compact .tags { margin-top: 12px; gap: 6px; }
.projects.compact .tags li { font-size: 11.5px; padding: 3px 9px; }
.projects.compact .project-card-side {
  flex-direction: row; align-items: center; justify-content: space-between;
  gap: 10px; padding-top: 14px; border-top: 1px solid var(--line-soft);
}
.projects.compact .project-year { font-size: 12px; }
.projects.compact .arrow { width: 26px; height: 26px; }
.projects.compact .arrow::before { width: 10px; }
.projects.compact .arrow::after { width: 7px; height: 7px; }

.tags { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 7px; }
.tags li {
  font-size: 12px; font-weight: 500; letter-spacing: .01em;
  padding: 4px 10px; border-radius: 999px;
  background: var(--bg-chip); color: var(--navy);
}
.tags.big li { font-size: 13.5px; padding: 6px 13px; background: #fff; border: 1px solid var(--line); }

.note { font-size: 14.5px !important; color: var(--muted) !important; font-style: italic; }

/* ── project detail page ───────────────────────────────── */
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14.5px; font-weight: 500; color: var(--muted); text-decoration: none;
  transition: color .16s ease;
}
.back-link:hover { color: var(--navy); }
.back-link::before {
  content: ""; width: 7px; height: 7px; flex: none;
  border-left: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.project-hero { padding: 40px 0 clamp(36px, 5vw, 56px); }
.project-hero h1 {
  margin-top: 18px;
  font-family: var(--serif); font-size: clamp(34px, 5vw, 54px);
  line-height: 1.1; letter-spacing: -.024em; font-weight: 600; color: var(--navy-deep);
  max-width: 20ch;
}
.project-hero .lede { margin-top: 20px; }

.project-meta {
  margin-top: 38px; padding-top: 28px; border-top: 1px solid var(--line);
  display: grid; gap: 24px 40px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.project-meta dt {
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 7px;
}
.project-meta dd { font-size: 15px; color: var(--ink); line-height: 1.55; }
.project-meta .tags { margin-top: 0; }

/* long-form body */
.project-article { padding-bottom: clamp(56px, 7vw, 88px); }
.project-article > .wrap > * { max-width: 760px; }
.project-article h2 {
  margin: 52px 0 16px;
  font-family: var(--serif); font-size: clamp(23px, 2.6vw, 28px);
  font-weight: 600; letter-spacing: -.018em; color: var(--navy-deep);
}
.project-article h2:first-child { margin-top: 0; }
.project-article h3 {
  margin: 32px 0 10px; font-size: 17px; font-weight: 650; color: var(--ink);
}
.project-article p { color: var(--ink-soft); font-size: 16.5px; line-height: 1.72; }
.project-article p + p { margin-top: 16px; }
.project-article strong { color: var(--ink); font-weight: 600; }
.project-article ul { display: grid; gap: 11px; margin: 16px 0; }
.project-article li {
  position: relative; padding-left: 22px; font-size: 16.5px; line-height: 1.68; color: var(--ink-soft);
}
.project-article li::before {
  content: ""; position: absolute; left: 2px; top: .7em;
  width: 6px; height: 6px; border-radius: 50%; background: #c3cdd9;
}

.project-article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .87em; padding: 2px 6px; border-radius: 5px;
  background: var(--bg-chip); color: var(--navy);
}

.pull {
  margin: 34px 0; padding: 22px 26px;
  background: var(--bg-alt); border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.pull p { font-size: 16.5px; color: var(--ink); }

/* key-numbers strip */
.metrics {
  margin: 36px 0; display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.metrics div { background: #fff; padding: 22px 24px; }
.metrics strong {
  display: block; font-family: var(--serif); font-size: 30px; font-weight: 600;
  color: var(--accent); line-height: 1.1; letter-spacing: -.02em;
}
.metrics span { display: block; margin-top: 5px; font-size: 13px; color: var(--muted); line-height: 1.45; }

/* ── figures & gallery ─────────────────────────────────── */
.figure { margin: 36px 0; }
.figure img {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.figure figcaption {
  margin-top: 11px; font-size: 13.5px; color: var(--muted); line-height: 1.55;
}

/* Placeholder that stands in until a real screenshot is dropped in.
   Swap the whole .shot block for <img src="..." alt="..."> when you have one. */
.shot {
  display: grid; place-items: center; align-content: center; gap: 8px;
  aspect-ratio: 16 / 9; padding: 24px; text-align: center;
  border: 1px dashed #c6d2e0; border-radius: var(--radius);
  background:
    repeating-linear-gradient(45deg, #fbfcfd 0 10px, #f4f7fa 10px 20px);
  color: var(--muted);
}
.shot b {
  font-size: 14px; font-weight: 600; color: var(--ink-soft); letter-spacing: -.01em;
}
.shot span { font-size: 12.5px; max-width: 46ch; line-height: 1.5; }
.shot code {
  font-size: 11.5px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #fff; border: 1px solid var(--line); border-radius: 5px; padding: 2px 7px;
  color: var(--navy);
}

.gallery {
  margin: 36px 0; display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.gallery .figure { margin: 0; }

/* wide blocks may exceed the 760px reading column */
.project-article > .wrap > .figure.wide,
.project-article > .wrap > .gallery,
.project-article > .wrap > .metrics { max-width: none; }

/* ── prev / next ───────────────────────────────────────── */
.pager {
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line);
}
.pager a {
  background: #fff; padding: 30px clamp(20px, 3vw, 32px);
  text-decoration: none; transition: background-color .16s ease;
}
.pager a:hover { background: var(--bg-alt); }
.pager a:hover strong { color: var(--accent); }
.pager .dir {
  display: block; font-size: 12px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 8px;
}
.pager strong {
  font-size: 17.5px; font-weight: 650; color: var(--navy-deep); letter-spacing: -.012em;
  transition: color .16s ease;
}
.pager .next { text-align: right; }
.pager .empty { background: var(--bg-alt); }

/* ── timeline ──────────────────────────────────────────── */
.timeline { display: grid; gap: 4px; }
.timeline > li {
  display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 28px;
  padding: 26px 0; border-top: 1px solid var(--line);
}
.timeline > li:last-child { border-bottom: 1px solid var(--line); }
.tl-when {
  font-size: 13.5px; font-weight: 600; letter-spacing: .04em;
  color: var(--muted); padding-top: 4px;
}
.tl-what h3 {
  font-size: 17.5px; font-weight: 650; color: var(--navy-deep); letter-spacing: -.01em;
}
.tl-org { margin-top: 4px; font-size: 14.5px; color: var(--muted); font-style: italic; }
.tl-what ul { margin-top: 12px; display: grid; gap: 8px; }
.tl-what li {
  position: relative; padding-left: 20px; font-size: 15.5px; color: var(--ink-soft);
}
.tl-what li::before {
  content: ""; position: absolute; left: 2px; top: .68em;
  width: 6px; height: 6px; border-radius: 50%; background: #c3cdd9;
}
.timeline.compact > li { padding: 20px 0; }

.chip {
  display: inline-block; vertical-align: middle; margin-left: 8px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px;
  background: var(--bg-chip); color: var(--muted);
}

/* ── skills ────────────────────────────────────────────── */
.skills {
  display: grid; gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.skill-group h3 {
  font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); padding-bottom: 12px; margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.skills-foot {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line);
  font-size: 14.5px; color: var(--muted);
}
.skills-foot strong { color: var(--ink); font-weight: 600; margin-right: 6px; }
.skills-foot span { margin: 0 10px; }

/* ── contact ───────────────────────────────────────────── */
.section-contact { background: var(--navy-deep); color: #fff; }
.contact-inner { text-align: center; max-width: 640px; }
.contact-inner h2 {
  font-family: var(--serif); font-size: clamp(32px, 4.4vw, 46px);
  font-weight: 600; letter-spacing: -.02em;
}
.contact-inner p { margin: 18px auto 32px; color: #b9c6d6; font-size: 17px; }
.section-contact .btn-primary { background: #fff; color: var(--navy-deep); }
.section-contact .btn-primary:hover { background: #e8eef6; }
.section-contact .social a { color: #b9c6d6; border-bottom-color: rgba(255, 255, 255, .2); }
.section-contact .social a:hover { color: #fff; border-bottom-color: #fff; }

/* ── footer ────────────────────────────────────────────── */
.site-footer { padding: 26px 0; border-top: 1px solid var(--line); }
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: 13.5px; color: var(--muted);
}

/* ── reveal on scroll ──────────────────────────────────── */
/* Hidden only when JS is present to reveal them again. */
.js .reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-visible {
  opacity: 1; transform: none;
  transition: opacity .55s ease, transform .55s cubic-bezier(.22, .61, .36, 1);
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── responsive ────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; max-width: 240px; justify-self: start; }
  .hero-photo::after { inset: 12px -12px -12px 12px; }
  .about-grid { grid-template-columns: 1fr; }
  .timeline > li { grid-template-columns: 1fr; gap: 10px; }
  .tl-when { padding-top: 0; }
  .feature-stats { gap: 24px; }
  .feature-stats div { text-align: left; }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px 24px 20px;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 11px 12px; font-size: 16px; }
  .nav a.is-active::after { display: none; }
  .nav a.is-active { background: var(--bg-alt); }
  .nav .nav-cv { margin: 8px 0 0; text-align: center; }

  /* every tier stacks: content, then a meta footer row */
  .project-card {
    grid-template-columns: 1fr; grid-template-rows: 1fr auto;
    gap: 16px; align-items: start; padding: 22px 20px 18px;
  }
  .project-card-side {
    flex-direction: row; align-items: center; justify-content: space-between;
    gap: 12px; padding-top: 14px; border-top: 1px solid var(--line-soft);
  }
  .project-blurb { max-width: none; }
  .tier-label { margin: 40px 0 18px; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { text-align: left; }
  .pager .empty { display: none; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 20px; }
  .social { gap: 16px; }
  .skills-foot span { display: block; height: 0; overflow: hidden; margin: 8px 0; }
}

/* ── print ─────────────────────────────────────────────── */
@media print {
  .site-header, .nav-toggle, .hero-actions, .section-contact,
  .arrow, .pager, .shot { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  body { font-size: 11pt; }
}
