/* Enlightened Centrist — shared stylesheet (based on The Compass template) */
:root {
  --bg: #fefcf8;
  --surface: #ffffff;
  --fg: #0a0a0a;
  --muted: #6b7280;
  --border: rgba(0,0,0,0.08);
  --border-soft: rgba(0,0,0,0.05);
  --accent: #0a0a0a;
  --accent-light: #1a1a1a;
  --drop: #b3261e;
  --ring: 0 0 0 0.1rem #fff, 0 0 0 0.28rem rgba(10,10,10,0.6);
  --container-max: 1220px;
  --reading-max: 44rem;
  --nav-h: 76px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 14px; min-height: 100%; scroll-padding-top: var(--nav-h); }
@media (min-width: 768px) { html { font-size: 16px; } }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  overflow-x: hidden;
}
a:focus-visible, button:focus-visible { outline: none; box-shadow: var(--ring); }
img, svg { max-width: 100%; }

/* ---------- Navbar ---------- */
.app-navbar {
  position: fixed; top: 0; width: 100%;
  background: rgba(254, 252, 248, 0.95);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 5%;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  z-index: 1000;
}
.app-brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-weight: 650; color: var(--fg); font-size: 1.1rem;
  letter-spacing: -0.02em; text-decoration: none; white-space: nowrap;
}
.brand-logo {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; display: block; flex-shrink: 0;
}
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.app-navlink {
  position: relative; color: #666; font-weight: 450; text-decoration: none;
  font-size: 0.9rem; letter-spacing: 0.02em;
}
.app-navlink::before {
  content: ""; position: absolute; bottom: -6px; left: 50%; width: 0; height: 1px;
  background: var(--accent); transform: translateX(-50%); transition: width .25s ease;
}
.app-navlink:hover, .app-navlink[aria-current="page"] { color: var(--accent); }
.app-navlink:hover::before, .app-navlink[aria-current="page"]::before { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  min-height: 85vh; display: flex; align-items: center; justify-content: center;
  padding: 0 5%; margin-top: var(--nav-h);
}
.hero-content { max-width: 900px; animation: fadeInUp 1s ease; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
h1 { font-size: 4rem; font-weight: 650; letter-spacing: -0.02em; margin-bottom: 1.5rem; line-height: 1.1; }
.subtitle { font-size: 1.3rem; font-weight: 450; color: var(--muted); letter-spacing: -0.01em; margin-bottom: 2.5rem; line-height: 1.8; }
.hero-meta { display: flex; gap: 2rem; align-items: center; margin-bottom: 2rem; font-size: 0.9rem; color: var(--muted); }
.meta-item { display: flex; align-items: center; gap: 0.5rem; }

/* ---------- Button ---------- */
.btn {
  display: inline-block; padding: .85rem 1.6rem; font-weight: 520;
  background: var(--fg); color: #fff; text-decoration: none; position: relative;
  transition: transform .18s ease, background .18s ease; cursor: pointer; border: none;
}
.btn::after, .btn::before { content: ""; position: absolute; background: var(--accent); transition: all .3s ease; }
.btn::after { bottom: 0; right: 0; width: 0; height: 1px; }
.btn::before { bottom: 0; right: 0; width: 1px; height: 0; }
.btn:hover::after { width: 100%; }
.btn:hover::before { height: 100%; }
.btn:hover { transform: translateY(-2px); background: var(--accent-light); }

/* ---------- Article listing ---------- */
.articles { padding: 6rem 5%; background: var(--surface); }
.page-top { margin-top: var(--nav-h); }
.section-header { max-width: var(--container-max); margin: 0 auto 4rem; }
.section-header h2, .section-header h1 { font-size: 2.3rem; font-weight: 650; letter-spacing: -0.02em; margin-bottom: .75rem; line-height: 1.2; }
.section-header p { color: var(--muted); }
.articles-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.5rem; max-width: var(--container-max); margin: 0 auto;
}
.card {
  display: block; border: 1px solid var(--border); padding: 2.5rem;
  transition: transform .25s ease; position: relative; background: var(--bg);
  color: inherit; text-decoration: none;
}
.card::before, .card::after { content: ""; position: absolute; background: var(--accent); }
.card::before { bottom: 0; left: 0; width: 0; height: 1px; transition: width .5s ease; }
.card::after { bottom: 0; right: 0; width: 1px; height: 0; transition: height .5s ease; }
.card:hover::before { width: 100%; }
.card:hover::after { height: 100%; }
.card:hover { transform: translateY(-6px); }
.article-category { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); font-weight: 650; margin-bottom: 1rem; }
.card h3 { font-size: 1.4rem; font-weight: 650; margin-bottom: .75rem; letter-spacing: -0.02em; line-height: 1.3; }
.card p { color: var(--muted); line-height: 1.8; margin-bottom: 1.5rem; }
.article-meta { display: flex; gap: 1.5rem; font-size: .85rem; color: var(--muted); padding-top: 1rem; border-top: 1px solid var(--border-soft); }

/* ---------- Article page ---------- */
.post { margin-top: var(--nav-h); padding: 4rem 5% 5rem; }
.post-header, .post-body { max-width: var(--reading-max); margin: 0 auto; }
.post-header h1 { font-size: 3rem; }
.post-dek { font-size: 1.25rem; color: var(--muted); line-height: 1.7; margin-bottom: 2rem; }
.post-byline {
  display: flex; flex-wrap: wrap; gap: 1.5rem; font-size: .9rem; color: var(--muted);
  padding: 1rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.post-hero { max-width: 64rem; margin: 3rem auto; }
.post-hero svg { display: block; width: 100%; height: auto; }
.post-body { font-size: 1.1rem; line-height: 1.85; }
.post-body p { margin-bottom: 1.4rem; }
.post-body h2 { font-size: 1.6rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.25; margin: 3rem 0 1rem; }
.post-body a { color: var(--fg); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.post-body a:hover { text-decoration-thickness: 2px; }
.post-body blockquote {
  margin: 2.5rem 0; padding-left: 1.5rem; border-left: 2px solid var(--fg);
  font-size: 1.35rem; line-height: 1.5; font-weight: 500; letter-spacing: -0.01em;
}
.post-body blockquote cite { display: block; margin-top: .6rem; font-size: .9rem; font-style: normal; font-weight: 400; color: var(--muted); }
.post-body figure { margin: 2.5rem 0; padding: 1.5rem; background: var(--surface); border: 1px solid var(--border); }
.post-body figure svg { display: block; width: 100%; height: auto; }
.post-body figcaption { margin-top: .75rem; font-size: .85rem; line-height: 1.5; color: var(--muted); }
.timeline { list-style: none; margin: 1.5rem 0 2.5rem; border-left: 1px solid var(--fg); }
.timeline li { position: relative; padding: 0 0 1.25rem 1.5rem; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: .65rem; width: 9px; height: 9px; background: var(--fg); border-radius: 50%; }
.timeline strong { display: block; font-size: .9rem; font-weight: 650; }
.post-sources { margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: .95rem; }
.post-sources h2 { font-size: 1.1rem; margin-top: 0; }
.post-sources ul { padding-left: 1.2rem; }
.post-sources li { margin-bottom: .4rem; }
.post-note { font-size: .85rem; color: var(--muted); }

/* ---------- Simple content pages ---------- */
.page { margin-top: var(--nav-h); padding: 4rem 5% 5rem; }
.page-inner { max-width: var(--reading-max); margin: 0 auto; font-size: 1.05rem; line-height: 1.85; }
.page-inner h1 { font-size: 3rem; }
.page-inner h2 { font-size: 1.4rem; font-weight: 650; margin: 2.5rem 0 .75rem; letter-spacing: -0.02em; }
.page-inner p, .page-inner ul { margin-bottom: 1.25rem; }
.page-inner ul { padding-left: 1.2rem; }
.page-inner a { color: var(--fg); text-underline-offset: 3px; }
.page-updated { color: var(--muted); font-size: .9rem; margin-bottom: 2rem; }

/* ---------- Footer ---------- */
.app-footer { border-top: 1px solid var(--border); padding: 3rem 5%; color: #999; }
.footer-content { max-width: var(--container-max); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; }
.footer-section h4 { font-size: .85rem; font-weight: 650; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1rem; color: var(--fg); }
.footer-section p { color: #666; line-height: 1.8; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: .75rem; }
.footer-link { color: #666; text-decoration: none; transition: color .2s ease; font-weight: 450; }
.footer-link:hover { color: var(--accent); }
.footer-bottom {
  max-width: var(--container-max); margin: 3rem auto 0; padding-top: 2rem;
  border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: .85rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  h1, .post-header h1, .page-inner h1 { font-size: 2.3rem; }
  .subtitle { font-size: 1rem; }
  .app-navbar { padding: 1.1rem 5%; }
  .nav-links { gap: 1.1rem; }
  .app-navlink { font-size: .8rem; }
  .articles { padding: 4rem 5%; }
  .articles-grid { grid-template-columns: 1fr; }
  .footer-content { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .hero-meta { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .post-body { font-size: 1.02rem; }
  .post-body figure { padding: 1rem; }
}
@media (max-width: 600px) {
  :root { --nav-h: 92px; }
  .app-navbar { flex-direction: column; align-items: flex-start; gap: .55rem; padding: .9rem 5%; }
  .nav-links { gap: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
