:root {
  --ink: #1a1a1a;
  --ink-soft: #3a3530;
  --paper: #f7f4ef;
  --paper-warm: #efe9df;
  --muted: #8a8070;
  --rule: #d8d2c8;
  --accent: #5a7a6a;
  --accent-soft: #e8f0ec;
  --shadow: 0 2px 12px rgba(90, 122, 106, 0.10);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.15s; }
a:hover { border-bottom-color: var(--accent); }

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

/* ── Site frame ── */
.site {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Header / nav ── */
.site-header {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1rem;
}
.brand {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: normal;
  letter-spacing: -0.02em;
  color: var(--ink);
  border: none;
}
.brand:hover { border: none; color: var(--ink); }
.brand-sub {
  font-style: italic;
  color: var(--muted);
  font-size: 0.95rem;
  margin-left: 0.6rem;
}

.site-nav {
  display: flex;
  gap: 1.75rem;
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.site-nav a {
  color: var(--muted);
  border-bottom: none;
  padding-bottom: 2px;
}
.site-nav a:hover,
.site-nav a.active {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}

/* ── Main ── */
main {
  padding: 2.5rem 0 4rem;
}

.page-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: normal;
  letter-spacing: -0.015em;
  margin-bottom: 0.5rem;
}
.page-lead {
  color: var(--muted);
  font-style: italic;
  max-width: 42rem;
  margin-bottom: 2rem;
}

/* ── Section headings ── */
.section-label {
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  text-transform: uppercase;
  margin: 2rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
}

/* ── Gallery grid ── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}
.card {
  background: white;
  border: 1px solid var(--rule);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.2s, transform 0.2s;
}
.card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.card-meta {
  padding: 0.55rem 0.7rem 0.65rem;
}
.card-date {
  font-family: 'Courier New', monospace;
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.card-caption {
  margin-top: 0.3rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--muted);
  font-style: italic;
}
.empty-state code {
  font-family: 'Courier New', monospace;
  background: var(--paper-warm);
  padding: 0.15rem 0.4rem;
  border-radius: 2px;
  font-style: normal;
  font-size: 0.9em;
}

/* ── Lightbox ── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 12, 8, 0.94);
  z-index: 999;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
}
#lightbox.open { display: flex; }
#lightbox img {
  max-width: min(92vw, 1000px);
  max-height: 85vh;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
#lb-close {
  position: fixed;
  top: 1rem;
  right: 1.5rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  padding: 0.3rem 0.6rem;
}
#lb-close:hover { color: white; }
#lb-info {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: rgba(255, 255, 255, 0.75);
  max-width: 90vw;
}
#lb-date {
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.5);
}
#lb-caption {
  font-family: Georgia, serif;
  font-size: 0.95rem;
  font-style: italic;
  margin-top: 0.35rem;
  line-height: 1.5;
}

/* ── Journal ── */
.journal-entry {
  padding: 2rem 0;
  border-bottom: 1px solid var(--rule);
  max-width: 46rem;
}
.journal-entry:last-child { border-bottom: none; }
.journal-date {
  font-family: 'Courier New', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.journal-title {
  font-size: 1.6rem;
  font-weight: normal;
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
}
.journal-body {
  font-size: 1.02rem;
  color: var(--ink-soft);
  line-height: 1.7;
}
.journal-body p { margin-bottom: 1em; }
.journal-body p:last-child { margin-bottom: 0; }
.journal-body em { color: var(--ink); }
.journal-body strong { color: var(--ink); }
.journal-body blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
  margin: 1em 0;
  color: var(--muted);
  font-style: italic;
}
.journal-body img {
  margin: 1.5em 0;
  border: 1px solid var(--rule);
}

/* ── About ── */
.about {
  max-width: 42rem;
  font-size: 1.05rem;
  color: var(--ink-soft);
  line-height: 1.75;
}
.about p { margin-bottom: 1.2em; }
.about h2 {
  font-size: 1.2rem;
  font-weight: normal;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
  margin: 2rem 0 0.8rem;
}
.contact-list {
  list-style: none;
  padding: 0;
}
.contact-list li {
  padding: 0.4rem 0;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
}
.contact-list .label {
  color: var(--muted);
  display: inline-block;
  min-width: 5.5rem;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 0;
  color: var(--muted);
  font-family: 'Courier New', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

/* ── Mobile ── */
@media (max-width: 640px) {
  .site { padding: 0 1.25rem; }
  .site-header { padding: 1.75rem 0 1.25rem; }
  main { padding: 1.75rem 0 3rem; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.85rem; }
  .site-nav { gap: 1.1rem; font-size: 0.72rem; }
}
