/* ===================================================
   Gregory Wieber — Redesign 2026
   Typography-driven, editorial, Swiss modernist
   =================================================== */

/* --- Reset --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 48px;
}

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

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

ul, ol {
  list-style: none;
}

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500&display=swap');

/* --- Custom Properties --- */
:root {
  --bg: #fafaf8;
  --text: #111;
  --text-secondary: #666;
  --accent: #c4492f;
  --dark: #111;
  --white: #fff;
  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --max-width: 1200px;
  --gutter: 24px;
}

/* --- Base --- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.full-bleed {
  width: 100%;
}

/* ===================================================
   Header / Nav
   =================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px var(--gutter);
  background: var(--bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.site-header.visible {
  transform: translateY(0);
  border-bottom: 1px solid #e0e0dc;
}

.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-header .wordmark {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.site-nav {
  display: flex;
  gap: 32px;
}

.site-nav a {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--text);
}

/* On subpages, header is always visible (no hero to scroll past) */
.page-project .site-header {
  position: relative;
  transform: none;
}

/* ===================================================
   Hero
   =================================================== */
.hero {
  padding: 80px var(--gutter) 64px;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Hero inline nav — sits beside the tagline */
.hero-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 32px;
  gap: 32px;
}

.hero-nav {
  display: flex;
  gap: 32px;
  flex-shrink: 0;
}

.hero-nav a {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.hero-nav a:hover {
  color: var(--text);
}

.hero-name {
  font-family: var(--font-heading);
  font-size: 12vw;
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.5;
}

/* ===================================================
   Featured Work Grid
   =================================================== */
.work-section {
  padding: 48px 0 80px;
}

.work-section .section-label {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  margin-bottom: 40px;
  padding: 0 var(--gutter);
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Asymmetric card spans */
.work-card:nth-child(1) { grid-column: span 7; }
.work-card:nth-child(2) { grid-column: span 5; }
.work-card:nth-child(3) { grid-column: span 5; }
.work-card:nth-child(4) { grid-column: span 7; }
.work-card:nth-child(5) { grid-column: span 4; }
.work-card:nth-child(6) { grid-column: span 4; }
.work-card:nth-child(7) { grid-column: span 4; }
.work-card:nth-child(8) { grid-column: span 4; }
/* Surprise cards injected by JS */
.work-card:nth-child(9) { grid-column: span 4; }
.work-card:nth-child(10) { grid-column: span 4; }

/* Card styles */
.work-card {
  position: relative;
  overflow: hidden;
}

/* Align shorter cards to bottom of row — creates tension, not gaps */
.work-card:nth-child(2) {
  align-self: end;
}

.work-card:nth-child(3) {
  align-self: end;
}

.work-card a {
  display: block;
}

.work-card-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.work-card-image.yt-thumb {
  aspect-ratio: 1280 / 720;
}

.work-card a:hover .work-card-image {
  transform: scale(1.02);
}

/* Placeholder cards (no image yet) */
.work-card-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--dark);
  border-radius: 4px;
  display: flex;
  align-items: flex-end;
  padding: 24px;
  transition: background 0.3s ease;
}

.work-card a:hover .work-card-placeholder {
  background: #222;
}

.work-card-placeholder .placeholder-title {
  font-family: var(--font-heading);
  font-size: clamp(16px, 2vw, 24px);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  word-break: break-word;
}

.work-card-label {
  margin-top: 12px;
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

/* ===================================================
   About Strip
   =================================================== */
.about-strip {
  background: var(--dark);
  color: var(--white);
  padding: 80px var(--gutter);
}

.about-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 48px;
  align-items: center;
}

.about-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.about-text p {
  font-size: 17px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.85);
  max-width: 600px;
}

.about-links {
  margin-top: 24px;
  display: flex;
  gap: 24px;
}

.about-links a {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 2px;
}

.about-links a:hover {
  color: var(--white);
  border-color: var(--white);
}

/* ===================================================
   Selected Writing
   =================================================== */
.writing-section {
  padding: 80px var(--gutter);
  max-width: var(--max-width);
  margin: 0 auto;
}

.writing-section .section-label {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.writing-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.writing-item a {
  display: block;
  padding: 20px 0;
  border-top: 1px solid #e0e0dc;
  transition: border-color 0.2s ease;
}

.writing-item a:hover {
  border-color: var(--text);
}

.writing-date {
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.writing-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

/* ===================================================
   Footer
   =================================================== */
.site-footer {
  padding: 48px var(--gutter);
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid #e0e0dc;
}

.footer-left .footer-name {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.footer-left .footer-email {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.footer-left .footer-email a {
  border-bottom: 1px solid #e0e0dc;
  transition: border-color 0.2s ease;
}

.footer-left .footer-email a:hover {
  border-color: var(--text);
}

.footer-right {
  display: flex;
  gap: 24px;
  align-items: center;
}

.footer-right a {
  font-size: 13px;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.footer-right a:hover {
  color: var(--text);
}

.footer-year {
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ===================================================
   Responsive
   =================================================== */

/* Tablet */
@media (max-width: 900px) {
  .hero-name {
    font-size: 14vw;
  }

  .work-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
  }

  .work-card:nth-child(1) { grid-column: span 6; }
  .work-card:nth-child(2) { grid-column: span 6; }
  .work-card:nth-child(3) { grid-column: span 3; }
  .work-card:nth-child(4) { grid-column: span 3; }
  .work-card:nth-child(5) { grid-column: span 3; }
  .work-card:nth-child(6) { grid-column: span 3; }
  .work-card:nth-child(7) { grid-column: span 3; }
  .work-card:nth-child(8) { grid-column: span 3; }
  .work-card:nth-child(9) { grid-column: span 3; }
  .work-card:nth-child(10) { grid-column: span 3; }

  .about-inner {
    gap: 32px;
  }

  .writing-list {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* Mobile */
@media (max-width: 600px) {
  :root {
    --gutter: 20px;
  }

  .site-header {
    padding: 24px var(--gutter);
  }

  .site-nav {
    gap: 20px;
  }

  .site-nav a {
    font-size: 13px;
  }

  .hero {
    padding: 48px var(--gutter) 40px;
  }

  .hero-name {
    font-size: 18vw;
  }

  .hero-tagline {
    font-size: 16px;
  }

  .hero-intro {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .hero-nav {
    gap: 20px;
  }

  .hero-nav a {
    font-size: 13px;
  }

  .work-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .work-card:nth-child(n) {
    grid-column: span 1;
  }

  .work-card-image {
    aspect-ratio: 16 / 10;
  }

  .about-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 24px;
  }

  .about-photo {
    margin: 0 auto;
    width: 120px;
    height: 120px;
  }

  .about-links {
    justify-content: center;
  }

  .about-text p {
    max-width: none;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
}

/* ===================================================
   Project Detail Pages
   =================================================== */
.project-hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  overflow: hidden;
}

.project-hero img {
  width: 100%;
  border-radius: 4px;
}

.project-hero-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--dark);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-hero-placeholder span {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.3);
}

.project-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px var(--gutter) 96px;
}

.project-content h1 {
  font-family: var(--font-heading);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
}

.project-meta {
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  margin-top: 16px;
}

.project-body {
  margin-top: 40px;
}

.project-body p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.project-body a {
  border-bottom: 1px solid #ccc;
  transition: border-color 0.2s ease;
}

.project-body a:hover {
  border-color: var(--text);
}

.project-body figure {
  margin: 40px 0;
}

.project-body figure img {
  max-width: 100%;
  border-radius: 4px;
}

.project-body figure figcaption {
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 12px;
  line-height: 1.5;
}

.project-body .video-embed {
  border-radius: 4px;
  overflow: hidden;
}

.project-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 2px solid var(--text);
  padding-bottom: 4px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.project-cta:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.project-cta::after {
  content: '\2197';
  font-size: 18px;
}

.project-back {
  display: inline-block;
  margin-bottom: 8px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.project-back:hover {
  color: var(--text);
}

.project-back::before {
  content: '\2190 ';
}

@media (max-width: 600px) {
  .project-content {
    padding: 40px var(--gutter) 64px;
  }

  .project-content h1 {
    font-size: 28px;
  }
}

/* ===================================================
   Article / Writing Pages
   =================================================== */
.article-content {
  max-width: 640px;
  margin: 0 auto;
  padding: 64px var(--gutter) 96px;
}

.article-content .project-back {
  margin-bottom: 24px;
}

.article-header h1 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4.5vw, 42px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.article-header .article-date {
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  margin-top: 16px;
}

.article-note {
  margin-top: 24px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  font-style: italic;
}

.article-body {
  margin-top: 48px;
}

.article-body p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 24px;
}

.article-body a {
  border-bottom: 1px solid #ccc;
  transition: border-color 0.2s ease;
}

.article-body a:hover {
  border-color: var(--text);
}

.article-body h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-top: 56px;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.article-body blockquote {
  margin: 40px 0;
  padding-left: 24px;
  border-left: 3px solid var(--text);
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text);
  font-style: italic;
}

.article-body figure {
  margin: 40px 0;
}

.article-body figure img {
  max-width: 100%;
  border-radius: 4px;
}

.article-body figure figcaption {
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 12px;
  line-height: 1.5;
}

.article-body figure video {
  width: 100%;
  border-radius: 4px;
}

.article-body em {
  font-style: italic;
}

/* Bio page */
.bio-content {
  max-width: 640px;
  margin: 0 auto;
  padding: 64px var(--gutter) 96px;
}

.bio-content h1 {
  font-family: var(--font-heading);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
}

.bio-content .bio-body {
  margin-top: 48px;
}

.bio-content .bio-body p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 24px;
}

.bio-content .bio-body a {
  border-bottom: 1px solid #ccc;
  transition: border-color 0.2s ease;
}

.bio-content .bio-body a:hover {
  border-color: var(--text);
}

.bio-links {
  margin-top: 40px;
  display: flex;
  gap: 24px;
}

.bio-links a {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 2px solid var(--text);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.bio-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 600px) {
  .article-content,
  .bio-content {
    padding: 40px var(--gutter) 64px;
  }

  .article-header h1 {
    font-size: 26px;
  }

  .bio-content h1 {
    font-size: 28px;
  }

  .bio-links {
    flex-direction: column;
    gap: 16px;
  }
}

/* ===================================================
   Index / Listing Pages (Apps, Art, Writing)
   =================================================== */
.index-page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px var(--gutter) 96px;
}

.index-page .project-back {
  margin-bottom: 24px;
}

.index-page h1 {
  font-family: var(--font-heading);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
}

.index-page .index-intro {
  margin-top: 24px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 560px;
}

.index-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}

.index-card a {
  display: block;
}

.index-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  transition: transform 0.4s ease;
}

.index-card a:hover img {
  transform: scale(1.02);
}

.index-card h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-top: 12px;
}

.index-card .index-card-meta {
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Writing index — stacked list, not cards */
.writing-index {
  margin-top: 56px;
}

.writing-index-group {
  margin-bottom: 48px;
}

.writing-index-group h2 {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.writing-index-item a {
  display: block;
  padding: 16px 0;
  border-top: 1px solid #e0e0dc;
  transition: border-color 0.2s ease;
}

.writing-index-item:last-child a {
  border-bottom: 1px solid #e0e0dc;
}

.writing-index-item a:hover {
  border-color: var(--text);
}

.writing-index-item .writing-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.writing-index-item .writing-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .index-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .index-page {
    padding: 32px var(--gutter) 64px;
  }

  .index-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ===================================================
   Gallery Pages (Art)
   =================================================== */
.gallery-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px var(--gutter) 96px;
}

.gallery-page .project-back {
  margin-bottom: 24px;
}

.gallery-page h1 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4.5vw, 42px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.gallery-page .gallery-intro {
  margin-top: 24px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 640px;
}

.gallery-page .gallery-intro p + p {
  margin-top: 16px;
}

.gallery-page .gallery-intro a {
  border-bottom: 1px solid #ccc;
  transition: border-color 0.2s ease;
}

.gallery-page .gallery-intro a:hover {
  border-color: var(--text);
}

.gallery-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.gallery-grid.single-col {
  grid-template-columns: 1fr;
  max-width: 640px;
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  border-radius: 4px;
}

.gallery-item img {
  max-height: 420px;
  object-fit: contain;
  object-position: left top;
}

.gallery-item figcaption {
  margin-top: 12px;
}

.gallery-item .gallery-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.gallery-item .gallery-meta {
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.gallery-item .gallery-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-top: 8px;
  max-width: 640px;
}

.gallery-item .gallery-desc a {
  border-bottom: 1px solid #ccc;
  transition: border-color 0.2s ease;
}

.gallery-item .gallery-desc a:hover {
  border-color: var(--text);
}

/* Triptych — 3-up image grid within a gallery item */
.gallery-triptych {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

/* Subsequent gallery sections — spaced from the one above */
.gallery-grid + .gallery-grid {
  margin-top: 56px;
}

/* Gallery section embedded within an article (no top padding) */
.gallery-page.gallery-inline {
  padding-top: 0;
}

/* Article continuation after an inline gallery */
.article-content.article-continued {
  padding-top: 24px;
}

/* Responsive video embed */
.video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 4px;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 600px) {
  .gallery-page {
    padding: 32px var(--gutter) 64px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ===================================================
   Lightbox — Full-page detail view
   =================================================== */
.gallery-item img {
  cursor: pointer;
}

.lightbox-page {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.lightbox-page.visible {
  display: block;
}

.lightbox-page.active {
  opacity: 1;
}

.lightbox-page-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px var(--gutter) 96px;
}

.lightbox-back {
  display: inline-block;
  margin-bottom: 32px;
}

.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 4px;
  display: block;
  margin: 0 auto;
}

.lightbox-info {
  margin-top: 24px;
  text-align: center;
}

.lightbox-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.lightbox-meta {
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  margin-top: 4px;
}

.lightbox-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-top: 12px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 600px) {
  .lightbox-page-inner {
    padding: 32px var(--gutter) 64px;
  }

  .lightbox-img {
    max-height: 60vh;
  }
}
