/* Davidobi — dark museum portfolio: navy + lime (default dark theme) */

/* Hagia Signature (Envato Elements) — package includes web fonts; or convert OTF/TTF to woff2 → assets/fonts/hagia-signature.woff2 */
@font-face{
  font-family: "Hagia Signature";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/hagia-signature.woff2") format("woff2");
}

:root{
  --navy: #0B0E1E;
  --accent: #8BC34A;
  --accent-hover: #7cb342;
  --bg: #ffffff;
  --bg-muted: #f5f6f8;
  --text: #1a1d26;
  --muted: #5c6370;
  --heading: #0B0E1E;
  --line: rgba(11, 14, 30, 0.12);
  --shadow: 0 8px 32px rgba(11, 14, 30, 0.08);
  --shadow-card: 0 4px 24px rgba(11, 14, 30, 0.06);
  --radius: 14px;
  --radius-sm: 10px;
  --max: 1140px;

  --focus: 2px solid var(--accent);
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --font-brand: "Hagia Signature", "Segoe Script", "Brush Script MT", cursive;

  --hero-overlay: linear-gradient(105deg, rgba(11, 14, 30, 0.55) 0%, rgba(11, 14, 30, 0.4) 45%, rgba(11, 14, 30, 0.65) 100%);
  --header-scrolled-bg: rgba(255, 255, 255, 0.96);
  --theme-toggle-bg: rgba(11, 14, 30, 0.06);
  --theme-toggle-border: var(--line);

  --font-display: var(--font);
  --font-body: var(--font);
  --panel: #12141b;
}

/* Dark theme (default for first visit) */
[data-theme="dark"]{
  color-scheme: dark;
  --navy: #0B0E1E;
  --accent: #9ccc65;
  --accent-hover: #aed581;
  --bg: #0d1117;
  --bg-muted: #161b22;
  --text: #e8ecf1;
  --muted: #94a3b8;
  --heading: #f1f5f9;
  --line: rgba(255, 255, 255, 0.1);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35);

  --hero-overlay: linear-gradient(105deg, rgba(0, 0, 0, 0.55) 0%, rgba(13, 17, 23, 0.45) 50%, rgba(0, 0, 0, 0.65) 100%);
  --header-scrolled-bg: rgba(13, 17, 23, 0.96);
  --theme-toggle-bg: rgba(255, 255, 255, 0.08);
  --theme-toggle-border: rgba(255, 255, 255, 0.15);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

img{
  max-width: 100%;
  display: block;
  border-radius: var(--radius-sm);
}
a{
  color: inherit;
  text-underline-offset: 3px;
}
a:hover{ color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible{
  outline: var(--focus);
  outline-offset: 2px;
}

.container{
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}

.skip-link{
  position: absolute;
  left: -999px;
  top: 0;
  padding: .75rem 1rem;
  background: var(--bg);
  color: var(--text);
  border-radius: 10px;
  z-index: 9999;
}
.skip-link:focus{ left: 1rem; top: 1rem; }

.sr-only{
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* ---------- Header (inner pages) ---------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,.8);
}
[data-theme="dark"] .site-header{
  box-shadow: 0 1px 0 rgba(0,0,0,.5);
}
.site-header--hero{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom: none;
  box-shadow: none;
  transition: background .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.site-header--hero.site-header--scrolled{
  background: var(--header-scrolled-bg);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.site-header--hero.site-header--scrolled .brand--hero,
.site-header--hero.site-header--scrolled .site-nav--hero a:not(.nav-cta--hero){
  color: var(--text);
}
.site-header--hero.site-header--scrolled .brand-mark--hero{
  background: rgba(11, 14, 30, 0.08);
  border-color: var(--line);
  color: var(--navy);
}
.site-header--hero.site-header--scrolled .nav-toggle--hero{
  border-color: var(--line);
  color: var(--text);
  background: var(--bg-muted);
}

.header-inner{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
}
.brand{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}
.brand-text{
  font-family: var(--font-brand);
  font-weight: 400;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}
.brand--hero{
  color: #fff;
}
.brand-mark{
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(11, 14, 30, 0.06);
  border: 1px solid var(--line);
  font-size: 1rem;
}
.brand-mark--hero{
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.25);
  color: #fff;
}

.site-nav{
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
}
.site-nav a{
  text-decoration: none;
  color: var(--muted);
  padding: .5rem .85rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: .95rem;
}
.site-nav a:hover{ color: var(--accent); }
.site-nav a[aria-current="page"]{
  color: var(--text);
  background: var(--bg-muted);
}
.site-nav--hero a{
  color: rgba(255,255,255,.85);
}
.site-nav--hero a:hover{
  color: #fff;
}
.site-nav--hero a[aria-current="page"]{
  color: #fff;
  background: rgba(255,255,255,.12);
}

.nav-cta{
  color: var(--navy) !important;
  background: var(--accent) !important;
  font-weight: 600 !important;
  border-radius: 999px;
}
.nav-cta:hover{
  background: var(--accent-hover) !important;
  color: var(--navy) !important;
}
.nav-cta--hero{
  color: var(--navy) !important;
  background: var(--accent) !important;
}

.nav-toggle{
  display: none;
  border: 1px solid var(--line);
  background: var(--bg-muted);
  color: var(--text);
  padding: .55rem .85rem;
  border-radius: 999px;
  font-weight: 500;
  cursor: pointer;
}
.nav-toggle--hero{
  border-color: rgba(255,255,255,.3);
  background: rgba(255,255,255,.12);
  color: #fff;
}

/* ---------- Home hero ---------- */
.hero-full{
  position: relative;
  min-height: min(92vh, 900px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 0 6rem;
  margin-bottom: 0;
}
.hero-full__bg{
  position: absolute;
  inset: 0;
  background:
    var(--hero-overlay),
    url("../img/ddavid.webp") center / cover no-repeat;
  z-index: 0;
}
[data-theme="dark"] .hero-full__bg{
  background:
    var(--hero-overlay),
    url("../img/2025-05-31-13-39-19-960x538.png") center / cover no-repeat;
}
.hero-full__inner{
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 46rem;
}
.hero-full__eyebrow{
  display: inline-block;
  letter-spacing: .2em;
  text-transform: uppercase;
  font-size: .72rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 1rem;
}
.hero-full__title{
  margin: 0 0 1rem;
  font-size: clamp(2.25rem, 5vw, 3.35rem);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  letter-spacing: -0.02em;
}
.hero-full__lead{
  margin: 0 0 1.75rem;
  font-size: 1.1rem;
  color: rgba(255,255,255,.85);
  line-height: 1.65;
}
.btn-accent{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .85rem 1.75rem;
  background: var(--accent);
  color: var(--navy) !important;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: background .2s ease;
}
.btn-accent:hover{
  background: var(--accent-hover);
  color: var(--navy) !important;
}
.btn-accent--outline{
  background: transparent;
  color: var(--accent) !important;
  border: 2px solid var(--accent);
}
.btn-accent--outline:hover{
  background: var(--accent);
  color: var(--navy) !important;
}

/* Overlapping info cards */
.overlap-wrap{
  position: relative;
  z-index: 2;
  margin-top: -4rem;
  margin-bottom: 0;
}
.info-cards{
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px){
  .info-cards{
    grid-template-columns: repeat(3, 1fr);
  }
}
.info-card{
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--line);
}
.info-card__icon{
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: rgba(139, 195, 74, 0.15);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
}
.info-card__title{
  margin: 0 0 .5rem;
  font-size: 1.15rem;
  font-weight: 700;
}
.info-card__text{
  margin: 0;
  font-size: .95rem;
  color: var(--muted);
  line-height: 1.55;
}

/* Sections */
.section-light{
  padding: 4rem 0;
  background: var(--bg);
}
.section-muted{
  padding: 4rem 0;
  background: var(--bg-muted);
}
.section-head-center{
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 2.5rem;
}
.section-head-center h2{
  margin: 0 0 .5rem;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--heading);
}
.section-head-center p{
  margin: 0;
  color: var(--muted);
}

/* Quote split */
.quote-split{
  display: grid;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 800px){
  .quote-split{
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}
.quote-split__quote{
  margin: 0;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--heading);
  padding-left: 1rem;
  border-left: 4px solid var(--accent);
}
.quote-split__body p{
  margin: 0 0 1rem;
  color: var(--muted);
}
.link-accent{
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.link-accent:hover{ text-decoration: underline; }

/* Series grid */
.series-grid{
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px){
  .series-grid{
    grid-template-columns: repeat(3, 1fr);
  }
}
.series-card{
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  transition: box-shadow .2s ease;
}
.series-card:hover{
  box-shadow: var(--shadow);
}
.series-card__media{
  display: block;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-muted);
}
.series-card__media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}
.series-card__tag{
  display: inline-block;
  margin: 1rem 1.25rem 0;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
}
.series-card__title{
  margin: .35rem 1.25rem .35rem;
  font-size: 1.1rem;
  font-weight: 700;
}
.series-card__title a{
  text-decoration: none;
  color: var(--text);
}
.series-card__title a:hover{ color: var(--accent); }
.series-card__meta{
  margin: 0 1.25rem 1.25rem;
  font-size: .9rem;
  color: var(--muted);
}

/* Alternating rows */
.split-row{
  display: grid;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 3rem;
}
.split-row:last-child{ margin-bottom: 0; }
@media (min-width: 800px){
  .split-row{
    grid-template-columns: 1.1fr 1fr;
    gap: 2.5rem;
  }
  .split-row--reverse .split-row__media{ order: 2; }
  .split-row--reverse .split-row__text{ order: 1; }
}
.split-row__media{
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-muted);
  box-shadow: var(--shadow-card);
}
.split-row__media img{
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: var(--radius);
}
.split-row__text h3{
  margin: 0 0 .75rem;
  font-size: 1.35rem;
}
.split-row__text p{
  margin: 0 0 1rem;
  color: var(--muted);
}

/* Journal */
.journal-grid{
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 600px){
  .journal-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px){
  .journal-grid{ grid-template-columns: repeat(4, 1fr); }
}
.journal-card{
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.journal-card__media{
  display: block;
  aspect-ratio: 16/11;
  background: var(--bg-muted);
}
.journal-card__media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}
.journal-card__tag{
  display: inline-block;
  margin: .85rem 1rem 0;
  font-size: .68rem;
  font-weight: 700;
  background: var(--navy);
  color: #fff;
  padding: .2rem .5rem;
  border-radius: 4px;
}
.journal-card__title{
  margin: .5rem 1rem .35rem;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.35;
}
.journal-card__title a{
  text-decoration: none;
  color: var(--text);
}
.journal-card__title a:hover{ color: var(--accent); }
.journal-card__meta{
  margin: 0 1rem 1rem;
  font-size: .82rem;
  color: var(--muted);
}

/* Mosaic */
.section-mosaic{
  background: var(--navy);
  padding: 3rem 0 0;
}
[data-theme="dark"] .section-mosaic{
  background: #07090d;
  border-top: 1px solid var(--line);
}
.section-mosaic__title{
  margin: 0 0 1.5rem;
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: #fff;
}
.mosaic-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  width: 100%;
}
@media (min-width: 600px){
  .mosaic-grid{ grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px){
  .mosaic-grid{ grid-template-columns: repeat(4, 1fr); }
}
.mosaic-grid img{
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0;
  opacity: .92;
  transition: opacity .2s ease;
}
.mosaic-grid img:hover{ opacity: 1; }
.mosaic-cta{
  text-align: center;
  padding: 2.5rem 0 3rem;
}
.mosaic-cta .btn-accent{
  min-width: 200px;
}

/* Footer wide */
.site-footer.site-footer--wide{
  background: var(--navy);
  color: rgba(255,255,255,.85);
  border-top: none;
  padding: 3rem 0 0;
}
.footer-grid{
  display: grid;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
@media (min-width: 720px){
  .footer-grid{
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}
.footer-heading{
  margin: 0 0 .75rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}
.footer-text{
  margin: 0;
  font-size: .92rem;
  line-height: 1.6;
  color: rgba(255,255,255,.7);
}
.footer-text a{
  color: var(--accent);
  text-decoration: none;
}
.footer-text a:hover{ text-decoration: underline; }

.site-footer .footer-social{
  margin-top: .75rem;
}
.site-footer .footer-social a{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  text-decoration: none;
  margin-right: .5rem;
}
.site-footer .footer-social a:hover{
  background: var(--accent);
  color: #fff;
}
.footer-bottom{
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0 1.75rem;
  font-size: .88rem;
  color: rgba(255,255,255,.55);
}
.footer-bottom .footer-links{
  display: flex;
  gap: 1rem;
}
.footer-bottom .footer-links a{
  color: rgba(255,255,255,.85);
  text-decoration: none;
}
.footer-bottom .footer-links a:hover{ color: var(--accent); }

/* ---------- Inner pages (gallery, about, contact) ---------- */
.page-inner main{
  padding-top: 0;
}
.section{
  padding: 3rem 0;
}
.section.alt{
  background: var(--bg-muted);
  border: none;
}
.section-head{
  margin-bottom: 1.5rem;
}
.section-head h1, .section-head h2{
  margin: 0 0 .35rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--heading);
}
.lead{
  color: var(--muted);
  max-width: 52ch;
}

.prose{
  max-width: 80ch;
}
.prose h2{
  margin-top: 1.75rem;
  margin-bottom: .5rem;
  font-family: var(--font);
  font-weight: 700;
  color: var(--heading);
}
.prose p{
  color: var(--muted);
}

.clean-list{
  margin: .6rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}
.clean-list li{ margin: .35rem 0; }

.callout{
  background: var(--bg);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
}
.callout h2, .callout h3{
  margin-top: 0;
  font-family: var(--font);
  font-weight: 700;
  color: var(--text);
}
.callout a{
  color: var(--accent);
  font-weight: 600;
}
.callout .clean-list a{
  color: var(--accent);
}
.contact-elsewhere{
  max-width: 34rem;
  margin: 0 auto;
}

/* Cards (inner) */
.cards{
  display: grid;
  gap: 1rem;
}
@media (min-width: 760px){
  .cards{ grid-template-columns: repeat(3, 1fr); }
}
.card{
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
}
.card h3{
  margin: 0 0 .4rem;
  font-family: var(--font);
  font-weight: 700;
  font-size: 1.1rem;
}
.card p{
  margin: 0 0 .75rem;
  color: var(--muted);
  font-size: .95rem;
}
.card-pad{ padding: 1.35rem; }
.text-link{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.text-link::after{
  content: "→";
}
.text-link:hover{ text-decoration: underline; }

.button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border-radius: 999px;
  padding: .75rem 1.15rem;
  border: 1px solid var(--line);
  background: var(--bg-muted);
  text-decoration: none;
  font-weight: 600;
  color: var(--text);
}
.button.primary{
  background: var(--accent);
  color: var(--navy);
  border-color: var(--accent);
}
.button.primary:hover{
  background: var(--accent-hover);
  color: var(--navy);
}

/* Gallery page */
.filters{
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin: 0 0 1.25rem;
}
.chip{
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  padding: .55rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 500;
  font-size: .9rem;
}
.chip:hover{ border-color: var(--accent); color: var(--accent); }
.chip[aria-pressed="true"]{
  background: rgba(139, 195, 74, 0.15);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.gallery-grid{
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
.gallery-masonry{
  display: block;
  column-count: 1;
  column-gap: 1rem;
}
@media (min-width: 560px){
  .gallery-masonry{ column-count: 2; }
}
@media (min-width: 900px){
  .gallery-masonry{ column-count: 3; }
}
.gallery-masonry .gallery-item{
  break-inside: avoid;
  margin-bottom: 1rem;
  border: none;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  padding: 0;
}
.gallery-item{
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  box-shadow: none;
  overflow: hidden;
}
.gallery-item button{
  all: unset;
  cursor: pointer;
  display: block;
  width: 100%;
}
.gallery-item button img{
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  display: block;
  object-fit: cover;
  border-radius: 0;
}
.gallery-masonry .gallery-item-title,
.gallery-masonry .gallery-item-meta{
  padding: 0 .65rem;
}
.gallery-masonry .gallery-item-title{
  margin-top: .5rem;
}
.gallery-masonry .gallery-item-meta{
  margin-bottom: .65rem;
}
.gallery-item-title{
  margin: .65rem 0 0;
  font-weight: 600;
  font-size: .95rem;
}
.gallery-item-meta{
  margin: .15rem 0 0;
  color: var(--muted);
  font-size: .82rem;
}
@media (min-width: 760px){
  .gallery-grid:not(.gallery-masonry){
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Lightbox */
.lightbox::backdrop{
  background: rgba(11, 14, 30, 0.85);
}
.lightbox{
  width: min(1000px, 92vw);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius);
  padding: 0;
  background: #12141b;
  box-shadow: 0 40px 90px rgba(0,0,0,.65);
  color: #e8eaf0;
}
.lightbox-inner{
  position: relative;
  display: grid;
  align-items: center;
  grid-template-columns: 48px 1fr 48px;
  gap: .75rem;
  padding: .9rem;
}
.lightbox-figure{ margin: 0; }
.lightbox-figure img{
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
}
.lightbox-caption{
  margin-top: .65rem;
  color: #b7bdcc;
}
.caption-title{
  font-family: var(--font);
  font-weight: 700;
  color: #fff;
}
.caption-meta{ font-size: .95rem; margin-top: .1rem; }
.caption-desc{ margin: .6rem 0 0; }

.icon-button{
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
#closeLightbox{
  position: absolute;
  top: 10px;
  right: 10px;
}
.nav-left{ justify-self: start; }
.nav-right{ justify-self: end; }

/* Footer compact (inner pages fallback) */
.site-footer:not(.site-footer--wide){
  background: var(--navy);
  color: rgba(255,255,255,.85);
  border-top: none;
  padding: 2rem 0;
}
.site-footer:not(.site-footer--wide) .footer-inner{
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: flex-start;
  justify-content: space-between;
}
.site-footer:not(.site-footer--wide) .footer-links a{
  color: rgba(255,255,255,.85);
  text-decoration: none;
}
.site-footer:not(.site-footer--wide) .footer-links a:hover{ color: var(--accent); }
.site-footer:not(.site-footer--wide) .footer-social a{
  color: rgba(255,255,255,.85);
}
.site-footer:not(.site-footer--wide) p{
  color: rgba(255,255,255,.85);
  margin: 0;
}

/* Mobile nav */
@media (max-width: 760px){
  .nav-toggle{ display: inline-flex; }
  .site-nav:not(.site-nav--hero){
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .65rem;
    min-width: 220px;
    box-shadow: var(--shadow);
  }
  .site-nav.site-nav--hero{
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    display: none;
    flex-direction: column;
    background: rgba(11, 14, 30, 0.97);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius);
    padding: .65rem;
    min-width: 220px;
    box-shadow: var(--shadow);
  }
  .site-nav.is-open{ display: flex; }
  .site-nav--hero a{ color: rgba(255,255,255,.9) !important; }
  .page-home .site-header--hero.site-header--scrolled .site-nav--hero{
    background: var(--bg);
    border-color: var(--line);
  }
  .page-home .site-header--hero.site-header--scrolled .site-nav--hero a{
    color: var(--text) !important;
  }
}

/* Home: offset for fixed header */
.page-home main{
  padding-top: 0;
}

.lead code, .section-head code, .info-card code{
  font-size: .88em;
  background: var(--bg-muted);
  padding: .15rem .4rem;
  border-radius: 6px;
  color: var(--heading);
}

/* Eyebrow legacy */
.eyebrow{
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .82rem;
  margin: 0 0 .8rem;
}

/* ---------- Theme toggle ---------- */
.header-spacer{
  flex: 1;
  min-width: .5rem;
}
@media (max-width: 760px){
  .header-spacer{ display: none; }
}

.theme-toggle{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--theme-toggle-border);
  border-radius: 10px;
  background: var(--theme-toggle-bg);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.theme-toggle:hover{
  border-color: var(--accent);
}
.theme-toggle svg{
  width: 20px;
  height: 20px;
}
.theme-toggle .icon-sun{ display: none; }
.theme-toggle .icon-moon{ display: block; }
[data-theme="dark"] .theme-toggle .icon-sun{ display: block; }
[data-theme="dark"] .theme-toggle .icon-moon{ display: none; }

.site-header--hero .theme-toggle{
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.site-header--hero.site-header--scrolled .theme-toggle{
  border-color: var(--theme-toggle-border);
  background: var(--theme-toggle-bg);
  color: var(--text);
}

[data-theme="dark"] .journal-card__tag{
  background: #1e293b;
  color: #e8ecf1;
}

/* Home mosaic preview tiles (populated by home.js) */
.mosaic-grid--home{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  width: 100%;
  padding: 0;
  margin: 0;
}
@media (min-width: 600px){
  .mosaic-grid--home{ grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px){
  .mosaic-grid--home{ grid-template-columns: repeat(4, 1fr); }
}
.mosaic-grid--home .masonry-card{
  aspect-ratio: 1;
  margin: 0;
  border-radius: 0;
}
.mosaic-grid--home .masonry-card img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.masonry-card{
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--bg-muted);
  text-decoration: none;
  color: inherit;
}
.masonry-card img{
  display: block;
  border-radius: 0;
}
.masonry-card__cap{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.25rem .65rem .55rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}
.masonry-card:hover .masonry-card__cap{
  opacity: 1;
}
.masonry-card__title{
  font-size: .8rem;
  font-weight: 600;
  color: #fff;
}

.footer-muted-link{
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  font-size: .85rem;
}
.footer-muted-link:hover{
  color: var(--accent);
}
