/* ============================================
   Blog Stylesheet — Editorial Design
   ============================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #FAF8F3;
  --bg-alt: #F2EEE5;
  --text: #1A1A1A;
  --text-soft: #4A4A4A;
  --text-muted: #807A72;
  --accent: #B8541F;
  --accent-soft: #D97744;
  --border: #E5DFD3;
  --border-strong: #C9C0AE;
  --shadow-sm: 0 1px 2px rgba(26, 26, 26, 0.04);
  --shadow-md: 0 4px 16px rgba(26, 26, 26, 0.06);
  --shadow-lg: 0 12px 32px rgba(26, 26, 26, 0.08);

  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-width: 1240px;
  --content-width: 720px;
}

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

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header / Navigation ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(250, 248, 243, 0.92);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.site-logo span {
  color: var(--accent);
  font-style: italic;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
  align-items: center;
}

.main-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-soft);
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 24px;
  color: var(--text);
}

/* ---------- Hero / Intro ---------- */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 880px;
  margin: 0 auto 24px;
}

.hero-title em {
  font-style: italic;
  color: var(--accent);
}

.hero-subtitle {
  font-size: 19px;
  color: var(--text-soft);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ---------- Section Headers ---------- */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 56px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.section-meta {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- Post Grid ---------- */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 48px 32px;
  padding-bottom: 80px;
}

.post-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.post-card a {
  display: block;
}

.post-card:hover {
  transform: translateY(-4px);
}

.post-card-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-alt);
  margin-bottom: 20px;
  border-radius: 2px;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

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

.post-card-category {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--bg);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 2px;
}

.post-card-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  color: var(--text);
  transition: color 0.2s ease;
}

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

.post-card-excerpt {
  font-size: 15px;
  color: var(--text-soft);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-card-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}

/* ---------- Featured Post (first card spans wider) ---------- */
.post-card.featured {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.post-card.featured .post-card-image {
  margin-bottom: 0;
  aspect-ratio: 4 / 3;
}

.post-card.featured .post-card-title {
  font-size: 38px;
  margin-bottom: 16px;
}

.post-card.featured .post-card-excerpt {
  font-size: 17px;
  -webkit-line-clamp: 3;
}

/* ---------- Article Page ---------- */
.article {
  padding: 56px 0 80px;
}

.article-header {
  text-align: center;
  margin-bottom: 48px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.article-category {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.article-subtitle {
  font-size: 20px;
  color: var(--text-soft);
  line-height: 1.5;
  margin-bottom: 32px;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-muted);
}

.article-meta .author {
  font-weight: 600;
  color: var(--text);
}

.article-hero-image {
  margin: 0 auto 48px;
  max-width: 1080px;
  padding: 0 24px;
}

.article-hero-image img {
  width: 100%;
  border-radius: 2px;
}

.article-hero-image figcaption {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 12px;
  font-style: italic;
}

.article-body {
  font-size: 18px;
  line-height: 1.75;
  color: var(--text-soft);
}

.article-body p {
  margin-bottom: 24px;
}

.article-body p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 500;
  float: left;
  line-height: 0.9;
  margin: 6px 10px 0 0;
  color: var(--accent);
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  line-height: 1.2;
  margin: 48px 0 20px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.article-body h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  margin: 36px 0 16px;
  color: var(--text);
}

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article-body a:hover {
  color: var(--accent-soft);
}

.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 8px 0 8px 28px;
  margin: 32px 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-style: italic;
  line-height: 1.4;
  color: var(--text);
}

.article-body ul,
.article-body ol {
  margin: 24px 0 24px 24px;
}

.article-body li {
  margin-bottom: 12px;
}

.article-body img {
  border-radius: 2px;
  margin: 32px 0;
}

.article-body code {
  background: var(--bg-alt);
  padding: 2px 8px;
  border-radius: 3px;
  font-family: 'SF Mono', Consolas, monospace;
  font-size: 0.92em;
  color: var(--accent);
}

.article-body pre {
  background: var(--text);
  color: var(--bg);
  padding: 24px;
  border-radius: 4px;
  overflow-x: auto;
  margin: 32px 0;
  font-size: 14px;
  line-height: 1.6;
}

.article-body pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

/* ---------- Article Footer / Share ---------- */
.article-footer {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.share-block {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.share-block-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.share-link {
  font-size: 14px;
  color: var(--text-soft);
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all 0.2s ease;
}

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

/* ---------- Static Pages (About, Contact, Privacy) ---------- */
.page {
  padding: 56px 0 80px;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  text-align: center;
}

.page-subtitle {
  font-size: 18px;
  color: var(--text-soft);
  text-align: center;
  margin-bottom: 56px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

.page-content {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-soft);
}

.page-content h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  margin: 40px 0 16px;
  color: var(--text);
}

.page-content p {
  margin-bottom: 20px;
}

.page-content ul {
  margin: 16px 0 24px 24px;
}

.page-content li {
  margin-bottom: 8px;
}

/* ---------- Contact Form ---------- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 32px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  font-family: var(--font-body);
  font-size: 16px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  color: var(--text);
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

.btn {
  display: inline-block;
  background: var(--text);
  color: var(--bg);
  padding: 14px 32px;
  border: none;
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn:hover {
  background: var(--accent);
  color: var(--bg);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 15px;
  color: var(--text-soft);
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  font-size: 15px;
  color: var(--text-soft);
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- Empty State / Loading ---------- */
.loading-state,
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
  font-size: 15px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .post-card.featured {
    grid-column: span 1;
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .post-card.featured .post-card-title {
    font-size: 28px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .container {
    padding: 0 20px;
  }

  .main-nav {
    display: none;
  }

  .main-nav.open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 20px;
  }

  .main-nav.open ul {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .hero {
    padding: 48px 0 40px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 40px 0 24px;
  }

  .posts-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .article-body {
    font-size: 17px;
  }

  .article-body blockquote {
    font-size: 20px;
    padding-left: 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

/* ---------- Print ---------- */
@media print {
  .site-header,
  .site-footer,
  .share-block {
    display: none;
  }
}
