/* ===== Global Font Setup ===== */
html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Color + Layout Variables ===== */
:root {
  --bg: #000;
  --fg: #fff;
  --muted: #bfbfbf;
  --panel: #1a1a1a;
  --accent: #ffffff;
  --headerH: 52px;
}

/* ===== Base ===== */
html, body { background: var(--bg); color: var(--fg); margin: 0; padding: 0; }
a { color: inherit; }

/* ===== Header ===== */
header {
  position: sticky; top: 0; z-index: 3000;
  background: var(--panel);
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding-top: env(safe-area-inset-top);
  backdrop-filter: saturate(1.1);
}
.header-inner {
  max-width: 1280px; margin: 0 auto;
  min-height: var(--headerH);
  padding: 6px 16px;
  display: flex; align-items: center; gap: 16px;
  transform: translateY(6px);
  position: relative;
}

/* ===== Brand (Name) ===== */
.brand {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 800;
  letter-spacing: .2px;
  font-size: 1.35rem;
  text-decoration: none;
  white-space: nowrap;

  /* gradient text */
  background: linear-gradient(90deg, #00c2ff, #2ee6b8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  /* subtle sweep on hover */
  background-size: 200% 100%;
  background-position: 0% 50%;
  transition: background-position 0.6s ease;
}
.brand:hover {
  background-position: 100% 50%;
}

.spacer { flex: 1; }

nav {
  display: flex; gap: 18px; align-items: center;
}
nav a {
  color: var(--fg);
  text-decoration: none;
  font-size: .98rem;
  padding: 6px 6px;
  border-radius: 6px;
  transition: color .2s ease, background .2s ease;
}
nav a:hover { background: rgba(255,255,255,.06); }

/* gradient active underline */
nav a[aria-current="page"] {
  position: relative;
}
nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, #00c2ff, #2ee6b8);
  border-radius: 1px;
}

/* ===== Hamburger ===== */
.menu-toggle { display:none; }
.hamburger {
  display:none; cursor:pointer; width:44px; height:44px;
  align-items:center; justify-content:center; border-radius:8px;
}
.hamburger:hover { background:rgba(255,255,255,.06); }
.hamburger span, .hamburger::before, .hamburger::after {
  content:''; display:block; width:22px; height:2px; background:#fff; position:relative;
}
.hamburger::before { position:absolute; transform: translateY(-6px); }
.hamburger::after { position:absolute; transform: translateY(6px); }

/* ===== Mobile Header Fixes ===== */
@media (max-width: 820px){
  .hamburger {
    display:flex;
    margin-left:auto;
    position:relative; z-index:3;
  }

  /* keep checkbox accessible (iOS fix) */
  .menu-toggle {
    position:absolute !important;
    width:1px; height:1px;
    margin:-1px; padding:0; border:0;
    clip:rect(0 0 0 0); clip-path:inset(50%);
    overflow:hidden;
  }

  .spacer { display:none; }

  /* center brand + enlarge */
  .brand {
    position:absolute;
    left:50%; transform:translateX(-50%);
    text-align:center;
    font-size:1.6rem;
    line-height:1.2;

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 800;
    background: linear-gradient(90deg, #00c2ff, #2ee6b8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  /* === Right-side mobile menu (≈75% opacity) === */
  .header-inner { position: relative; }
  nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 12px;
    left: auto;
    width: min(78vw, 340px);
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 10px 10px;

    background: rgba(26,26,26,0.825);
    backdrop-filter: blur(6px) saturate(1.1);
    -webkit-backdrop-filter: blur(6px) saturate(1.1);

    border: 1px solid rgba(255,255,255,.10);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,.45);
    z-index: 2000;
    overflow: visible;
  }
  .menu-toggle:checked ~ nav { display:flex; }

  nav a {
    padding: 12px 12px;
    font-size: 1rem;
    border-radius: 10px;
  }
  nav a:hover { background: rgba(255,255,255,.10); }

  /* Mobile typography & spacing tweaks for hero */
  .main-content h2 {
    font-size: 1.6rem;
    margin: 6px 0 2px;
  }
  .subtitle {
    margin: 0 0 10px;
    font-size: .96rem;
  }
}

/* ===== Focus Styles ===== */
nav a:focus-visible,
.hamburger:focus-visible,
.brand:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ===== Headings ===== */
h1, h2, .page-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 800;
  letter-spacing: .2px;
  line-height: 1.15;
}

/* Page titles / prominent headings */
.page-title,
section h2 {
  background: linear-gradient(90deg, #00c2ff 0%, #2ee6b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 2rem;
  margin: 0 0 8px;
}
