/* =========================================================
   Blog stylesheet
   -----------------------------------------------------------
   Token system — change the look of the whole site by editing
   the values below. Nothing else in this file should need to
   change for a color or type tweak.
   ========================================================= */

:root {
  --paper:      #FBFAF7;
  --ink:        #201F1C;
  --ink-soft:   #5B584F;
  --accent:     #33473C;   /* deep pine — used sparingly: links, drop cap, rule */
  --hairline:   #E6E2D6;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Newsreader", Georgia, "Times New Roman", serif;
  --font-meta:    ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;

  --measure: 680px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 2px; }

/* ---------- Layout shell ---------- */

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 24px;
}

header.site-header {
  border-bottom: 1px solid var(--hairline);
  padding: 56px 0 28px;
  margin-bottom: 48px;
}

header.site-header .wrap { display: flex; flex-direction: column; gap: 6px; }

.site-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.site-title:hover { text-decoration: none; }

.site-tagline {
  font-family: var(--font-meta);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

footer.site-footer {
  border-top: 1px solid var(--hairline);
  margin-top: 72px;
  padding: 32px 0 72px;
  font-family: var(--font-meta);
  font-size: 12.5px;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

/* ---------- Index / post list ---------- */

.post-list { list-style: none; margin: 0; padding: 0; }

.post-entry {
  padding: 32px 0;
  border-bottom: 1px solid var(--hairline);
}
.post-entry:first-child { padding-top: 0; }

.post-entry .meta {
  font-family: var(--font-meta);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
  display: block;
}

.post-entry h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 27px;
  line-height: 1.25;
  margin: 0 0 10px;
}
.post-entry h2 a { color: var(--ink); text-decoration: none; }
.post-entry h2 a:hover { color: var(--accent); }

.post-entry .excerpt {
  color: var(--ink-soft);
  font-size: 17px;
  margin: 0;
}

.empty-note {
  color: var(--ink-soft);
  font-family: var(--font-meta);
  font-size: 14px;
  padding: 40px 0;
}

/* ---------- Single post ---------- */

.post-meta {
  font-family: var(--font-meta);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.post-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 40px;
}

.post-body p { margin: 0 0 26px; }

/* Signature element: a quiet drop cap opens each post */
.post-body p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 3.4em;
  line-height: 0.85;
  float: left;
  padding: 4px 8px 0 0;
  color: var(--accent);
}

.post-body h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  margin: 44px 0 18px;
}

.post-body blockquote {
  margin: 32px 0;
  padding-left: 20px;
  border-left: 2px solid var(--accent);
  color: var(--ink-soft);
  font-style: italic;
}

.post-body img {
  width: 100%;
  height: auto;
  border-radius: 3px;
  margin: 36px 0 10px;
  display: block;
}

.post-body figcaption,
.post-body em.caption {
  display: block;
  font-family: var(--font-meta);
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: 0 0 30px;
}

.post-body ul, .post-body ol { margin: 0 0 26px; padding-left: 22px; }
.post-body li { margin-bottom: 8px; }

.back-link {
  display: inline-block;
  margin-top: 56px;
  font-family: var(--font-meta);
  font-size: 13px;
  letter-spacing: 0.03em;
}

/* ---------- Mobile ---------- */

@media (max-width: 600px) {
  body { font-size: 17px; }
  .site-title { font-size: 24px; }
  .post-title { font-size: 30px; }
  .post-entry h2 { font-size: 23px; }
  header.site-header { padding: 40px 0 22px; }
}

/* ---------- Reduced motion / focus ---------- */

a:focus-visible, .site-title:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

/* =========================================================
   Photography gallery additions
   -----------------------------------------------------------
   Reuses the tokens above (--paper, --ink, --accent, fonts).
   Nothing here should need a second palette — a photo grid
   earns its distinctiveness from the photos, not new colors.
   ========================================================= */

/* ---------- Homepage: category cards ---------- */

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.category-card {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 3px;
  text-decoration: none;
  background: var(--ink);
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.category-card:hover img { transform: scale(1.04); }

.category-card-label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 20px 18px 16px;
  background: linear-gradient(to top, rgba(32,31,28,0.75), rgba(32,31,28,0));
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.category-card-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  color: var(--paper);
}

.category-card-count {
  font-family: var(--font-meta);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--paper);
  opacity: 0.85;
}

/* ---------- Category page: photo grid ---------- */

.category-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 36px;
  margin: 0 0 12px;
}

.category-page .back-link,
.category-title + .back-link {
  margin-top: 0;
  margin-bottom: 32px;
  display: inline-block;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 6px;
}

.photo-tile {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: zoom-in;
}

.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.photo-tile:hover img {
  transform: scale(1.03);
}

/* ---------- Single photo page ---------- */

.photo-full {
  width: 100%;
  height: auto;
  border-radius: 3px;
  margin-bottom: 28px;
  display: block;
}

.photo-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 30px;
  margin: 0 0 8px;
}

.photo-caption {
  color: var(--ink-soft);
  font-size: 17px;
  margin: 0 0 20px;
}

.photo-story p { margin: 0 0 24px; }

/* ---------- Lightbox ---------- */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(32, 31, 28, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.lightbox-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-figure {
  margin: 0;
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.lightbox-img {
  max-width: 92vw;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.lightbox-caption {
  font-family: var(--font-meta);
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--paper);
  opacity: 0.9;
  text-align: center;
  max-width: 70ch;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--paper);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.15s ease;
  padding: 12px;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; }

.lightbox-close { top: 18px; right: 18px; font-size: 34px; }
.lightbox-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* ---------- Mobile ---------- */

@media (max-width: 600px) {
  .category-title { font-size: 28px; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 4px; }
  .lightbox-prev, .lightbox-next { font-size: 22px; padding: 8px; }
  .lightbox-close { font-size: 28px; }
}
