/* ahmadamine998.github.io on the Ahmad Amine design system. Colors, sizes and spacing come from tokens.css. */

/* ---- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--ground); color: var(--body); font-family: var(--font-sans); font-size: var(--size-body); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
p, ul, ol, figure, h1, h2, h3, h4 { margin: 0; }
ul, ol { padding-left: 1.2em; }
a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.16em; text-decoration-color: var(--link-underline, currentColor); }
a:hover, a:focus-visible { color: var(--link-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
strong { font-weight: 600; }
em { font-style: italic; }
code { font-family: inherit; font-weight: 500; }
.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; top: var(--space-3); left: var(--space-4); z-index: 100; padding: var(--space-2) var(--space-3); background: var(--ground); transform: translateY(-300%); }
.skip-link:focus { transform: none; }

/* ---- type */
h1, h2, h3, h4 { color: var(--heading); font-weight: 500; letter-spacing: -0.01em; }
h1 { font-size: var(--size-h1); line-height: 1.1; }
.display { font-size: var(--size-display); line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-size: var(--size-h2); line-height: 1.15; }
h3 { font-size: var(--size-h3); line-height: 1.3; }
.lead { font-size: var(--size-lead); line-height: 1.5; }
.small, .meta { font-size: var(--size-small); line-height: 1.5; }
.meta { color: var(--meta); }
.caption, figcaption { font-size: var(--size-caption); line-height: 1.45; color: var(--meta); }
.label { font-size: var(--size-small); font-weight: 500; color: var(--accent-text); letter-spacing: 0; }
.prose > * + * { margin-top: var(--space-4); }
.prose { max-width: 40rem; }
.ruled::after { content: ""; display: block; width: 72px; height: var(--rule-web-gap); margin-top: var(--space-3); border-top: var(--rule-web-red) solid var(--rule); border-bottom: var(--rule-web-red) solid var(--rule); }

/* ---- icons, buttons */
.icon { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; vertical-align: -0.15em; display: inline-block; }
.icon-link { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: var(--meta); text-decoration: none; border: 1px solid transparent; transition: color 0.15s, border-color 0.15s, background-color 0.15s; }
.icon-link .icon { width: 20px; height: 20px; }
.icon-link:hover, .icon-link:focus-visible { color: var(--heading); border-color: var(--hairline); background: var(--surface); }
.btn { display: inline-flex; align-items: center; gap: var(--space-2); padding: 11px 18px; font: inherit; font-size: var(--size-small); font-weight: 500; line-height: 1.2; text-decoration: none; border: 1px solid currentColor; color: var(--heading); background: transparent; cursor: pointer; transition: color 0.15s, background-color 0.15s, border-color 0.15s, transform 0.15s; }
.btn:hover, .btn:focus-visible { color: var(--accent); }
.btn-solid { background: var(--heading); color: var(--ground); border-color: var(--heading); }
.btn-solid:hover, .btn-solid:focus-visible { background: var(--accent); border-color: var(--accent); color: var(--white); }
.btn .icon { width: 0.9em; height: 0.9em; }
.linkrow { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); align-items: center; }
.linkrow a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: var(--size-small); font-weight: 500; color: var(--heading); }
.linkrow a:hover, .linkrow a:focus-visible { color: var(--accent); }
.linkrow .icon { width: 1.05em; height: 1.05em; color: var(--accent); }
.more-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 500; color: var(--heading); padding-bottom: 2px; border-bottom: 2px solid var(--accent); }
.more-link:hover, .more-link:focus-visible { color: var(--accent); }
.more-link .icon { width: 1.05em; height: 1.05em; color: var(--accent); }

/* ---- layout */
.wrap { width: min(100% - 2 * var(--page-pad), var(--page-max)); margin-inline: auto; }
.band { padding-block: var(--space-16); }
.band + .band { padding-top: 0; }
.band-surface { background: var(--surface); padding-block: var(--space-16); }
.band-surface + .band { padding-top: var(--space-16); }
@media (min-width: 900px) { .band { padding-block: var(--space-24); } .band + .band { padding-top: 0; } .band-surface { padding-block: var(--space-24); } .band-surface + .band { padding-top: var(--space-24); } }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-3) var(--space-6); margin-bottom: var(--space-8); }
.section-head .label { display: block; margin-bottom: var(--space-2); }
.section-head p.lead { max-width: 40rem; color: var(--meta); margin-top: var(--space-3); }
.grid-2 { display: grid; gap: var(--gutter); grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: var(--gutter); grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid-2, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---- header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.site-header.scrolled { border-bottom-color: var(--hairline); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; color: var(--heading); text-decoration: none; font-size: 1.25rem; font-weight: 500; letter-spacing: -0.01em; line-height: 1; }
.brand .mark { width: 30px; height: 30px; }
.site-nav { display: none; align-items: center; gap: var(--space-2); }
.site-nav a { position: relative; display: inline-block; padding: 10px 12px; font-size: var(--size-nav); font-weight: 500; color: var(--meta); text-decoration: none; transition: color 0.15s; }
.site-nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.2s; }
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a[aria-current="page"] { color: var(--heading); }
.site-nav a[aria-current="page"]::after, .site-nav a:hover::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: var(--space-1); }
.header-actions .btn { margin-left: var(--space-2); display: none; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid transparent; background: transparent; color: var(--meta); cursor: pointer; }
.theme-toggle:hover, .theme-toggle:focus-visible { color: var(--heading); border-color: var(--hairline); background: var(--surface); }
.theme-toggle .icon { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; } :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; } }
html:not(.js) .theme-toggle { display: none; }
.menu { position: relative; }
.menu > summary { list-style: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; cursor: pointer; color: var(--meta); border: 1px solid transparent; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover { color: var(--heading); border-color: var(--hairline); background: var(--surface); }
.menu > summary .icon { width: 22px; height: 22px; }
.menu[open] > summary .icon-menu { display: none; }
.menu:not([open]) > summary .icon-close { display: none; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: var(--space-2); background: var(--card); border: 1px solid var(--hairline); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12); display: flex; flex-direction: column; }
.menu-panel a { padding: 10px 14px; font-weight: 500; color: var(--heading); text-decoration: none; }
.menu-panel a:hover, .menu-panel a[aria-current="page"] { background: var(--surface); color: var(--accent); }
@media (max-width: 479px) { .header-actions .icon-link { display: none; } }
@media (min-width: 900px) { .site-nav { display: flex; } .menu { display: none; } .header-actions .btn { display: inline-flex; } }

/* ---- hero: one wine field, the circuit drawn in white bleeding off the right edge */
.hero { position: relative; overflow: hidden; background: var(--wine); color: var(--white); }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.55; background-image: linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px); background-size: 96px 96px; background-position: center top; }
.hero-inner { position: relative; z-index: 1; padding-block: var(--space-16); display: flex; flex-direction: column; gap: var(--space-6); }
.hero-text { max-width: 36rem; display: flex; flex-direction: column; gap: var(--space-6); }
.hero .kicker { color: var(--wine-light); font-size: var(--size-small); font-weight: 500; }
.hero h1 { color: var(--white); font-size: clamp(2.5rem, 1.25rem + 2.9vw, 3.875rem); line-height: 1.02; letter-spacing: -0.025em; }
.hero .lead { color: var(--wine-light); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.hero .btn { color: var(--white); border-color: rgba(255, 255, 255, 0.55); }
.hero .btn:hover, .hero .btn:focus-visible { border-color: var(--white); background: rgba(255, 255, 255, 0.1); color: var(--white); }
.hero .btn-solid { background: var(--white); color: var(--wine); border-color: var(--white); }
.hero .btn-solid:hover, .hero .btn-solid:focus-visible { background: var(--wine-light); border-color: var(--wine-light); color: var(--wine); }
.hero .btn .icon { color: inherit; }
.hero-art { pointer-events: none; }
.hero-art svg { width: 118%; max-width: none; margin-left: -9%; height: auto; }
.hero .track-edge { stroke: rgba(255, 255, 255, 0.55); stroke-width: 1.5; }
.hero .track-start { stroke: rgba(255, 255, 255, 0.8); stroke-width: 3; }
.hero .lap { stroke: var(--white); }
.lap { fill: none; stroke: var(--track-lap); stroke-linecap: round; stroke-linejoin: round; stroke-width: calc(1.4px + 0.24px * var(--i)); opacity: calc(0.26 + 0.148 * var(--i)); stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: 17s linear infinite; }
.track-edge { fill: none; stroke: var(--track-edge); stroke-width: 1.5; }
.track-start { stroke: var(--track-edge); stroke-width: 3; }
.lap[style*="--i:0"] { animation-name: lap-0; }
.lap[style*="--i:1"] { animation-name: lap-1; }
.lap[style*="--i:2"] { animation-name: lap-2; }
.lap[style*="--i:3"] { animation-name: lap-3; }
.lap[style*="--i:4"] { animation-name: lap-4; }
.lap[style*="--i:5"] { animation-name: lap-5; }
@keyframes lap-0 { 0% { stroke-dashoffset: 1000; stroke-opacity: 1; } 15.29%, 90.29% { stroke-dashoffset: 0; stroke-opacity: 1; } 96.18% { stroke-dashoffset: 0; stroke-opacity: 0; } 96.19%, 100% { stroke-dashoffset: 1000; stroke-opacity: 0; } }
@keyframes lap-1 { 0%, 15.29% { stroke-dashoffset: 1000; stroke-opacity: 1; } 29.12%, 90.29% { stroke-dashoffset: 0; stroke-opacity: 1; } 96.18% { stroke-dashoffset: 0; stroke-opacity: 0; } 96.19%, 100% { stroke-dashoffset: 1000; stroke-opacity: 0; } }
@keyframes lap-2 { 0%, 29.12% { stroke-dashoffset: 1000; stroke-opacity: 1; } 41.47%, 90.29% { stroke-dashoffset: 0; stroke-opacity: 1; } 96.18% { stroke-dashoffset: 0; stroke-opacity: 0; } 96.19%, 100% { stroke-dashoffset: 1000; stroke-opacity: 0; } }
@keyframes lap-3 { 0%, 41.47% { stroke-dashoffset: 1000; stroke-opacity: 1; } 52.35%, 90.29% { stroke-dashoffset: 0; stroke-opacity: 1; } 96.18% { stroke-dashoffset: 0; stroke-opacity: 0; } 96.19%, 100% { stroke-dashoffset: 1000; stroke-opacity: 0; } }
@keyframes lap-4 { 0%, 52.35% { stroke-dashoffset: 1000; stroke-opacity: 1; } 61.76%, 90.29% { stroke-dashoffset: 0; stroke-opacity: 1; } 96.18% { stroke-dashoffset: 0; stroke-opacity: 0; } 96.19%, 100% { stroke-dashoffset: 1000; stroke-opacity: 0; } }
@keyframes lap-5 { 0%, 61.76% { stroke-dashoffset: 1000; stroke-opacity: 1; } 69.71%, 90.29% { stroke-dashoffset: 0; stroke-opacity: 1; } 96.18% { stroke-dashoffset: 0; stroke-opacity: 0; } 96.19%, 100% { stroke-dashoffset: 1000; stroke-opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .lap { animation: none; stroke-dashoffset: 0; } }
@media (min-width: 900px) {
  .hero { min-height: min(780px, 88vh); display: flex; align-items: center; }
  .hero-inner { padding-block: var(--space-24); }
  .hero-text { max-width: min(40rem, 52%); }
  .hero-art { position: absolute; inset: 0; }
  .hero-art svg { position: absolute; left: 53%; top: 50%; transform: translateY(-50%); width: 62%; min-width: 660px; max-height: 118%; margin: 0; }
}

/* ---- watermark: the circuit's edges behind a page head */
.watermark { position: absolute; right: -14%; top: -35%; width: 58%; min-width: 620px; pointer-events: none; opacity: 0.9; }
.watermark .lap, .watermark .track-start { display: none; }
.watermark .track-edge { stroke: var(--hairline); stroke-width: 1.5; }
.page-head { position: relative; overflow: hidden; }
.page-head .wrap { position: relative; z-index: 1; }

/* ---- logo band */
.logo-band { border-bottom: 1px solid var(--hairline); }
.logo-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-6) var(--space-10, 40px); padding-block: var(--space-6); }
@media (max-width: 699px) { .logo-band .label { display: none; } }
.logo-band .label { margin-right: auto; color: var(--meta); font-weight: 400; }
.logo-band img { height: 36px; width: auto; }
.logo-band .logo-penn { height: 30px; }
.logo-band .logo-xlab { height: 44px; }
.logo-band .logo-roboracer { height: 26px; }
.logo-band img { padding: 6px 8px; box-sizing: content-box; }
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-light { display: none; } :root:not([data-theme="light"]) .logo-dark { display: block; } }
/* dark theme: photographs and white figure mats sit a step below full brightness */
:root[data-theme="dark"] .photo-frame img, :root[data-theme="dark"] .card-media img, :root[data-theme="dark"] .bleed img, :root[data-theme="dark"] .figure-frame img, :root[data-theme="dark"] .course img { filter: brightness(0.9); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .photo-frame img, :root:not([data-theme="light"]) .card-media img, :root:not([data-theme="light"]) .bleed img, :root:not([data-theme="light"]) .figure-frame img, :root:not([data-theme="light"]) .course img { filter: brightness(0.9); } }

/* ---- cards */
.card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--hairline); text-decoration: none; color: inherit; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s; }
a.card:hover, a.card:focus-visible { border-color: var(--accent); transform: translateY(-2px); color: inherit; }
.card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface); border-bottom: 1px solid var(--hairline); }
.card-media img, .card-media video { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
a.card:hover .card-media img { transform: scale(1.03); }
.card-media.contain img { object-fit: contain; padding: var(--space-4); background: var(--mat); }
.card-body { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); flex: 1; }
.card-body h3 { font-size: var(--size-h3); }
.card-body p { color: var(--body); }
.card-body .meta { margin-top: auto; padding-top: var(--space-2); }
.card-foot { display: flex; align-items: center; gap: var(--space-2); color: var(--accent-text); font-weight: 500; font-size: var(--size-small); margin-top: auto; }
.card-foot .icon { width: 1em; height: 1em; }
@media (min-width: 1024px) { .grid-3.stagger > :nth-child(2) { margin-top: var(--space-8); } .grid-3.stagger > :nth-child(3) { margin-top: var(--space-16); } }

/* ---- split blocks, text beside a figure */
.split { display: grid; gap: var(--space-8); grid-template-columns: 1fr; align-items: center; }
.split + .split { margin-top: var(--space-16); }
.split figure { margin: 0; }
.split .figure-frame { background: var(--mat); border: 1px solid var(--hairline); padding: var(--space-4); }
.split .photo-frame { border: 1px solid var(--hairline); overflow: hidden; }
.split figcaption { margin-top: var(--space-2); }
.split .number { display: block; font-size: 3.25rem; line-height: 1; font-weight: 500; letter-spacing: -0.02em; color: var(--accent); margin-bottom: var(--space-4); }
.split .number + .label, .split-text > .label { display: block; margin-bottom: var(--space-2); }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-12); }
  .split.flip > .split-text { order: 2; }
  .split + .split { margin-top: var(--space-24); }
}

/* ---- overlapping captions, full-bleed photo bands */
figure.overlap { position: relative; margin-bottom: var(--space-8); }
figure.overlap figcaption { margin: calc(-1 * var(--space-6)) var(--space-4) 0; position: relative; max-width: 32rem; padding: var(--space-3) var(--space-4); background: var(--card); border: 1px solid var(--hairline); color: var(--body); font-size: var(--size-small); }
@media (min-width: 900px) { figure.overlap figcaption { margin: 0; position: absolute; left: calc(-1 * var(--space-6)); bottom: calc(-1 * var(--space-6)); } .split.flip figure.overlap figcaption { left: auto; right: calc(-1 * var(--space-6)); } }
.bleed { position: relative; margin-top: var(--space-16); }
.bleed + .wrap { margin-top: var(--space-16); }
.bleed img { width: 100%; height: min(62vh, 640px); object-fit: cover; }
.bleed-box { position: relative; z-index: 1; margin: calc(-1 * var(--space-24)) auto 0; width: min(100% - 2 * var(--page-pad), var(--page-max)); }
.bleed-box > div { max-width: 34rem; background: var(--wine); color: var(--white); padding: var(--space-8); }
.bleed-box .label { color: var(--wine-light); }
.bleed-box h2, .bleed-box h3 { color: var(--white); margin-top: var(--space-2); }
.bleed-box p { color: var(--wine-light); margin-top: var(--space-3); }
.bleed-box a { color: var(--white); }
.bleed-box .linkrow a { color: var(--white); }
.bleed-box .linkrow .icon { color: var(--wine-light); }
.bleed-box .linkrow a:hover, .bleed-box .linkrow a:focus-visible { color: var(--wine-light); }
.bleed-box .linkrow { margin-top: var(--space-4); }
.stat-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); }
.stat { padding: var(--space-6) 0; border-top: 2px solid var(--accent); }
.stat strong { display: block; font-size: 2.5rem; line-height: 1; font-weight: 500; letter-spacing: -0.02em; color: var(--heading); }
.stat span { display: block; margin-top: var(--space-2); color: var(--meta); font-size: var(--size-small); }
@media (min-width: 900px) { .stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---- publications */
.pub-year { display: grid; grid-template-columns: 1fr; gap: var(--space-4); padding-top: var(--space-8); }
.pub-year h3 { font-size: clamp(2.25rem, 1.8rem + 2vw, 3.5rem); line-height: 1; font-weight: 500; letter-spacing: -0.03em; color: var(--numeral); }
.pub-list { display: flex; flex-direction: column; border-top: 1px solid var(--hairline); }
.pub { display: grid; grid-template-columns: 1fr; gap: var(--space-2) var(--space-6); padding: var(--space-6) 0; border-bottom: 1px solid var(--hairline); }
.pub .title { font-weight: 500; color: var(--heading); font-size: 1.0625rem; line-height: 1.35; }
.pub .title a { color: inherit; text-decoration: none; }
.pub .title a:hover, .pub .title a:focus-visible { color: var(--accent); }
.pub .venue-tag { font-size: var(--size-caption); font-weight: 500; color: var(--accent-text); letter-spacing: 0.01em; }
.pub-links { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.pub-links a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--hairline); font-size: var(--size-caption); font-weight: 500; color: var(--heading); text-decoration: none; transition: border-color 0.15s, color 0.15s; }
.pub-links a:hover, .pub-links a:focus-visible { border-color: var(--accent); color: var(--accent); }
.pub-links .icon { width: 14px; height: 14px; }
@media (min-width: 900px) {
  .pub-year { grid-template-columns: 180px 1fr; }
  .pub-year h3 { position: sticky; top: 92px; align-self: start; }
  .pub { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title tag" "authors tag" "venue links"; align-items: start; }
  .pub .title { grid-area: title; }
  .pub .authors { grid-area: authors; }
  .pub .venue { grid-area: venue; }
  .pub .venue-tag { grid-area: tag; text-align: right; }
  .pub-links { grid-area: links; justify-content: flex-end; align-self: end; }
}

/* ---- news */
.news { display: flex; flex-direction: column; border-top: 1px solid var(--hairline); }
.news-item { display: grid; grid-template-columns: 1fr; gap: var(--space-1) var(--space-6); padding: var(--space-4) 0; border-bottom: 1px solid var(--hairline); }
.news-item time { color: var(--meta); font-size: var(--size-small); }
@media (min-width: 700px) { .news-item { grid-template-columns: 160px 1fr; } }

/* ---- page head */
.page-head { padding-block: var(--space-16) var(--space-12); }
.page-head h1 { margin-bottom: var(--space-4); font-size: clamp(2.25rem, 1.5rem + 2.6vw, 3.5rem); line-height: 1.05; letter-spacing: -0.02em; }
.page-head .lead { max-width: 44rem; color: var(--body); }
.page-head .intro { max-width: 44rem; margin-top: var(--space-4); color: var(--meta); }
@media (min-width: 900px) { .page-head { padding-block: var(--space-16) var(--space-12); } }

/* ---- timeline */
.timeline { position: relative; display: flex; flex-direction: column; gap: var(--space-10, 40px); margin: 0; padding: 0 0 0 28px; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px; background: var(--hairline); }
.tl-item { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2) 72px; }
.tl-item::before { content: ""; position: absolute; left: -27px; top: 6px; width: 11px; height: 11px; box-sizing: border-box; background: var(--ground); border: 2px solid var(--accent); }
.tl-when { color: var(--meta); font-size: var(--size-small); line-height: 1.5; }
.tl-when time { display: block; color: var(--heading); font-weight: 500; }
.tl-body > * + * { margin-top: var(--space-3); }
.tl-body figure { margin-top: var(--space-4); border: 1px solid var(--hairline); overflow: hidden; }
.tl-body figure img { width: 100%; }
.tl-body figcaption { padding: var(--space-2) var(--space-3); }
.tl-year { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 72px; padding-top: var(--space-6); }
.tl-year span { grid-column: 1 / -1; display: block; font-size: clamp(2.5rem, 2rem + 2vw, 4rem); line-height: 1; font-weight: 500; letter-spacing: -0.03em; color: var(--numeral); }
@media (min-width: 900px) { .timeline { padding-left: 0; } .timeline::before { left: 216px; } .tl-item { grid-template-columns: 180px minmax(0, 1fr); } .tl-item::before { left: 211px; } .tl-year { grid-template-columns: 180px minmax(0, 1fr); } .tl-year span { grid-column: 2; } }

/* ---- journey globe */
.journey-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-12); align-items: start; }
.globe-aside { display: none; }
.globe-stack { position: relative; aspect-ratio: 1; }
.globe-frame { position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s ease; }
.globe-frame.is-active, .globe-stack:not(.has-active) .globe-frame:first-child { opacity: 1; }
.globe-svg { display: block; width: 100%; height: auto; }
.globe-caption { margin-top: var(--space-3); display: flex; flex-direction: column; gap: 2px; font-size: var(--size-small); color: var(--meta); }
.globe-place { color: var(--heading); font-weight: 500; }
@media (min-width: 1100px) {
  .journey-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: var(--space-16); }
  .globe-aside { display: block; position: sticky; top: 96px; }
}
@media (prefers-reduced-motion: reduce) { .globe-frame { transition: none; } }

/* ---- course and institution blocks */
.course { display: grid; gap: var(--space-4); padding: var(--space-6) 0; border-top: 1px solid var(--hairline); grid-template-columns: 1fr; }
.course .course-meta { color: var(--meta); font-size: var(--size-small); line-height: 1.6; }
.course .course-meta strong { color: var(--heading); font-weight: 500; }
.course .course-body > * + * { margin-top: var(--space-3); }
.course figure { border: 1px solid var(--hairline); overflow: hidden; }
.course figcaption { padding: var(--space-2) var(--space-3); }
@media (min-width: 900px) { .course { grid-template-columns: 200px 1fr; } }

/* ---- motion */
.motion-figure .motion-poster { display: none; }
@media (prefers-reduced-motion: reduce) { .motion-figure .research-animation, .motion-figure video { display: none; } .motion-figure .motion-poster { display: block; } }

/* ---- footer */
.site-footer { margin-top: var(--space-24); background: var(--surface); border-top: 1px solid var(--hairline); padding-block: var(--space-12) var(--space-8); font-size: var(--size-small); color: var(--meta); }
.footer-grid { display: grid; gap: var(--space-8); grid-template-columns: 1fr; }
.footer-grid h4 { font-size: var(--size-small); font-weight: 500; color: var(--heading); margin-bottom: var(--space-3); }
.footer-grid ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.footer-grid a { color: var(--meta); text-decoration: none; }
.footer-grid a:hover { color: var(--accent); }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--heading); font-weight: 500; font-size: 1.125rem; margin-bottom: var(--space-3); }
.footer-brand .mark { width: 26px; height: 26px; }
.footer-icons { display: flex; gap: var(--space-1); margin-left: -8px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2); margin-top: var(--space-12); padding-top: var(--space-4); border-top: 1px solid var(--hairline); font-size: var(--size-caption); }
.button { font: inherit; color: var(--link); background: none; border: 0; padding: 0; text-decoration: underline; text-decoration-thickness: 1px; cursor: pointer; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
