/* ==========================================================================
   Shared Site Layout — Header & Footer
   Dzmitry Bryzinski Portfolio
   Unified, responsive, accessible, zero-dependency layout system.
   ========================================================================== */

:root {
  --layout-header-height: 54px;
  --layout-max-width: 1180px;

  /* Default light theme fallbacks */
  --header-bg: rgba(247, 247, 244, 0.92);
  --header-border: #dcded9;
  --footer-border: #dcded9;
  --nav-text: #171917;
  --nav-muted: #666b67;
  --nav-accent: #176b57;
  --nav-accent-soft: #eaf2ee;
}

/* ==========================================================================
   Sticky Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  width: 100%;
  height: var(--layout-header-height, 54px);
  background-color: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--header-border);
  display: flex;
  align-items: center;
}

.site-header-inner {
  width: 100%;
  max-width: var(--layout-max-width, 1180px);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Brand / Wayfinding */
.site-brand {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--nav-text);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

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

.site-brand .brand-arrow {
  font-weight: 500;
  color: var(--nav-muted);
  transition: transform 0.15s ease, color 0.15s ease;
}

.site-brand:hover .brand-arrow {
  transform: translateX(-2px);
  color: var(--nav-accent);
}

.site-brand .brand-sub {
  font-weight: 400;
  color: var(--nav-muted);
  font-size: 0.88rem;
}

/* Navigation Links */
.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.88rem;
  white-space: nowrap;
}

.site-nav a,
.nav-link {
  color: var(--nav-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

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

.site-nav a.active,
.nav-link.active {
  color: var(--nav-text);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Primary Case Artifact Action (e.g. Google Sheets model) */
.nav-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--nav-accent);
  background: var(--nav-accent-soft, #eaf2ee);
  border: 1px solid rgba(23, 107, 87, 0.22);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.nav-action:hover {
  background: rgba(23, 107, 87, 0.14);
  border-color: var(--nav-accent);
  color: #124c3f;
}

.nav-next-case {
  font-weight: 600;
  color: var(--nav-accent) !important;
}

.nav-next-case:hover {
  text-decoration: underline;
}

/* Accessibility Focus */
.site-header a:focus-visible,
.site-footer a:focus-visible {
  outline: 2px solid var(--nav-accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  width: 100%;
  margin-top: 64px;
  border-top: 1px solid var(--footer-border);
  padding: 28px 0 34px;
  font-size: 0.86rem;
  color: var(--nav-muted);
}

.site-footer-inner {
  width: 100%;
  max-width: var(--layout-max-width, 1180px);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-meta {
  font-size: 0.86rem;
  color: var(--nav-muted);
}

.footer-meta strong {
  color: var(--nav-text);
  font-weight: 650;
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.86rem;
}

.footer-links a {
  color: var(--nav-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .site-nav .nav-links {
    display: none;
  }
}

@media (max-width: 680px) {
  .site-header-inner {
    padding: 0 18px;
    gap: 12px;
  }

  .site-brand .brand-sub {
    display: none;
  }

  .site-nav {
    gap: 14px;
    font-size: 0.84rem;
  }

  .site-footer {
    margin-top: 48px;
    padding: 24px 0 30px;
  }

  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 0 18px;
  }

  .footer-links {
    gap: 10px 16px;
  }
}
