.site-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1000;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: var(--sidebar-width);
  min-height: 100dvh;
  overflow-y: auto;
  background:
    radial-gradient(circle at 30% 0%, rgba(20, 139, 130, 0.18), transparent 34%),
    var(--navy-950);
  color: #fff;
  transition: width 180ms ease, transform 220ms ease;
}

.sidebar-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 112px;
  padding: 0.8rem 0.8rem 0.55rem 1rem;
}

.sidebar-brand {
  display: grid;
  width: 72px;
  height: 76px;
  place-items: center;
  border-radius: var(--radius-md);
}

.sidebar-brand img {
  width: 68px;
  max-width: 68px;
  max-height: 72px;
  object-fit: contain;
}

.sidebar-collapse,
.sidebar-close,
.mobile-menu-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  cursor: pointer;
}

.sidebar-close {
  display: none;
}

.icon {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.sidebar-nav {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  margin: 0;
  padding: 0.4rem 0.75rem 1.5rem;
  list-style: none;
}

.sidebar-nav a {
  position: relative;
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  min-height: 50px;
  gap: 0.75rem;
  border: 1px solid transparent;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.76);
  padding: 0.6rem 0.8rem;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.sidebar-nav a::before {
  position: absolute;
  inset: 9px auto 9px 0;
  width: 3px;
  border-radius: 99px;
  background: transparent;
  content: "";
}

.sidebar-nav a:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.sidebar-nav a.is-active {
  border-color: rgba(199, 138, 32, 0.32);
  background: linear-gradient(90deg, rgba(199, 138, 32, 0.16), rgba(255, 255, 255, 0.04));
  color: #fff;
}

.sidebar-nav a.is-active::before {
  background: var(--gold-500);
}

.sidebar-contact {
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.9rem;
  padding: 0;
  list-style: none;
}

.sidebar-socials a {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.88);
}

.sidebar-socials a:hover {
  background: var(--teal-600);
  color: #fff;
}

.sidebar-socials .icon {
  width: 18px;
  height: 18px;
}

.sidebar-follow {
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  color: #fff;
  padding: 0.65rem 0.75rem;
  text-align: center;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
}

.site-main {
  min-height: 100dvh;
  margin-left: var(--sidebar-width);
  transition: margin-left 180ms ease;
}

.site-mobile-header {
  display: none;
}

.site-shell {
  width: min(var(--content-max), calc(100% - 3rem));
  margin-inline: auto;
}

.site-section {
  padding-block: clamp(3.6rem, 7vw, 7rem);
}

.site-section.is-white {
  background: var(--paper);
}

.site-section.is-ink {
  background: var(--navy-950);
  color: rgba(255, 255, 255, 0.8);
}

.site-section.is-ink h2,
.site-section.is-ink h3 {
  color: #fff;
}

.site-footer {
  background: #06101e;
  color: rgba(255, 255, 255, 0.74);
  padding: 2.2rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(300px, 1.8fr);
  gap: 1.5rem 2rem;
  align-items: start;
}

.footer-brand {
  display: grid;
  gap: 0.2rem;
}

.footer-brand strong {
  color: #fff;
  font-size: 1.05rem;
}

.footer-brand span {
  font-size: 0.82rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem 1rem;
}

.footer-nav a,
.footer-meta a {
  color: rgba(255, 255, 255, 0.82);
}

.footer-nav a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  padding: 0.48rem 0.72rem;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  border-color: rgba(123, 209, 200, 0.65);
  background: var(--teal-700);
  color: #fff;
  transform: translateY(-1px);
}

.footer-meta {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  font-size: 0.78rem;
}

.site-overlay {
  position: fixed;
  z-index: 990;
  inset: 0;
  background: rgba(4, 13, 25, 0.72);
  backdrop-filter: blur(2px);
}

body.sidebar-collapsed .site-sidebar {
  width: var(--sidebar-collapsed-width);
  overflow: visible;
}

body.sidebar-collapsed .site-main {
  margin-left: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .sidebar-brand-row {
  min-height: 104px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  padding: 0.65rem 0.2rem 0.45rem;
}

body.sidebar-collapsed .sidebar-brand {
  display: grid;
  width: 42px;
  height: 45px;
  place-items: center;
  overflow: visible;
}

body.sidebar-collapsed .sidebar-brand img {
  width: 40px;
  max-width: 40px;
  max-height: 44px;
  transform: none;
}

body.sidebar-collapsed .sidebar-collapse {
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
}

body.sidebar-collapsed .sidebar-follow {
  display: none;
}

body.sidebar-collapsed .sidebar-nav {
  gap: 0.25rem;
  padding: 0.25rem 0.45rem 0.75rem;
}

body.sidebar-collapsed .sidebar-nav a {
  grid-template-columns: 1fr;
  min-height: 44px;
  justify-items: center;
  padding: 0.45rem;
}

body.sidebar-collapsed .sidebar-nav a .sidebar-label {
  position: absolute;
  z-index: 20;
  top: 50%;
  left: calc(100% + 14px);
  display: block;
  width: max-content;
  max-width: 220px;
  border: 1px solid rgba(123, 209, 200, 0.24);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.96), rgba(8, 28, 48, 0.98));
  color: #fff;
  padding: 0.62rem 0.82rem;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-8px, -50%) scale(0.96);
  transform-origin: left center;
  transition: opacity 160ms ease, transform 180ms cubic-bezier(.22,.72,.25,1), visibility 160ms ease;
}

body.sidebar-collapsed .sidebar-nav a .sidebar-label::before {
  position: absolute;
  top: 50%;
  right: 100%;
  width: 10px;
  height: 10px;
  background: #0e6d69;
  content: "";
  transform: translate(5px, -50%) rotate(45deg);
}

body.sidebar-collapsed .sidebar-nav a:hover .sidebar-label,
body.sidebar-collapsed .sidebar-nav a:focus-visible .sidebar-label {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%) scale(1);
}

body.sidebar-collapsed .sidebar-contact {
  display: block;
  padding: 0.65rem 0 0.8rem;
}

body.sidebar-collapsed .sidebar-socials {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.28rem;
  margin: 0;
}

body.sidebar-collapsed .sidebar-socials a {
  width: 34px;
  height: 34px;
}

body.sidebar-collapsed .sidebar-socials .icon {
  width: 16px;
  height: 16px;
}

.go-to-top {
  position: fixed;
  z-index: 800;
  right: 1.2rem;
  bottom: 1.2rem;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(16, 35, 63, 0.12);
  border-radius: 50%;
  background: var(--paper);
  color: var(--navy-900);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  animation: go-top-enter 180ms ease both;
}

.go-to-top[hidden] {
  display: none;
}

@keyframes go-top-enter {
  from { opacity: 0; transform: translateY(10px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.go-to-top:hover {
  background: var(--navy-900);
  color: #fff;
}

@media (max-width: 980px) {
  .site-sidebar {
    width: min(310px, 88vw);
    transform: translateX(-105%);
    box-shadow: 24px 0 60px rgba(0, 0, 0, 0.28);
  }

  body.nav-open .site-sidebar {
    transform: translateX(0);
  }

  .sidebar-collapse {
    display: none;
  }

  .sidebar-close {
    display: grid;
  }

  .site-main,
  body.sidebar-collapsed .site-main {
    margin-left: 0;
  }

  .site-mobile-header {
    position: sticky;
    z-index: 900;
    top: 0;
    display: flex;
    height: 74px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    padding: 0.55rem 1rem;
    backdrop-filter: blur(14px);
  }

  .mobile-brand img {
    width: 190px;
    max-height: 52px;
    object-fit: contain;
  }

  .mobile-menu-button {
    border-color: rgba(16, 35, 63, 0.12);
    background: var(--navy-900);
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(100% - 1.5rem, var(--content-max));
  }

  .site-section {
    padding-block: 3.6rem;
  }

  .footer-meta {
    flex-direction: column;
  }

  .go-to-top {
    right: 0.8rem;
    bottom: 0.8rem;
  }
}
