/* ── AIDA Lab — site stylesheet ─────────────────────────── */

/* Tokens */
:root {
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --ink: #141821;
  --ink-2: #3A4152;
  --muted: #6A7286;
  --line: #DFE3EA;
  --accent: #2244CC;
  --accent-hover: #1B37A6;
  --chip-conf: #2244CC;
  --chip-jrnl: #A33E75;
  /* :target highlight on a linked publication */
  --hl: #FFEE93;
  --hl-edge: #E8C33A;
  /* dark "layout viewer" panel — committed dark in both themes */
  --panel: #0C1017;
  --panel-ink: #EDF0F6;
  --panel-muted: #98A1B5;
  --panel-line: #232D3E;
  /* layer palette (from real cell-layout viewers) */
  --diff: #3FA46C;
  --poly: #CE5540;
  --m1: #4E7FE1;
  --m2: #C94F8C;
  --via: #E0B54A;
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
}
/* Light is the default theme. Dark applies only via the explicit toggle below. */
:root[data-theme="light"] {
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --ink: #141821;
  --ink-2: #3A4152;
  --muted: #6A7286;
  --line: #DFE3EA;
  --accent: #2244CC;
  --accent-hover: #1B37A6;
  --chip-conf: #2244CC;
  --chip-jrnl: #A33E75;
  --hl: #FFEE93;
  --hl-edge: #E8C33A;
  --panel-line: #232D3E;
}
:root[data-theme="dark"] {
  --bg: #0C1017;
  --surface: #121826;
  --ink: #E7EAF2;
  --ink-2: #BAC1D2;
  --muted: #8B93A8;
  --line: #222B3A;
  --accent: #8CA2FF;
  --accent-hover: #AAB9FF;
  --chip-conf: #8CA2FF;
  --chip-jrnl: #DE8BB6;
  --hl: rgba(255, 215, 64, 0.20);
  --hl-edge: #C9A233;
  --panel-line: #2A3548;
}

/* Base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 24px; }
/* Nothing may push the page wider than the screen: a horizontal scroll makes
   every .wrap look like it has no side margin once the user scrolls right.
   overflow-x: clip (not hidden) keeps the sticky nav working. */
html, body { max-width: 100%; overflow-x: clip; }
main { min-height: 55vh; }
main[hidden] { display: none; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}
h1, h2 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  text-wrap: balance;
}
h2 { font-size: clamp(1.55rem, 3vw, 2rem); margin: 0 0 10px; }
.lead { color: var(--ink-2); max-width: 64ch; margin: 0; font-size: 1.02rem; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 62px;
}
.wordmark {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600; font-size: 1.12rem; letter-spacing: 0.005em;
}
.wordmark:hover { color: var(--ink); }
.wordmark svg { display: block; }
.wordmark small {
  font-family: var(--font-mono); font-weight: 400; font-size: 0.64rem;
  letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase;
  border-left: 1px solid var(--line); padding-left: 10px; margin-left: 2px;
  line-height: 1.3;
}
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a {
  color: var(--ink-2); font-size: 0.9rem; font-weight: 600;
  padding: 4px 0; border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.nav-links a.cta { color: var(--accent); }
.nav-drop {
  position: relative;
  align-self: stretch;
  display: flex; align-items: center;
}
.nav-drop .caret { font-size: 0.6rem; color: var(--muted); margin-left: 4px; }
.nav-menu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  min-width: 140px;
  background: var(--bg); border: 1px solid var(--line);
  display: none; flex-direction: column;
  padding: 6px 0; z-index: 60;
}
.nav-drop:hover .nav-menu, .nav-drop:focus-within .nav-menu { display: flex; }
.nav-links .nav-menu a {
  padding: 8px 16px; border-bottom: none; font-size: 0.85rem;
}
.nav-links .nav-menu a:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.theme-btn {
  background: none; border: 1px solid var(--line); color: var(--muted);
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
}
.theme-btn:hover { color: var(--ink); border-color: var(--muted); }
@media (max-width: 760px) {
  .wordmark small { display: none; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 0.82rem; }
}
/* Phones: wordmark and links no longer fit on one line — stack them */
@media (max-width: 620px) {
  .nav-inner { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 6px; row-gap: 6px; }
  .wordmark { font-size: 1.05rem; }
  .nav-links {
    width: 100%; justify-content: space-between; gap: 10px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
  .nav-links a { font-size: 0.78rem; white-space: nowrap; }
  .theme-btn { width: 26px; height: 26px; flex: none; }
  /* Touch devices have no hover: flatten the People dropdown into
     Professor and Students as ordinary top-level links. */
  .nav-drop { display: contents; }
  .nav-drop > a { display: none; }
  .nav-menu {
    position: static; transform: none; display: flex; flex-direction: row;
    gap: 10px; min-width: 0; padding: 0; border: none; background: none;
  }
  .nav-links .nav-menu a { padding: 4px 0; font-size: 0.78rem; }
  .nav-links .nav-menu a:hover { background: none; }
}

/* Hero (home) */
.hero {
  background: var(--panel);
  color: var(--panel-ink);
  border-bottom: 1px solid var(--panel-line);
}
.hero-inner { padding-top: 80px; }
.hero .eyebrow { color: var(--panel-muted); }
.hero h1 {
  font-size: clamp(2.3rem, 5.2vw, 3.7rem);
  margin: 0 0 22px;
  max-width: 22ch;
  color: #F2F4FA;
}
.hero p.sub {
  color: var(--panel-muted);
  font-size: 1.06rem;
  max-width: 58ch;
  margin: 0 0 32px;
}
.hero p.sub strong { color: var(--panel-ink); font-weight: 500; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 60px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 0.92rem;
  padding: 11px 22px;
  border: 1px solid transparent;
}
.btn-solid { background: #E9EDF7; color: #0C1017; }
.btn-solid:hover { background: #FFFFFF; color: #0C1017; }
.btn-ghost { border-color: var(--panel-line); color: var(--panel-ink); }
.btn-ghost:hover { border-color: var(--panel-muted); color: #FFFFFF; }

.layout-strip { position: relative; }
.layout-strip canvas { display: block; width: 100%; height: 216px; }
.layout-caption {
  position: absolute; left: 24px; bottom: 10px;
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.08em;
  color: var(--panel-muted); text-transform: uppercase;
}
.layer-legend {
  display: flex; gap: 14px; justify-content: flex-end;
  padding: 0 0 10px;
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.08em;
  color: var(--panel-muted);
}
.layer-legend span { display: inline-flex; align-items: center; gap: 5px; }
.layer-legend i { width: 8px; height: 8px; display: inline-block; }
@media (max-width: 720px) { .layout-caption { display: none; } }

/* Venue strip */
.venues { border-bottom: 1px solid var(--line); overflow-x: auto; }
.venues-inner {
  display: flex; gap: 34px; align-items: center;
  padding-top: 16px; padding-bottom: 16px;
  font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.06em;
  color: var(--muted); white-space: nowrap;
}
.venues-inner b { color: var(--ink); font-weight: 500; }
.venues-inner sup { color: var(--accent); font-weight: 500; }

/* Interior page header */
.page-head { padding-top: 68px; padding-bottom: 12px; }
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0 0 12px; }

/* News */
.news { padding-top: 68px; padding-bottom: 8px; }
.news ul { list-style: none; margin: 20px 0 0; padding: 0; }
.news li {
  display: grid; grid-template-columns: 96px 1fr; gap: 20px;
  padding: 13px 0; border-top: 1px solid var(--line);
  align-items: baseline;
}
.news li:last-child { border-bottom: 1px solid var(--line); }
.news time {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.news p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.news p strong { color: var(--ink); font-weight: 600; }
.news-tag {
  font-family: var(--font-mono); font-size: 0.6rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 2px 8px; margin-right: 10px;
  display: inline-block; position: relative; top: -1px;
  white-space: nowrap;
  /* per-hue chip: light tinted fill + same-hue border + same-hue text.
     --h is a theme-aware token, so it adapts in light and dark. */
  color: var(--h);
  border: 1px solid color-mix(in srgb, var(--h) 40%, transparent);
  background: color-mix(in srgb, var(--h) 7%, transparent);
}
.news-tag.paper { --h: var(--accent); }
.news-tag.talk  { --h: var(--chip-jrnl); }
.news-tag.lab   { --h: var(--muted); }
.news-link {
  color: var(--ink); font-weight: 400;
  text-decoration: underline;
  text-decoration-color: var(--muted);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.news-link:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
  background: var(--hl);
}
.news-link:hover strong { text-decoration: underline; text-underline-offset: 2px; }

/* Research overview (home) */
.overview { padding-top: 68px; padding-bottom: 8px; }
.overview ul { list-style: none; margin: 24px 0 0; padding: 0; }
.overview li {
  display: grid; grid-template-columns: 22px 1fr; gap: 12px;
  padding: 13px 0; border-top: 1px solid var(--line);
  align-items: baseline; font-size: 0.95rem; color: var(--muted);
}
.overview li:last-child { border-bottom: 1px solid var(--line); }
.overview i { width: 10px; height: 10px; display: inline-block; position: relative; top: 0px; }
.overview b { color: var(--ink); font-weight: 600; }
.more-link {
  display: inline-block; margin-top: 20px; font-weight: 600; font-size: 0.92rem;
}

/* Recruiting banner (home) */
.banner { margin: 76px 0 0; background: var(--panel); border-top: 1px solid var(--panel-line); }
.banner-inner {
  padding: 44px 0;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
}
.banner p {
  margin: 0; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem); color: var(--panel-ink);
  letter-spacing: -0.005em;
}
.banner .sub { font-family: var(--font-sans); font-weight: 400; font-size: 0.9rem; color: var(--panel-muted); margin-top: 4px; }

/* Research page */
.area-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 0 48px; margin: 44px 0 0;
}
@media (max-width: 780px) { .area-grid { grid-template-columns: 1fr; } }
.area { padding: 26px 0 30px; border-top: 1px solid var(--line); }
.area h3 {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 1.12rem; font-weight: 600; letter-spacing: -0.005em;
  margin: 0 0 10px;
}
.area h3 i { width: 10px; height: 10px; flex: none; }
.area-img {
  width: 100%; display: block; margin: 4px 0 12px;
  border: 1px solid var(--line);
}
.area p { margin: 0 0 14px; color: var(--ink-2); font-size: 0.93rem; }
.kw { display: flex; flex-wrap: wrap; gap: 6px; }
.kw span, .kw a {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.05em;
  padding: 2px 8px; text-transform: uppercase;
}
.kw span { color: var(--muted); border: 1px solid var(--line); }

/* Topics inside a research area: topic name + the papers under it */
.topics { margin-top: 14px; border-top: 1px solid var(--line); }
.topic {
  display: grid; grid-template-columns: 1fr auto; gap: 10px 16px;
  align-items: center; padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 560px) { .topic { grid-template-columns: 1fr; align-items: start; } }
/* .area p sets 0.93rem, so these must out-specify it */
.area .tname {
  margin: 0;
  font-family: var(--font-sans); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0; text-transform: none;
  color: var(--ink-2);
}
.area .tpubs { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.tpubs a {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.05em;
  padding: 2px 8px; text-transform: uppercase; white-space: nowrap;
  color: var(--accent); border: 1px solid var(--accent);
}
.tpubs a:hover { color: #FFFFFF; background: var(--accent); }
@media (max-width: 560px) { .tpubs { justify-content: flex-start; } }

/* Publications */
.pub-year {
  display: grid; grid-template-columns: 96px 1fr; gap: 20px;
  margin-top: 40px;
}
@media (max-width: 640px) { .pub-year { grid-template-columns: 1fr; gap: 8px; } }
.pub-year > h3 {
  font-family: var(--font-mono); font-weight: 500; font-size: 0.95rem;
  color: var(--muted); margin: 22px 0 0;
  font-variant-numeric: tabular-nums;
}
.pub-year ul { list-style: none; margin: 0; padding: 0; }
.pub-year li {
  padding: 20px 0; border-top: 1px solid var(--line);
  scroll-margin-top: 84px;
}
.pub-year li:target {
  background: var(--hl);
  box-shadow: -14px 0 0 var(--hl), 14px 0 0 var(--hl);
  border-top-color: var(--hl-edge);
  animation: hl-flash 1.6s ease-out 1;
}
.pub-year li:target .pub-title { color: var(--ink); }
@keyframes hl-flash {
  0%   { background: transparent; box-shadow: none; }
  18%  { background: var(--hl-edge); box-shadow: -14px 0 0 var(--hl-edge), 14px 0 0 var(--hl-edge); }
  100% { background: var(--hl); box-shadow: -14px 0 0 var(--hl), 14px 0 0 var(--hl); }
}
.pub-tags { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.venue-chip {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.07em; text-transform: uppercase;
  padding: 2px 9px;
  border: 1px solid var(--chip-conf); color: var(--chip-conf);
}
.venue-chip.jrnl { border-color: var(--chip-jrnl); color: var(--chip-jrnl); }
.topic-chip {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.04em;
  padding: 2px 8px;
  border: 1px solid var(--line); color: var(--muted);
}
.rate-chip {
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.02em;
  padding: 0; color: var(--muted); opacity: 0.85;
  align-self: center;
}
.pub-venue-full {
  font-size: 0.8rem; color: var(--muted); margin: 4px 0 0;
}
.pub-title {
  margin: 0 0 5px; font-weight: 600; font-size: 1rem;
  line-height: 1.45; color: var(--ink);
}
.pub-authors { margin: 0; font-size: 0.87rem; color: var(--muted); }
.pub-authors b { color: var(--ink-2); font-weight: 600; }
.scholar-note { margin: 40px 0 0; font-size: 0.9rem; color: var(--muted); }

/* People */
.pi-card {
  display: grid; grid-template-columns: 260px 1fr; gap: 48px;
  margin-top: 40px; align-items: start;
}
@media (max-width: 780px) {
  /* single column: cap the photo so it does not fill the whole screen */
  .pi-card { grid-template-columns: 1fr; gap: 24px; }
  .pi-photo { max-width: 180px; }
  .pi-photo .initials { font-size: 2.4rem; }
}
.pi-photo {
  aspect-ratio: 4 / 5; background: var(--panel);
  border: 1px solid var(--panel-line);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 18px; position: relative; overflow: hidden;
}
.pi-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; }
.pi-photo .mono-mark {
  font-family: var(--font-mono); color: var(--panel-muted);
  font-size: 0.7rem; letter-spacing: 0.12em; z-index: 1;
}
.pi-photo .initials {
  font-family: var(--font-display);
  font-size: 3.4rem; font-weight: 600; color: #E9EDF7;
  letter-spacing: -0.02em; line-height: 1; z-index: 1; margin-bottom: 6px;
}
.pi-photo::before {
  content: ""; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(78,127,225,0.13) 22px 24px),
    repeating-linear-gradient(0deg, transparent 0 30px, rgba(201,79,140,0.10) 30px 31px);
}
.pi-bio h2 { margin: 0 0 2px; }
.pi-role {
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 18px;
}
.pi-bio > p { color: var(--ink-2); font-size: 0.95rem; margin: 0 0 14px; max-width: 62ch; }
.pi-bio b { color: var(--ink); font-weight: 600; }
.pi-links { display: flex; gap: 18px; margin: 18px 0 0; font-size: 0.88rem; font-weight: 600; }
.cvline { list-style: none; margin: 26px 0 0; padding: 0; }
.cvline li {
  display: grid; grid-template-columns: 128px 1fr; gap: 16px;
  padding: 9px 0; border-top: 1px solid var(--line);
  font-size: 0.89rem;
}
.cvline time, .cvline .lbl {
  font-family: var(--font-mono); font-size: 0.76rem; color: var(--muted);
  font-variant-numeric: tabular-nums; padding-top: 2px;
}
.contact-list { max-width: 640px; }
.contact-list li:last-child { border-bottom: 1px solid var(--line); }
.map { margin: 36px 0 0; }
.map iframe {
  width: 100%; height: 380px; border: 1px solid var(--line); display: block;
}
.cvline p { margin: 0; color: var(--ink-2); }
.cvline p b { color: var(--ink); font-weight: 600; }

.members-sec { padding-top: 76px; padding-bottom: 8px; }
.members {
  list-style: none; margin: 36px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px;
}
@media (max-width: 720px) { .members { grid-template-columns: 1fr; } }
.members li {
  border-top: 1px solid var(--line); padding: 18px 0 22px;
  display: flex; gap: 16px; align-items: flex-start;
}
.m-photo {
  width: 72px; height: 72px; flex: none; overflow: hidden;
  background: var(--line);
}
.m-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m-body { min-width: 0; }
.members h3 {
  font-family: var(--font-display); font-size: 1.06rem; font-weight: 600;
  margin: 0 0 2px; letter-spacing: -0.005em;
}
.m-edu {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em;
  color: var(--muted); margin: 0 0 8px;
}
.m-topic { margin: 0 0 8px; font-size: 0.91rem; color: var(--ink-2); }
.m-mail { font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); }

/* Teaching block (people page) */
.teaching-sec { padding-top: 68px; padding-bottom: 8px; }
.course {
  display: grid; grid-template-columns: 96px 1fr; gap: 20px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 20px 0; margin-top: 28px;
}
@media (max-width: 640px) { .course { grid-template-columns: 1fr; gap: 6px; } }
.course .code { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); padding-top: 3px; }
.course h3 { margin: 0 0 6px; font-size: 1.02rem; font-weight: 600; font-family: var(--font-display); }
.course p { margin: 0; color: var(--ink-2); font-size: 0.92rem; }

/* Apply page */
.apply-sec { padding-top: 56px; padding-bottom: 8px; }
.apply-sec h2 { font-size: 1.3rem; }
.apply-sec ul.plain { list-style: none; margin: 20px 0 0; padding: 0; max-width: 640px; }
.apply-sec ul.plain li {
  padding: 12px 0; border-top: 1px solid var(--line);
  font-size: 0.95rem; color: var(--ink-2);
}
.apply-sec ul.plain li:last-child { border-bottom: 1px solid var(--line); }
.apply-sec ul.plain b { color: var(--ink); font-weight: 600; }
.apply-sec .prose { max-width: 62ch; color: var(--ink-2); font-size: 0.96rem; }
.apply-cta { margin-top: 64px; }
.apply-cta-inner {
  border-top: 1px solid var(--line);
  padding: 40px 0 64px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 24px;
}
.apply-cta p { margin: 0; font-size: 0.9rem; color: var(--muted); max-width: 48ch; }
.apply-cta code { font-family: var(--font-mono); font-size: 0.85em; color: var(--ink); }
.btn-accent { background: var(--accent); color: #FFFFFF; }
.btn-accent:hover { background: var(--accent-hover); color: #FFFFFF; }

/* Photo strips & gallery */
.home-gallery { padding-top: 68px; padding-bottom: 8px; }
.photo-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px;
}
.photo-row img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block;
  border: 1px solid var(--line);
}
@media (max-width: 640px) { .photo-row { grid-template-columns: 1fr; } }
.gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 36px 0 0;
}
@media (max-width: 780px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .gallery-grid { grid-template-columns: 1fr; } }
.gallery-grid figure { margin: 0; }
.gallery-grid img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block;
  border: 1px solid var(--line);
}
.gallery-grid figcaption {
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); margin-top: 8px;
}

/* Footer */
footer { padding: 48px 0 56px; }
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px;
  font-size: 0.85rem; color: var(--muted);
  border-top: 1px solid var(--line); padding-top: 32px;
}
.foot p { margin: 0 0 4px; }
.foot b { color: var(--ink-2); font-weight: 600; }
.foot .links { display: flex; gap: 18px; font-weight: 600; }
