/* ==========================================================================
   base.css — reset and shared page chrome
   Everything that appears on EVERY page: reset, body, nav, footer, tags,
   buttons. Page-specific rules belong in home.css or article.css.
   Load order: theme.css → base.css → (home.css | article.css)
   ========================================================================== */

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

/* --- NAV ----------------------------------------------------------------- */

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--rule);
}

.nav-name {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--navy);
  text-decoration: none;
}

.nav-links { display: flex; gap: 28px; list-style: none; }

.nav-links a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--navy); }

/* --- SHARED COMPONENTS --------------------------------------------------- */

.tag {
  font-size: 11px;
  padding: 3px 10px;
  background: var(--bg3);
  color: var(--muted);
  border-radius: 2px;
  border: 1px solid var(--rule);
  letter-spacing: 0.03em;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: 2px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn-primary { background: var(--navy); color: #F7F5F0; }
.btn-primary:hover { background: var(--navy-hi); }

.btn-ghost { border: 1px solid var(--faint); color: var(--muted); }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }

/* --- FOOTER -------------------------------------------------------------- */

footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px var(--pad) 44px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-left, .footer-right { font-size: 12px; color: var(--faint); }
.footer-left a { color: inherit; }

/* --- ACCESSIBILITY ------------------------------------------------------- */

@media (max-width: 540px) {
  .nav-links { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
