/* My 70th Year — light, minimal, Polaroid-first (see DESIGN_SYSTEM.md) */

:root {
  --text: #2C2C2C;
  --text-soft: #6B6B6B;
  --accent: #8B7355;
  --bg: #F7F6F4;
  --surface: #FFFFFF;
  --border: #E0E0E0;
  --overlay: rgba(20, 20, 20, 0.94);
  --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.12);
  --max-width: 1400px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { color: var(--accent); }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 246, 244, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.month-nav {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.month-nav::-webkit-scrollbar { display: none; }

.month-nav a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

.month-nav a:hover,
.month-nav a.active {
  color: var(--accent);
  background: rgba(139, 115, 85, 0.08);
}

/* ---------- intro ---------- */

.intro {
  max-width: 720px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 1rem;
  text-align: center;
}

.intro h1 {
  font-size: 2.5rem;
  font-weight: 300;
  line-height: 1.2;
  margin: 0 0 0.25rem;
}

.intro .tagline {
  color: var(--accent);
  font-size: 1.05rem;
  margin: 0 0 2rem;
}

.intro p {
  color: var(--text-soft);
  text-align: left;
  margin: 0 0 1rem;
}
.intro p:first-of-type { text-align: center; }

/* ---------- gallery ---------- */

.month {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.month h2 {
  font-size: 1.75rem;
  font-weight: 400;
  margin: 3rem 0 1.5rem;
  scroll-margin-top: 4.5rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem 1.5rem;
}

@media (max-width: 1023px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px)  { .grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; } }

.card {
  margin: 0;
  scroll-margin-top: 5rem;
}

.card-photo {
  display: block;
  box-shadow: var(--shadow-subtle);
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

.card-photo:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-medium);
}

.card-photo img {
  display: block;
  width: 100%;
  height: auto;
}

.card figcaption { margin-top: 0.6rem; }

.card-date {
  font-size: 0.8rem;
  color: var(--text-soft);
  margin: 0;
}

.card-caption {
  font-size: 0.9rem;
  margin: 0.15rem 0 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.card-caption a { pointer-events: none; color: inherit; text-decoration: none; }

/* ---------- footer ---------- */

.site-footer {
  max-width: var(--max-width);
  margin: 4rem auto 0;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-soft);
  font-size: 0.85rem;
}
.site-footer p { margin: 0.25rem 0; }

/* ---------- lightbox ---------- */

.lightbox[hidden] { display: none; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade-in 0.2s ease-out;
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lb-figure {
  margin: 0;
  max-width: min(92vw, 900px);
  text-align: center;
  animation: scale-in 0.2s ease-out;
}

@keyframes scale-in {
  from { transform: scale(0.97); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.lb-figure img {
  max-width: 100%;
  max-height: 72vh;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.lb-figure figcaption {
  max-width: 640px;
  margin: 1rem auto 0;
  color: #EDEAE6;
}

.lb-date {
  font-size: 0.85rem;
  color: #B9B3AC;
  margin: 0;
}

.lb-caption {
  font-size: 1rem;
  margin: 0.35rem 0 0;
  line-height: 1.55;
}

.lb-caption a { color: #D2BC9F; }

.lightbox button {
  position: absolute;
  background: none;
  border: none;
  color: #EDEAE6;
  cursor: pointer;
  font-size: 2.2rem;
  line-height: 1;
  padding: 0.75rem;
  opacity: 0.75;
  transition: opacity 0.2s;
}

.lightbox button:hover { opacity: 1; }
.lightbox button:focus-visible { outline: 2px solid var(--accent); border-radius: 4px; }

.lb-close { top: 0.75rem; right: 1rem; }
.lb-prev  { left: 0.5rem; top: 50%; transform: translateY(-50%); font-size: 3rem; }
.lb-next  { right: 0.5rem; top: 50%; transform: translateY(-50%); font-size: 3rem; }

@media (max-width: 767px) {
  .lb-prev { left: 0; }
  .lb-next { right: 0; }
  .lb-figure img { max-height: 62vh; }
}
