/* =====================================================================
   NotAllWhoWander — Astrophotography Portfolio
   Stylesheet
   Organized: Tokens > Reset > Layout > Components > Sections > Media
   ===================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Palette — pulled from the site emblem */
  --color-void: #050f12;          /* page background, deepest night */
  --color-teal-deep: #0b2c30;     /* panel background */
  --color-teal-mid: #123842;      /* header / card background */
  --color-teal-line: #1c5a5e;     /* borders, dividers on dark */
  --color-teal-bright: #3fa9a4;   /* nebula cyan accent */
  --color-purple: #6a4a8f;        /* nebula purple accent */
  --color-purple-deep: #2c1d40;
  --color-gold: #d4af6a;          /* primary accent — rings, type, stars */
  --color-gold-bright: #f0d9a0;
  --color-cream: #f3ead9;         /* primary text on dark */
  --color-cream-dim: #b9c9c6;     /* secondary text on dark */

  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body: 'Jost', 'Segoe UI', sans-serif;

  --measure: 68ch;
  --radius: 6px;
  --container: 1180px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-void);
  color: var(--color-cream);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; margin: 0; }
p { margin: 0 0 1em; }
button { font-family: inherit; cursor: pointer; }

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 14px;
}

.section-heading {
  font-size: clamp(2rem, 4vw, 2.9rem);
  color: var(--color-cream);
  margin-bottom: 22px;
  letter-spacing: 0.01em;
}

.section-lede {
  max-width: var(--measure);
  color: var(--color-cream-dim);
  font-size: 1.08rem;
}

section { position: relative; padding: 110px 0; }

/* ---------- Constellation divider (signature element) ---------- */
.constellation-divider {
  width: 100%;
  height: 64px;
  display: block;
  margin: 0 auto;
}
.constellation-divider svg { width: 100%; height: 100%; display: block; }
.constellation-divider .line { stroke: var(--color-gold); stroke-width: 1; opacity: 0.55; }
.constellation-divider .star { fill: var(--color-gold-bright); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  background: rgba(5, 15, 18, 0.2);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(212, 175, 106, 0);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), padding 0.3s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(5, 15, 18, 0.86);
  border-bottom-color: rgba(212, 175, 106, 0.18);
  padding: 12px 0;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  color: var(--color-cream);
}

.main-nav ul { display: flex; gap: 34px; }
.main-nav a {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-cream-dim);
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.main-nav a:hover,
.main-nav a:focus-visible { color: var(--color-gold-bright); border-color: var(--color-gold); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-teal-line);
  border-radius: var(--radius);
  padding: 8px 10px;
  color: var(--color-cream);
}

/* ---------- Hero / Welcome ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 160px 0 90px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(106, 74, 143, 0.35), transparent 60%),
    radial-gradient(ellipse at 20% 100%, rgba(63, 169, 164, 0.18), transparent 55%),
    linear-gradient(180deg, var(--color-void) 0%, #08181b 60%, var(--color-void) 100%);
}
#star-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero .container {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-emblem {
  width: min(220px, 42vw);
  height: auto;
  margin-bottom: 34px;
  filter: drop-shadow(0 0 40px rgba(212, 175, 106, 0.25));
  animation: emblem-in 1.2s var(--ease) both;
}
.hero-title {
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.02;
  color: var(--color-cream);
  animation: fade-up 1s var(--ease) both 0.15s;
}
.hero-title span { color: var(--color-gold); font-style: italic; }
.hero-tagline {
  margin-top: 22px;
  max-width: 46ch;
  font-size: 1.15rem;
  color: var(--color-cream-dim);
  font-style: italic;
  animation: fade-up 1s var(--ease) both 0.3s;
}
.hero-actions {
  margin-top: 42px;
  display: flex;
  gap: 20px;
  animation: fade-up 1s var(--ease) both 0.45s;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 999px;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease), color .3s var(--ease);
  border: 1px solid var(--color-gold);
}
.btn-primary { background: var(--color-gold); color: var(--color-void); }
.btn-primary:hover { background: var(--color-gold-bright); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--color-gold-bright); }
.btn-ghost:hover { background: rgba(212, 175, 106, 0.12); transform: translateY(-2px); }

.scroll-cue {
  position: absolute;
  bottom: 36px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--color-cream-dim);
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: fade-up 1s var(--ease) both 0.6s;
}
.scroll-cue::after {
  content: '';
  width: 1px; height: 34px;
  background: linear-gradient(var(--color-gold), transparent);
  animation: pulse-down 2.2s ease-in-out infinite;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes emblem-in {
  from { opacity: 0; transform: scale(0.85) rotate(-4deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes pulse-down {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0.2; }
  50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0.2; }
}

/* ---------- About ---------- */
.about { background: var(--color-teal-deep); }
.about .container {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 70px;
  align-items: center;
}
.about-figure {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 20%, rgba(106,74,143,0.5), var(--color-void) 70%);
  border: 1px solid var(--color-teal-line);
}
.about-figure svg { width: 100%; height: 100%; }
.about-copy p { color: var(--color-cream-dim); }
.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 36px;
  padding-top: 30px;
  border-top: 1px solid var(--color-teal-line);
}
.about-stats .stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.1rem;
  color: var(--color-gold);
}
.about-stats .stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-cream-dim);
}

/* ---------- Astrophotography (field notes) ---------- */
.astro { background: var(--color-void); }
.astro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 26px;
  margin-top: 50px;
}
.field-card {
  background: linear-gradient(160deg, var(--color-teal-mid), var(--color-teal-deep));
  border: 1px solid var(--color-teal-line);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.field-card:hover { transform: translateY(-6px); border-color: var(--color-gold); }
.field-card .field-label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-teal-bright);
  margin-bottom: 10px;
  display: block;
}
.field-card h3 {
  font-size: 1.35rem;
  color: var(--color-gold-bright);
  margin-bottom: 10px;
}
.field-card p { color: var(--color-cream-dim); font-size: 0.96rem; margin-bottom: 0; }

.astro-note {
  margin-top: 60px;
  padding: 34px 40px;
  border-left: 2px solid var(--color-gold);
  background: rgba(212, 175, 106, 0.06);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.astro-note p { color: var(--color-cream-dim); margin: 0; font-size: 1.02rem; }
.astro-note strong { color: var(--color-gold-bright); font-weight: 600; }

/* ---------- Gallery ---------- */
.gallery { background: var(--color-teal-deep); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 50px;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3 / 2;
  cursor: pointer;
  background: var(--color-void);
  border: 1px solid var(--color-teal-line);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.gallery-item:hover img { transform: scale(1.07); }
.gallery-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px 18px;
  background: linear-gradient(0deg, rgba(5,15,18,0.9), transparent);
  transform: translateY(8px);
  opacity: 0;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.gallery-item:hover .gallery-caption,
.gallery-item:focus-visible .gallery-caption { opacity: 1; transform: translateY(0); }
.gallery-caption .cap-title {
  font-family: var(--font-display);
  color: var(--color-cream);
  font-size: 1.05rem;
}
.gallery-caption .cap-meta {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--color-gold);
  text-transform: uppercase;
}
.gallery-item::after {
  content: '';
  position: absolute; inset: 0;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: border-color 0.3s var(--ease);
}
.gallery-item:hover::after { border-color: var(--color-gold); }
.gallery-item button.zoom-hint {
  position: absolute;
  top: 12px; right: 12px;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(212,175,106,0.5);
  background: rgba(5,15,18,0.55);
  color: var(--color-gold-bright);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.gallery-item:hover button.zoom-hint { opacity: 1; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(4, 10, 12, 0.94);
  padding: 40px;
  overflow-y: auto; /* safety net: if content is ever taller than the
                        viewport (e.g. a short laptop screen with a lot of
                        acquisition fields), the overlay scrolls instead of
                        clipping content at the bottom. */
}
.lightbox.is-open { display: flex; }
.lightbox-inner {
  position: relative;
  max-width: 1100px;
  width: 100%;
  margin: auto 0; /* keeps it centered when short, top-aligned when it
                      needs to scroll, instead of getting cut off */
  animation: fade-up 0.35s var(--ease) both;
}
.lightbox-inner img {
  width: 100%;
  max-height: 62vh; /* shortened from 78vh to reliably leave room for the
                        caption and acquisition panel below it without
                        needing to scroll on most screens */
  object-fit: contain;
  border-radius: var(--radius);
  border: 1px solid var(--color-teal-line);
}
.lightbox-caption {
  margin-top: 16px;
  text-align: center;
}
.lightbox-caption .cap-title { font-family: var(--font-display); font-size: 1.3rem; color: var(--color-cream); }
.lightbox-caption .cap-meta { font-size: 0.78rem; letter-spacing: 0.1em; color: var(--color-gold); text-transform: uppercase; margin-top: 4px; }

/* Acquisition data readout -- a horizontal, wrapping row of "chips" rather
   than one field per line, so 5-6 fields stay compact instead of stacking
   into a tall column that pushes the bottom of the lightbox off-screen. */
.lightbox-acquisition {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 8px 30px;
  max-width: 720px;
  margin: 20px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--color-teal-line);
  font-family: 'Courier New', ui-monospace, monospace;
}
.acq-field {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  white-space: nowrap;
}
.acq-label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-teal-bright);
}
.acq-value {
  font-size: 0.86rem;
  color: var(--color-cream);
  letter-spacing: 0.01em;
}

@media (max-width: 600px) {
  .lightbox-inner img { max-height: 48vh; }
  .lightbox-acquisition {
    justify-content: flex-start;
    gap: 6px 20px;
  }
  .acq-field { white-space: normal; }
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(11, 44, 48, 0.7);
  border: 1px solid var(--color-teal-line);
  color: var(--color-cream);
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color .25s var(--ease);
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
  background: var(--color-gold); color: var(--color-void); border-color: var(--color-gold);
}
.lightbox-close { top: -60px; right: 0; }
.lightbox-prev { top: 50%; left: -60px; transform: translateY(-50%); }
.lightbox-next { top: 50%; right: -60px; transform: translateY(-50%); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-void);
  border-top: 1px solid var(--color-teal-line);
  padding: 56px 0 34px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 30px;
  padding-bottom: 34px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 36px; height: 36px; border-radius: 50%; }
.footer-brand span { font-family: var(--font-display); font-size: 1.15rem; }
.footer-links ul { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-links a { font-size: 0.85rem; color: var(--color-cream-dim); }
.footer-links a:hover { color: var(--color-gold-bright); }
.footer-social { display: flex; gap: 16px; }
.footer-social a {
  width: 38px; height: 38px;
  border: 1px solid var(--color-teal-line);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-cream-dim);
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.footer-social a:hover { border-color: var(--color-gold); color: var(--color-gold-bright); }
.footer-bottom {
  border-top: 1px solid var(--color-teal-line);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--color-cream-dim);
}
.footer-bottom a { color: var(--color-gold); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about .container { grid-template-columns: 1fr; }
  .about-figure { max-width: 380px; margin: 0 auto; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-close { top: 8px; right: 8px; background: rgba(4,10,12,0.8); }
  .lightbox { padding: 16px; }
}

@media (max-width: 760px) {
  section { padding: 80px 0; }
  .main-nav { position: fixed; top: 0; right: 0; height: 100svh; width: min(78vw, 320px);
    background: var(--color-teal-mid); border-left: 1px solid var(--color-teal-line);
    transform: translateX(100%); transition: transform 0.4s var(--ease);
    display: flex; align-items: center; padding: 40px 30px; z-index: 99;
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: 26px; }
  .nav-toggle { display: flex; }
  .about-stats { grid-template-columns: 1fr; gap: 16px; }
  .footer-top { flex-direction: column; }
}

@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; }
}
