/* ============================================================
   Abdulrahman Alsulami — Portfolio
   Image-first, board-game-path layout.
   ============================================================ */

/* ---------- Reset & tokens ---------- */
*,*::before,*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

:root {
  --bg: #0f0f10;
  --bg-2: #131315;
  --grid: rgba(243, 234, 212, 0.045);
  --cream: #f3ead4;
  --cream-2: #ece2c6;
  --ink: #16161a;
  --pink: #ff5f8a;
  --pink-2: #ff7fa4;
  --green: #2d8659;
  --yellow: #ffd84d;
  --blue: #5b8def;
  --muted: rgba(243, 234, 212, 0.62);

  --radius-pill: 64px;
  --radius-card: 22px;

  --container: 1240px;

  --shadow-soft: 0 30px 60px -30px rgba(0,0,0,0.55);
}

body {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--cream);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Sticky-nav-aware anchor scroll */
#about, #projects, #skills, #contact,
.project { scroll-margin-top: 110px; }
@media (max-width: 900px) {
  #about, #projects, #skills, #contact,
  .project { scroll-margin-top: 90px; }
}

/* ---------- Subtle grid background ---------- */
.grid-bg {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at center, #000 50%, transparent 100%);
}

/* ---------- Floating decorations ---------- */
.decor { position: absolute; pointer-events: none; z-index: 1; opacity: .92; }
.decor svg { width: 100%; height: 100%; display: block; }
.decor--star        { top: 180px;   right: 80px;   width: 42px;  height: 42px; }
.decor--smiley      { top: 460px;   right: 110px;  width: 44px;  height: 44px; }
.decor--pawn-green  { top: 360px;   right: 280px;  width: 56px;  height: 76px; }
.decor--pawn-pink   { top: 880px;   right: 60px;   width: 56px;  height: 76px; }
.decor--dice-yellow { top: 760px;   left: 40px;    width: 56px;  height: 56px; }
.decor--dice-blue   { top: 1080px;  left: 60px;    width: 56px;  height: 56px; }
.decor--steps       { bottom: 240px; right: 40px;  width: 70px;  height: 70px; }
@media (max-width: 900px) { .decor { display: none; } }

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  padding: 16px 24px 0;
  background: linear-gradient(180deg, rgba(15,15,16,.92) 0%, rgba(15,15,16,.65) 70%, transparent 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.topbar__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 12px 22px;
  background: #1a1a1c;
  border: 1px solid rgba(243,234,212,.08);
  border-radius: 999px;
}
.brand {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: .2px;
  color: var(--cream);
  font-size: 16px;
}
.nav { display: flex; gap: 28px; justify-content: center; }
.nav a {
  font-size: 14px; font-weight: 500;
  color: rgba(243,234,212,.78);
  transition: color .2s ease;
}
.nav a:hover { color: var(--cream); }
.lets-talk {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  background: var(--cream);
  color: var(--ink);
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  transition: transform .2s ease, background .2s ease;
}
.lets-talk:hover { transform: translateY(-1px); background: #fff; }
.lets-talk__arrow { width: 22px; height: 22px; display: inline-grid; place-items: center; background: var(--ink); color: var(--cream); border-radius: 999px; }
.lets-talk__arrow svg { width: 12px; height: 12px; }

.nav-toggle { display: none; }
@media (max-width: 900px) {
  .topbar__inner { grid-template-columns: 1fr auto auto; }
  .nav {
    display: none;
    position: absolute; top: calc(100% + 8px); left: 24px; right: 24px;
    background: #1a1a1c;
    border: 1px solid rgba(243,234,212,.08);
    border-radius: 22px;
    padding: 18px 22px;
    flex-direction: column; gap: 14px;
  }
  .nav.is-open { display: flex; }
  .nav-toggle {
    display: inline-grid; gap: 4px; padding: 10px;
    background: #232325; border-radius: 12px;
  }
  .nav-toggle span { display: block; width: 18px; height: 2px; background: var(--cream); }
}

/* ---------- Layout container ---------- */
section { position: relative; z-index: 2; }

/* ---------- HERO ---------- */
.hero {
  max-width: var(--container);
  margin: 0 auto;
  padding: 72px 32px 32px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
}
.hero__title {
  font-family: 'Archivo Black', 'Inter', sans-serif;
  font-weight: 900;
  font-size: clamp(40px, 7vw, 92px);
  line-height: .95;
  letter-spacing: -.5px;
  margin: 0 0 22px;
  color: var(--cream);
  text-transform: uppercase;
}
.hero__lede {
  max-width: 520px;
  font-size: 16px;
  color: rgba(243,234,212,.78);
  margin: 0 0 28px;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px 12px 22px;
  border-radius: 999px;
  font-weight: 700; font-size: 14px;
  transition: transform .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn__arrow { width: 26px; height: 26px; display: inline-grid; place-items: center; border-radius: 999px; }
.btn__arrow svg { width: 12px; height: 12px; }

.btn--primary { background: var(--pink); color: #2a0e16; }
.btn--primary .btn__arrow { background: #2a0e16; color: var(--pink); }
.btn--primary:hover { transform: translateY(-1px); background: var(--pink-2); }

.btn--ghost { background: #1f1f22; color: var(--cream); border: 1px solid rgba(243,234,212,.12); }
.btn--ghost .btn__arrow { background: var(--cream); color: var(--ink); }
.btn--ghost:hover { background: #25252a; }

.btn--outline { background: transparent; color: var(--cream); border: 1px solid rgba(243,234,212,.25); }
.btn--outline .btn__arrow { background: var(--cream); color: var(--ink); }
.btn--outline:hover { background: rgba(243,234,212,.06); }

/* Hero visual */
.hero__visual {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 520px;
  margin-left: auto;
}
.hero__image {
  width: 100%; height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 30px 50px rgba(0,0,0,.55));
}
.hero__badge {
  position: absolute;
  top: -10px; left: -10px;
  width: 130px; height: 130px;
  display: grid; place-items: center;
  animation: spin 22s linear infinite;
}
.hero__badge-text { width: 100%; height: 100%; }
.hero__badge-cube { position: absolute; inset: 0; display: grid; place-items: center; width: 40px; height: 40px; margin: auto; animation: spin 22s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .hero__visual { max-width: 420px; margin: 0 auto; }
  .hero__badge { top: -10px; left: 0; width: 100px; height: 100px; }
}

/* ---------- STEP / track sections ---------- */
.step {
  max-width: var(--container);
  margin: 16px auto;
  padding: 0 32px;
}
.step__track {
  background: var(--cream);
  color: var(--ink);
  border-radius: var(--radius-pill);
  padding: 28px 36px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 32px;
  position: relative;
  box-shadow: var(--shadow-soft);
}
.step__track--wide {
  grid-template-columns: 1fr;
  gap: 22px;
  padding: 32px 40px;
}

.step__num {
  font-family: 'Archivo Black', 'Inter', sans-serif;
  font-size: 38px;
  display: inline-grid; place-items: center;
  width: 88px; height: 88px;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  margin: -28px 0 -28px -8px; /* push half-out for "milestone" feel */
}
.step__head { display: flex; align-items: center; gap: 22px; }
.step__head .step__num { margin: -32px 0; }
.step__label {
  font-family: 'Archivo Black', 'Inter', sans-serif;
  font-size: 28px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0;
  color: var(--ink);
}
.step__icon { width: 36px; height: 36px; }
.step__icon svg { width: 100%; height: 100%; }

.step__body p {
  margin: 0;
  font-size: 16px;
  color: #2a2a2e;
  line-height: 1.6;
}
.step--about .step__track { grid-template-columns: auto auto 1fr; }
.step--about .step__body { padding-right: 12px; }

/* About specific layout (matches reference) */
@media (max-width: 800px) {
  .step__track { grid-template-columns: 1fr; padding: 26px 26px 30px; }
  .step__num { margin: 0 0 8px; width: 70px; height: 70px; font-size: 30px; }
  .step__head { flex-wrap: wrap; gap: 14px; }
  .step__head .step__num { margin: 0; }
  .step--about .step__track { grid-template-columns: 1fr; }
}

/* ---------- Connector curves ---------- */
.connector {
  width: 100%;
  max-width: var(--container);
  margin: -8px auto;
  padding: 0 32px;
  height: 110px;
  position: relative;
  z-index: 1;
}
.connector svg { width: 100%; height: 100%; }
@media (max-width: 800px) { .connector { display: none; } }

/* ---------- FEATURED WORK row ---------- */
.chevrons { width: 80px; height: 26px; margin-left: 12px; }
.chevrons svg { width: 100%; height: 100%; }

.projects-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 4px;
}
.projects-row > .project-card {
  flex: 1 1 0;
  min-width: 0;
}
@media (max-width: 1100px) {
  .projects-row > .project-card { flex: 1 1 calc((100% - 36px) / 3); min-width: 180px; }
}
@media (max-width: 700px) {
  .projects-row > .project-card { flex: 1 1 calc((100% - 18px) / 2); }
}
@media (max-width: 460px) {
  .projects-row > .project-card { flex: 1 1 100%; }
}

.project-card {
  background: #1a1a1c;
  border: 1px solid rgba(243,234,212,.08);
  border-radius: 20px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .25s ease, border-color .25s ease;
}
.project-card:hover { transform: translateY(-4px); border-color: rgba(243,234,212,.22); }
.project-card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #0c0c0d;
  overflow: hidden;
}
.project-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.project-card:hover .project-card__media img { transform: scale(1.04); }
.project-card__tag {
  position: absolute; top: 10px; left: 10px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .8px;
  padding: 5px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  color: var(--ink);
}
.tag--green  { background: #6cd3a3; }
.tag--blue   { background: #7fb1ff; }
.tag--pink   { background: #ff96b6; }
.tag--yellow { background: #ffd84d; }

.project-card__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700; font-size: 15px;
  letter-spacing: .2px;
  color: var(--cream);
}
.project-card__arrow {
  width: 28px; height: 28px;
  display: inline-grid; place-items: center;
  border: 1px solid rgba(243,234,212,.18);
  border-radius: 999px;
  transition: background .2s ease, color .2s ease;
}
.project-card__arrow svg { width: 12px; height: 12px; }
.project-card:hover .project-card__arrow { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.project-card__arrow--ext { background: rgba(255,95,138,.14); border-color: rgba(255,95,138,.35); color: var(--pink); }
.project-card:hover .project-card__arrow--ext { background: var(--pink); color: var(--ink); border-color: var(--pink); }

/* "More work on ArtStation" CTA panel */
.more-work {
  background:
    linear-gradient(140deg, #1a1a1d 0%, #131316 100%);
  border: 1px solid rgba(243,234,212,.08);
  border-radius: 28px;
  padding: 36px 40px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px;
  box-shadow: var(--shadow-soft);
}
.more-work__copy { max-width: 760px; }
.more-work__eyebrow {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--pink);
  margin-bottom: 10px;
  text-transform: uppercase;
}
.more-work__title {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(20px, 2.6vw, 28px);
  margin: 0 0 10px;
  line-height: 1.15;
  color: var(--cream);
  letter-spacing: -.2px;
}
.more-work__desc {
  margin: 0 0 18px;
  color: rgba(243,234,212,.7);
  max-width: 640px;
}
@media (max-width: 800px) {
  .more-work { flex-direction: column; align-items: flex-start; padding: 28px; }
}

/* ---------- Skills chips ---------- */
.skills-chips {
  display: flex; flex-wrap: wrap; gap: 12px;
}
.chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid rgba(0,0,0,.4);
}
.chip__ic { width: 18px; height: 18px; flex: none; }

/* ---------- Contact row ---------- */
.contact-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
  align-items: center;
}
.contact-row__copy h3 {
  font-family: 'Archivo Black', 'Inter', sans-serif;
  font-size: clamp(22px, 2.4vw, 30px);
  margin: 0 0 8px;
  color: var(--ink);
}
.contact-row__copy p { margin: 0; color: #2a2a2e; }
.contact-row__cta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

.contact-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  transition: transform .2s ease, background .2s ease;
}
.contact-pill svg { width: 16px; height: 16px; }
.contact-pill:hover { transform: translateY(-1px); background: #2a2a2e; }
.contact-pill--ghost { background: transparent; color: var(--ink); border: 1px solid rgba(0,0,0,.25); }
.contact-pill--ghost:hover { background: rgba(0,0,0,.06); }

@media (max-width: 800px) {
  .contact-row { grid-template-columns: 1fr; }
  .contact-row__cta { justify-content: flex-start; }
}

/* ---------- DEEP PROJECTS ---------- */
.deep-projects {
  max-width: var(--container);
  margin: 56px auto 24px;
  padding: 0 32px;
  display: flex; flex-direction: column;
  gap: 56px;
}
.project { position: relative; }
.project__head { max-width: 820px; margin: 0 0 28px; }
.project__index {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--pink);
  font-size: 12px;
  margin-bottom: 8px;
}
.project__title {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(28px, 4.4vw, 56px);
  line-height: 1.02;
  margin: 0 0 12px;
  letter-spacing: -.5px;
  color: var(--cream);
}
.project__meta {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 10px;
  color: rgba(243,234,212,.65);
  font-size: 13px;
  margin: 0 0 14px;
}
.project__meta .dot { width: 4px; height: 4px; background: rgba(243,234,212,.35); border-radius: 999px; }
.project__desc { color: rgba(243,234,212,.78); margin: 0; max-width: 760px; }

.project__hero {
  margin: 0 0 22px;
  background: #15151a;
  border: 1px solid rgba(243,234,212,.08);
  border-radius: 24px;
  overflow: hidden;
}
.project__hero img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  cursor: zoom-in;
}

/* Gallery group sub-heading (e.g. "Modular Hospital Wall") */
.gallery__group {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(243,234,212,.55);
  margin: 28px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(243,234,212,.08);
}
.gallery__group:first-of-type { margin-top: 8px; }

/* Gallery — image-first, contain by default so models don't get cropped */
.gallery {
  display: grid;
  gap: 18px;
}
.gallery--3col { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .gallery--3col { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .gallery--3col { grid-template-columns: 1fr; } }

.gallery__item {
  margin: 0;
  background: #15151a;
  border: 1px solid rgba(243,234,212,.08);
  border-radius: 18px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .25s ease, border-color .25s ease;
}
.gallery__item:hover { transform: translateY(-3px); border-color: rgba(243,234,212,.2); }
.gallery__item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;        /* keep models intact */
  /* Subtle radial vignette so wide/contained renders feel framed, not floating */
  background:
    radial-gradient(ellipse at center, #1a1a1f 0%, #0c0c0e 75%);
  cursor: zoom-in;
  transition: transform .5s ease;
  padding: 8px;
}
.gallery__item:hover img { transform: scale(1.02); }
.gallery__item figcaption {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(243,234,212,.82);
  letter-spacing: .2px;
}
.gallery__item--wide {
  grid-column: 1 / -1;
}
.gallery__item--wide img {
  aspect-ratio: 21 / 9;
  object-fit: cover;          /* hero/banner-style → cover is OK */
}

/* ---------- Collapsible gallery (per-project Show More) ---------- */
.project__gallery { position: relative; }

.project__gallery[data-collapsed="true"] {
  max-height: 440px;          /* one group heading + 1 row of 3-col thumbs */
  overflow: hidden;
}
@media (max-width: 900px) { .project__gallery[data-collapsed="true"] { max-height: 540px; } }
@media (max-width: 540px) { .project__gallery[data-collapsed="true"] { max-height: 560px; } }

/* Glow halo behind the Show-More button — uses the bg + pink accent */
.project__gallery[data-collapsed="true"]::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(640px, 80%);
  height: 200px;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(ellipse at 50% 90%,
      rgba(255, 95, 138, .26) 0%,
      rgba(255, 95, 138, .09) 30%,
      transparent 65%);
  filter: blur(4px);
}

/* Fade strip that blends the last visible row into the page bg */
.project__gallery-fade {
  display: none;
}
.project__gallery[data-collapsed="true"] .project__gallery-fade {
  display: block;
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 180px;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(180deg,
    rgba(15, 15, 16, 0)   0%,
    rgba(15, 15, 16, .55) 45%,
    rgba(15, 15, 16, .92) 80%,
    var(--bg)             100%);
}

/* Button wrapper — sits at the natural end when expanded, floats over fade when collapsed */
.project__more-wrap {
  display: flex;
  justify-content: center;
  margin: 28px 0 4px;
}
.project__gallery[data-collapsed="true"] .project__more-wrap {
  position: absolute;
  left: 0; right: 0;
  bottom: 28px;
  margin: 0;
  z-index: 3;
}

.project__more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 26px;
  background: var(--cream);
  color: var(--ink);
  border-radius: 999px;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    0 18px 50px -18px rgba(0, 0, 0, .7),
    0 0 0 1px rgba(255, 255, 255, .04),
    0 0 60px rgba(255, 95, 138, .15);
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.project__more:hover {
  transform: translateY(-2px);
  background: var(--pink);
  color: var(--cream);
  box-shadow:
    0 22px 60px -18px rgba(0, 0, 0, .75),
    0 0 0 1px rgba(255, 95, 138, .35),
    0 0 80px rgba(255, 95, 138, .35);
}

.project__more-icon {
  display: inline-flex;
  width: 14px; height: 14px;
  transition: transform .25s ease;
}
.project__more-icon svg { width: 100%; height: 100%; display: block; }
.project__gallery:not([data-collapsed="true"]) .project__more-icon {
  transform: rotate(180deg);
}

/* ---------- FOOTER ---------- */
.footer {
  margin-top: 80px;
  padding: 32px;
  position: relative; z-index: 2;
}
.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  background: var(--cream);
  color: var(--ink);
  border-radius: var(--radius-pill);
  padding: 22px 32px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
  box-shadow: var(--shadow-soft);
}
.footer__icon {
  width: 56px; height: 56px;
  display: inline-grid; place-items: center;
  background: var(--ink); border-radius: 999px;
}
.footer__icon svg { width: 28px; height: 28px; }
.footer__copy { margin: 0; font-size: 13px; color: #2a2a2e; }
.footer__connect { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer__connect > span:first-child { font-weight: 600; margin-right: 6px; }
.footer__connect [data-render="social"] { display: contents; }
.footer__link {
  width: 36px; height: 36px;
  display: inline-grid; place-items: center;
  background: var(--ink); border-radius: 999px;
  transition: transform .2s ease, background .2s ease;
}
.footer__link svg { width: 16px; height: 16px; }
.footer__link:hover { transform: translateY(-1px); background: #2a2a2e; }

@media (max-width: 800px) {
  .footer__inner { grid-template-columns: 1fr; text-align: left; padding: 22px 26px; border-radius: 28px; }
  .footer__connect { flex-wrap: wrap; }
}

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.92);
  display: grid; place-items: center;
  z-index: 100;
  padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox__img {
  max-width: 92vw; max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
  background: #111;
}
.lightbox__caption {
  color: var(--cream);
  margin: 14px 0 0;
  font-size: 14px;
  text-align: center;
}
.lightbox__close {
  position: absolute; top: 18px; right: 22px;
  width: 44px; height: 44px;
  background: var(--cream); color: var(--ink);
  border-radius: 999px;
  font-size: 26px; font-weight: 700;
  display: grid; place-items: center;
  line-height: 1;
}
.lightbox__close:hover { background: #fff; }

/* ---------- Edit FAB (link to dashboard) ---------- */
/* Hidden by default; script.js reveals it only on localhost/file. */
.edit-fab { display: none; }
.edit-fab.is-local {
  position: fixed;
  bottom: 22px; right: 22px;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  background: var(--cream);
  color: var(--ink);
  border-radius: 999px;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,.6);
  z-index: 80;
  transition: transform .2s ease;
}
.edit-fab.is-local svg { width: 22px; height: 22px; }
.edit-fab.is-local:hover { transform: translateY(-2px) rotate(-8deg); }
@media (max-width: 600px) { .edit-fab.is-local { width: 46px; height: 46px; } }

/* ---------- Reduce motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
