@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Source+Serif+4:ital,opsz,wght@0,8..60,500;0,8..60,600;0,8..60,700;1,8..60,500;1,8..60,600&display=swap");

:root {
  --bg: #f7f4ef;
  --bg-elevated: #fffdf9;
  --ink: #1c1917;
  --muted: #57534e;
  --line: #e7e0d6;
  --accent: #1d4e5f;
  --header-height: 3.7rem;
}

body {
  padding-top: var(--header-height);
  background: var(--bg) !important;
}

#header,
#sidebar,
#sidebar .toggle {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#wrapper {
  display: block !important;
  min-height: 0 !important;
}

#main {
  width: 100% !important;
  margin: 0 !important;
}

#main > .inner {
  margin: 0 auto;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(247, 244, 239, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 52rem;
  min-height: var(--header-height);
  margin: 0 auto;
  padding: 0 1.25rem;
  gap: 1rem;
}

.wordmark {
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  border-bottom: 0;
}

.wordmark:hover {
  color: var(--accent) !important;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.15rem;
}

.nav a {
  color: var(--muted);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 0;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink) !important;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--ink);
  border-radius: 0.4rem;
  padding: 0.35rem 0.65rem;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
}

@media (max-width: 720px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    gap: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.25rem 0.85rem;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 0.45rem 0;
  }
}
