/*
  global.css — dark theme, matching the splash page aesthetic.
*/

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

/* --- Base typography --- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&display=swap');

:root {
  --font-body: 'Cormorant Garamond', Georgia, serif;
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-nav: system-ui, -apple-system, sans-serif;
  --color-text: #e8e6e0;
  --color-text-muted: rgba(255,255,255,0.45);
  --color-bg: #050508;
  --color-accent: #9bb8a8;
  --color-accent-hover: #c2d8cf;
  --color-border: rgba(255,255,255,0.1);
  --max-width: 44rem;
}

html {
  font-size: 18px;
  line-height: 1.7;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--color-text);
  background: var(--color-bg);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

h1 { font-size: 2.2rem; font-weight: 300; letter-spacing: 0.03em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

p { margin-bottom: 1rem; }

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover { color: var(--color-accent-hover); }

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

/* --- Nav --- */
.site-nav {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: clamp(1.5rem, 3vw, 3rem);
  padding: 1rem 0 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.nav-home {
  font-family: var(--font-nav);
  font-size: clamp(0.7rem, 1vw, 0.85rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
}

.nav-home:hover { color: rgba(255,255,255,0.9); }

.nav-links {
  display: contents;
  font-family: var(--font-nav);
  font-size: clamp(0.7rem, 1vw, 0.85rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-links a { color: var(--color-text-muted); white-space: nowrap; }
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: #fff; border-bottom: 1px solid rgba(255,255,255,0.5); padding-bottom: 2px; }

/* Hamburger button — hidden on desktop */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  width: 28px;
  height: 20px;
  position: relative;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.6);
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
  position: absolute;
  left: 0;
}

.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 9px; }
.nav-toggle span:nth-child(3) { top: 18px; }

.nav-toggle.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

@media (max-width: 900px) {
  .site-nav { justify-content: space-between; }
  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5,5,8,0.95);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    font-size: 1.1rem;
    z-index: 100;
  }

  .nav-links.open { display: flex; }
}

/* --- Page intro --- */
.page-intro {
  font-style: italic;
  color: var(--color-text-muted);
  font-size: 1.15rem;
  margin-bottom: 2.5rem;
}

main {
  max-width: 100%;
}

main > * {
  margin-left: auto;
  margin-right: auto;
}

/* --- Footer --- */
.site-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* --- Archive grid --- */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.archive-card {
  text-decoration: none;
  color: inherit;
}

.archive-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 4px;
}

.archive-card h3 {
  font-size: 1rem;
  margin-top: 0.5rem;
  color: var(--color-text);
}

.archive-card time {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}
