@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500&family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@400;500&display=swap');

:root {
  color-scheme: light;
  --ink: #2b2b2b;
  --muted: #8a8178;
  --line: rgba(45, 45, 45, 0.08);
  --border: rgba(45, 45, 45, 0.1);
  --paper: #faf7f0;
  --surface: #ffffff;
  --accent: #d97745;
  --accent-dark: #c86532;
  --display: 'Cormorant Garamond', Georgia, serif;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { font-size: 17px; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 247, 240, 0.9);
  backdrop-filter: blur(24px);
}

.site-header-inner {
  display: flex;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 24px;
  font-style: italic;
  font-weight: 500;
  line-height: 32px;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.brand-mark {
  display: flex;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 20px 25px -5px rgba(72, 58, 42, 0.13), 0 8px 10px -6px rgba(72, 58, 42, 0.13);
}
.brand-mark img { width: 100%; height: 100%; border-radius: inherit; object-fit: contain; }

main { min-height: calc(100vh - 190px); }

.index-intro,
.note-article,
.not-found {
  width: min(760px, calc(100% - 40px));
  margin-right: auto;
  margin-left: auto;
}
.post-list { width: min(900px, calc(100% - 40px)); margin-right: auto; margin-left: auto; }

.index-intro { padding: 96px 0 64px; }
.index-intro h1,
.article-header h1,
.not-found h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.035em;
}
.index-intro h1 { max-width: 680px; font-size: clamp(2.5rem, 7vw, 4.5rem); }
.index-intro > p:last-child { max-width: 590px; margin: 28px 0 0; color: var(--muted); font-size: 1.1rem; }

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.post-list { padding-bottom: 96px; }
.post-card { border-top: 1px solid var(--line); }
.post-card:last-child { border-bottom: 1px solid var(--line); }
.post-card-link {
  display: block;
  padding: 32px 0;
  text-decoration: none;
}
.post-card-link.has-cover { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 36px; }
.post-card-link:hover h2 { color: var(--accent); }
.post-card img { width: 220px; aspect-ratio: 4 / 3; border-radius: 8px; object-fit: cover; }
.post-card-copy time { color: var(--muted); font-size: 0.82rem; }
.post-card h2 { margin: 7px 0 9px; font-family: var(--serif); font-size: 1.7rem; line-height: 1.2; transition: color 160ms ease; }
.post-card p { margin: 0; color: var(--muted); }
.read-more { display: inline-block; margin-top: 16px; color: var(--accent-dark); font-size: 0.88rem; font-weight: 700; }
.empty-state { padding: 32px 0; border-top: 1px solid var(--line); color: var(--muted); }

.note-article { padding: 68px 0 104px; }
.article-header { margin-bottom: 44px; }
.back-link { display: inline-block; margin-bottom: 54px; color: var(--muted); font-size: 0.88rem; text-decoration: none; }
.back-link:hover { color: var(--accent); }
.article-byline { display: flex; min-width: 0; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--muted); font-size: 0.82rem; white-space: nowrap; }
.article-byline img { width: 28px; height: 28px; flex: 0 0 auto; border: 1px solid var(--border); border-radius: 999px; object-fit: cover; }
.article-byline span:first-of-type { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.article-header h1 { font-size: clamp(2.45rem, 7vw, 4.6rem); }
.article-description { max-width: 650px; margin: 24px 0 18px; color: var(--muted); font-size: 1.12rem; }
.article-cover { margin: 0 0 58px; }
.article-cover img { width: 100%; max-height: 620px; border-radius: 10px; object-fit: cover; }
figcaption { margin-top: 10px; color: var(--muted); font-size: 0.82rem; }

.editorial-body { width: min(680px, 100%); }
.editorial-body p { margin: 0 0 1.45em; }
.editorial-body h2,
.editorial-body h3 { font-family: var(--serif); line-height: 1.2; letter-spacing: -0.02em; }
.editorial-body h2 { margin: 2.1em 0 0.7em; font-size: 2rem; }
.editorial-body h3 { margin: 1.9em 0 0.65em; font-size: 1.45rem; }
.editorial-body figure { margin: 2.7rem 0; }
.editorial-body figure img { width: 100%; border-radius: 8px; }
.editorial-body blockquote { margin: 2.5rem 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--accent); font-family: var(--serif); font-size: 1.2rem; }
.editorial-body blockquote p { margin: 0; }
.editorial-body blockquote footer { margin-top: 12px; color: var(--muted); font-family: var(--sans); font-size: 0.82rem; }
.editorial-body hr { margin: 3.5rem 0; border: 0; border-top: 1px solid var(--line); }

.not-found { padding: 120px 0; text-align: center; }
.not-found h1 { font-size: clamp(2.2rem, 7vw, 4rem); }
.not-found > p:not(.eyebrow) { color: var(--muted); }
.button-link { display: inline-block; margin-top: 22px; padding: 11px 18px; border-radius: 7px; color: #fff; background: var(--accent); font-weight: 700; text-decoration: none; }
.button-link:hover { background: var(--accent-dark); }

.site-footer { padding: 40px 20px; border-top: 1px solid var(--line); background: var(--paper); }
.site-footer-inner {
  display: flex;
  width: min(1280px, 100%);
  margin: 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
.site-footer p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 24px; }
.site-footer a { text-decoration: none; transition: color 160ms ease; }
.site-footer a:hover { color: var(--accent); }

@media (max-width: 640px) {
  html { font-size: 16px; }
  .index-intro, .post-list, .note-article, .not-found { width: min(100% - 28px, 760px); }
  .index-intro { padding: 68px 0 48px; }
  .post-card-link.has-cover { grid-template-columns: 1fr; gap: 20px; }
  .post-card img { width: 100%; aspect-ratio: 16 / 9; }
  .note-article { padding-top: 44px; }
  .back-link { margin-bottom: 40px; }
}

@media (min-width: 768px) {
  .site-header,
  .site-footer { padding-right: 32px; padding-left: 32px; }
  .site-footer-inner { flex-direction: row; text-align: left; }
}

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