/* =============================================
   VARIABLES & RESET
   ============================================= */
:root {
  --color-bg: #f8f6f2;
  --color-surface: #ffffff;
  --color-border: #e2ddd7;
  --color-text: #1c1a18;
  --color-text-secondary: #5c5751;
  --color-text-muted: #9a948e;
  --color-accent: #1a3d1c;
  --color-accent-warm: #c8622a;
  --color-link: #1a3d1c;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Lora', Georgia, serif;
  --font-ui: 'DM Sans', sans-serif;

  --container-width: 740px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3rem;
  --space-xl: 5rem;

  --radius: 3px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); margin-top: var(--space-lg); margin-bottom: var(--space-sm); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.35rem); margin-top: var(--space-md); margin-bottom: 0.75rem; }
h4 { font-size: 1.05rem; margin-top: var(--space-md); margin-bottom: 0.5rem; }

p { margin-bottom: 1.25rem; }

a {
  color: var(--color-link);
  text-decoration: underline;
  text-decoration-color: rgba(26,61,28,0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}
a:hover {
  color: var(--color-accent-warm);
  text-decoration-color: var(--color-accent-warm);
}

strong, b { font-weight: 700; }
em, i { font-style: italic; }
hr { border: none; border-top: 1px solid var(--color-border); margin: var(--space-lg) 0; }

/* =============================================
   LAYOUT CONTAINER
   ============================================= */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* =============================================
   HEADER
   ============================================= */
header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow 0.3s ease;
}

header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--color-text);
}

.logo-mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text);
  line-height: 1;
}

.logo:hover .logo-text {
  color: var(--color-accent);
}

/* Navigation */
nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

nav a {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}

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

/* =============================================
   MAIN
   ============================================= */
main {
  padding: var(--space-lg) 0 var(--space-xl);
}

/* =============================================
   H1
   ============================================= */
.page-title {
  padding: var(--space-md) 0 var(--space-sm);
}

.page-title h1 {
  color: var(--color-text);
  margin-bottom: 0;
}

/* =============================================
   INTRO
   ============================================= */
section.intro {
  padding: var(--space-sm) 0 var(--space-md);
  border-bottom: 1px solid var(--color-border-light, var(--color-border));
  margin-bottom: var(--space-md);
}

section.intro p {
  font-size: 1.0625rem;
  color: var(--color-text-secondary);
  line-height: 1.75;
  margin-bottom: 0;
}

/* =============================================
   AUTHOR BOX
   ============================================= */
section.author-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.author-photo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--color-border);
}

.author-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.author-name {
  font-family: var(--font-display);
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

.author-date {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* =============================================
   CONTENT ARTICLE
   ============================================= */
article.content {
  font-size: 1.0625rem;
  line-height: 1.8;
}

/* Lists */
article.content ul,
article.content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

article.content li {
  margin-bottom: 0.4rem;
}

article.content ul li::marker {
  color: var(--color-accent);
}

/* Tables */
article.content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-md) 0;
  font-size: 0.9rem;
  font-family: var(--font-ui);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
  overflow: hidden;
}

article.content thead {
  background-color: var(--color-accent);
  color: #ffffff;
}

article.content thead th {
  padding: 0.65rem 0.9rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: none;
}

article.content tbody tr {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

article.content tbody tr:last-child {
  border-bottom: none;
}

article.content tbody tr:nth-child(even) {
  background-color: #f9f8f5;
}

article.content tbody td {
  padding: 0.6rem 0.9rem;
  vertical-align: top;
  color: var(--color-text-secondary);
}

article.content tbody td:first-child {
  color: var(--color-text);
  font-weight: 500;
}

/* Blockquotes */
article.content blockquote {
  border-left: 3px solid var(--color-accent);
  padding: 0.75rem 1.25rem;
  margin: var(--space-md) 0;
  background: var(--color-accent-light, #edf2ed);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--color-text-secondary);
}

/* Images */
article.content img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  margin: var(--space-md) 0;
  box-shadow: var(--shadow-sm);
}

/* Horizontal rule */
article.content hr {
  margin: var(--space-lg) 0;
}

/* Inline italic (em) paragraph — disclaimer at bottom */
article.content > p:last-child em {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* =============================================
   FOOTER
   ============================================= */
footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 0;
  text-align: center;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

footer p {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 640px) {
  nav {
    gap: 1rem;
  }

  nav a {
    font-size: 0.8rem;
  }

  .logo-text {
    font-size: 0.925rem;
  }

  section.author-box {
    padding: 0.875rem 1rem;
  }

  .author-photo {
    width: 44px;
    height: 44px;
  }

  article.content table {
    font-size: 0.8rem;
  }

  article.content thead th,
  article.content tbody td {
    padding: 0.5rem 0.6rem;
  }
}

@media (max-width: 480px) {
  nav {
    display: none;
  }
}
