/* ================================================================
   Opsvoro — Light Magazine / Editorial Design System
   Palette: warm off-white bg, high-contrast dark body, steel-blue accent
   Typography: Newsreader (Google Fonts) — quality editorial serif
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,400;1,6..72,500;1,6..72,600&display=swap');

:root {
  /* Backgrounds */
  --bg:         #faf9f6;
  --bg-soft:    #f4f2ed;
  --bg-hover:   #f0ede6;
  --bg-code:    #f2f0ea;
  --bg-th:      #f0ede6;
  --bg-zebra:   #faf8f4;

  /* Foreground */
  --fg:         #1a1a1a;
  --fg-soft:    #3d3d3d;
  --fg-mute:    #7a7570;

  /* Accent — deep editorial steel-blue */
  --accent:     #2d5a8e;
  --accent-bg:  rgba(45, 90, 142, 0.08);

  /* Borders — hairline style */
  --border:       #dedad2;
  --border-strong: #c8c3b8;

  /* Structural — single unified, centered content width */
  --max: 960px;

  /* Typography scale */
  --font-serif: 'Newsreader', Georgia, 'Times New Roman', Times, serif;
}

/* ============ Reset + Base ============ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; }
button { font-family: inherit; cursor: pointer; }

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

/* ============ Header ============ */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border-strong);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 19px;
  font-style: italic;
  letter-spacing: -0.01em;
  color: var(--fg);
  flex-shrink: 0;
}
.brand:hover { color: var(--accent); }

.site-nav {
  display: flex;
  gap: 0;
  flex: 1;
  flex-wrap: wrap;
}

.nav-link {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 400;
  color: var(--fg-mute);
  padding: 4px 14px;
  border-right: 1px solid var(--border);
  transition: color 0.15s;
}
.nav-link:first-child { padding-left: 0; }
.nav-link:last-child { border-right: none; }
.nav-link:hover { color: var(--fg); }

.hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 5px 12px;
  color: var(--fg-mute);
  margin-left: auto;
  font-family: inherit;
}
.hamburger:hover { color: var(--fg); border-color: var(--fg-mute); }

/* ============ Main layout ============ */
.site-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 0 80px;
  min-height: calc(100vh - 200px);
}

/* ============ Footer ============ */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border-strong);
  padding: 48px 0 28px;
  margin-top: 0;
}
.site-footer h4 {
  font-family: var(--font-serif);
  color: var(--fg);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 14px;
}
.site-footer a {
  font-family: var(--font-serif);
  color: var(--fg-mute);
  font-size: 14px;
  transition: color 0.15s;
}
.site-footer a:hover { color: var(--fg); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: 7px; }
.footer-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.footer-brand-desc {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--fg-mute);
  line-height: 1.6;
  margin: 0;
}
.footer-bottom {
  padding-top: 20px;
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--fg-mute);
  line-height: 1.6;
}
.footer-bottom p { margin: 4px 0; }
.footer-bottom a { color: var(--fg-mute); text-decoration: underline; text-underline-offset: 2px; }
.footer-bottom a:hover { color: var(--fg); }

/* ============ AdSlot (AdSense placeholder — keep minimal) ============ */
.adslot {
  display: block;
  margin: 16px 0;
  text-align: center;
}
.adslot:empty { display: none; }

/* Suppress unfilled AdSense slots */
.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
.adslot:has(.adsbygoogle[data-ad-status="unfilled"]) { display: none !important; }

/* ============ Static pages ============ */
.static-page {
  max-width: 720px;
  margin: 48px auto;
  padding: 0 24px 80px;
  line-height: 1.78;
  color: var(--fg);
  font-family: var(--font-serif);
}
.static-page h1 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 24px;
  letter-spacing: -0.02em;
  color: var(--fg);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 16px;
}
.static-page h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--fg);
}
.static-page ul { padding-left: 22px; margin: 10px 0; }
.static-page li { margin: 5px 0; color: var(--fg-soft); font-size: 16px; }
.static-page code {
  background: var(--bg-code);
  color: var(--fg-soft);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 14px;
  font-family: ui-monospace, 'Cascadia Code', 'Fira Code', monospace;
  border: 1px solid var(--border);
}
.static-page a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.static-page p { margin: 12px 0; font-size: 16px; color: var(--fg-soft); line-height: 1.75; }
.static-page em { color: var(--fg-mute); font-style: italic; font-size: 14px; }

/* ============ Mobile ============ */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .site-nav { display: none; }
  .site-nav.open {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 10px 0 4px;
    border-top: 1px solid var(--border);
    gap: 0;
  }
  .site-nav.open .nav-link {
    padding: 10px 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
  }
  .hamburger { display: inline-block; }
  .site-header .container { gap: 12px; flex-wrap: wrap; }
  .footer-cols { grid-template-columns: 1fr; gap: 24px; }
  .static-page { margin-top: 28px; }
}
