/* ==========================================================================
   Matthew Frak — Portfolio
   Edit the colour tokens below to re-theme the whole site.
   ========================================================================== */

:root {
  --bg: #f7fbff;
  --surface: #ffffff;
  --ink: #0f2340;             /* navy text */
  --ink-soft: #44546b;
  --ink-faint: #7a879a;
  --line: #dbe7f3;
  --accent: #1b3a6b;          /* navy accent */
  --accent-hover: #2c5a9a;
  --blue: #9fd0f5;            /* baby blue */
  --blue-soft: #e6f3fd;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 35, 64, .04), 0 10px 28px rgba(15, 35, 64, .08);
  --max: 1120px;
  /* One typeface everywhere: IBM Plex Sans. Display = headings, label = small uppercase labels, dates, chart ticks */
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: var(--font-sans);
  --font-label: var(--font-sans);
  color-scheme: light;
}

/* ---------- Base ---------- */

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration-color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); font-weight: 600; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }

p { margin: 0 0 1em; }

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

.eyebrow {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .75rem;
  display: block;
}

.section { padding: 96px 0; border-top: 1px solid var(--line); }

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; text-decoration: none; letter-spacing: -0.01em; }
.brand span { color: var(--blue); }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-links a { text-decoration: none; font-size: .95rem; color: var(--ink-soft); }
.nav-links a:hover { color: var(--ink); }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); padding: 8px; cursor: pointer; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px;
  font-size: .95rem; font-weight: 500; text-decoration: none;
  border: 1px solid var(--ink); background: var(--ink); color: var(--bg);
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); color: #fff; background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--blue-soft); color: var(--ink); border-color: var(--blue); }
.nav-links .btn { color: var(--bg); padding: 8px 16px; }

/* ---------- Hero ---------- */

.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: min(80vh, 760px); display: grid; place-items: center;
  background: var(--ink); color: #fff;
}
/* Slides stack on top of each other and crossfade; the active one also eases out of a slight zoom */
.hero-slides { position: absolute; inset: 0; z-index: -2; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; }
.hero-slide.is-active { opacity: 1; }
.hero-slide img, .hero-slide video { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-slide.is-active img { animation: hero-zoom 7s ease-out forwards; }
@keyframes hero-zoom { from { transform: scale(1.035); } to { transform: scale(1); } }
/* Dark navy wash so white text stays readable on any photo */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 60% 55% at 50% 50%, rgba(8,12,20,.42), transparent 75%),
    linear-gradient(180deg, rgba(12,18,30,.38) 0%, rgba(12,18,30,.22) 45%, rgba(12,18,30,.60) 100%);
}
.hero-content { text-align: center; padding: 96px 16px 112px; max-width: 760px; }
.hero-avatar {
  width: 104px; height: 104px; border-radius: 50%; object-fit: cover;
  border: 3px solid rgba(255,255,255,.9); margin: 0 auto 20px; box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.hero h1 { color: #fff; margin-bottom: .3em; text-shadow: 0 2px 20px rgba(0,0,0,.45); }
.hero-lede { font-size: 1.15rem; color: rgba(255,255,255,.95); max-width: 44ch; margin: 0 auto 1.9rem; text-shadow: 0 1px 12px rgba(0,0,0,.5); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero .btn { background: #fff; color: var(--ink); border-color: #fff; }
.hero .btn:hover { background: var(--blue); border-color: var(--blue); color: var(--ink); }
.hero .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.65); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.14); color: #fff; border-color: #fff; }

.hero-caption {
  position: absolute; left: 24px; bottom: 20px; z-index: 2;
  font-size: .85rem; font-weight: 500; color: rgba(255,255,255,.95); text-decoration: none; text-shadow: 0 1px 8px rgba(0,0,0,.7);
  transition: opacity .4s ease;
}
.hero-caption[href]:hover { color: #fff; text-decoration: underline; }
.hero-caption:not([href]) span { display: none; }
.hero-controls { position: absolute; right: 20px; bottom: 16px; z-index: 2; display: flex; align-items: center; gap: 12px; }
.hero-dots { display: flex; align-items: center; gap: 10px; }
.hero-dots button {
  position: relative; width: 12px; height: 12px; padding: 0; border-radius: 6px; border: 0; cursor: pointer;
  background: rgba(255,255,255,.5); box-shadow: 0 1px 4px rgba(0,0,0,.35);
  transition: background .3s ease, width .3s ease;
}
.hero-dots button::before { content: ""; position: absolute; inset: -8px -5px; }  /* bigger tap target than the dot */
.hero-dots button:hover { background: rgba(255,255,255,.8); }
.hero-dots button[aria-selected="true"] { background: #fff; width: 32px; }
.hero-pause {
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.4); color: #fff;
}
.hero-pause:hover { background: rgba(255,255,255,.25); }
.i-pause, .i-play { display: block; width: 10px; height: 10px; }
.i-pause { border-left: 3px solid #fff; border-right: 3px solid #fff; }
.i-play { width: 0; height: 0; border-left: 10px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 3px; }

.section-title { text-align: center; font-size: clamp(1.7rem, 3.2vw, 2.2rem); margin: 0 0 48px; }

/* ---------- Experience timeline ----------
   Static centre rail with a logo on each stop. Cards alternate sides on desktop. */

.timeline { position: relative; list-style: none; margin: 0; padding: 0; }
.timeline::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px;
  background: var(--line);
}

.stop { display: grid; grid-template-columns: 1fr 136px 1fr; align-items: center; padding: 28px 0; position: relative; z-index: 1; }
.stop-logo {
  grid-column: 2; grid-row: 1; justify-self: center;
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--blue-soft); box-shadow: var(--shadow);
  display: grid; place-items: center; overflow: hidden;
  transition: border-color .4s ease, transform .4s ease;
}
.stop-logo img { width: 74%; height: 74%; object-fit: contain; }
.stop-logo img.wide { width: 84%; height: 84%; }   /* wide wordmarks get a pill badge */
.stop-logo:has(img.wide) { width: 128px; border-radius: 38px; }
.stop:hover .stop-logo { transform: scale(1.06); }

.stop-card {
  grid-column: 1; grid-row: 1;
  padding: 24px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.stop-date { grid-column: 3; grid-row: 1; padding-left: 8px; }
.stop:nth-child(even) .stop-card { grid-column: 3; }
.stop:nth-child(even) .stop-date { grid-column: 1; text-align: right; padding: 0 8px 0 0; }

.stop-date strong { display: block; font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; color: var(--accent); letter-spacing: -0.01em; }
.stop-date span { font-family: var(--font-label); font-size: .8rem; color: var(--ink-faint); }

.stop-card .company { font-family: var(--font-label); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.stop-card h3 { margin: .3rem 0 .5rem; }
.stop-card p { color: var(--ink-soft); font-size: .95rem; margin: 0; }
.stop-card .tags { margin-top: 14px; }
.stop-card .tags li { font-size: .78rem; padding: 4px 10px; background: var(--blue-soft); border-color: transparent; color: var(--accent); }
.stop-link { display: inline-block; margin-top: 14px; font-size: .88rem; font-weight: 500; color: var(--accent); text-decoration: none; }
.stop-link:hover { text-decoration: underline; }
.stop-link + .stop-link { margin-left: 16px; }

/* slide in from the side the card sits on */
.stop.reveal { transform: none; }
.stop.reveal .stop-card { transform: translateX(-24px); transition: transform .6s ease; }
.stop.reveal:nth-child(even) .stop-card { transform: translateX(24px); }
.stop.reveal.in .stop-card { transform: none; }

.timeline-foot { text-align: center; margin-top: 32px; color: var(--ink-soft); }

/* ---------- Project cards ---------- */

/* Part-filled last row stays left-aligned (Nov 1: Matthew found the centred lone card odd) */
.project-grid { display: flex; flex-wrap: wrap; gap: 24px; }
.project-grid > .card { flex: 0 0 calc((100% - 48px) / 3); }
.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: inherit;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; color: inherit; }
.card-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--line); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card-body .eyebrow { margin-bottom: .4rem; font-size: .72rem; }
.card-body h3 { margin-bottom: .4rem; }
.card-body p { color: var(--ink-soft); font-size: .95rem; margin-bottom: 1.2rem; }
.card-more { margin-top: auto; font-size: .9rem; font-weight: 500; color: var(--accent); }

/* ---------- Tag pills (timeline cards) ---------- */

.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.tags li {
  font-size: .85rem; padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft);
}

/* ---------- Contact ---------- */

.contact { text-align: center; }
.contact h2 { font-size: clamp(2rem, 5vw, 3.2rem); }
.contact p { color: var(--ink-soft); max-width: 48ch; margin: 0 auto 2rem; }
.contact .hero-actions { justify-content: center; }

.site-footer { padding: 32px 0; border-top: 1px solid var(--line); color: var(--ink-faint); font-size: .85rem; }
.site-footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--ink-faint); }

/* ---------- Project pages: slideshow + short text ----------
   Title and a short summary, one large photo slideshow, a few bullet points, tools. */

.back { display: inline-flex; gap: 6px; font-size: .9rem; color: var(--ink-faint); text-decoration: none; margin-bottom: 20px; }
.back:hover { color: var(--accent); }

.p-head { padding-top: 40px; padding-bottom: 40px; }
.p-head h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: .15em; }
.p-meta { margin: 0 0 14px; font-weight: 500; color: var(--ink-faint); }
.p-summary { max-width: 64ch; margin: 0; font-size: 1.15rem; color: var(--ink-soft); }

/* The slideshow sits in its own full-width band. Each photo shows at its natural shape with rounded
   corners (no box or fill around it), so tall photos are just tall photos. */
.p-show { background: #edf3f9; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 36px 0 28px; }
.pshow-stage {
  position: relative; outline: none;
  aspect-ratio: 16 / 10; max-height: 70vh; width: 100%;
}
.pshow-stage:focus-visible { outline: 3px solid var(--blue); outline-offset: 6px; border-radius: 12px; }
.pshow-slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .35s ease; }
.pshow-slide.is-active { opacity: 1; z-index: 1; }
.pshow-slide { display: flex; align-items: center; justify-content: center; }
.pshow-slide img, .pshow-slide video {
  display: block; width: auto; height: auto; max-width: 100%; max-height: 100%;
  border-radius: 12px; box-shadow: 0 6px 24px rgba(15,35,64,.18);
}
.pshow-slide video { background: #000; }
.pshow-prev, .pshow-next {
  position: absolute; top: 50%; z-index: 2; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.88); color: var(--ink); font-size: 1.2rem; box-shadow: 0 2px 10px rgba(0,0,0,.25);
  transition: background .2s ease, transform .2s ease;
}
.pshow-prev { left: 14px; } .pshow-next { right: 14px; }
.pshow-prev:hover, .pshow-next:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.pshow-bar { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; margin-top: 12px; }
.pshow-cap { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.pshow-count { flex: none; font-size: .85rem; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.pshow-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.pshow-dots button {
  position: relative; width: 10px; height: 10px; padding: 0; border: 0; border-radius: 5px; cursor: pointer;
  background: #c9d6e4; transition: background .25s ease, width .25s ease;
}
.pshow-dots button::before { content: ""; position: absolute; inset: -7px -4px; }  /* bigger tap target */
.pshow-dots button:hover { background: var(--blue); }
.pshow-dots button[aria-selected="true"] { background: var(--accent); width: 26px; }

.p-points { padding-top: 44px; padding-bottom: 24px; }
.p-points ul { max-width: 64ch; margin: 0 0 18px; padding-left: 1.1em; }
.p-points li { margin-bottom: .55em; color: var(--ink-soft); font-size: 1.05rem; }
.p-points li::marker { color: var(--accent); }
.p-points strong { color: var(--ink); }
.p-tools { margin: 0; font-size: .95rem; color: var(--ink-soft); }
.p-tools span { font-weight: 600; color: var(--ink); margin-right: 4px; }

.p-chart { padding-top: 16px; padding-bottom: 24px; }
.p-chart > h2 { font-size: 1.45rem; margin-bottom: .4em; }
.p-chart > p { color: var(--ink-soft); max-width: 64ch; }
.p-chart { min-width: 0; }

/* Gallery: even grid that wraps, so any number of photos lays out cleanly.
   To add a photo, copy one <figure> line in the HTML and change src/alt/caption. */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 48px 0; }
.gallery figure { margin: 0; position: relative; border-radius: 10px; overflow: hidden; background: var(--line); cursor: zoom-in; aspect-ratio: 1; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery figure:hover img { transform: scale(1.03); }
.gallery figure:hover figcaption, .gallery figure:focus-visible figcaption { opacity: 1; }
.gallery figure:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Video clips sit in the gallery grid, two cells wide, and play in place instead of opening the lightbox */
.gallery figure.video { grid-column: span 2; aspect-ratio: 2 / 1; cursor: default; background: #000; }
.gallery figure.video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery figure.video figcaption { top: 0; bottom: auto; padding: 10px 12px 28px; background: linear-gradient(rgba(0,0,0,.6), transparent); opacity: 1; pointer-events: none; }

/* ---------- Data chart (project pages) ---------- */

.chart {
  --chart-key: #2a64b8;       /* validated pair: CVD ΔE ≥ 17 vs --chart-other */
  --chart-other: #8c9db5;
  margin: 1.5rem 0 2rem; padding: 20px 20px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); position: relative;
}
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
/* below ~560px the chart keeps a readable size and scrolls sideways inside its card */
.chart-plot { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.chart-plot svg { min-width: 540px; padding-left: 4px; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .zero { stroke: var(--ink-faint); stroke-width: 1; }
.chart .tick { font: 500 11px var(--font-label); fill: var(--ink-faint); }
.chart .axis { font: 500 12px var(--font-sans); fill: var(--ink-soft); }
.chart .lbl { font: 600 12.5px var(--font-sans); fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }
.chart .pt { cursor: pointer; outline: none; }
.chart .hit { fill: transparent; }
.chart .dot { stroke: var(--surface); stroke-width: 2; transition: r .15s ease; }
.chart .pt.key .dot { fill: var(--chart-key); }
.chart .pt.other .dot { fill: var(--chart-other); }
.chart .pt:hover .dot, .chart .pt:focus-visible .dot { stroke: var(--ink); }
.chart-legend { display: flex; gap: 20px; font-size: .85rem; color: var(--ink-soft); margin-bottom: 8px; flex-wrap: wrap; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.chart-legend i.key { background: var(--chart-key); }
.chart-legend i.other { background: var(--chart-other); }
.chart figcaption { font-size: .82rem; color: var(--ink-faint); margin-top: 6px; }
.chart details { margin-top: 10px; font-size: .9rem; }
.chart summary { cursor: pointer; color: var(--accent); font-weight: 500; }
.chart table { width: 100%; border-collapse: collapse; margin-top: 10px; font-variant-numeric: tabular-nums; }
.chart th, .chart td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.chart th { font: 500 .75rem var(--font-label); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); }
.chart td:not(:first-child), .chart th:not(:first-child) { text-align: right; }
.chart tr.key td { color: var(--ink); font-weight: 600; }
.chart-tip {
  position: absolute; z-index: 5; pointer-events: none; max-width: 260px;
  padding: 8px 10px; border-radius: 8px; font-size: .82rem; line-height: 1.4;
  background: var(--ink); color: #fff; box-shadow: var(--shadow); transform: translate(-50%, calc(-100% - 12px));
}

.next-project { border-top: 1px solid var(--line); margin-top: 56px; padding: 48px 0 64px; }
.next-project a { display: flex; justify-content: space-between; align-items: center; gap: 24px; text-decoration: none; }
.next-project .title { font-family: var(--font-display); font-size: clamp(1.5rem, 3.5vw, 2.4rem); font-weight: 600; letter-spacing: -0.02em; }
.next-project .arrow { font-size: 2rem; color: var(--accent); transition: transform .2s ease; }
.next-project a:hover .arrow { transform: translateX(6px); }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(10, 10, 12, .92); align-items: center; justify-content: center; padding: 56px 72px;
}
.lightbox.open { display: flex; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 160px); object-fit: contain; border-radius: 8px; }
.lightbox figcaption { color: #ddd; font-size: .9rem; margin-top: 14px; text-align: center; }
.lightbox button {
  position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 0;
  width: 44px; height: 44px; border-radius: 50%; font-size: 1.3rem; cursor: pointer;
}
.lightbox button:hover { background: rgba(255,255,255,.2); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------- Reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-slide.is-active img { animation: none; }
  * { transition: none !important; }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .project-grid > .card { flex-basis: calc((100% - 24px) / 2); }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .section { padding: 64px 0; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px;
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 12px 0; }
  .nav-links .btn { justify-content: center; margin-top: 8px; }
  .hero { min-height: 74vh; }
  .hero-content { padding: 72px 16px 96px; }
  .hero-avatar { width: 84px; height: 84px; }
  .hero-lede { font-size: 1.05rem; }
  .hero-caption { display: none; }
  .hero-controls { right: 12px; bottom: 12px; }
  .section-title { margin-bottom: 32px; }
  .timeline::before { left: 38px; }
  .stop, .stop:nth-child(even) { grid-template-columns: 76px 1fr; column-gap: 16px; row-gap: 10px; align-items: start; padding: 18px 0; }
  .stop-logo { grid-column: 1; grid-row: 1 / span 2; width: 60px; height: 60px; }
  .stop-logo:has(img.wide) { width: 76px; height: 44px; border-radius: 22px; margin-top: 8px; }
  .stop-date, .stop:nth-child(even) .stop-date { grid-column: 2; grid-row: 1; text-align: left; padding: 6px 0 0; }
  .stop-card, .stop:nth-child(even) .stop-card { grid-column: 2; grid-row: 2; padding: 20px; }
  .stop-date strong { font-size: 1.1rem; }
  .stop.reveal .stop-card, .stop.reveal:nth-child(even) .stop-card { transform: translateY(12px); }
  .project-grid > .card { flex-basis: 100%; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .p-head { padding-top: 28px; }
  .p-summary { font-size: 1.05rem; }
  .p-show { padding: 24px 0 20px; }
  .pshow-stage { aspect-ratio: 1 / 1; }  /* square on phones suits both tall and wide photos */
  .p-head { padding-bottom: 28px; }
  .p-points { padding-top: 32px; }
  .pshow-prev, .pshow-next { width: 36px; height: 36px; font-size: 1rem; }
  .pshow-prev { left: 8px; } .pshow-next { right: 8px; }
  .lightbox { padding: 56px 8px; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
}
