/* =========================
   Design tokens
   ========================= */
:root {
  /* Core neutrals */
  --color-bg: #12151E;        /* Charcoal */
  --color-surface: #2B3040;   /* Slate */
  --color-text: #F2F4F7;      /* Off-White */
  --color-muted: #b8bcc9;

  /* Accent */
  --color-primary: #4C8C6A;        /* Green */
  --color-primary-hover: #3f7559;
  --color-accent: #E2B64A;         /* Signal Amber */

  /* Utility */
  --color-border: #F2F4F7;
  --radius-sm: 6px;
  --radius-md: 10px;

  /* Fonts */
  --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* =========================
   Fonts
   ========================= */

/* Inter */
@font-face {
  font-family: "Inter";
  src: url("/public/fonts/inter/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/public/fonts/inter/Inter-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/public/fonts/inter/Inter-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* JetBrains Mono */
@font-face {
  font-family: "JetBrains Mono";
  src: url("/public/fonts/jetbrains-mono/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/public/fonts/jetbrains-mono/JetBrainsMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* =========================
   Base styles
   ========================= */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--color-bg, #12151E);
  color: var(--color-text, #F2F4F7);
  font-family: var(--font-body, system-ui, -apple-system, Segoe UI, Roboto, sans-serif);
}

a { color: inherit; }

/* =========================
   Header / Nav (Desktop)
   ========================= */

.site-header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

/* Desktop layout: logo | center | right */
.nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5px 20px;

  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 28px;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.nav-wordmark {
  display: block;
  height: 28px;
  width: auto;
  max-width: 220px;
}

/* Desktop groups */
.nav-center {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 22px;
  min-width: 0;
}

.nav-center a {
  text-decoration: none;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  font-size: 0.70rem;
}

.nav-center a:hover {
  color: var(--color-muted);
}

.nav-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
  font-size: 0.70rem;
}

.nav-right a {
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}

/* Login */
.nav-right a.nav-login {
  color: var(--color-text);
}

.nav-right a.nav-login:hover {
  color: var(--color-muted);
}

/* CTA */
.nav-right a.nav-cta {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}

.nav-right a.nav-cta:hover {
  background: var(--color-primary-hover);
}

/* =========================
   Mobile hamburger (no JS)
   Requires the <details class="nav-mobile"> markup
   ========================= */

.nav-desktop {
  display: contents; /* allows center/right to participate in grid on desktop */
}

.nav-mobile {
  display: none;
  justify-self: end;
}

/* Burger button */
.nav-burger {
  list-style: none;
  cursor: pointer;
  width: 44px;
  height: 40px;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
}

.nav-burger::-webkit-details-marker { display: none; }

.burger-line {
  width: 25px;
  height: 1px;
  background: var(--color-text);
  display: block;
  border-radius: 2px;
}

.nav-burger .burger-line + .burger-line {
  margin-top: 1px;
}

/* Drawer */
.nav-drawer {
  margin-top: 10px;
  padding: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: grid;
  gap: 10px;
  min-width: 220px;
}

.nav-drawer a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  padding: 10px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.nav-drawer a:hover {
  background: rgba(242, 244, 247, 0.06);
}

.nav-drawer a.nav-login {
  color: var(--color-accent);
}

.nav-drawer a.nav-cta {
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  text-align: center;
}

.nav-drawer a.nav-cta:hover {
  background: var(--color-primary-hover);
}

/* =========================
   Responsive: switch to hamburger
   ========================= */
/* Mobile: keep logo fixed, right-align burger + drawer, don't shift layout */
@media (max-width: 820px) {
  /* header stays single-row: logo + burger */
  .nav {
    position: relative;               /* anchor for absolute drawer */
    grid-template-columns: auto 1fr auto;
    column-gap: 12px;
    align-items: center;
  }

  /* hide desktop link groups */
  .nav-center,
  .nav-right {
    display: none;
  }

  /* show hamburger */
  .nav-mobile {
    display: block;
    justify-self: end;
  }

  /* keep logo left */
  .nav-logo {
    justify-self: start;
  }

  /* overlay drawer, right-aligned, no layout shift */
  .nav-drawer {
    position: absolute;
    top: calc(100% + 10px);
    right: 20px;                      /* match .nav padding */
    margin-top: 0;
    min-width: 240px;
    z-index: 50;
  }
}


