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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg-glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--color-line-soft);
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-header__brand {
  font-size: 18px;
  font-weight: 500;
  color: var(--color-fg);
  letter-spacing: -0.01em;
}
.site-header__brand:hover { color: var(--color-fg); }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: clamp(18px, 3vw, 36px);
}

.site-nav a {
  color: var(--color-fg);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.005em;
  opacity: 0.8;
  transition: opacity 0.2s var(--ease);
}
.site-nav a:hover { opacity: 1; }
.site-nav a.is-active { opacity: 1; font-weight: 500; }

.theme-toggle {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--color-fg);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s var(--ease);
}

.theme-toggle::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-fg);
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.theme-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px var(--color-line-soft) inset;
}

.theme-toggle:hover::before {
  transform: scale(1.06);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.site-footer {
  position: sticky;
  bottom: 0;
  z-index: 90;
  margin-top: 64px;
  padding: 0;
  border-top: 1px solid var(--color-line-soft);
  background: var(--color-bg-glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  min-height: 56px;
  gap: 16px;
  font-size: 13px;
  color: var(--color-fg-soft);
}

.site-footer a {
  color: var(--color-fg-soft);
  margin-right: 18px;
}
.site-footer a:hover { color: var(--color-fg); }

.home-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.home-page main {
  flex: 1;
  display: grid;
  align-items: center;
}

.home-page .site-footer {
  margin-top: auto;
}

main {
  min-height: 60vh;
}

.section {
  padding: clamp(52px, 8vw, 96px) 0;
}

.section--tight { padding: clamp(34px, 6vw, 72px) 0; }

.section__eyebrow {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--color-accent);
  margin-bottom: 12px;
}

.section__title {
  margin-bottom: 18px;
}

.section__lead {
  font-size: clamp(18px, 1.6vw, 22px);
  color: var(--color-fg-soft);
  max-width: 640px;
  font-weight: 400;
}

.grid {
  display: grid;
  gap: 24px;
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.divider {
  border: none;
  border-top: 1px solid var(--color-line-soft);
  margin: 0;
}

@media (max-width: 760px) {
  .site-header__inner {
    height: auto;
    padding: 12px 0;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
  }

  .site-header__actions {
    width: 100%;
    justify-content: flex-start;
    gap: 14px;
    flex-wrap: wrap;
  }

  .site-nav ul {
    flex-wrap: wrap;
    gap: 14px 18px;
  }

  .site-footer {
    padding: 0;
  }
}
