/* ============================================================
   LAYOUT.CSS — Container, Navbar, Footer, Page Wrappers
   ============================================================ */

/* ── Container ── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

.container--narrow  { max-width: 860px; }
.container--mid     { max-width: 1000px; }

/* ── SPA Page Visibility ── */
.page           { display: none; flex-direction: column; flex: 1; min-height: 0; }
.page.active    { display: flex; }

/* ── Particles Canvas ── */
#particles-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.38;
}

/* ── Navbar ── */
#navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(31, 41, 55, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  padding: 13px 0;
  flex-shrink: 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text);
  transition: color 0.2s;
  flex-shrink: 0;
}
.nav-logo:hover { color: var(--blue); }
.nav-logo img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text2);
  transition: all 0.2s;
  white-space: nowrap;
}
.nav-link:hover,
.nav-link.active {
  color: var(--blue-light);
  background: rgba(6, 71, 224, 0.1);
}
.nav-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ── Hamburger ── */
.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  padding: 4px;
  border-radius: 8px;
  transition: background 0.2s;
}
.hamburger:hover { background: var(--bg3); }
.hamburger svg  { width: 24px; height: 24px; display: block; }

/* ── Mobile Nav Overlay ── */
#mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}
#mobile-nav.open { display: flex; }

.mobile-nav-panel {
  background: var(--bg2);
  width: min(300px, 85vw);
  height: 100%;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-right: 1px solid var(--border);
  animation: slideIn 0.25s ease;
  overflow-y: auto;
}

.mobile-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 8px;
  padding: 0 6px 16px;
  border-bottom: 1px solid var(--border);
}
.mobile-nav-logo img { width: 30px; height: 30px; border-radius: 50%; }

.mobile-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--bg3);
  border: none;
  color: var(--text3);
  font-size: 1rem;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.mobile-close:hover { background: rgba(239,68,68,0.2); color: #f87171; }

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text2);
  transition: all 0.2s;
}
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--blue-light);
  background: rgba(6, 71, 224, 0.12);
}
.mobile-nav-link svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── Section Header ── */
.section-header {
  text-align: center;
  margin-bottom: 52px;
}

/* ── Footer ── */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: auto;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text2);
}
.footer-brand img { width: 26px; height: 26px; border-radius: 50%; }

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-link {
  font-size: 0.8rem;
  color: var(--text3);
  transition: color 0.2s;
}
.footer-link:hover { color: var(--blue-light); }

.footer-socials {
  display: flex;
  gap: 10px;
}

.footer-social {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--bg3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  transition: all 0.25s;
}
.footer-social:hover {
  background: rgba(6, 71, 224, 0.15);
  border-color: var(--blue);
  color: var(--blue-light);
  transform: translateY(-2px);
}
.footer-social svg { width: 16px; height: 16px; }

.footer-bottom {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-copy {
  color: var(--text3);
  font-size: 0.78rem;
}
