/* =========================================================
   base.css
   Global styles, typography, header, nav, footer
========================================================= */

:root {
  --layout-max-width: 1200px;

  --color-bg-body-light: #f3f4f6;
  --color-bg-card-light: #ffffff;
  --color-bg-card: var(--color-bg-card-light);

  --color-bg-gradient-top: #dbeafe;
  --color-bg-gradient-bottom: #d1d5db;

  --color-border-subtle: #e5e7eb;

  --color-text-main: #111827;
  --color-text-muted: #6b7280;

  --color-accent-soft: #eef2ff;
  --color-accent-strong: #2563eb;

  --radius-card: 18px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
}

/* Sticky footer layout */
html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1 0 auto;
}

.site-footer {
  flex-shrink: 0;
}

/* Reset */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top, var(--color-bg-gradient-top) 0, transparent 55%),
    radial-gradient(circle at bottom, var(--color-bg-gradient-bottom) 0, var(--color-bg-body-light) 65%);
  color: var(--color-text-main);
}

@media (max-width: 640px) {
  body {
    background-size: cover;
    background-attachment: scroll;
    overflow-x: hidden;
  }
}

/* Typography */

h1,
h2,
h3,
h4 {
  margin: 0 0 0.6rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1rem;
  line-height: 1.55;
  color: var(--color-text-muted);
}

a {
  color: var(--color-accent-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* Layout shell */

.site-main {
  display: block;
}

/* =========================================================
   Footer (improved UX spacing + separation)
========================================================= */

.site-footer {
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  padding: 1.25rem 1.5rem;
  margin-top: 3rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.site-footer p {
  margin: 0.35rem 0;
}

/* =========================================================
   Card
========================================================= */

.card {
  background: var(--color-bg-card);
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-soft);
  padding: 1.75rem 2rem;
}

/* =========================================================
   Header + Navigation
========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(to right, #020617, #111827);
  border-bottom: 1px solid rgba(15, 23, 42, 0.8);
}

.site-header-inner {
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: 0.6rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Brand */

.brand-block {
  display: inline-flex;
  align-items: center;
}

.brand-title {
  color: #f9fafb;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Desktop nav (center) */

.site-nav.desktop-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
}

.site-nav-link {
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.87rem;
  color: #e5e7eb;
  border: 1px solid transparent;
  white-space: nowrap;
}

.site-nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(148, 163, 184, 0.6);
  text-decoration: none;
}

.site-nav-link.active {
  background: #ffffff;
  color: #111827;
  border-color: rgba(148, 163, 184, 0.7);
}

/* Right controls */

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Hamburger icon */

.hamburger {
  width: 30px;
  height: 22px;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 0;
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background: #f1f5f9;
  border-radius: 3px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Mobile menu */

.mobile-menu {
  display: none;
  flex-direction: column;
  background: #020617;
  border-top: 1px solid #111827;
  padding: 0.5rem 1.25rem 0.75rem;
}

.mobile-menu.open {
  display: flex;
}

.mobile-nav-link {
  padding: 0.7rem 0;
  color: #e5e7eb;
  font-size: 0.98rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.mobile-nav-link:last-child {
  border-bottom: none;
}

.mobile-nav-link.active {
  font-weight: 600;
  color: #93c5fd;
}

/* Hamburger "X" animation */

.hamburger.open span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Responsive header */

@media (max-width: 900px) {
  .site-header-inner {
    padding-inline: 1rem;
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .site-header-inner {
    padding-inline: 1rem;
  }

  .site-nav.desktop-nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .header-controls {
    gap: 0.5rem;
  }

  .brand-title {
    font-size: 0.9rem;
  }
}

@media (max-width: 640px) {
  /* Theme toggle removed – no styles remain */
}

html {
  min-height: 100%;
  background: linear-gradient(
      to bottom,
      #edf2fc 0%,
      #f8fbff 40%,
      #eef3f9 100%
  );
  background-attachment: fixed;
}

body {
  min-height: 100%;
  background: transparent !important;
}