/* ==========================================================================
   Vijay Rajkumar — Atlas Portfolio
   Inspired by Gerhard Richter's Atlas & archival European museum catalogues
   ========================================================================== */

:root {
  --bg: #f1f0eb;
  --surface: #e6e4de;
  --surface-hover: #dcd9d1;
  --ink: #181817;
  --ink-muted: #67655f;
  --ink-faint: #96938b;
  --rule: #d8d5cd;
  --rule-strong: #bdb9ae;
  --accent: #181817;
  --font-sans: "Helvetica Neue", "Neue Haas Grotesk Display Pro", -apple-system, BlinkMacSystemFont, "Inter", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --max-width: 1520px;
  --gutter: clamp(18px, 3vw, 44px);
}

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

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}

.img-shield {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: transparent;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(241, 240, 235, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px var(--gutter);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.brand-cluster {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.wordmark {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-descriptor {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

.site-nav {
  display: flex;
  gap: 28px;
  flex-shrink: 0;
}

.nav-link {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  position: relative;
  padding-bottom: 2px;
  transition: color 0.18s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--ink);
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--ink);
}

/* Main container */
.app-root {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter) 80px;
}

/* Footer */
.site-footer {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 20px var(--gutter) 32px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

/* ==========================================================================
   Atlas Controls Bar
   ========================================================================== */

.controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
  padding: 18px 0 16px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 28px;
}

.controls-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
}

.control-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-right: 4px;
}

.filter-btn {
  font-size: 13px;
  color: var(--ink-muted);
  padding: 3px 0;
  position: relative;
  transition: color 0.15s ease;
}

.filter-btn:hover {
  color: var(--ink);
}

.filter-btn.is-active {
  color: var(--ink);
  font-weight: 500;
}

.filter-btn.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--ink);
}

.control-divider {
  width: 1px;
  height: 14px;
  background: var(--rule-strong);
  margin: 0 4px;
}

.shuffle-icon {
  display: inline-block;
  margin-left: 4px;
  font-size: 11px;
  opacity: 0.65;
  transition: transform 0.25s ease;
}

.filter-btn:hover .shuffle-icon {
  opacity: 1;
}

/* Active thread / tag filter bar */
.active-thread-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--rule);
  margin-bottom: 24px;
  font-size: 13px;
}

.thread-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.thread-type {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.thread-clear {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 2px 6px;
  border: 1px solid var(--rule-strong);
  transition: all 0.15s ease;
}

.thread-clear:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* Subtle chromatic bar when sorted by color */
.spectrum-strip {
  display: flex;
  height: 4px;
  width: 100%;
  margin: -18px 0 24px;
  overflow: hidden;
  opacity: 0.88;
}

.spectrum-swatch {
  flex: 1;
  min-width: 2px;
}

/* ==========================================================================
   Richter Atlas Visual Field (Proportional Masonry Columns)
   ========================================================================== */

.atlas-meta-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

.atlas-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
  align-items: start;
}

.atlas-column {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2.2vw, 30px);
}

.plate-card {
  display: block;
  position: relative;
  cursor: pointer;
}

.plate-frame {
  position: relative;
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.plate-frame img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), filter 0.35s ease;
}

.plate-card:hover .plate-frame img {
  transform: scale(1.018);
}

.plate-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-top: 7px;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.plate-card:hover .plate-caption,
.plate-card:focus-visible .plate-caption {
  opacity: 1;
  transform: translateY(0);
}

.plate-title {
  font-size: 12px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plate-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.plate-motion-glyph {
  font-size: 8.5px;
  color: var(--ink-muted);
  opacity: 0.85;
  transform: translateY(-0.5px);
}

.plate-year {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-muted);
}

.plate-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(24, 24, 23, 0.18);
  display: inline-block;
}

/* Text-only archival plate (for projects without stills yet) */
.plate-text-only {
  border: 1px solid var(--rule-strong);
  background: #eceae3;
  padding: 26px 20px;
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.plate-card:hover .plate-text-only {
  border-color: var(--ink);
  background: #e5e2da;
}

.plate-text-only-title {
  font-size: 15px;
  font-weight: 450;
  line-height: 1.35;
}

.plate-text-only-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

.empty-state {
  padding: 72px 0;
  text-align: center;
  color: var(--ink-muted);
}

/* ==========================================================================
   Project Detail View
   ========================================================================== */

.project-back-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0 18px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 36px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.back-link:hover {
  color: var(--ink);
}

.project-header {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 1fr);
  gap: 32px 64px;
  margin-bottom: 44px;
  align-items: start;
}

.project-year-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 10px;
  letter-spacing: 0.06em;
}

.project-title {
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 18px;
}

.project-description {
  max-width: 62ch;
  color: var(--ink);
  font-size: 15.5px;
  line-height: 1.68;
}

.project-description p {
  margin: 0 0 14px;
}

.project-description p.is-credits-line {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.07em;
  line-height: 1.7;
  color: var(--ink-muted);
  margin: 0 0 8px;
}

.project-description a {
  border-bottom: 1px solid var(--rule-strong);
  transition: border-color 0.15s ease;
}

.project-description a:hover {
  border-bottom-color: var(--ink);
}

.project-ledger {
  border-top: 1px solid var(--rule);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ledger-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
  align-items: baseline;
}

.ledger-key {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-faint);
}

.ledger-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.tag-link {
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.tag-link:hover {
  border-bottom-color: var(--ink);
}

/* PDF / Publication links */
.project-docs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.doc-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--rule-strong);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.doc-link:hover {
  border-color: var(--ink);
  background: var(--surface);
}

/* Video embeds */
.project-videos {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-bottom: 48px;
}

.project-videos.is-supplemental {
  margin-top: 16px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}

.video-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #141413;
  overflow: hidden;
}

.video-shell iframe,
.video-shell video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
}

.video-caption {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

/* Subfolder group navigation (e.g. Nervi buildings) */
.group-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 36px;
}

.group-section {
  margin-bottom: 56px;
}

.group-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 0 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
  font-weight: 450;
  letter-spacing: 0.02em;
}

.group-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  font-weight: 400;
}

.group-description {
  max-width: 62ch;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-muted);
  margin: -4px 0 20px;
}

.group-description p {
  margin: 0 0 10px;
}

/* Project image gallery */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
  margin-bottom: 56px;
}

.project-gallery.is-dense {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.5vw, 22px);
}

.gallery-item {
  position: relative;
  background: var(--surface);
  cursor: zoom-in;
  overflow: hidden;
}

.gallery-item.is-wide {
  grid-column: 1 / -1;
}

.gallery-item img {
  width: 100%;
  height: auto;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-item:hover img {
  transform: scale(1.01);
}

/* Connected Works (Subtle Network of Ideas) */
.connected-section {
  border-top: 1px solid var(--rule-strong);
  padding-top: 32px;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 22px;
}

.connected-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.connected-card {
  display: block;
}

.connected-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--surface);
  overflow: hidden;
  margin-bottom: 10px;
}

.connected-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.connected-card:hover .connected-thumb img {
  transform: scale(1.03);
}

.connected-title {
  font-size: 14px;
  font-weight: 450;
  margin-bottom: 4px;
}

.connected-threads {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  line-height: 1.5;
}

/* Sequential Catalogue Footer Nav (Previous / Next Work) */
.project-pager {
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
}

.pager-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 46%;
}

.pager-link.is-next {
  text-align: right;
  margin-left: auto;
}

.pager-dir {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.pager-title {
  font-size: 14px;
  color: var(--ink-muted);
  transition: color 0.15s ease;
}

.pager-link:hover .pager-title {
  color: var(--ink);
}

/* ==========================================================================
   Index View (Illustrated Catalogue Raisonné Table)
   ========================================================================== */

.index-view {
  padding-top: 28px;
}

.index-row {
  display: grid;
  grid-template-columns: 64px 56px minmax(200px, 1.5fr) minmax(150px, 1fr) minmax(140px, 0.9fr) 78px;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
  align-items: center;
  transition: background 0.15s ease, padding-left 0.15s ease;
}

.index-row.is-head {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--rule-strong);
  padding-top: 0;
}

.index-row:not(.is-head):hover {
  background: rgba(24, 24, 23, 0.03);
  padding-left: 8px;
}

.index-thumb {
  position: relative;
  width: 52px;
  height: 36px;
  background: var(--surface);
  overflow: hidden;
}

.index-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.index-year {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
}

.index-title {
  font-size: 14.5px;
  font-weight: 450;
}

.index-role,
.index-mediums {
  font-size: 13px;
  color: var(--ink-muted);
}

.index-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  text-align: right;
}

/* ==========================================================================
   About View
   ========================================================================== */

.about-view {
  padding-top: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(240px, 0.8fr);
  gap: 40px 72px;
  align-items: start;
}

.about-prose {
  font-size: 18px;
  line-height: 1.65;
  max-width: 58ch;
}

.about-prose p {
  margin: 0 0 22px;
}

.about-contact {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  max-width: 58ch;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.about-contact h3 {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin: 0 0 6px;
  font-weight: 400;
}

.contact-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  font-size: 13.5px;
  align-items: baseline;
}

.about-aside {
  border-top: 1px solid var(--rule);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: 13px;
}

.about-aside h3 {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin: 0 0 8px;
  font-weight: 400;
}

/* ==========================================================================
   Lightbox
   ========================================================================== */

.lightbox[hidden] {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 20, 19, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 64px;
}

.lightbox-stage {
  position: relative;
  margin: 0;
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.lightbox-img-wrap {
  position: relative;
  display: inline-flex;
}

.lightbox-stage img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
}

.lightbox-stage figcaption {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: rgba(241, 240, 235, 0.72);
  letter-spacing: 0.04em;
}

.lightbox-close,
.lightbox-nav {
  position: fixed;
  color: rgba(241, 240, 235, 0.78);
  font-size: 26px;
  padding: 12px 16px;
  transition: color 0.15s ease;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  color: #ffffff;
}

.lightbox-close {
  top: 16px;
  right: 22px;
  font-size: 32px;
}

.lightbox-prev {
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
}

/* Mobile Filter Toggle Bar (hidden on desktop) */
.mobile-controls-summary {
  display: none;
}

/* ==========================================================================
   Responsive — Preserving Gerhard Richter's Atlas 2-Column Field on iPhone
   ========================================================================== */

@media (max-width: 1180px) {
  .atlas-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .atlas-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .project-header,
  .about-view {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .project-gallery {
    grid-template-columns: 1fr;
  }
  .project-gallery.is-dense {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .index-row {
    grid-template-columns: 48px 48px 1fr;
    gap: 12px;
  }
  .index-role,
  .index-mediums,
  .index-count {
    display: none;
  }
}

@media (max-width: 680px) {
  :root {
    --gutter: 14px;
  }

  .header-inner {
    padding: 13px var(--gutter);
    padding-top: max(13px, env(safe-area-inset-top));
    gap: 12px;
    align-items: center;
  }

  .brand-cluster {
    flex-direction: column;
    gap: 1px;
  }

  .wordmark {
    font-size: 11.5px;
    letter-spacing: 0.12em;
  }

  .brand-descriptor {
    font-size: 9.5px;
    letter-spacing: 0.02em;
  }

  .site-nav {
    gap: 16px;
  }

  .nav-link {
    font-size: 12.5px;
    padding: 4px 0;
  }

  /* Compact Swiss mobile controls summary bar so the Atlas field begins immediately */
  .mobile-controls-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 14px;
  }

  .mobile-drawer-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink);
    padding: 4px 0;
  }

  .mobile-summary-state {
    color: var(--ink-muted);
    text-transform: none;
    letter-spacing: 0.02em;
  }

  .mobile-quick-actions {
    display: inline-flex;
    align-items: center;
    gap: 14px;
  }

  .mobile-quick-btn {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ink-muted);
    padding: 4px 0;
  }

  .mobile-quick-btn.is-active {
    color: var(--ink);
    font-weight: 500;
  }

  .controls-bar {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0 16px;
    margin-top: -14px;
    margin-bottom: 18px;
  }

  .controls-bar.is-open {
    display: flex;
  }

  .controls-group {
    gap: 8px 14px;
  }

  .filter-btn {
    font-size: 13px;
    padding: 5px 0;
  }

  .control-divider {
    display: none;
  }

  .atlas-meta-line {
    font-size: 10px;
    margin-bottom: 12px;
  }

  /* Preserve 2-column Richter Atlas visual field on iPhone */
  .atlas-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .atlas-column {
    gap: 14px;
  }

  .plate-caption {
    opacity: 0.78;
    transform: none;
    padding-top: 5px;
    gap: 6px;
  }

  .plate-title {
    font-size: 10.5px;
    color: var(--ink-muted);
  }

  .plate-year {
    font-size: 9.5px;
  }

  .plate-text-only {
    padding: 14px 12px;
  }

  .plate-text-only-title {
    font-size: 12.5px;
  }

  .plate-text-only-meta {
    font-size: 9.5px;
  }

  /* Project detail mobile tuning */
  .project-back-row {
    padding: 14px 0;
    margin-bottom: 24px;
    font-size: 10.5px;
  }

  .project-title {
    font-size: 24px;
    margin-bottom: 14px;
  }

  .project-description {
    font-size: 14.5px;
  }

  .ledger-row {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    font-size: 12.5px;
  }

  .group-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 16px;
    padding: 12px 0;
    margin-bottom: 24px;
  }

  .group-nav::-webkit-scrollbar {
    display: none;
  }

  .group-nav .filter-btn,
  .group-nav .control-label {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .connected-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .pager-title {
    font-size: 12.5px;
  }

  .about-prose {
    font-size: 16px;
  }

  .lightbox {
    padding: 56px 12px max(24px, env(safe-area-inset-bottom));
  }

  .lightbox-stage img {
    max-width: 94vw;
    max-height: 74vh;
  }

  .lightbox-close {
    top: max(10px, env(safe-area-inset-top));
    right: 10px;
    font-size: 30px;
  }

  .lightbox-nav {
    display: none;
  }

  .site-footer {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
    font-size: 10px;
  }
}
