/* ── Variables ─────────────────────────────────────────────────── */
:root {
  --bg:           #F8F8F8;
  --white:        #ffffff;
  --text:         #111111;
  --muted:        #666666;
  --accent:       #C8A96A;
  --accent-light: rgba(200, 169, 106, 0.10);
  --border:       #E2E2E2;
  --radius:       4px;
  --max-w:        1100px;
  --article-w:    720px;
}

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.75;
}

img { max-width: 100%; display: block; }
a   { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  line-height: 1.25;
}

/* ── Header / Nav ──────────────────────────────────────────────── */
body > header {
  background: var(--text);
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--accent);
}

nav {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 1rem;
}

.logo {
  font-family: Georgia, serif;
  font-size: 1.375rem;
  font-weight: bold;
  color: var(--accent);
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo:hover { text-decoration: none; opacity: 0.85; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: #bbb;
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  text-decoration: none;
}

/* ── Hero ──────────────────────────────────────────────────────── */
.hero {
  background: var(--text);
  color: var(--white);
  text-align: center;
  padding: 4.5rem 1.5rem 4rem;
  border-bottom: 1px solid #1e1e1e;
}

.hero h1 {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  color: var(--white);
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.hero h1 span { color: var(--accent); }

.hero p {
  color: #999;
  font-size: 1.125rem;
  max-width: 500px;
  margin: 0 auto;
  letter-spacing: 0.01em;
}

/* ── Category Bar ──────────────────────────────────────────────── */
.category-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
}

.category-bar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.875rem 0;
  scrollbar-width: none;
}
.category-bar-inner::-webkit-scrollbar { display: none; }

.cat-link {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  white-space: nowrap;
  transition: all 0.2s;
}
.cat-link:hover,
.cat-link.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
  text-decoration: none;
}

/* ── Articles Section ──────────────────────────────────────────── */
.articles-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.section-heading {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 1.5rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--border);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* ── Article Card ──────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  transition: box-shadow 0.25s, transform 0.25s;
}
.card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
  transform: translateY(-2px);
}

.card-category {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.card-category:hover { text-decoration: none; opacity: 0.8; }

.card-title {
  font-family: Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.4;
  color: var(--text);
  display: block;
}
.card-title:hover { color: var(--accent); text-decoration: none; }

.card-excerpt {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
}

.card-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* ── Article Page ──────────────────────────────────────────────── */
.article-wrapper {
  max-width: var(--article-w);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem;
}

.article-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.article-category {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1rem;
}
.article-category:hover { text-decoration: none; }

.article-title {
  font-size: clamp(1.875rem, 4.5vw, 2.75rem);
  line-height: 1.2;
  margin-bottom: 1.25rem;
}

.article-meta {
  font-size: 0.875rem;
  color: var(--muted);
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* ── Article Content ───────────────────────────────────────────── */
.article-content h2 {
  font-size: 1.625rem;
  margin: 2.75rem 0 1rem;
}

.article-content h3 {
  font-size: 1.25rem;
  margin: 2.25rem 0 0.75rem;
}

.article-content h4 {
  font-size: 1.0625rem;
  margin: 1.75rem 0 0.5rem;
}

.article-content p {
  margin-bottom: 1.25rem;
}

.article-content ul,
.article-content ol {
  margin: 0.75rem 0 1.25rem 1.375rem;
}

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

.article-content strong { color: var(--text); }

.article-content em { color: var(--muted); }

.article-content blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.75rem 0;
  padding: 0.875rem 1.25rem;
  background: var(--accent-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted);
  font-style: italic;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 0.9rem;
}
.article-content th {
  background: var(--text);
  color: var(--white);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-family: -apple-system, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.article-content td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.article-content tr:last-child td { border-bottom: none; }
.article-content tr:nth-child(even) td { background: var(--white); }

.article-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

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

.article-content code {
  background: #eee;
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.875em;
}

/* ── Author Bio ────────────────────────────────────────────────── */
.author-bio {
  margin-top: 3rem;
  padding: 1.375rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  color: var(--muted);
}
.author-bio strong { color: var(--text); }

/* ── Category Header ───────────────────────────────────────────── */
.category-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
}
.category-header h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.category-header p   { color: var(--muted); font-size: 1rem; }

/* ── About Page ────────────────────────────────────────────────── */
.about-wrapper {
  max-width: var(--article-w);
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
}
.about-wrapper h1 { font-size: 2.5rem; margin-bottom: 1.75rem; }
.about-wrapper h2 { font-size: 1.375rem; margin: 2.25rem 0 0.75rem; }
.about-wrapper p  { margin-bottom: 1.25rem; color: var(--muted); line-height: 1.8; }
.about-wrapper ul { margin: 0.75rem 0 1.25rem 1.375rem; }
.about-wrapper li { margin-bottom: 0.4rem; color: var(--muted); }
.about-wrapper strong { color: var(--text); }

/* ── Empty State ───────────────────────────────────────────────── */
.empty {
  text-align: center;
  color: var(--muted);
  padding: 5rem 1.5rem;
  font-size: 1rem;
}

/* ── Footer ────────────────────────────────────────────────────── */
footer {
  background: var(--text);
  color: #777;
  text-align: center;
  padding: 2.75rem 1.5rem;
  font-size: 0.875rem;
  border-top: 2px solid var(--accent);
}
footer p + p { margin-top: 0.5rem; }
footer a { color: var(--accent); }
footer a:hover { opacity: 0.8; text-decoration: none; }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  nav {
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.875rem 0;
    gap: 0.625rem;
  }
  .nav-links { gap: 0.75rem; }
  .nav-links a { font-size: 0.75rem; }
  .article-grid { grid-template-columns: 1fr; }
  .article-title { font-size: 1.75rem; }
  .hero { padding: 3rem 1.25rem 2.5rem; }
}

@media (max-width: 480px) {
  .articles-section { padding: 2rem 1rem 3rem; }
  .article-wrapper   { padding: 2rem 1rem 3.5rem; }
  .about-wrapper     { padding: 2.5rem 1rem 3.5rem; }
}
