.site-shell {
  min-height: 100vh;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 30;
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  background: #eff8c9;
  color: #18220f;
  transform: translateY(-160%);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.sidebar {
  display: none;
}

.site-main {
  min-height: 100vh;
  position: relative;
}

.topbar {
  position: sticky;
  top: 0.75rem;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: min(calc(100% - 2.5rem), 1180px);
  margin: 0 auto;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(11, 15, 9, 0.82);
  backdrop-filter: blur(18px);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-avatar {
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
}

.brand-wordmark {
  display: inline-flex;
  flex-direction: column;
  gap: 0.08rem;
}

.brand-wordmark strong,
.brand-wordmark span {
  display: block;
  line-height: 1;
  text-transform: uppercase;
}

.brand-wordmark strong {
  font-size: 1rem;
  letter-spacing: 0.14em;
  color: var(--text);
}

.brand-wordmark span {
  color: var(--muted);
  font-size: 0.94rem;
  letter-spacing: 0.2em;
}

.desktop-nav {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
  flex: 1;
  min-width: 0;
}

.page {
  width: min(calc(100% - 2rem), var(--content-width));
  margin: 0 auto;
  padding: 1.5rem 0 5rem;
}

.page > section + section {
  margin-top: 1.5rem;
}

.footer {
  width: min(calc(100% - 2rem), var(--content-width));
  margin: 0 auto;
  padding: 0 0 5rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer a {
  color: var(--text);
}

.footer-grid {
  display: grid;
  gap: 1rem;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(128, 154, 57, 0.1), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow);
}

.footer-copy,
.footer-column {
  display: grid;
  gap: 0.55rem;
}

.footer-copy p,
.footer-bottom p {
  margin: 0;
}

.footer-brand {
  width: fit-content;
}

.footer-heading {
  color: #dceab8;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.65rem;
}

.footer-link-stack {
  display: grid;
  gap: 0.45rem;
}

.footer-link-grid a,
.footer-link-stack a,
.footer-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: auto;
  padding: 0.15rem 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.footer-link-grid a:hover,
.footer-link-stack a:hover,
.footer-link-button:hover {
  color: #d6e4c3;
  transform: none;
}

.footer-link-button {
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.footer-bottom {
  display: grid;
  gap: 0.35rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  grid-column: 1 / -1;
}

.footer-bottom p {
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
}

.footer-credit-link {
  color: #eff8c9;
  font-weight: 700;
}

@media (max-width: 759px) {
  .footer-link-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 760px) {
  .desktop-nav {
    display: flex;
    flex-wrap: wrap;
  }

  .desktop-nav .nav-link {
    justify-content: center;
    padding: 0.7rem 0.9rem;
  }

  .menu-toggle,
  .mobile-menu {
    display: none;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

  .footer-bottom {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
  }
}

@media (min-width: 1040px) {
  .topbar {
    width: min(calc(100% - 4rem), 1280px);
  }

  .page {
    width: min(calc(100% - 3rem), 1120px);
    padding-top: 2rem;
  }

  .discipline-browser {
    position: sticky;
    top: 2rem;
  }

  .footer {
    width: min(calc(100% - 3rem), 1120px);
    padding-bottom: 2.5rem;
  }
}
