/* =========================================================
   ELYNDOR — design tokens
========================================================= */
:root{
  --void:        #0A0B0E;
  --void-deep:   #050507;
  --panel:       #101218;
  --hairline:    rgba(201,194,179,0.14);
  --hairline-strong: rgba(201,194,179,0.28);

  --parchment:      #C9C2B3;
  --parchment-dim:  #8C887C;
  --parchment-bright:#EDE8DC;

  --sapphire:       #5C84BD;
  --sapphire-bright:#82A6D9;
  --sapphire-dim:   rgba(92,132,189,0.14);

  --ovran:        #C97A4A;
  --ovran-dim:    rgba(201,122,74,0.16);
  --ekareen:      #D6452C;
  --ekareen-dim:  rgba(214,69,44,0.16);
  --zetros:       #7FB3C0;
  --zetros-dim:   rgba(127,179,192,0.16);

  --font-display: 'Spectral', Georgia, serif;
  --font-display-sc: 'Spectral SC', Georgia, serif;
  --font-body:    'Work Sans', -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  --container: 1120px;
  --radius: 3px;
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *,*::before,*::after{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body{
  margin:0;
  background: var(--void);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a{ color: inherit; text-decoration: none; }
ul,ol{ margin:0; padding:0; list-style:none; }
img{ max-width:100%; display:block; }
code{ font-family: var(--font-mono); }

::selection{ background: var(--sapphire); color: var(--void-deep); }

:focus-visible{
  outline: 2px solid var(--sapphire-bright);
  outline-offset: 3px;
}

h1,h2,h3,h4{
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--parchment-bright);
  margin: 0;
}

.eyebrow{
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sapphire-bright);
  margin: 0 0 0.9rem;
}

/* =========================================================
   Background atmosphere
========================================================= */
.stars{
  position: fixed; inset: 0;
  background-image: radial-gradient(1px 1px at 20px 30px, rgba(237,232,220,0.6) 50%, transparent 100%),
                     radial-gradient(1px 1px at 140px 90px, rgba(237,232,220,0.5) 50%, transparent 100%),
                     radial-gradient(1.5px 1.5px at 260px 40px, rgba(237,232,220,0.7) 50%, transparent 100%),
                     radial-gradient(1px 1px at 320px 160px, rgba(237,232,220,0.4) 50%, transparent 100%),
                     radial-gradient(1px 1px at 60px 200px, rgba(237,232,220,0.5) 50%, transparent 100%),
                     radial-gradient(1.5px 1.5px at 400px 240px, rgba(237,232,220,0.6) 50%, transparent 100%);
  background-repeat: repeat;
  background-size: 440px 320px;
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}
.vignette{
  position: fixed; inset: 0;
  background: radial-gradient(120% 90% at 50% -10%, rgba(92,132,189,0.10), transparent 55%),
              radial-gradient(100% 60% at 50% 110%, rgba(0,0,0,0.6), transparent 60%);
  z-index: 0;
  pointer-events: none;
}

main, .site-header, .site-footer{ position: relative; z-index: 1; }

/* =========================================================
   Header
========================================================= */
.site-header{
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,11,14,0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.header-inner{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.brand{ display:flex; align-items:center; gap:0.6rem; margin-right: auto; }
.brand-mark{ width: 28px; height: 28px; border-radius: 50%; }
.brand-word{ font-family: var(--font-display-sc); font-size: 1.05rem; letter-spacing: 0.04em; color: var(--parchment-bright); }

.main-nav{ display: flex; align-items: center; gap: 1.8rem; }
.main-nav a{
  font-size: 0.86rem;
  color: var(--parchment-dim);
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.main-nav a:hover{ color: var(--parchment-bright); }
.main-nav a.is-active{ color: var(--parchment-bright); border-bottom-color: var(--sapphire); }
.main-nav a.mobile-only-link{ display: none; }

.nav-actions{ display: flex; align-items: center; gap: 0.6rem; }

.nav-cta{
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  border: 1px solid var(--hairline-strong);
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius);
  color: var(--parchment-bright);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.nav-cta:hover{ border-color: var(--sapphire); background: var(--sapphire-dim); }
.nav-cta--solid{ background: var(--sapphire); border-color: var(--sapphire); color: var(--void-deep); }
.nav-cta--solid:hover{ background: var(--sapphire-bright); border-color: var(--sapphire-bright); }

.nav-toggle{
  display: none;
  background: none; border: none; cursor: pointer;
  width: 32px; height: 32px;
  flex-direction: column; justify-content: center; gap: 5px;
  padding: 0;
}
.nav-toggle span{ display:block; height:1px; background: var(--parchment); width: 100%; }

/* =========================================================
   Hero
========================================================= */
/* Hero */
.hero{
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 6rem 1.5rem 7rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 2rem;
  min-height: 78vh;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
}
.hero::before{
  content: "";
  position: absolute;
  inset: -40%;
  z-index: -1;
  background-image:
          linear-gradient(180deg, rgba(10,11,14,0.55) 0%, rgba(10,11,14,0.88) 60%, rgba(10,11,14,0.95) 100%),
          url('assets/hub-glow.jpg');
  background-size: 150%;
  background-position: center 35%;
  background-attachment: fixed;
}

@media (max-width: 880px){
  .hero{
    grid-template-columns: 1fr;
    padding-top: 4rem;
    min-height: auto;
  }
  .hero::before {
    background-attachment: scroll;
    background-position: center 20%;
    background-size: 140%;
  }
  .hero-orbit{ height: 240px; }
  .orbit-ring--1{ width: 220px; height: 220px; }
  .orbit-ring--2{ width: 150px; height: 150px; }
  .orbit-ring--3{ width: 90px; height: 90px; }
}

@media (max-width: 600px){
  .hero {
    padding: 3rem 1.5rem 4rem;
  }
  .hero::before {
    background-position: center 10%;
    background-size: 160%;
  }
}
.hero-inner{
  max-width: 350px;
  margin: 0 auto;
}
.hero-title{
  font-size: clamp(3.2rem, 7vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  margin: 0 0 1.1rem;
}
.hero-tagline{
  color: var(--parchment);
  font-size: 1.08rem;
  max-width: 46ch;
  margin: 0 0 2rem;
}
.hero-quote{
  font-family: var(--font-display);
  font-style: italic;
  color: var(--parchment-dim);
  margin: 2.2rem 0 0;
  font-size: 1rem;
}

.status-row{ margin-bottom: 1.4rem; }
.status-pill{
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--parchment);
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  padding: 0.4rem 0.9rem 0.4rem 0.7rem;
}
.status-dot{
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--parchment-dim);
}
.status-dot.is-online{ background: #6FCF97; box-shadow: 0 0 8px rgba(111,207,151,0.7); animation: pulse 2.4s ease-in-out infinite; }
.status-dot.is-offline{ background: #C9655A; }
@keyframes pulse{ 0%,100%{ opacity:1; } 50%{ opacity:0.45; } }

.ip-row{ display:flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 1.8rem; }
.ip-card{
  display:flex; align-items:center; gap:0.7rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 0.55rem 0.7rem;
  background: rgba(255,255,255,0.02);
}
.ip-label{ font-family: var(--font-mono); font-size: 0.68rem; letter-spacing:0.1em; text-transform:uppercase; color: var(--parchment-dim); }
.ip-value{ font-size: 0.86rem; color: var(--parchment-bright); }
.ip-value .port{ color: var(--parchment-dim); }
.copy-btn{
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: none;
  border: 1px solid var(--hairline-strong);
  color: var(--parchment-dim);
  border-radius: var(--radius);
  padding: 0.3rem 0.55rem;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.copy-btn:hover{ border-color: var(--sapphire); color: var(--sapphire-bright); }
.copy-btn.is-copied{ border-color: #6FCF97; color: #6FCF97; }

.cta-row{ display:flex; flex-wrap: wrap; gap: 0.9rem; }
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.btn-primary{ background: var(--sapphire); color: var(--void-deep); }
.btn-primary:hover{ background: var(--sapphire-bright); }
.btn-ghost{ border-color: var(--hairline-strong); color: var(--parchment-bright); }
.btn-ghost:hover{ border-color: var(--sapphire); color: var(--sapphire-bright); }

.hero-orbit{
  position: relative;
  height: 460px;
  display: flex; align-items: center; justify-content: center;
}
.orbit-ring{
  position: absolute;
  border: 1px dashed var(--hairline);
  border-radius: 50%;
  animation: spin linear infinite;
}
.orbit-ring--1{ width: 420px; height: 420px; animation-duration: 60s; }
.orbit-ring--2{ width: 300px; height: 300px; animation-duration: 42s; animation-direction: reverse; }
.orbit-ring--3{ width: 180px; height: 180px; animation-duration: 28s; }
@keyframes spin{ to{ transform: rotate(360deg); } }
.orbit-planet{
  position: absolute;
  top: -22px; left: 50%;
  transform: translateX(-50%);
  width: 44px; height: 44px;
  display: block;
  border-radius: 50%;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.orbit-planet:hover, .orbit-planet:focus-visible{
  transform: translateX(-50%) scale(1.18);
  filter: drop-shadow(0 0 10px rgba(130,166,217,0.6));
}
.orbit-ring--2 .orbit-planet{ width: 34px; height: 34px; top: -17px; }
.orbit-ring--3 .orbit-planet{ width: 26px; height: 26px; top: -13px; }
.orbit-planet svg{ width:100%; height:100%; filter: drop-shadow(0 0 14px rgba(0,0,0,0.5)); }

@media (max-width: 880px){
  .hero{ grid-template-columns: 1fr; padding-top: 4rem; min-height: auto; }
  .hero-orbit{ height: 240px; }
  .orbit-ring--1{ width: 220px; height: 220px; }
  .orbit-ring--2{ width: 150px; height: 150px; }
  .orbit-ring--3{ width: 90px; height: 90px; }
}

/* =========================================================
   Section shell
========================================================= */
section{ max-width: var(--container); margin: 0 auto; padding: 5.5rem 1.5rem; }
.section-head{ max-width: 640px; margin-bottom: 3rem; }
.section-head h2{ font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin-bottom: 0.9rem; }
.section-intro{ color: var(--parchment-dim); max-width: 60ch; }

/* =========================================================
   Atlas / planet tabs
========================================================= */
.planet-atlas{
  border: 1px solid var(--hairline);
  border-radius: 6px;
  overflow: hidden;
}
.planet-tabs{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--hairline);
}
.planet-tab{
  display:flex; align-items:center; gap: 0.8rem;
  background: rgba(255,255,255,0.015);
  border: none;
  border-right: 1px solid var(--hairline);
  padding: 1.1rem 1.3rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}
.planet-tab:last-child{ border-right: none; }
.planet-tab:hover{ background: rgba(255,255,255,0.035); }
.planet-tab.is-active{ background: rgba(92,132,189,0.07); box-shadow: inset 0 -2px 0 var(--sapphire); }
.tab-glyph{ width: 40px; height: 40px; flex-shrink: 0; }
.tab-glyph svg{ width:100%; height:100%; }
.tab-name{ font-family: var(--font-display); font-size: 1.05rem; color: var(--parchment-bright); }

.planet-panel{ display:none; padding: 2.4rem; }
.planet-panel.is-active{ display:block; }
.panel-banner{
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--hairline);
  margin-bottom: 1.8rem;
  display: block;
}
.panel-head{ display:flex; align-items:baseline; gap: 0.8rem; margin-bottom: 0.6rem; }
.panel-head h3{ font-size: 1.7rem; }
.panel-sub{ font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--parchment-dim); }
.panel-flavor{ color: var(--parchment); max-width: 64ch; margin-bottom: 1.8rem; }
.panel-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 1.6rem; }
.panel-grid h4{ font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--parchment-dim); margin-bottom: 0.8rem; }
.pros ul li, .cons ul li{ padding: 0.4rem 0 0.4rem 1.1rem; position: relative; font-size: 0.94rem; border-bottom: 1px solid var(--hairline); }
.pros ul li:last-child, .cons ul li:last-child{ border-bottom: none; }
.pros ul li::before{ content: "+"; position: absolute; left: 0; color: var(--zetros); }
.cons ul li::before{ content: "–"; position: absolute; left: 0; color: var(--ovran); }
.hazard-callout{
  font-size: 0.92rem;
  border-left: 2px solid var(--ekareen);
  background: var(--ekareen-dim);
  padding: 0.85rem 1.1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--parchment-bright);
}

@media (max-width: 700px){
  .planet-tabs{ grid-template-columns: 1fr; }
  .planet-tab{ border-right:none; border-bottom: 1px solid var(--hairline); }
  .panel-grid{ grid-template-columns: 1fr; gap: 1.4rem; }
  .planet-panel{ padding: 1.6rem; }
}

/* =========================================================
   Chronicle
========================================================= */
.chronicle-grid{
  display:grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.chronicle-text p{ margin: 0 0 1.1rem; max-width: 62ch; }
.chronicle-note{ color: var(--parchment-dim); font-size: 0.92rem; border-top: 1px solid var(--hairline); padding-top: 1.1rem; }
.pull-quote{
  margin: 0; padding: 0 0 0 1.4rem;
  border-left: 2px solid var(--sapphire);
  display: flex; align-items: center;
}
.pull-quote p{
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.6rem;
  color: var(--parchment-bright);
  margin:0;
}
.hub-card{
  border: 1px solid var(--hairline);
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255,255,255,0.015);
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
}
.hub-card img{ width: 100%; height: 100%; object-fit: cover; display:block; min-height: 260px; }
.hub-card-text{ padding: 2.2rem; }
.hub-card-text h3{ font-size: 1.3rem; margin-bottom: 1rem; }
.hub-card-text p{ max-width: 70ch; margin: 0 0 1rem; color: var(--parchment); }
.hub-card-text p:last-child{ margin-bottom: 0; }

.nation-figure{ margin: 2.5rem 0 0; }
.nation-figure img{
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--hairline);
  display: block;
}
.nation-figure figcaption{
  margin-top: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--parchment-dim);
}

@media (max-width: 800px){
  .hub-card{ grid-template-columns: 1fr; }
  .hub-card img{ min-height: 200px; }
}

@media (max-width: 800px){
  .chronicle-grid{ grid-template-columns: 1fr; }
  .pull-quote{ border-left:none; border-top: 2px solid var(--sapphire); padding: 1.4rem 0 0; }
}

/* =========================================================
   Join steps
========================================================= */
.join-steps{ display:flex; flex-direction: column; gap: 0; }
.join-steps li{
  display:flex; gap: 1.6rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--hairline);
}
.join-steps li:first-child{ border-top: 1px solid var(--hairline); }
.step-num{
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--sapphire-bright);
  width: 2.4rem; flex-shrink: 0;
}
.join-steps h3{ font-size: 1.1rem; margin-bottom: 0.3rem; }
.join-steps p{ color: var(--parchment-dim); margin:0; max-width: 60ch; }
.join-steps code{ color: var(--parchment-bright); background: rgba(255,255,255,0.04); padding: 0.1rem 0.4rem; border-radius: 2px; }

/* =========================================================
   Rules
========================================================= */
.rules-list{ list-style: none; counter-reset: rule; display:flex; flex-direction: column; gap: 0; max-width: 72ch; margin: 0; padding: 0; }
.rules-list li{
  counter-increment: rule;
  padding: 1.1rem 0 1.1rem 2.6rem;
  border-bottom: 1px solid var(--hairline);
  position: relative;
}
.rules-list li:first-child{ border-top: 1px solid var(--hairline); }
.rules-list li::before{
  content: counter(rule) ".";
  position: absolute; left: 0; top: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--sapphire-bright);
  width: 2rem;
}
.rules-note{ margin-top: 1.6rem; color: var(--parchment-dim); font-size: 0.92rem; }
.rules-note a{ color: var(--sapphire-bright); border-bottom: 1px solid currentColor; }

/* =========================================================
   Gallery
========================================================= */
.gallery-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.gallery-card{
  border: 1px solid var(--hairline);
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255,255,255,0.015);
  margin: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.gallery-card img{
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.gallery-card img:hover {
  transform: scale(1.04);
}
.gallery-card figcaption{
  padding: 0.9rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--parchment-dim);
  flex-grow: 1;
  display: flex;
  align-items: center;
}
.gallery-note{ margin-top: 1.6rem; color: var(--parchment-dim); font-size: 0.88rem; }

@media (max-width: 900px){
  .gallery-grid{ grid-template-columns: 1fr 1fr; }
  .gallery-card img{ height: 160px; }
}
@media (max-width: 600px){
  .gallery-grid{ grid-template-columns: 1fr; }
  .gallery-card img{ height: 180px; }
}

.community-banner{
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--hairline);
  margin-bottom: 3rem;
  display: block;
}

/* =========================================================
   Link cards (home overview grid + community page)
========================================================= */
.explore-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.community-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.link-card{
  display:block;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 2.2rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.link-card:hover{ border-color: var(--sapphire); transform: translateY(-2px); }
.link-card h3{ font-size: 1.3rem; margin-bottom: 0.7rem; }
.link-card p{ color: var(--parchment-dim); margin: 0 0 1.2rem; max-width: 50ch; }
.card-link{ font-family: var(--font-mono); font-size: 0.8rem; color: var(--sapphire-bright); }

@media (max-width: 900px){ .explore-grid{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px){ .explore-grid{ grid-template-columns: 1fr; } .community-grid{ grid-template-columns: 1fr; } }

/* =========================================================
   Footer
========================================================= */
.site-footer{ border-top: 1px solid var(--hairline); margin-top: 3rem; }
.footer-inner{
  max-width: var(--container); margin: 0 auto; padding: 2.4rem 1.5rem;
  display:flex; flex-wrap: wrap; align-items:center; gap: 1.5rem 2rem;
}
.footer-brand{ display:flex; align-items:center; gap:0.5rem; font-family: var(--font-display-sc); color: var(--parchment-bright); margin-right: auto; }
.footer-brand .brand-mark{ width: 22px; height: 22px; border-radius: 50%; }
.footer-nav{ display:flex; gap: 1.4rem; flex-wrap: wrap; }
.footer-nav a{ font-size: 0.84rem; color: var(--parchment-dim); }
.footer-nav a:hover{ color: var(--parchment-bright); }
.footer-meta{ font-family: var(--font-mono); font-size: 0.76rem; color: var(--parchment-dim); margin:0; width: 100%; }

/* =========================================================
   Gallery lightbox
========================================================= */
.gallery-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
}
.gallery-lightbox.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 7, 0.95);
  cursor: pointer;
}
.lightbox-content {
  position: relative;
  z-index: 101;
  max-width: min(1100px, 90vw);
  width: min(1100px, 90vw);
  max-height: 80vh;
  height: min(700px, 80vh);
  display: flex;
  flex-direction: column;
  align-items: center;
}
  .lightbox-image {
    width: 100%;
    /* allow the image to grow/shrink inside the vertical space left by caption/buttons */
    flex: 1 1 auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
    max-height: calc(80vh - 4.5rem); /* keep some space for caption / controls */
  }
  .lightbox-caption {
    color: var(--parchment-bright);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    margin-bottom: 0.9rem; /* caption shown above image */
    text-align: center;
  }
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--hairline);
  color: var(--parchment-bright);
  width: 40px;
  height: 40px;
  font-size: 2rem;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
  z-index: 102;
}
.lightbox-close:hover {
  background: rgba(0, 0, 0, 0.7);
  border-color: var(--sapphire);
}
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--hairline);
  color: var(--parchment-bright);
  width: 56px;
  height: 56px;
  font-size: 1.6rem;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
  z-index: 105;
}
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(0,0,0,0.75); border-color: var(--sapphire); }
.lightbox-prev:disabled, .lightbox-next:disabled { opacity: 0.4; cursor: not-allowed; }

.lightbox-source {
  display: none; /* hidden by default; shown only when lightbox open and a source exists */
  margin-top: 0.9rem;
  padding: 0.5rem 0.85rem;
  background: rgba(0,0,0,0.45);
  border: 1px solid var(--hairline);
  color: var(--parchment-bright);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  border-radius: 4px;
  transition: background 0.15s ease, border-color 0.15s ease;
  z-index: 103;
}
.gallery-lightbox.is-open .lightbox-source:not([hidden]) { display: inline-block; }
.lightbox-source:hover { background: rgba(0,0,0,0.75); border-color: var(--sapphire); }

@media (max-width: 600px) {
  .lightbox-content {
    max-width: 95vw;
    max-height: 95vh;
  }
  .lightbox-image {
    max-height: 70vh;
  }
  .lightbox-close {
    width: 36px;
    height: 36px;
    font-size: 1.6rem;
    top: 0.5rem;
    right: 0.5rem;
  }
}

/* =========================================================
   Mobile nav
========================================================= */
@media (max-width: 880px){
  .main-nav{
    position: absolute; top: 100%; left:0; right:0;
    flex-direction: column;
    background: var(--void-deep);
    border-bottom: 1px solid var(--hairline);
    padding: 1rem 1.5rem;
    gap: 1rem;
    display: none;
  }
  .main-nav.is-open{ display:flex; }
  .main-nav a.mobile-only-link{
    display: block;
    margin-top: 0.4rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--hairline);
  }
  .nav-actions{ display:none; }
  .nav-toggle{ display:flex; }
}
