/* ==========================================================
   Ryan O'Connor — portfolio
   Type: Archivo Expanded (display) · Geist (body) · Geist Mono (labels)
   ========================================================== */

:root {
  --bg: #F7F6F3;
  --ink: #111110;
  --text: #2B2A27;
  --text-2: #3D3B37;
  --muted: #5E5B56;
  --hair: #DAD7D0;
  --ph: #E4E1DB;
  --ph-2: #D9D5CD;

  --display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Geist', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Geist Mono', ui-monospace, Menlo, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --gap: clamp(16px, 2vw, 28px);
  --space-xl: clamp(80px, 10vw, 160px);
  --space-l: clamp(56px, 7vw, 112px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--muted); }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 300; }

/* ---------- Type roles ---------- */
.display {
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 300;
  letter-spacing: -0.02em;
}
.mono {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
}
.muted { color: var(--muted); }
.body-copy { font-size: 17px; line-height: 1.65; color: var(--text); }
.body-copy + .body-copy { margin-top: 18px; }
.link-underline { border-bottom: 1px solid var(--ink); padding-bottom: 4px; }

/* ---------- Layout ---------- */
.wrap { padding-left: var(--gutter); padding-right: var(--gutter); }
.rule { border-top: 1px solid var(--ink); }

/* ---------- Header ---------- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 28px var(--gutter);
  border-bottom: 1px solid var(--hair);
  position: relative;
}
.wordmark {
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 500;
  letter-spacing: 0.01em;
  font-size: 20px;
  line-height: 1;
}
.site-nav { display: flex; gap: 20px; font-weight: 300; }
.site-nav a[aria-current="page"] { border-bottom: 1px solid var(--ink); }
.menu-btn {
  display: none;
  background: none;
  border: 0;
  padding: 0 4px;
  min-height: 44px;
  color: var(--ink);
  cursor: pointer;
}

/* ---------- Image placeholders ---------- */
.media { background: var(--ph); position: relative; overflow: hidden; }
.media.dark { background: var(--ph-2); }
.media .ph-label {
  position: absolute; left: 16px; bottom: 14px;
  font-family: var(--mono); font-size: 11px; color: #6A665F;
}
/* Rows of images at their own shape, and video embeds */
.mod-row, .mod-video {
  margin-left: var(--gutter); margin-right: var(--gutter);
  display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
  gap: var(--gap); align-items: start;
}
.mod-row img { height: auto; }
.mod-video:not(.multi) { display: block; }
/* vertical videos: same width as a post in a row of three, centered */
.mod-video.multi { display: flex; justify-content: center; }
.mod-video.multi > * { flex: 0 0 calc((100% - 2 * var(--gap)) / 3); }
.media.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.p-hero.video, .p-hero.video-ph { width: 100%; }
.video-ph { display: block; }
.r-9-16 { aspect-ratio: 9 / 16; }

.carousel-nav { display: none; }
.carousel-nav button {
  min-width: 44px; min-height: 36px; padding: 0;
  background: none; border: 0; color: var(--ink);
  font-family: var(--mono); font-size: 18px; line-height: 1; cursor: pointer;
}
.carousel-nav button:disabled { color: var(--hair); cursor: default; }

/* One-row sliders: a category of ads scrolls sideways on every screen */
.mod-mix.slider {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  margin-right: 0; padding-right: var(--gutter); scrollbar-width: none;
}
.mod-mix.slider::-webkit-scrollbar { display: none; }
.mod-mix.slider > img, .mod-mix.slider > video { flex: 0 0 auto; width: auto; height: clamp(320px, 36vw, 580px); scroll-snap-align: start; }
.mod-mix.slider > .media { flex: 0 0 auto; width: auto; height: clamp(320px, 36vw, 580px); scroll-snap-align: start; }
.mod-mix.slider + .carousel-nav { display: flex; justify-content: flex-end; gap: 4px; margin: 8px var(--gutter) 0; }

/* Mixed-shape rows: feed + story ads at equal height */
.mod-mix {
  margin-left: var(--gutter); margin-right: var(--gutter);
  display: grid; gap: var(--gap); align-items: start;
}
.mod-mix > img, .mod-mix > video { width: 100%; height: auto; display: block; object-fit: cover; background: var(--ph); }

/* Results strip */
.mod-stats {
  margin-left: var(--gutter); margin-right: var(--gutter);
  border-top: 1px solid var(--ink); padding-top: 28px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 32px var(--gap);
}
.stat-num { font-size: clamp(44px, 5.4vw, 84px); line-height: 1; margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 15px; line-height: 1.45; color: var(--text-2); max-width: 260px; }

/* Device mockups and other images that must not be cropped */
.media.contain { background: var(--bg); }
.media.contain img { object-fit: contain; }
.r-16-9 { aspect-ratio: 16 / 9; }
.r-16-8 { aspect-ratio: 16 / 8; }
.r-21-9 { aspect-ratio: 21 / 9; }
.r-4-3 { aspect-ratio: 4 / 3; }
.r-4-5 { aspect-ratio: 4 / 5; }
.r-3-4 { aspect-ratio: 3 / 4; }
.r-1-1 { aspect-ratio: 1 / 1; }

/* ---------- Home ---------- */
.hero {
  padding: var(--space-xl) var(--gutter) var(--space-l);
  display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-end;
}
.hero h1 {
  flex: 999 1 640px; min-width: 0;
  font-size: clamp(30px, 4.25vw, 68px);
  line-height: 1.02;
}
.hero-side {
  flex: 1 1 300px; max-width: 380px;
  display: flex; flex-direction: column; gap: 20px;
  color: var(--text-2);
}
.hero-side .mono { align-self: flex-start; }
/* No intro paragraph: the About link sits directly under the headline */
.hero--stack { flex-direction: column; align-items: flex-start; gap: 28px; }
.hero--stack h1 { flex: none; max-width: 1100px; }
.hero--stack .hero-side { flex: none; }

.section-bar {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  border-top: 1px solid var(--ink);
  padding: 14px 0 32px;
}
.collage { display: flex; flex-wrap: wrap; gap: clamp(16px, 2vw, 32px); align-items: flex-start; }
.collage + .collage { margin-top: clamp(32px, 5vw, 80px); }
.tile { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tile-caption { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.collage .t-a { flex: 3 1 520px; }
.collage .t-b { flex: 2 1 340px; margin-top: clamp(0px, 8vw, 140px); }
.collage .t-c { flex: 1 1 260px; }
.collage .t-d { flex: 1 1 260px; margin-top: clamp(0px, 5vw, 96px); }
.collage .t-e { flex: 1 1 260px; }
.view-all { display: none; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: var(--space-xl);
  padding: 48px var(--gutter) 40px;
  border-top: 1px solid var(--ink);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px;
}
.site-footer .big {
  font-size: clamp(24px, 2.7vw, 38px);
  line-height: 1.08;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-end; }
.site-footer { align-items: flex-end; }

/* ---------- Work ---------- */
.page-head {
  padding: var(--space-l) var(--gutter) 40px;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px;
}
.page-head h1 { font-size: clamp(38px, 5.1vw, 82px); line-height: 0.95; }
.page-head h1 .count { font-family: var(--mono); font-size: 0.32em; letter-spacing: 0.04em; vertical-align: top; }
.page-head p { max-width: 360px; font-size: 15px; color: var(--text-2); }
.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;
}
.work-wrap { padding-top: clamp(56px, 7vw, 112px); }
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 56px var(--gap);
}
.work-item { display: flex; flex-direction: column; gap: 12px; }
.work-item .meta { display: flex; gap: 14px; align-items: baseline; font-size: 15px; }
.work-item .num { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.work-item .title { flex: 1 1 auto; }
.work-item .client { font-size: 13px; color: var(--muted); }
.work-item:hover .media img { opacity: 0.92; }

/* ---------- Project ---------- */
.p-hero { width: 100%; }
.p-head { padding: clamp(48px, 6vw, 96px) var(--gutter) 0; }
.p-head .kicker { margin-bottom: 20px; color: var(--muted); }
.p-head h1 { font-size: clamp(34px, 4.8vw, 74px); line-height: 1; }
.p-intro {
  margin-top: clamp(40px, 5vw, 72px);
  border-top: 1px solid var(--ink);
  padding-top: 28px;
  display: flex; flex-wrap: wrap; gap: 48px;
}
.p-meta {
  flex: 1 1 260px; margin: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px;
  align-content: start; font-size: 14px; line-height: 1.45;
}
.p-meta dt { margin-bottom: 6px; color: var(--muted); }
.p-meta dd { margin: 0; }
.p-copy { flex: 2 1 480px; min-width: 0; max-width: 760px; }
.p-copy .summary { font-size: clamp(26px, 2.65vw, 38px); line-height: 1.2; margin-bottom: 32px; }

.mod { margin-top: var(--space-xl); }
.mod.tight { margin-top: var(--gap); }
.mod-label {
  margin-left: var(--gutter); margin-right: var(--gutter);
  padding-top: 14px; border-top: 1px solid var(--hair);
}
.mod-label + .mod { margin-top: 20px; }
.mod-label { display: flex; flex-direction: column; gap: 8px; }
.label-caption { max-width: 760px; font-size: 15px; line-height: 1.55; color: var(--text-2); }
.mod-text {
  margin-left: var(--gutter); margin-right: var(--gutter);
  border-top: 1px solid var(--ink); padding-top: 28px;
  display: flex; flex-wrap: wrap; gap: 20px 48px;
}
.mod-text > .mono { flex: 1 1 260px; }
.mod-text .txt { flex: 2 1 480px; min-width: 0; max-width: 760px; }
.mod-text h2 { font-size: clamp(26px, 2.65vw, 38px); line-height: 1.2; margin-bottom: 24px; }
.mod-wide { margin-left: var(--gutter); margin-right: var(--gutter); }
.wide-video { width: 100%; height: auto; display: block; object-fit: cover; background: var(--ph); }
.mod-two { margin-left: var(--gutter); margin-right: var(--gutter); display: flex; flex-wrap: wrap; gap: var(--gap); }
.mod-two > * { flex: 1 1 320px; }
.mod-text-image {
  margin-left: var(--gutter); margin-right: var(--gutter);
  display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 80px); align-items: center;
}
.mod-text-image .txt { flex: 1 1 340px; max-width: 520px; }
.mod-text-image .txt .mono { color: var(--muted); margin-bottom: 16px; }
.mod-text-image h2 { font-size: clamp(22px, 2.2vw, 32px); line-height: 1.12; margin-bottom: 20px; }
.mod-text-image figure { flex: 1 1 420px; min-width: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.mod-text-image figcaption { font-size: 13px; color: var(--muted); }
.mod-quote {
  margin-left: auto; margin-right: auto; max-width: 1000px;
  padding: 0 var(--gutter); text-align: center;
  font-size: clamp(22px, 2.7vw, 40px); line-height: 1.15;
}
.mod-trio { margin-left: var(--gutter); margin-right: var(--gutter); display: flex; flex-wrap: wrap; gap: var(--gap); align-items: flex-start; }
.mod-trio > .big { flex: 2 1 400px; }
.mod-trio > .stack { flex: 1 1 220px; display: flex; flex-direction: column; gap: var(--gap); }

.credits {
  margin: var(--space-xl) var(--gutter) 0;
  border-top: 1px solid var(--ink); padding-top: 28px;
  display: flex; flex-wrap: wrap; gap: 48px;
}
.credits h2 { flex: 1 1 260px; }
.credits dl {
  flex: 2 1 480px; margin: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 32px;
  font-size: 15px; line-height: 1.4;
}
.credits dt { color: var(--muted); font-size: 13px; }
.credits dd { margin: 0; }
.next-project {
  margin: var(--space-xl) var(--gutter) 0;
  border-top: 1px solid var(--hair);
  padding: 32px 0;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 16px;
}
.next-project .display { font-size: clamp(24px, 3.2vw, 48px); line-height: 1.05; }
.next-project + .site-footer { margin-top: 0; }

/* ---------- About ---------- */
.about-top {
  padding: var(--space-l) var(--gutter) 0;
  display: flex; flex-wrap: wrap; gap: clamp(32px, 6vw, 96px); align-items: flex-start;
}
.about-top .portrait { flex: 1 1 320px; max-width: 520px; }
.about-top .bio { flex: 1 1 440px; min-width: 0; max-width: 720px; }
.about-top h1 { font-size: clamp(32px, 3.9vw, 60px); line-height: 1; margin-bottom: 32px; }
.about-top .lead { font-size: clamp(18px, 1.55vw, 22px); line-height: 1.35; margin-bottom: 24px; }
.about-top .body-copy { font-size: 16px; }
.about-top .body-copy:last-of-type { margin-bottom: 40px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 34px; padding: 7px 12px;
  border: 1px solid var(--ink);
  font-size: 11px;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn.solid { background: var(--ink); color: var(--bg); }
.btn.solid:hover { background: #333230; color: var(--bg); }

.info-cols {
  margin: clamp(80px, 10vw, 140px) var(--gutter) 0;
  border-top: 1px solid var(--ink); padding-top: 28px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 40px;
}
.info-cols h2 { margin-bottom: 18px; color: var(--muted); }
.info-cols ul { margin: 0; padding: 0; list-style: none; font-size: 16px; line-height: 1.7; }

.cv { margin: clamp(80px, 10vw, 140px) var(--gutter) 0; }
.cv-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 16px;
  border-top: 1px solid var(--ink); padding-top: 28px; margin-bottom: 32px;
}
.cv-head h2 { font-size: clamp(28px, 2.9vw, 40px); line-height: 1; }
.cv h3 { margin: 48px 0 8px; color: var(--muted); }
.cv h3:first-of-type { margin-top: 0; }
.cv-row {
  display: flex; flex-wrap: wrap; gap: 8px 24px;
  padding: 22px 0; border-bottom: 1px solid var(--hair);
  font-size: 16px; line-height: 1.4;
}
.cv-row .years { flex: 0 0 140px; font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 2px; }
.cv-row .who { flex: 1 1 240px; display: flex; flex-direction: column; gap: 4px; }
.cv-row .who .role { font-size: 14px; color: var(--muted); }
.cv-row .desc { flex: 2 1 380px; font-size: 15px; line-height: 1.55; color: var(--text-2); }

/* ---------- Serif option (html.serif): Instrument Serif display ---------- */
.serif .display,
.serif .wordmark {
  font-family: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  font-stretch: 100%;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.serif .wordmark { font-size: 28px; letter-spacing: 0; }
.serif .hero h1 { font-size: clamp(44px, 6.4vw, 104px); line-height: 0.98; }
.serif .page-head h1 { font-size: clamp(56px, 8vw, 128px); line-height: 0.9; }
.serif .p-head h1 { font-size: clamp(52px, 7.5vw, 120px); line-height: 0.92; }
.serif .p-copy .summary { font-size: clamp(26px, 2.4vw, 36px); line-height: 1.2; }
.serif .mod-text-image h2 { font-size: clamp(32px, 3.2vw, 48px); line-height: 1.05; }
.serif .mod-quote { font-size: clamp(32px, 4vw, 60px); line-height: 1.1; }
.serif .next-project .display { font-size: clamp(36px, 5vw, 72px); line-height: 1; }
.serif .about-top h1 { font-size: clamp(48px, 6vw, 96px); line-height: 0.95; }
.serif .about-top .lead { font-size: clamp(24px, 2.2vw, 32px); line-height: 1.25; }
.serif .cv-head h2 { font-size: clamp(40px, 4.5vw, 64px); }
.serif .site-footer .big { font-size: clamp(32px, 4vw, 56px); line-height: 1; }

/* ---------- Mono wordmark option (html.wm-mono) ---------- */
.wm-mono .wordmark {
  font-family: var(--mono);
  font-stretch: 100%;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  .site-header { padding: 14px 20px; align-items: center; }
  .wordmark { font-size: 16px; }
  .menu-btn { display: block; }
  .site-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0; z-index: 10;
    flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--hair);
    padding: 8px 20px 16px;
  }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--hair); }
  .site-nav a:last-child { border-bottom: 0; }
  .site-nav a[aria-current="page"] { border-bottom: 1px solid var(--hair); }
  .menu-open .site-nav { display: flex; }

  :root { --gutter: 20px; --gap: 12px; --space-xl: 64px; --space-l: 48px; }

  .hero { padding: 56px 20px 48px; gap: 28px; }
  .hero h1 { font-size: 29px; line-height: 1.08; flex-basis: 100%; }
  .hero--stack { gap: 20px; }
  .hero--stack h1 { flex-basis: auto; }
  .hero-side { max-width: none; }

  .collage { gap: 12px; }
  .collage + .collage { margin-top: 36px; }
  .collage .t-a, .collage .t-b, .collage .t-e { flex: 1 1 100%; margin-top: 0; }
  .collage .t-c, .collage .t-d { flex: 1 1 calc(50% - 6px); margin-top: 0; }
  .collage .t-d { margin-top: 48px; }
  .collage .t-d .media { aspect-ratio: 4 / 5; }
  .collage .tile-caption .client { display: none; }
  .view-all {
    display: flex; justify-content: center; align-items: center;
    min-height: 52px; margin-top: 36px; border: 1px solid var(--ink);
  }

  .page-head h1 { font-size: 43px; }
  .work-wrap { padding-top: 48px; }
  .work-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .work-item .media { aspect-ratio: 1 / 1 !important; }
  .work-item .media img, .work-item .media video { width: 100%; height: 100%; object-fit: cover; }
  .work-item .media.contain img { object-fit: contain; }
  .work-item .media img { object-position: var(--mpos, 50% 50%); }
  .work-item .meta { flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.3; }
  .work-item .client { order: -1; font-family: var(--mono); font-size: 10px; }
  .work-item .num { display: none; }

  .p-hero.r-16-8 { aspect-ratio: 4 / 5; }
  .p-head h1 { font-size: 32px; }
  .p-intro { gap: 32px; }
  .p-meta { gap: 18px 16px; }
  .p-copy .summary { font-size: 23px; margin-bottom: 24px; }
  .mod-text h2 { font-size: 23px; margin-bottom: 16px; }
  .label-caption { font-size: 14px; }
  .body-copy { font-size: 16px; }
  .mod-two > * { flex-basis: calc(50% - 6px); }
  .mod-two.two-wide > * { flex-basis: 100%; }
  .mod-row { grid-template-columns: repeat(min(var(--cols, 2), 2), minmax(0, 1fr)); }
  /* per-row phone overrides: stack one per line, or swipe sideways */
  .mod-row.m-stack { grid-template-columns: minmax(0, 1fr); }
  .mod-row.m-carousel {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    margin-right: 0; padding-right: 20px; scrollbar-width: none;
  }
  .mod-row.m-carousel > * { flex: 0 0 82%; width: 82%; min-width: 0; scroll-snap-align: start; }
  /* captions sit closer to their images */
  .tile, .work-item { gap: 8px; }
  /* device mockups: a tighter crop on phones, nearly edge to edge */
  .media.has-m { aspect-ratio: auto !important; background: none; }
  .mod-wide .media.has-m, .mod-two .media.has-m, .media.has-m.p-hero { margin-left: -10px; margin-right: -10px; }
  .media.has-m img { height: auto; }
  /* room between a stacked laptop and phones */
  .mod-two:has(.has-m) { row-gap: 36px; }
  .mod-wide.tight:has(.has-m) { margin-top: 36px; }
  /* rows of 3: swipe sideways on phones */
  .mod-row[style*="--cols:3"] {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    margin-right: 0; padding-right: 20px; scrollbar-width: none;
  }
  .mod-row[style*="--cols:3"] > * { flex: 0 0 74%; width: 74%; min-width: 0; scroll-snap-align: start; }
  /* mixed rows swipe sideways on phones, every item the same height */
  .mod-mix {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    margin-right: 0; padding-right: 20px; scrollbar-width: none;
  }
  .mod-mix > img, .mod-mix > video { flex: 0 0 auto; width: auto; height: 440px; scroll-snap-align: start; }
  .carousel-nav {
    display: flex; justify-content: flex-end; gap: 4px;
    margin: 6px var(--gutter) 0;
  }
  .carousel-nav button {
    min-width: 44px; min-height: 36px; padding: 0;
    background: none; border: 0; color: var(--ink);
    font-family: var(--mono); font-size: 18px; line-height: 1; cursor: pointer;
  }
  .carousel-nav button:disabled { color: var(--hair); cursor: default; }
  .mod-video.multi > * { flex-basis: calc(50% - 6px); }
  .mod-full.r-21-9 { aspect-ratio: 1 / 1; }
  .mod-quote { text-align: left; font-size: 22px; }
  .mod-trio > .stack { flex-direction: row; }
  .mod-trio > .stack > * { flex: 1 1 0; }
  .credits { gap: 18px; }
  .credits dl { gap: 14px 16px; }
  .next-project .display { font-size: 24px; }

  .about-top { padding-top: 32px; }
  .about-top .portrait { max-width: none; }
  .about-top h1 { font-size: 32px; margin-bottom: 20px; }
  .about-top .lead { font-size: 17px; }
  .btn-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .btn { padding: 7px 6px; }
  .btn { min-height: 40px; }
  .info-cols { grid-template-columns: 1fr 1fr; gap: 32px 16px; }
  .cv-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
  .cv-row .years { grid-column: 2; grid-row: 1; flex: none; font-size: 11px; white-space: nowrap; }
  .cv-row .who { grid-column: 1; grid-row: 1 / span 2; }
  .cv-row .desc { grid-column: 1 / -1; font-size: 14px; margin-top: 4px; }

  .site-footer .big { font-size: 24px; }
  .footer-links { gap: 24px; }
  .site-footer .loc { display: none; }

  .serif .wordmark { font-size: 22px; }
  .wm-mono .wordmark { font-size: 14px; }
  .serif .hero h1 { font-size: 42px; line-height: 1; }
  .serif .page-head h1 { font-size: 64px; }
  .serif .p-head h1 { font-size: 48px; line-height: 0.95; }
  .serif .p-copy .summary { font-size: 24px; }
  .serif .mod-text-image h2 { font-size: 32px; }
  .serif .mod-quote { font-size: 32px; }
  .serif .next-project .display { font-size: 34px; }
  .serif .about-top h1 { font-size: 48px; }
  .serif .about-top .lead { font-size: 22px; }
  .serif .cv-head h2 { font-size: 40px; }
  .serif .site-footer .big { font-size: 34px; }
}

/* Results strip: 2 x 2 on phones */
@media (max-width: 767px) {
  .mod-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
  .stat-num { font-size: 44px; }
  .stat-label { font-size: 14px; }
}

/* A module used as the project hero (e.g. a row of ads) */
.p-hero-mod > .mod { margin-top: clamp(24px, 3vw, 40px); }

/* Rows of two stay at the scale of rows of three */
@media (min-width: 768px) {
  .mod-mix.narrow { max-width: calc((100% - 2 * var(--gutter)) * 0.62); }
}

/* Looping video thumbnails */
.media > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* Website in devices */
.mod-devices {
  margin-left: var(--gutter); margin-right: var(--gutter);
  background: var(--ph); padding: clamp(32px, 6vw, 96px) clamp(24px, 6vw, 110px) clamp(32px, 5vw, 80px);
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(130px, 17vw, 250px); gap: clamp(20px, 4vw, 64px); align-items: end;
}
.dev-scroll { position: absolute; inset: 0; background-size: 100% auto; background-repeat: no-repeat; background-position: 50% 0%; animation: devdown 60s linear infinite; }
.dev-phone .dev-scroll { animation: none; }
@keyframes devscroll { 0%, 8% { background-position: 50% 0%; } 46%, 54% { background-position: 50% 100%; } 92%, 100% { background-position: 50% 0%; } }
@media (prefers-reduced-motion: reduce) { .dev-scroll { animation: none; } }
.dev-mac-screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0b0b0b; border: clamp(6px, 0.9vw, 14px) solid #141414; border-radius: clamp(8px, 1vw, 16px) clamp(8px, 1vw, 16px) 0 0; }
.dev-mac-base { position: relative; height: clamp(8px, 1vw, 16px); margin: 0 -6%; background: linear-gradient(#e2e2e2, #a8a8a8); border-radius: 0 0 14px 14px; }
.dev-mac-base::before { content: ""; position: absolute; left: 50%; top: 0; width: 14%; height: 40%; transform: translateX(-50%); background: #c4c4c4; border-radius: 0 0 8px 8px; }
.dev-phone { position: relative; aspect-ratio: 9 / 19.5; background: #111; border-radius: clamp(20px, 2.6vw, 40px); padding: clamp(5px, 0.6vw, 9px); box-shadow: 0 0 0 1px #2a2a2a; }
.dev-phone-screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: clamp(15px, 2vw, 31px); background: #0b0b0b; }
.dev-phone-screen::before { content: ""; position: absolute; z-index: 2; top: 2.2%; left: 50%; width: 30%; height: 3.6%; transform: translateX(-50%); background: #000; border-radius: 99px; }
@media (max-width: 767px) {
  .mod-devices { grid-template-columns: minmax(0, 1fr) 30%; gap: 14px; padding: 24px 18px; }
}

@keyframes devdown { 0%, 4% { background-position: 50% 0%; } 96%, 100% { background-position: 50% 100%; } }
/* Emails in phones, scrolling in turn */
.mod-phones {
  margin-left: var(--gutter); margin-right: var(--gutter);
  background: var(--ph); padding: clamp(32px, 6vw, 96px) clamp(16px, 6vw, 110px);
  display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, clamp(150px, 20vw, 290px))); justify-content: center; gap: clamp(16px, 4vw, 64px);
}
.dev-scroll.seq { animation-timing-function: ease-in-out; animation-iteration-count: infinite; animation-fill-mode: both; }
@keyframes seq3 { 0% { background-position: 50% 0%; } 28% { background-position: 50% 100%; } 31% { background-position: 50% 100%; } 33.3% { background-position: 50% 0%; } 100% { background-position: 50% 0%; } }
@media (prefers-reduced-motion: reduce) { .dev-scroll.seq { animation: none; } }
@media (max-width: 767px) { .mod-phones { gap: 10px; padding: 24px 12px; } }

.resp-img { width: 100%; height: auto; display: block; }

@keyframes seq2 { 0% { background-position: 50% 0%; } 42% { background-position: 50% 100%; } 46% { background-position: 50% 100%; } 50% { background-position: 50% 0%; } 100% { background-position: 50% 0%; } }
@keyframes seq1 { 0%, 6% { background-position: 50% 0%; } 88%, 94% { background-position: 50% 100%; } 100% { background-position: 50% 0%; } }
.dev-scroll.fit { animation: none; background-size: contain; background-position: 50% 0%; background-color: #000; }
