/* True to Things — ported from mateocafe.com look & feel */

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

:root {
  --color-ink: #121212;
  --color-paper: #f7f5f0;
  --color-muted: #6b6b6b;
  --color-rule: #e0e0e0;
  --color-accent: #c41e3a;
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --content-width: 750px;
  --wide-width: 1000px;
  --max-width: 1200px;
  /* Reading measure ~66 cpl. In rem so the header and body align regardless
     of each block's own font-size. */
  --measure: 40rem;
  /* Lede width: title + hero share this, then the body steps in to --measure.
     Two widths, one step — no narrow/wide/narrow oscillation. */
  --lede: 48rem;
}

body {
  margin: 0;
  padding: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  /* Kerning + standard ligatures: familiar word-shapes read more fluently. */
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "calt";
}

/* Site header */
.site-header {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
  border-bottom: 1px solid var(--color-rule);
}

.site-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-title a:hover {
  color: var(--color-accent);
}

.tagline {
  font-family: var(--font-body);
  font-size: 1rem;
  font-style: italic;
  color: var(--color-muted);
  margin-top: 0.5rem;
}

/* Section nav (stubbed) — thin ruled bar with centered section links */
.site-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--color-rule);
}

.nav-sections {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-sections a {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-ink);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-sections a:hover {
  color: var(--color-accent);
}

.nav-subscribe {
  position: absolute;
  right: 1.5rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
  color: var(--color-paper);
  background: var(--color-accent);
  padding: 0.4rem 0.9rem;
  transition: opacity 0.2s ease;
}

.nav-subscribe:hover {
  opacity: 0.85;
}

@media (max-width: 720px) {
  .nav-subscribe {
    display: none;
  }
}

/* Home / index */
.home {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Featured lead — big image + headline, side by side on wide screens */
.featured {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--color-rule);
}

@media (min-width: 900px) {
  .featured {
    grid-template-columns: 3fr 2fr;
    gap: 3.5rem;
  }
}

.featured-image {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--color-rule);
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(15%) contrast(1.05);
  transition: filter 0.4s ease;
}

.featured:hover .featured-image img {
  filter: grayscale(0%) contrast(1);
}

.featured-kicker {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-accent);
  margin: 0 0 1rem;
}

.featured-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  text-wrap: balance;
}

.featured-title a {
  color: inherit;
  text-decoration: none;
}

.featured-title a:hover {
  color: var(--color-accent);
}

.featured-blurb {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--color-muted);
  margin: 0 0 1.25rem;
}

.featured-meta {
  font-size: 0.8125rem;
  font-style: italic;
  color: var(--color-muted);
}

/* Rubric above the grid */
.section-label {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-ink);
  margin: 0 0 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-ink);
}

.gallery {
  padding: 3rem 0 4rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.post-card {
  display: flex;
  flex-direction: column;
}

.post-card-image {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  margin-bottom: 1rem;
  background: var(--color-rule);
  display: block;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(20%) contrast(1.05);
  transition: filter 0.3s ease;
}

.post-card:hover .post-card-image img {
  filter: grayscale(0%) contrast(1);
}

.post-card-kicker {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-accent);
  margin: 0 0 0.5rem;
}

.post-card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.3;
  margin: 0 0 0.75rem;
}

.post-card-title a {
  color: inherit;
  text-decoration: none;
}

.post-card-title a:hover {
  color: var(--color-accent);
}

.post-card-blurb {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-muted);
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  font-size: 0.8125rem;
  font-style: italic;
  color: var(--color-muted);
  margin-top: auto;
}

.meta-separator {
  margin: 0 0.4rem;
}

/* Topic tags — small, quiet chips under the meta line */
.topics {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0 0;
  padding: 0;
}

.topics li {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  border: 1px solid var(--color-rule);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}

.empty-state {
  text-align: center;
  padding: 6rem 2rem;
  color: var(--color-muted);
  font-style: italic;
}

/* Article */
article {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Post page: a wide column that holds the hero; header + body sit centered at
   the reading measure, the hero breaks out a notch wider. */
.post {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.post > .article-header {
  max-width: var(--lede);
  margin-left: auto;
  margin-right: auto;
}

.hero {
  max-width: var(--lede);
  margin: 0 auto 2.75rem;
}

.hero img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
}

.hero-caption {
  font-size: 0.8125rem;
  color: var(--color-muted);
  font-style: italic;
  text-align: right;
  margin-top: 0.5rem;
}

.article-header {
  text-align: left;
  padding: 2.5rem 0 0;
  margin-bottom: 2rem;
}

.article-kicker {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-accent);
  margin: 0 0 1rem;
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  text-wrap: balance;
}

.article-meta {
  font-size: 0.9375rem;
  color: var(--color-muted);
}

.article-byline {
  font-style: normal;
}

.article-date {
  font-style: italic;
}

.article-separator {
  margin: 0 0.5rem;
}

.article-reading-time {
  font-style: italic;
}

/* Content */
.content {
  font-size: 1.1875rem;
  line-height: 1.8;
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
  hanging-punctuation: first allow-end last;
}

.content p {
  margin: 0 0 1.5rem;
  /* Even out the ragged edge and pull up orphaned last-line words. */
  text-wrap: pretty;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.content h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 3rem 0 1.25rem;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.content h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 2.5rem 0 1rem;
  text-wrap: balance;
}

.content a {
  color: var(--color-ink);
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.2s ease;
}

.content a:hover {
  color: var(--color-accent);
}

.content blockquote {
  margin: 2rem 0;
  padding: 0 0 0 1.5rem;
  border-left: 3px solid var(--color-accent);
  font-style: italic;
  color: var(--color-muted);
}

.content blockquote p {
  margin-bottom: 0;
}

.content ul,
.content ol {
  margin: 0 0 1.5rem;
  padding-left: 1.5rem;
}

.content li {
  margin-bottom: 0.5rem;
  text-wrap: pretty;
}

.content em {
  font-style: italic;
}

.content strong {
  font-weight: 600;
}

.content code {
  font-family: "SF Mono", Monaco, "Cascadia Code", monospace;
  font-size: 0.875em;
  background: rgba(0, 0, 0, 0.05);
  padding: 0.2em 0.4em;
  border-radius: 3px;
}

.content pre {
  background: #1a1a1a;
  color: #e0e0e0;
  padding: 1.5rem;
  border-radius: 4px;
  overflow-x: auto;
  margin: 2rem 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.content pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

.content hr {
  border: none;
  text-align: center;
  margin: 3rem 0;
}

.content hr::before {
  content: "***";
  letter-spacing: 1em;
  color: var(--color-muted);
  font-family: var(--font-display);
}

.content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2rem auto;
}

/* First paragraph drop cap */
.content > p:first-of-type::first-letter {
  font-family: var(--font-display);
  float: left;
  font-size: 4rem;
  line-height: 0.8;
  padding-right: 0.5rem;
  padding-top: 0.1rem;
  font-weight: 500;
  color: var(--color-ink);
}

/* End-of-post author note — the photo earns its place here, after the read */
.author-note {
  max-width: var(--measure);
  margin: 3.5rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--color-rule);
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.author-avatar {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-ink);
  color: var(--color-paper);
  display: flex;
  align-items: center;
  justify-content: center;
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.author-monogram {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.author-note-name {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-ink);
  margin: 0 0 0.5rem;
}

.author-note-bio {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-muted);
  margin: 0 0 0.6rem;
}

.author-note-link {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  text-decoration: none;
}

.author-note-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Post footer / back link */
.post-footer {
  max-width: var(--measure);
  margin: 2.5rem auto 0;
  padding: 0 1.5rem 2rem;
  text-align: center;
}

.back-link {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--color-accent);
}

.back-link::before {
  content: "\2190";
  margin-right: 0.5rem;
}

/* Site footer */
.site-footer {
  border-top: 1px solid var(--color-rule);
  margin-top: 4rem;
  background: #ece9e1;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 700px) {
  .footer-inner {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 3rem;
  }
}

.footer-wordmark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
}

.footer-wordmark a {
  color: inherit;
  text-decoration: none;
}

.footer-wordmark a:hover {
  color: var(--color-accent);
}

.footer-mission {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-muted);
  margin: 0;
  max-width: 34ch;
}

.footer-subscribe {
  flex: 0 0 auto;
}

/* Newsletter signup (stub) */
.footer-subscribe-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-ink);
  margin-bottom: 0.6rem;
}

.footer-subscribe-row {
  display: flex;
  max-width: 22rem;
}

.footer-subscribe input {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--color-rule);
  background: var(--color-paper);
  color: var(--color-ink);
}

.footer-subscribe input:focus {
  outline: none;
  border-color: var(--color-ink);
}

.footer-subscribe button {
  flex: 0 0 auto;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-paper);
  background: var(--color-ink);
  border: 1px solid var(--color-ink);
  padding: 0 1.1rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.footer-subscribe button:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

/* Footer bottom bar */
.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem;
  border-top: 1px solid var(--color-rule);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-copyright {
  font-size: 0.8125rem;
  font-style: italic;
  color: var(--color-muted);
  margin: 0;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-legal a {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-legal a:hover {
  color: var(--color-accent);
}
