/* Nomad Website – redesigned editorial style */
:root {
  --bg: #1a1816;
  --surface: #242220;
  --text: #e8e4df;
  --muted: #a39e96;
  --accent: #c4a484;
  --border: #3a3632;
  --shadow: 0 4px 20px rgba(0,0,0,0.35);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

/* Nav */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26,24,22,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
nav .brand {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
nav .links a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}
nav .links a:hover,
nav .links a.active { color: var(--accent); }

/* Heroes */
.hero {
  height: 75vh;
  min-height: 480px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  position: relative;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 55%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 2.5rem 2rem;
  max-width: 900px;
  color: #fff;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 500;
  margin: 0 0 0.4rem;
  line-height: 1.15;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

/* Main content */
main {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}
main.wide { max-width: 1100px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
h2 { font-size: 1.8rem; margin: 0 0 0.5rem; }
.post-date, .subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 1.5rem;
  letter-spacing: 0.02em;
}
main p { margin: 0 0 1.25rem; }

/* Musings list */
.post-list { display: flex; flex-direction: column; gap: 2rem; }
.post-card {
  background: var(--surface);
  padding: 1.75rem;
  border-radius: 6px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.post-card h2 { margin: 0 0 0.3rem; }
.post-card a { color: var(--text); text-decoration: none; }
.post-card a:hover { color: var(--accent); }
.post-card p { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.98rem; }

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.gallery figure {
  margin: 0;
  background: var(--surface);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.2s ease;
}
.gallery figure:hover { transform: translateY(-3px); }
.gallery img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}
.gallery figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  color: var(--muted);
  text-align: center;
}

/* Album nav */
.album-nav {
  text-align: center;
  margin-bottom: 2rem;
}
.album-nav a {
  color: var(--muted);
  text-decoration: none;
  margin: 0 0.75rem;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
}
.album-nav a:hover,
.album-nav a.active {
  color: var(--accent);
  background: rgba(196,164,132,0.15);
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

/* Responsive */
@media (max-width: 700px) {
  nav { flex-direction: column; gap: 0.5rem; }
  nav .links a { margin: 0 0.6rem; }
  .hero { height: 60vh; }
  main { padding: 2rem 1rem 3rem; }
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: 92vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.lightbox .caption {
  color: #eee;
  margin-top: 1rem;
  font-size: 0.95rem;
  text-align: center;
  max-width: 80vw;
}
.lightbox .close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  color: #fff;
  font-size: 2.2rem;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
}
.lightbox .nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: none;
  font-size: 2rem;
  width: 48px;
  height: 72px;
  cursor: pointer;
  border-radius: 4px;
}
.lightbox .prev { left: 1rem; }
.lightbox .next { right: 1rem; }
.lightbox .nav-btn:hover { background: rgba(255,255,255,0.28); }
.gallery img { cursor: pointer; }
