/* Shared foundation: load before portfolio.css or case-study.css */
/* =============================================
   RESET & BASE
============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:      #09090f;
  --navy:       #0d1117;
  --navy-light: #141924;
  --card-bg:    #111827;
  --gold:       #c9a84c;
  --gold-light: #e2c068;
  --gold-dim:   rgba(201,168,76,0.15);
  --gold-glow:  rgba(201,168,76,0.08);
  --white:      #f5f0e8;
  --muted:      #8b8b8b;
  --border:     rgba(201,168,76,0.18);
  --font-head:  'Playfair Display', serif;
  --font-body:  'Inter', sans-serif;
  --max-w:      1100px;
  --page-gutter: 24px;
  --section-pad: 100px var(--page-gutter);
  --sidebar-w: 260px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  padding-left: var(--sidebar-w);
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

/* =============================================
   SCROLLBAR
============================================= */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

/* =============================================
   NAVIGATION
============================================= */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  z-index: 180;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 32px 28px;
  background: rgba(9,9,15,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid rgba(201,168,76,0.08);
}

.nav-logo {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.nav-logo span {
  color: var(--white);
  font-weight: 400;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 18px;
  list-style: none;
  margin-top: 44px;
  width: 100%;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}

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

.nav-cta {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold) !important;
  border: 1px solid var(--gold);
  padding: 8px 20px;
  border-radius: 2px;
  transition: background 0.2s, color 0.2s !important;
}

.nav-cta:hover {
  background: var(--gold) !important;
  color: var(--black) !important;
}

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

.nav-toggle {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: rgba(9,9,15,0.92);
  color: var(--gold);
  z-index: 220;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle:focus-visible,
.nav-links a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.22s ease, opacity 0.22s ease;
  content: '';
}

.nav-toggle-icon { position: relative; }
.nav-toggle-icon::before { position: absolute; top: -6px; left: 0; }
.nav-toggle-icon::after { position: absolute; top: 6px; left: 0; }

.nav-toggle[aria-expanded='true'] .nav-toggle-icon { background: transparent; }
.nav-toggle[aria-expanded='true'] .nav-toggle-icon::before {
  top: 0;
  transform: rotate(45deg);
}
.nav-toggle[aria-expanded='true'] .nav-toggle-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 170;
}

/* =============================================
   RESPONSIVE — shared navigation (all pages)
============================================= */
@media (max-width: 900px) {
  body { padding-left: 0; }

  .nav-toggle { display: inline-flex; }

  .site-nav {
    width: min(82vw, 320px);
    padding: 74px 24px 24px;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
  }

  .site-nav.is-open { transform: translateX(0); }
  .nav-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .site-main { padding-top: 72px; }
}

@media (max-width: 600px) {
  .site-nav { width: 88vw; }
}
