/* adil.bd stylesheet, release 20261029
   One file for every page except the CV, which keeps its own inline print styles.
   Sections: tokens, base, header, hero, glance, sections, about, education,
   experience, research, skills, writing, beyond, contact, footer, subpages,
   motion, responsive, reduced motion, print. */

:root {
  --ivory: #f3eee6;
  --paper: #fffdfa;
  --sand: #e8e0d3;
  --ink: #101820;
  --frame: #182a3b;
  --frame-text: #f7f4ee;
  --slate: #273440;
  --soft-ink: #354655;
  --muted: #59636b;          /* 5.2:1 on ivory */
  --bronze: #96512e;         /* text accent, 5.4:1 on ivory */
  --bronze-line: #c77c52;    /* decorative lines and dots only */
  --bronze-light: #e6ad89;   /* accent on dark backgrounds */
  --on-dark-muted: #c3ccd4;
  --line: #ddd5c9;
  --line-dark: rgba(247,244,238,.16);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --page: min(1180px, calc(100% - 3rem));
  --ease: cubic-bezier(.2,.7,.25,1);
  --header-h: 72px;
}

/* Base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  color: var(--slate);
  background: var(--ivory);
  font: 400 1.125rem/1.65 var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--bronze-line);
  outline-offset: 4px;
  border-radius: 2px;
}
::selection { color: var(--paper); background: var(--frame); }
.wrap { width: var(--page); margin-inline: auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: fixed; top: .8rem; left: .8rem; z-index: 100;
  padding: .65rem .9rem; color: var(--paper); background: var(--ink);
  transform: translateY(-180%); transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }
.scroll-progress { position: fixed; inset: 0 0 auto; z-index: 1000; height: 2px; pointer-events: none; }
.scroll-progress span {
  display: block; width: 100%; height: 100%;
  background: var(--bronze-line); transform: scaleX(0); transform-origin: left;
}

/* Shared type */
.section { padding: clamp(5rem, 9vw, 7.5rem) 0; }
.section-head { max-width: 760px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-title {
  margin: 0;
  color: var(--ink);
  font: 500 clamp(2.6rem, 5.2vw, 4.5rem)/1 var(--serif);
  letter-spacing: -.03em;
}
.section-lede { margin: 1.1rem 0 0; color: var(--muted); font-size: 1.15rem; max-width: 60ch; }
.meta { margin: 0; color: var(--muted); font-size: .95rem; }
.label { margin: 0 0 .9rem; color: var(--bronze); font-size: .98rem; font-weight: 600; }
.dark { color: var(--frame-text); background: var(--ink); }
.dark .section-title { color: var(--paper); }
.dark .section-lede, .dark .meta { color: var(--on-dark-muted); }
.dark .label { color: var(--bronze-light); }

.text-link {
  display: inline-flex; align-items: baseline; gap: .35em;
  color: var(--bronze); font-weight: 600; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: .1em;
  transition: background-size .3s var(--ease), color .2s ease;
}
.text-link:hover, .text-link:focus-visible { background-size: 0 1px; background-position: 100% 100%; }
.dark .text-link { color: var(--bronze-light); }
.text-link .arrow { display: inline-block; transition: transform .25s var(--ease); }
.text-link:hover .arrow, .text-link:focus-visible .arrow { transform: translate(2px,-2px); }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 50px; padding: 0 1.5rem;
  border: 1.5px solid var(--frame); border-radius: 999px;
  font: 600 1rem/1 var(--sans); text-decoration: none;
  transition: background-color .25s ease, color .25s ease, transform .25s var(--ease), box-shadow .25s ease;
}
.button svg { width: 18px; height: 18px; flex: none; }
.button-primary { color: var(--paper); background: var(--frame); }
.button-primary:hover, .button-primary:focus-visible { background: var(--ink); transform: translateY(-2px); box-shadow: 0 10px 22px rgba(16,24,32,.18); }
.button-ghost { color: var(--frame); background: transparent; }
.button-ghost:hover, .button-ghost:focus-visible { color: var(--paper); background: var(--frame); transform: translateY(-2px); }
.dark .button-primary { color: var(--ink); background: var(--frame-text); border-color: var(--frame-text); }
.dark .button-primary:hover, .dark .button-primary:focus-visible { background: #fff; }
.dark .button-ghost { color: var(--frame-text); border-color: var(--frame-text); }
.dark .button-ghost:hover, .dark .button-ghost:focus-visible { color: var(--ink); background: var(--frame-text); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--frame);
  border-bottom: 1px solid var(--line-dark);
}
.nav { min-height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand {
  color: var(--frame-text); font: 600 1.2rem/1 var(--serif);
  letter-spacing: -.01em; text-decoration: none; white-space: nowrap;
}
.nav-end, .nav-links, .language-switcher { display: flex; align-items: center; }
.nav-end { gap: 1.4rem; }
.nav-links { gap: clamp(.8rem, 1.5vw, 1.35rem); }
.nav-links a {
  position: relative; color: var(--frame-text);
  font-size: .92rem; font-weight: 500; text-decoration: none; white-space: nowrap;
}
.nav-links a::after {
  position: absolute; left: 0; right: 0; bottom: -.3rem; height: 1.5px;
  background: var(--bronze-light); content: "";
  transform: scaleX(0); transform-origin: right; transition: transform .3s var(--ease);
}
.nav-links a:hover::after, .nav-links a:focus-visible::after, .nav-links a.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav-links .nav-cv {
  padding: .45rem 1.25rem; border: 1px solid rgba(247,244,238,.45); border-radius: 999px; line-height: 1.2;
  transition: background-color .25s ease, color .25s ease;
}
.nav-links .nav-cv::after { display: none; }
.nav-links .nav-cv:hover, .nav-links .nav-cv:focus-visible { color: var(--frame); background: var(--frame-text); }
.language-switcher {
  gap: .5rem; padding-left: 1.2rem; border-left: 1px solid rgba(247,244,238,.22);
  color: var(--on-dark-muted); font-size: .85rem; font-weight: 600; white-space: nowrap;
}
.language-switcher a { color: var(--on-dark-muted); text-decoration: none; }
.language-switcher a[aria-current="page"] { color: var(--frame-text); text-decoration: underline; text-underline-offset: .3em; }
.language-switcher a:hover, .language-switcher a:focus-visible { color: var(--bronze-light); }
.mobile-nav { display: none; position: relative; }
.mobile-nav summary {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 .2rem;
  list-style: none; cursor: pointer; color: var(--frame-text); font-weight: 600;
}
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav .bars { position: relative; width: 20px; height: 12px; }
.mobile-nav .bars::before, .mobile-nav .bars::after {
  position: absolute; left: 0; width: 100%; height: 1.5px; background: currentColor; content: "";
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.mobile-nav .bars::before { top: 2px; }
.mobile-nav .bars::after { top: 9px; }
.mobile-nav[open] .bars::before { top: 5.5px; transform: rotate(45deg); }
.mobile-nav[open] .bars::after { top: 5.5px; transform: rotate(-45deg); }

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--ivory); }
.hero-grid {
  position: relative; z-index: 1;
  min-height: clamp(640px, calc(100svh - var(--header-h)), 860px);
  display: grid; grid-template-columns: minmax(0,1.1fr) minmax(400px,.9fr);
  padding-left: max(1.5rem, calc((100vw - 1180px) / 2));
}
.hero-copy {
  position: relative; z-index: 3; align-self: center;
  max-width: 680px;
  padding: clamp(4rem,7vw,6rem) clamp(2rem,4vw,4rem) clamp(4rem,7vw,6rem) 0;
}
.hero-role { margin: 0 0 1.2rem; color: var(--bronze); font-size: 1.05rem; font-weight: 600; }
.hero h1 {
  margin: 0; color: var(--ink);
  font: 500 clamp(4.2rem, 8.6vw, 7.8rem)/.88 var(--serif);
  letter-spacing: -.045em;
}
.official-name { margin: .9rem 0 0; color: var(--muted); font-size: 1rem; }
.hero-tagline {
  margin: 1.6rem 0 0; color: var(--soft-ink);
  font: italic 400 clamp(1.3rem,2vw,1.6rem)/1.35 var(--serif);
}
.hero-intro { margin: 1rem 0 0; max-width: 54ch; color: var(--slate); font-size: 1.15rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

/* The signature: a latitude line from Dhaka to Oslo */
.journey {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .9rem;
  max-width: 470px; margin-top: 2.4rem; color: var(--muted); font-size: .92rem;
}
.journey-place { display: grid; line-height: 1.25; }
.journey-place strong { color: var(--ink); font: 500 1.05rem var(--serif); }
.journey-place:last-child { text-align: right; }
.journey-track { position: relative; height: 12px; }
.journey-track::before {
  position: absolute; top: 50%; left: 0; right: 0; height: 1px;
  background: var(--bronze-line); content: ""; transform-origin: left;
}
.journey-dot {
  position: absolute; top: 50%; width: 9px; height: 9px; margin-top: -4.5px;
  border-radius: 50%; background: var(--bronze-line);
}
.journey-dot.start { left: -4px; }
.journey-dot.end { right: -4px; background: var(--ivory); border: 1.5px solid var(--bronze-line); }
.journey-traveller {
  position: absolute; top: 50%; left: 0; width: 5px; height: 5px; margin-top: -2.5px;
  border-radius: 50%; background: var(--frame); opacity: 0;
}
.hero-now { margin: 1.8rem 0 0; color: var(--muted); font-size: .98rem; max-width: 54ch; }
.hero-now strong { color: var(--slate); font-weight: 600; }

.portrait { position: relative; z-index: 2; min-width: 0; min-height: 620px; }
.portrait img {
  position: absolute; right: 0; bottom: 0;
  width: min(640px,118%); max-width: none; height: 94%;
  object-fit: contain; object-position: right bottom;
  filter: saturate(.94) drop-shadow(-8px 20px 24px rgba(16,24,32,.08));
}

/* At a glance */
.glance { position: relative; z-index: 4; background: var(--paper); border-block: 1px solid var(--line); }
.glance-list {
  display: grid; grid-template-columns: .8fr .9fr 1.6fr 1.3fr; gap: 1.5rem 2.5rem;
  margin: 0; padding: 2rem 0;
}
.glance-list div { min-width: 0; }
.glance-list dt { margin: 0 0 .25rem; color: var(--muted); font-size: .92rem; }
.glance-list dd { margin: 0; color: var(--ink); font: 500 1.08rem/1.45 var(--serif); }

/* About */
#about { background: var(--ivory); }
.about-grid { display: grid; grid-template-columns: minmax(260px,.8fr) minmax(0,1.2fr); gap: clamp(2.5rem,7vw,6rem); align-items: start; }
.about-grid .section-head { position: sticky; top: calc(var(--header-h) + 2rem); margin: 0; }
.about-copy p { margin: 0 0 1.3rem; color: var(--soft-ink); font: 400 clamp(1.1rem,1.7vw,1.25rem)/1.7 var(--serif); max-width: 62ch; }
.about-copy p:first-child { color: var(--ink); font-size: clamp(1.2rem,1.9vw,1.38rem); }
.offer { margin-top: clamp(3rem,6vw,4.5rem); }
.offer-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.offer-list li { padding: 1.6rem 1.6rem 1.6rem 0; border-bottom: 1px solid var(--line); }
.offer-list li + li { padding-left: 1.6rem; border-left: 1px solid var(--line); }
.offer-list h3 { margin: 0 0 .5rem; color: var(--ink); font: 500 1.45rem/1.2 var(--serif); }
.offer-list p { margin: 0; color: var(--muted); font-size: 1.02rem; }

/* Education: a real sequence, so it gets a timeline */
#education { background: var(--paper); }
.edu-list { position: relative; margin: 0; padding: 0; list-style: none; }
.edu-list::before {
  position: absolute; top: .6rem; bottom: .6rem; left: 6px; width: 1px;
  background: var(--line); content: "";
}
.edu-item {
  position: relative;
  display: grid; grid-template-columns: 210px minmax(0,1fr); gap: .3rem 3rem;
  padding: 0 0 2.6rem 2.6rem;
}
.edu-item:last-child { padding-bottom: 0; }
.edu-item::before {
  position: absolute; top: .55rem; left: 0; width: 13px; height: 13px;
  border-radius: 50%; background: var(--paper); border: 2px solid var(--bronze-line); content: "";
}
.edu-item.is-current::before { background: var(--bronze-line); box-shadow: 0 0 0 5px rgba(199,124,82,.18); }
.edu-when { margin: .25rem 0 0; color: var(--muted); font-size: 1rem; }
.edu-item.is-current .edu-when { color: var(--bronze); font-weight: 600; }
.edu-item h3 { margin: 0; color: var(--ink); font: 500 clamp(1.4rem,2.3vw,1.85rem)/1.2 var(--serif); }
.edu-place { margin: .3rem 0 0; color: var(--soft-ink); }
.edu-note { margin: .55rem 0 0; color: var(--muted); font-size: 1.02rem; max-width: 62ch; }
.edu-item > :not(.edu-when) { grid-column: 2; }
.edu-item > .edu-when { grid-row: 1 / span 3; }

/* Experience: chronological, line draws while scrolling */
.career { position: relative; margin: 0; padding: 0; list-style: none; }
.career::before, .career::after {
  position: absolute; top: .5rem; bottom: .5rem; left: 6px; width: 1px; content: "";
}
.career::before { background: var(--line-dark); }
.career::after { background: var(--bronze-light); transform: scaleY(var(--career-progress, 1)); transform-origin: top; }
.role {
  position: relative;
  display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.35fr); gap: .4rem clamp(2rem,5vw,4rem);
  padding: 0 0 2.8rem 2.6rem;
}
.role:last-child { padding-bottom: 0; }
.role::before {
  position: absolute; top: .45rem; left: 0; width: 13px; height: 13px;
  border-radius: 50%; background: var(--ink); border: 2px solid var(--bronze-light); content: "";
}
.role-head h3 { margin: 0; color: var(--paper); font: 500 clamp(1.4rem,2.3vw,1.9rem)/1.2 var(--serif); }
.role-org { margin: .35rem 0 0; color: var(--bronze-light); font-weight: 600; }
.role-when { margin: .25rem 0 0; color: var(--on-dark-muted); font-size: .98rem; }
.role-body p, .role-body li { color: #d9dee3; font-size: 1.04rem; }
.role-body p { margin: 0 0 .6rem; }
.role-body ul { margin: 0; padding-left: 1.1rem; }
.role-body li { margin-bottom: .45rem; }
.role-body li::marker { color: var(--bronze-light); }
.role-funding { color: var(--on-dark-muted) !important; font-size: .96rem !important; }
.earlier { margin-top: 3.5rem; padding-top: 2.4rem; border-top: 1px solid var(--line-dark); }
.earlier-title { margin: 0 0 1.4rem; color: var(--paper); font: 500 1.6rem var(--serif); }
.earlier-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 2rem 3rem; }
.earlier-grid h4 { margin: 0; color: var(--paper); font: 500 1.25rem/1.3 var(--serif); }
.earlier-grid .meta { margin: .25rem 0 .5rem; }
.earlier-grid p:last-child { margin: 0; color: #d9dee3; font-size: 1rem; }
.section-foot { margin-top: 2.8rem; }

/* Research */
#research { background: var(--ivory); }
.research-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.2rem 2rem; }
.research-head .section-head { margin-bottom: 0; }
.profile-row { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; }
.research-body { margin-top: clamp(2.5rem,5vw,3.5rem); }
.thesis {
  display: grid; grid-template-columns: minmax(0,1.45fr) minmax(220px,.55fr); gap: clamp(2rem,6vw,5rem);
  padding: clamp(2rem,5vw,3.5rem);
  color: var(--frame-text); background: var(--frame);
  border-radius: 4px;
}
.thesis .label { color: var(--bronze-light); }
.thesis h3 { margin: 0; color: var(--paper); font: 500 clamp(1.75rem,3.2vw,2.75rem)/1.12 var(--serif); letter-spacing: -.015em; }
.thesis p { margin: 1rem 0 0; color: #d9dee3; max-width: 62ch; }
.thesis .text-link { margin-top: 1.5rem; color: var(--bronze-light); }
.thesis-facts { margin: 0; display: grid; align-content: center; border-top: 1px solid var(--line-dark); }
.thesis-facts div { padding: 1rem 0; border-bottom: 1px solid var(--line-dark); }
.thesis-facts dt { color: var(--paper); font: 500 2rem/1 var(--serif); }
.thesis-facts dd { margin: .35rem 0 0; color: var(--on-dark-muted); font-size: .95rem; }
.work-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; margin: 2.5rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.work-list li { padding: 1.7rem 1.6rem 1.7rem 0; border-bottom: 1px solid var(--line); }
.work-list li + li { padding-left: 1.6rem; border-left: 1px solid var(--line); }
.work-status { margin: 0 0 .6rem; color: var(--bronze); font-size: .95rem; font-weight: 600; }
.work-list h3 { margin: 0; color: var(--ink); font: 500 1.35rem/1.25 var(--serif); }
.work-list p:last-child { margin: .6rem 0 0; color: var(--muted); font-size: 1rem; }
.earlier-papers { display: flex; flex-wrap: wrap; align-items: baseline; gap: .8rem 2rem; margin-top: 2rem; }
.earlier-papers > span { color: var(--muted); }
.interests { display: grid; grid-template-columns: minmax(200px,.5fr) minmax(0,1.5fr); gap: 1rem 3rem; margin-top: 3.5rem; padding-top: 2.5rem; border-top: 1px solid var(--line); }
.interests h3 { margin: 0; color: var(--bronze); font: italic 400 1.75rem/1.2 var(--serif); }
.interests p { margin: 0; color: var(--soft-ink); font: 400 1.18rem/1.7 var(--serif); max-width: 64ch; }

/* Skills */
#skills { background: var(--paper); }
.skills-grid { display: grid; grid-template-columns: minmax(260px,.8fr) minmax(0,1.2fr); gap: clamp(2.5rem,7vw,6rem); }
.skills-grid .section-head { margin: 0; }
.skill-group + .skill-group { margin-top: 2rem; }
.skill-group h3 { margin: 0 0 .9rem; color: var(--ink); font: 500 1.3rem var(--serif); }
.chips { display: flex; flex-wrap: wrap; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.chips li {
  padding: .45rem .95rem; border: 1px solid var(--line); border-radius: 999px;
  color: var(--soft-ink); background: var(--ivory); font-size: .98rem;
  transition: border-color .2s ease, color .2s ease;
}
.chips li:hover { border-color: var(--bronze-line); color: var(--ink); }
.chips.tools li { color: var(--paper); background: var(--frame); border-color: var(--frame); }
.chips small { color: var(--on-dark-muted); font-size: .85em; }

/* Writing */
#writing { background: var(--ivory); }
.lanes { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr); gap: clamp(2rem,5vw,4rem); }
.lane { padding-top: 1.6rem; border-top: 2px solid var(--ink); }
.lane + .lane { border-top-color: var(--line); }
.lane h3 { margin: 0; color: var(--ink); font: 500 clamp(1.7rem,3vw,2.5rem)/1.12 var(--serif); }
.lane .lane-sub { color: var(--ink); font-size: 1.5rem; }
.lane p { margin: .9rem 0 0; color: var(--muted); max-width: 58ch; }
.lane .links { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin-top: 1.3rem; }

/* Beyond teaser */
.beyond-teaser { background: var(--ivory); padding-bottom: clamp(5rem,9vw,7.5rem); }
.beyond-card {
  display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 1.5rem 3rem;
  padding: clamp(2rem,4vw,3rem); border-radius: 4px;
  color: var(--ink); background: var(--sand); text-decoration: none;
  transition: background-color .3s ease;
}
.beyond-card p { margin: 0; font: italic 400 clamp(1.35rem,2.4vw,1.85rem)/1.35 var(--serif); max-width: 40ch; }
.beyond-card span { display: inline-flex; align-items: center; gap: .5rem; color: var(--bronze); font-weight: 600; white-space: nowrap; }
.beyond-card span svg { width: 20px; height: 20px; transition: transform .3s var(--ease); }
.beyond-card:hover, .beyond-card:focus-visible { background: #e1d6c5; }
.beyond-card:hover span svg, .beyond-card:focus-visible span svg { transform: translateX(5px); }

/* Contact */
#contact { padding-bottom: clamp(4rem,7vw,6rem); }
.contact-grid { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); gap: clamp(2.5rem,7vw,6rem); align-items: start; }
.contact-copy p { margin: 1.2rem 0 0; color: var(--on-dark-muted); font: 400 1.2rem/1.6 var(--serif); max-width: 48ch; }
.contact-copy .hero-actions { margin-top: 2.2rem; }
.contact-card { margin: 0; display: grid; border-top: 1px solid var(--line-dark); }
.contact-card div { display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line-dark); }
.contact-card dt { color: var(--on-dark-muted); font-size: .98rem; }
.contact-card dd { margin: 0; color: var(--paper); font-weight: 500; overflow-wrap: anywhere; }
.contact-card a { color: var(--paper); text-decoration-color: rgba(247,244,238,.35); text-underline-offset: .25em; }
.contact-card a:hover, .contact-card a:focus-visible { color: var(--bronze-light); text-decoration-color: currentColor; }
.contact-card .profile-links { display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; }

footer { background: var(--ink); border-top: 1px solid var(--line-dark); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem 2rem; padding: 1.5rem 0; color: var(--on-dark-muted); font-size: .92rem; }
.footer-grid a { color: var(--on-dark-muted); text-decoration: none; }
.footer-grid a:hover, .footer-grid a:focus-visible { color: var(--bronze-light); }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; }

/* Subpages (Beyond work, 404) */
.page-hero { padding: clamp(4.5rem,9vw,7rem) 0 clamp(2.5rem,5vw,3.5rem); }
.page-hero .back { margin-bottom: 2.4rem; }
.page-hero h1 { margin: 0; max-width: 16ch; color: var(--ink); font: 500 clamp(3rem,7vw,5.6rem)/.98 var(--serif); letter-spacing: -.035em; }
.page-hero .hero-tagline { max-width: 40ch; }
.page-hero .lead { margin: 1.2rem 0 0; max-width: 60ch; color: var(--soft-ink); font: 400 1.25rem/1.7 var(--serif); }
.names { background: var(--paper); border-block: 1px solid var(--line); }
.names dl { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.5rem 3rem; margin: 0; padding: 2.2rem 0; }
.names dt { color: var(--ink); font: 500 1.4rem/1.25 var(--serif); }
.names dd { margin: .3rem 0 0; color: var(--muted); }
.names-intro { margin: 2.2rem 0 0; color: var(--muted); }
.interest-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.interest-list li { padding: 2rem 2rem 2rem 0; border-bottom: 1px solid var(--line); }
.interest-list li + li { padding-left: 2rem; border-left: 1px solid var(--line); }
.interest-list h2 { margin: 0 0 .7rem; color: var(--ink); font: 500 1.9rem/1.15 var(--serif); }
.interest-list p { margin: 0; color: var(--muted); }
.interest-list .links { display: flex; flex-wrap: wrap; gap: .6rem 1.3rem; margin-top: 1.2rem; }
.say-hello { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; }
.say-hello h2 { margin: 0; color: var(--paper); font: 500 clamp(2rem,4vw,3rem)/1.1 var(--serif); }
.say-hello .links { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin-top: .8rem; }
.say-hello .links a { color: var(--frame-text); text-underline-offset: .25em; text-decoration-color: rgba(247,244,238,.35); }
.say-hello .links a:hover, .say-hello .links a:focus-visible { color: var(--bronze-light); }
.not-found { min-height: 60vh; display: grid; align-content: center; }
.not-found p { color: var(--muted); }

/* Motion: one orchestrated hero entrance, gentle reveals, scroll-drawn career line */
.motion-ready [data-reveal] {
  opacity: 0; transform: translateY(14px);
  transition: opacity .6s ease, transform .6s var(--ease);
  transition-delay: var(--d, 0ms);
}
.motion-ready [data-reveal].is-visible { opacity: 1; transform: none; }
.motion-ready .hero-copy > *, .motion-ready .portrait img { opacity: 0; }
.motion-ready .hero-copy > * { animation: rise .75s var(--ease) forwards; }
.motion-ready .hero-copy > :nth-child(2) { animation-delay: .08s; }
.motion-ready .hero-copy > :nth-child(3) { animation-delay: .16s; }
.motion-ready .hero-copy > :nth-child(4) { animation-delay: .26s; }
.motion-ready .hero-copy > :nth-child(5) { animation-delay: .34s; }
.motion-ready .hero-copy > :nth-child(6) { animation-delay: .42s; }
.motion-ready .hero-copy > :nth-child(7) { animation-delay: .5s; }
.motion-ready .hero-copy > :nth-child(8) { animation-delay: .58s; }
.motion-ready .portrait img { animation: portrait-in .9s .2s var(--ease) forwards; }
.motion-ready .journey-track::before { transform: scaleX(0); animation: draw 1.4s 1s var(--ease) forwards; }
.motion-ready .journey-dot.end { opacity: 0; animation: pop .4s 2.3s var(--ease) forwards; }
.motion-ready .journey-traveller { animation: travel 1.4s 1s var(--ease) forwards; }
.motion-ready .glance-list > div { opacity: 0; animation: rise .6s var(--ease) forwards; }
.motion-ready .glance-list > div:nth-child(1) { animation-delay: .7s; }
.motion-ready .glance-list > div:nth-child(2) { animation-delay: .78s; }
.motion-ready .glance-list > div:nth-child(3) { animation-delay: .86s; }
.motion-ready .glance-list > div:nth-child(4) { animation-delay: .94s; }
.motion-ready .edu-item::before { transform: scale(.4); transition: transform .5s var(--ease); }
.motion-ready .edu-item.is-visible::before { transform: scale(1); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes portrait-in { from { opacity: 0; transform: translateX(14px) scale(1.015); } to { opacity: 1; transform: none; } }
@keyframes draw { to { transform: scaleX(1); } }
@keyframes pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
@keyframes travel {
  0% { left: 0; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { left: calc(100% - 5px); opacity: 0; }
}
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 5px rgba(199,124,82,.18); } 50% { box-shadow: 0 0 0 9px rgba(199,124,82,.06); } }
.motion-ready .edu-item.is-current.is-visible::before { animation: pulse 2.6s 1s ease-in-out 3; }

/* Responsive */
@media (max-width: 1100px) {
  .nav-links { gap: .85rem; }
  .nav-links a { font-size: .86rem; }
  .glance-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 980px) {
  .language-switcher { padding-left: .8rem; }
  .work-list, .offer-list { grid-template-columns: 1fr; }
  .work-list li, .offer-list li, .work-list li + li, .offer-list li + li { padding: 1.5rem 0; border-left: 0; }
}
@media (max-width: 1023px) {
  .nav-links, .nav-end > .language-switcher { display: none; }
  .mobile-nav { display: block; }
  .mobile-panel {
    position: absolute; top: calc(100% + .7rem); right: 0;
    width: min(300px, calc(100vw - 2rem));
    display: grid; gap: .1rem; padding: .8rem;
    border: 1px solid var(--line-dark); border-radius: 4px;
    background: var(--frame); box-shadow: 0 18px 40px rgba(0,0,0,.3);
  }
  .mobile-nav:not([open]) .mobile-panel { display: none; }
  .mobile-nav[open] .mobile-panel { animation: drop .25s var(--ease); }
  .mobile-panel > a {
    display: flex; align-items: center; min-height: 44px; padding: 0 .7rem;
    color: var(--frame-text); font-weight: 500; text-decoration: none; border-radius: 3px;
  }
  .mobile-panel > a:hover, .mobile-panel > a:focus-visible, .mobile-panel > a.is-active { background: rgba(247,244,238,.08); }
  .mobile-panel .language-switcher { justify-content: flex-start; margin-top: .5rem; padding: .8rem .7rem .3rem; border-top: 1px solid var(--line-dark); border-left: 0; }
  @keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

  .hero-grid {
    grid-template-columns: minmax(0,1fr); grid-template-rows: auto auto;
    min-height: 0; padding: 1.25rem clamp(1.25rem,5vw,3rem) clamp(3rem,8vw,4rem);
  }
  .portrait { grid-row: 1; width: min(100%,420px); min-height: 0; margin: 0 auto; }
  .portrait img { position: relative; inset: auto; width: 100%; height: auto; filter: none; }
  .hero-copy { grid-row: 2; width: 100%; max-width: 640px; margin: .5rem auto 0; padding: 0; text-align: center; }
  .hero h1 { font-size: clamp(3.5rem,16vw,5.6rem); white-space: nowrap; }
  .hero-intro, .hero-now { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .journey { margin-inline: auto; text-align: left; }
  .motion-ready .portrait img { animation: rise .7s .05s var(--ease) forwards; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .portrait { width: min(100%,480px); }
}
@media (max-width: 820px) {
  :root { --page: min(100% - 2.5rem, 1180px); --header-h: 64px; }
  body { font-size: 1.0625rem; }
  .section { padding: 4.25rem 0; }
  .about-grid, .skills-grid, .lanes, .contact-grid, .thesis, .interests { grid-template-columns: 1fr; }
  .about-grid .section-head { position: static; }
  .edu-item, .role { grid-template-columns: 1fr; }
  .edu-item > :not(.edu-when), .edu-item > .edu-when { grid-column: 1; grid-row: auto; }
  .edu-when { margin: 0 0 .2rem; }
  .earlier-grid, .names dl, .interest-list { grid-template-columns: 1fr; }
  .interest-list li, .interest-list li + li { padding: 1.7rem 0; border-left: 0; }
  .beyond-card { grid-template-columns: 1fr; }
  .contact-card div { grid-template-columns: 1fr; gap: .2rem; }
}
@media (max-width: 520px) {
  .glance-list { grid-template-columns: 1fr; gap: 1.1rem; padding: 1.6rem 0; }
  .hero-actions .button { width: 100%; }
  .journey { font-size: .85rem; gap: .6rem; }
  .thesis { padding: 1.6rem; }
  .brand { font-size: 1.1rem; }
}

/* Reduced motion: everything visible immediately, no drawn lines */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .motion-ready [data-reveal], .motion-ready .hero-copy > *, .motion-ready .portrait img, .motion-ready .glance-list > div { opacity: 1 !important; transform: none !important; }
  .motion-ready .journey-track::before, .motion-ready .edu-item::before { transform: none !important; }
  .motion-ready .journey-dot.end { opacity: 1 !important; }
  .journey-traveller { display: none; }
  .career::after { transform: none !important; }
}

/* Print: a clean, readable one-column version of the homepage */
@media print {
  @page { size: A4; margin: 15mm 14mm; }
  body { color: #273440; background: #fff; font-size: 10.5pt; line-height: 1.45; }
  .site-header, .skip-link, .scroll-progress, .portrait, .hero-actions, .journey, .beyond-teaser, footer, .mobile-nav { display: none !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; box-shadow: none !important; }
  .hero-grid { display: block; min-height: 0; padding: 0; }
  .hero-copy { padding: 0 0 5mm; text-align: left; }
  .hero h1 { font-size: 34pt; }
  .section { padding: 5mm 0; }
  .dark, .thesis { color: #273440 !important; background: #fff !important; }
  .dark *, .thesis * { color: #273440 !important; }
  .section-title { font-size: 20pt; }
  .about-grid, .skills-grid, .lanes, .contact-grid, .thesis, .interests, .work-list, .offer-list, .glance-list { display: block; }
  .role, .edu-item, .work-list li, .offer-list li { break-inside: avoid; }
  .career::after { display: none; }
}
