@import url("https://fonts.googleapis.com/css2?family=Newsreader:ital,wght@0,400;0,600;1,400;1,600&family=IBM+Plex+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap");

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
}

h1 { font-size: 3rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.35rem; }

code, pre {
  font-family: var(--font-mono);
}

a {
  color: var(--accent);
  text-decoration: none;
}

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

/* Shared nav */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  padding: 0 2rem;
  background: var(--bg-base);
  border-bottom: 1px solid var(--border);
}

.site-nav .wordmark {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1;
  color: var(--text-primary);
  text-decoration: none;
}

.site-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.site-nav .nav-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color 0.15s;
}

.site-nav .nav-links a:hover,
.site-nav .nav-links a.active {
  color: var(--text-primary);
}

.site-nav .nav-links .cta {
  color: var(--accent);
  font-weight: 500;
}

.site-nav .nav-links .cta:hover {
  color: var(--accent-hover);
}

/* Shared footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  text-align: center;
}

.site-footer .wordmark {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.site-footer p {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.site-footer .footer-links {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
}

.site-footer .footer-links a {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.site-footer .footer-links a:hover {
  color: var(--text-secondary);
}

/* Mobile nav toggle */

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

@media (max-width: 640px) {
  .nav-toggle {
    display: block;
  }

  .site-nav .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    gap: 1rem;
  }

  .site-nav .nav-links.open {
    display: flex;
  }
}
