/* ==========================================================================
   Bright Daylight Gallery Design System
   Structural rhythm modeled on diffendaffer.com/portfolio/
   Palette transformed to airy architectural paper-white & warm alabaster
   ========================================================================== */
:root {
  --bg-paper: #ffffff;
  --bg-tint: #f7f5f0;
  --bg-cool: #f3f5f8;
  --bg-cta: #faf8f4;
  --ink: #14161a;
  --text: #383d47;
  --muted: #6e7480;
  --line: #e6e3dc;
  --line-strong: #d5d0c5;
  --accent: #d63b2f;
  --accent-hover: #b52c21;
  --teal: #0f766e;
  --teal-soft: #eaf6f3;
  --red-soft: #fdf2f1;
  --radius: 6px;
  --shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 56px rgba(15, 23, 42, 0.14);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --max-w: 1460px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg-paper);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
strong { color: var(--ink); font-weight: 600; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: rgba(20, 22, 26, 0.055);
  color: var(--ink);
  padding: 2px 6px;
  border-radius: 4px;
}
[hidden] { display: none !important; }

/* ==========================================================================
   HEADER (Diffendaffer Clean 72px Nav — Light Translucent)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 70px;
  padding: 0 clamp(20px, 4vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1.8px solid var(--ink);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.monogram--sm { width: 28px; height: 28px; font-size: 11px; }
.brand-name {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
}
.nav-link {
  position: relative;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text);
  padding: 10px 0;
  transition: color 200ms ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms var(--ease);
}
.nav-link:hover,
.nav-link.is-active { color: var(--ink); }
.nav-link:hover::after,
.nav-link.is-active::after { transform: scaleX(1); }
.nav-link--accent { color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  width: 40px;
  height: 38px;
  padding: 0 9px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.nav-toggle span { display: block; height: 1.8px; background: var(--ink); width: 100%; border-radius: 2px; }

/* ==========================================================================
   FULL-BLEED HERO MEDIA + CREDIT STRIP (Diffendaffer Signature Opening)
   ========================================================================== */
.hero-media {
  width: 100%;
  background: #eceae4;
}
.hero-frame {
  width: 100%;
  height: clamp(320px, 64vh, 720px);
  overflow: hidden;
  position: relative;
}
.hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 46%;
}
.hero-credit-bar {
  background: var(--bg-paper);
  border-bottom: 1px solid var(--line);
}
.hero-credit-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 12px clamp(20px, 4vw, 56px);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ==========================================================================
   CENTERED HERO COPY BAND (Light-weight Display Typography)
   ========================================================================== */
.hero-copy {
  background: var(--bg-paper);
  padding: clamp(54px, 7vw, 88px) clamp(20px, 4vw, 56px) clamp(56px, 7vw, 84px);
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.hero-copy__inner {
  max-width: 860px;
  margin: 0 auto;
}
.co-badge {
  display: inline-block;
  margin: 0 0 18px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--red-soft);
  border: 1px solid #f4c6c2;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.hero-title {
  margin: 0 0 18px;
  font-size: clamp(44px, 6.4vw, 68px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--ink);
}
.hero-sub {
  margin: 0 auto 30px;
  font-size: clamp(15px, 1.5vw, 17px);
  color: var(--text);
  line-height: 1.85;
  max-width: 740px;
}
.hero-hint {
  display: inline-block;
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}
.hero-pillars {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.pillar-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--bg-tint);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  transition: border-color 200ms ease, background 200ms ease, transform 200ms var(--ease);
}
.pillar-chip span {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
}
.pillar-chip:hover {
  border-color: var(--accent);
  background: #ffffff;
  transform: translateY(-1px);
}

/* ==========================================================================
   CATEGORY BANDS (Alternating Bright Tints — Diffendaffer Section Rhythm)
   ========================================================================== */
.cat-band {
  padding: clamp(64px, 8vw, 108px) clamp(20px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 70px;
}
.cat-band--paper { background: var(--bg-paper); }
.cat-band--tint  { background: var(--bg-tint); }
.cat-band--cool  { background: var(--bg-cool); }

.cat-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

/* Diffendaffer Signature Eyebrow with Short Accent Dash */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--accent);
  flex-shrink: 0;
}
.eyebrow--center { justify-content: center; }
.eyebrow--center::before { display: none; }

.cat-heading {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1.25;
}
.cat-lede {
  margin: 0 0 clamp(34px, 4vw, 48px);
  max-width: 780px;
  font-size: 15.5px;
  color: var(--text);
  line-height: 1.75;
}

/* ==========================================================================
   ASYMMETRIC EDITORIAL GALLERY GRIDS (1-Wide / 2-Up / 3-Up Rows)
   ========================================================================== */
.gallery-stack {
  display: flex;
  flex-direction: column;
  gap: clamp(36px, 4.2vw, 56px);
}
.gallery-row {
  display: grid;
  gap: clamp(24px, 2.8vw, 38px);
}
.gallery-row--wide { grid-template-columns: 1fr; }
.gallery-row--2    { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery-row--3    { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Clean Borderless Editorial Card */
.work-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  outline: none;
}
.work-card:focus-visible .work-card__media {
  box-shadow: 0 0 0 3px rgba(214, 59, 47, 0.35);
}

.work-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: #eceae4;
  border: 1px solid rgba(20, 22, 26, 0.08);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 360ms var(--ease), transform 360ms var(--ease);
}
.work-card--wide .work-card__media { aspect-ratio: 21 / 9; }
.work-card--cinema .work-card__media { aspect-ratio: 16 / 9; }
.work-card--light-frame .work-card__media { background: #ffffff; }

.work-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease), filter 350ms var(--ease);
}
.work-card--contain .work-card__media img {
  object-fit: contain;
  background: #ffffff;
}
.work-card:hover .work-card__media {
  box-shadow: var(--shadow-md);
}
.work-card:hover .work-card__media img {
  transform: scale(1.028);
}

/* Top-Right Media Indicator (Diffendaffer ▶ Play Circle / Gallery Pill) */
.media-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
  transition: background 220ms ease, color 220ms ease, transform 220ms var(--ease);
}
.media-badge--play .play-tri {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-size: 9px;
  padding-left: 2px;
}
.work-card:hover .media-badge {
  transform: translateY(-1px);
  background: #ffffff;
}

/* Below-Image Editorial Typography (Exact Diffendaffer 3-Tier Hierarchy) */
.work-card__body {
  padding-top: 15px;
}
.work-card__title {
  margin: 0 0 6px;
  font-size: clamp(18px, 1.55vw, 21px);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  transition: color 200ms ease;
}
.work-card--wide .work-card__title { font-size: clamp(20px, 1.9vw, 25px); }
.work-card:hover .work-card__title { color: var(--accent); }

.work-card__kicker {
  margin: 0 0 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.5;
}
.work-card__note {
  margin: 0;
  font-size: 14px;
  color: var(--text);
  line-height: 1.65;
}
.work-card--wide .work-card__note { max-width: 900px; }
.work-card__credit {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.cat-footer-link {
  margin-top: 42px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.editorial-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1.5px solid var(--line-strong);
  padding-bottom: 4px;
  transition: color 200ms ease, border-color 200ms ease;
}
.editorial-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ==========================================================================
   ABOUT & EXPERIENCE BAND
   ========================================================================== */
.about-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.4fr);
  gap: clamp(32px, 4.5vw, 72px);
  align-items: start;
}
.about-profile {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px;
  border-radius: 10px;
  background: var(--bg-tint);
  border: 1px solid var(--line);
}
.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid #ffffff;
  box-shadow: var(--shadow-sm);
}
.profile-meta h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
}
.profile-meta h3 span {
  font-weight: 400;
  color: var(--muted);
  font-size: 16px;
  margin-left: 6px;
}
.edu {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.skill-tags span {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
}

.exp-list {
  display: flex;
  flex-direction: column;
}
.exp-item {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.exp-item:first-child { padding-top: 4px; border-top: 0; }
.exp-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 16px;
  margin-bottom: 8px;
}
.exp-head h4 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
.exp-head span {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.exp-item p {
  margin: 0;
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.75;
}

/* ==========================================================================
   CLOSING CTA BAND & FOOTER (Diffendaffer Closing Formula — Bright Editorial)
   ========================================================================== */
.cta-band {
  background: var(--bg-cta);
  padding: clamp(72px, 9vw, 112px) clamp(20px, 4vw, 56px);
  text-align: center;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 70px;
}
.cta-inner {
  max-width: 880px;
  margin: 0 auto;
}
.cta-band h2 {
  margin: 10px 0 14px;
  font-size: clamp(26px, 3.6vw, 40px);
  font-weight: 300;
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1.25;
  text-wrap: balance;
}
.cta-desc {
  margin: 0 auto 30px;
  max-width: 600px;
  font-size: 15.5px;
  color: var(--text);
}
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}
.btn-primary,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 24px;
  border-radius: 5px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease, transform 200ms var(--ease);
}
.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border: 1.5px solid var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
}
.btn-outline {
  background: #ffffff;
  color: var(--ink);
  border: 1.5px solid var(--line-strong);
}
.btn-outline:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}
.contact-strip {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.8;
}
.contact-strip a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer {
  background: var(--bg-paper);
  padding: 36px clamp(72px, 6vw, 92px) 36px clamp(20px, 4vw, 56px);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px 24px;
  font-size: 13px;
  color: var(--muted);
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.footer-nav a {
  text-decoration: none;
  transition: color 200ms ease;
}
.footer-nav a:hover { color: var(--accent); }

/* Floating Back-to-Top Circle */
.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform 200ms var(--ease), border-color 200ms ease, color 200ms ease;
}
.back-top:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--accent);
}

/* ==========================================================================
   UNIFIED FULLSCREEN GALLERY LIGHTBOX (Diffendaffer Modal — Bright Gallery)
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: rgba(250, 249, 246, 0.985);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: var(--ink);
}
.lightbox__backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.lightbox__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(16px, 3vw, 36px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
}
.lightbox__meta-top {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.lightbox__kicker {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lightbox__counter {
  font-size: 12px;
  font-weight: 700;
  font-family: ui-monospace, Menlo, monospace;
  color: var(--accent);
  background: var(--red-soft);
  padding: 2px 9px;
  border-radius: 999px;
  flex-shrink: 0;
}
.lightbox__close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 180ms ease, color 180ms ease;
}
.lightbox__close:hover { border-color: var(--accent); color: var(--accent); }

.lightbox__nav {
  position: fixed;
  top: 46%;
  transform: translateY(-50%);
  z-index: 10;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}
.lightbox__nav--prev { left: clamp(10px, 2vw, 28px); }
.lightbox__nav--next { right: clamp(10px, 2vw, 28px); }
.lightbox__nav:hover { border-color: var(--accent); color: var(--accent); }

.lightbox__stage {
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px clamp(58px, 7vw, 96px);
  overflow: auto;
}
.lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 255px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  background: #ffffff;
}
.lightbox__video {
  max-width: 100%;
  max-height: calc(100vh - 255px);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  background: #111318;
}

/* Rich Technical Evidence Plate Inside Lightbox (for Code / Evals / Reports) */
.lightbox__plate {
  width: min(980px, 100%);
  max-height: calc(100vh - 255px);
  overflow: auto;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: clamp(20px, 3vw, 34px);
  box-shadow: var(--shadow-md);
  text-align: left;
}
.plate-eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}
.plate-title {
  margin: 0 0 14px;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 600;
  color: var(--ink);
}
.plate-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 14px;
}
.plate-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.plate-box {
  background: var(--bg-tint);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}
.plate-box--ok { background: var(--teal-soft); border-color: #bce2d8; }
.plate-box--warn { background: var(--red-soft); border-color: #f4c6c2; }
.plate-box h4 { margin: 0 0 8px; font-size: 15px; color: var(--ink); }
.plate-box p { margin: 0; font-size: 13.5px; color: var(--text); line-height: 1.65; }
.plate-box .plate-big { font-size: 32px; font-weight: 700; line-height: 1.15; margin: 0 0 8px; color: var(--ink); }
.plate-box .plate-big--red { color: var(--accent); }
.plate-box .plate-big--teal { color: var(--teal); }
.plate-code {
  margin: 12px 0 0;
  padding: 16px;
  background: #f6f7f9;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: 12.5px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #1f242d;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}
.plate-code .ok { color: var(--teal); font-weight: 700; }
.plate-code .err { color: var(--accent); font-weight: 700; }
.plate-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 12px;
}
.plate-table th, .plate-table td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.plate-table th {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: var(--bg-tint);
}

/* Lightbox Caption & Filmstrip Footer */
.lightbox__footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  padding: 14px clamp(16px, 3vw, 36px) 16px;
}
.lightbox__caption {
  max-width: 1160px;
  margin: 0 auto 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 24px;
}
.lightbox__title {
  margin: 0 0 3px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.lightbox__sub {
  margin: 0;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.55;
  max-width: 900px;
}
.lightbox__link {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--accent);
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 2px;
  white-space: nowrap;
}

.lightbox__thumbs {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.lightbox__thumbs::-webkit-scrollbar { height: 5px; }
.lightbox__thumbs::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }
.lb-thumb {
  position: relative;
  flex: 0 0 68px;
  height: 46px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-tint);
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 160ms ease, border-color 160ms ease;
}
.lb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lb-thumb__tag {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink);
  background: rgba(247, 245, 240, 0.92);
  padding: 4px;
  text-align: center;
  line-height: 1.2;
}
.lb-thumb__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 22, 26, 0.35);
  color: #ffffff;
  font-size: 13px;
}
.lb-thumb:hover { opacity: 0.92; }
.lb-thumb.is-active {
  opacity: 1;
  border-color: var(--accent);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 1200;
  background: var(--ink);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (Tablet & Mobile First-Class Polish)
   ========================================================================== */
@media (max-width: 960px) {
  .gallery-row--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-layout { grid-template-columns: 1fr; }
  .plate-grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    padding: 12px 24px 20px;
    box-shadow: var(--shadow-md);
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 6px; }
  .nav-link { display: block; padding: 8px 0; font-size: 14px; }

  .hero-frame { height: 42vh; min-height: 240px; }
  .hero-sub { text-wrap: balance; }
  .hero-sub br { display: none; }
  .gallery-row--2, .gallery-row--3 { grid-template-columns: 1fr; }
  .work-card--wide .work-card__media { aspect-ratio: 16 / 9; }

  .plate-grid-2 { grid-template-columns: 1fr; }
  .lightbox__stage { padding: 12px 14px; }
  .lightbox__nav {
    top: auto;
    bottom: 112px;
    transform: none;
    width: 38px;
    height: 38px;
    font-size: 20px;
  }
  .lightbox__img,
  .lightbox__video,
  .lightbox__plate { max-height: calc(100vh - 275px); }
}
