:root{
  --bg: #000;
  --text: #eee;
  --muted: #cccccc;
  --panel: #111;
  --panel2: #0a0a0a;
  --line: #333;
  --white: #ffffff;

  /* Brand system (no blue) */
  --color-primary: #ffeaa7;              /* your pale yellow */
  --color-primary-soft: rgba(255, 234, 167, 0.14);
  --color-border-strong: rgba(255, 234, 167, 0.55);

  /* Accent / emphasis (still pale-yellow family) */
  --color-accent: var(--color-primary);
  --color-accent-soft: var(--color-primary-soft);

  /* Status colors */
  --color-danger: #C40233;               /* keep if you still want red warnings */
  --color-danger-soft: rgba(196, 2, 51, 0.12);

  /* Typography */
  --font-body: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* TEMP ALIASES (remove later once all references are migrated) */
  --un-blue: var(--color-primary);
  --ruby-red: var(--color-danger);
}

.hero-home-link {
  display: inline-flex;
}

.hero-home-link img {
  transition: opacity 0.2s ease;
}

.hero-home-link:hover img {
  opacity: 0.85;
}

.menu { display: none; }
.menu.is-open { display: block; }

.menu-overlay { display: none; }
.menu-overlay.is-open { display: block; }

body.menu-open { overflow: hidden; }


    html{
      font-size: 18px; /* bigger base */
    }

    body {
      font-family: var(--font-body);
      line-height: 1.65;
      padding: 42px 18px;
      max-width: 960px;
      margin: auto;
      background: var(--bg);
      color: var(--text);
      text-rendering: optimizeLegibility;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }
/* Enhanced Navigation Menu */
.site-nav {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--line);
}

.site-nav a {
    font-family: var(--font-mono);
    font-size: 1rem; /* Bigger, clearer text */
    font-weight: 700; /* Bold for immediate recognition */
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.site-nav a:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

/* Clear "You Are Here" indicator */
.site-nav a.active {
    color: var(--color-primary);
    background: rgba(0, 158, 219, 0.1);
    border: 1px solid var(--color-primary);
}

.nav-divider {
    color: var(--line);
    font-weight: 400;
}

    /* Headings */
    h1, h2, h3 {
      color: var(--white);
      text-transform: uppercase;
      letter-spacing: 1.6px;
    }

    /* Hero header with Delta */
    .hero{
      display: flex;
      align-items: flex-start;
      gap: 16px;
      margin: 6px 0 18px;
      padding-bottom: 22px;
      border-bottom: 2px solid var(--white);
    }

    .hero-mark {
  width: 78px;
  height: 78px;
  object-fit: contain;
  flex: 0 0 auto;
  margin-top: -4px;
}

    .hero-title{
      margin: 0;
      font-size: 56px;
      line-height: 1.05;
      letter-spacing: 2px;
      color: var(--color-primary); /* colour on the main title */
    }

    .lede{
      margin-top: 16px;
      margin-bottom: 34px;
      color: var(--text);
      font-size: 1.05rem;
    }

    .lede em{
      color: var(--text);
      font-style: italic;
    }

    /* Section headers */
    h2{
      border-bottom: 1px solid var(--line);
      padding-bottom: 10px;
      margin-top: 54px;
      margin-bottom: 18px;
    }

    h3{
      margin-top: 0;
      margin-bottom: 10px;
    }

    /* Panels */
    .bio {
      background: #1a1a1a;
      padding: 22px;
      border-left: 4px solid var(--white);
      margin-bottom: 22px;
      border-radius: 6px;
    }

    .diagnostic-box {
      background: var(--panel2);
      padding: 26px;
      margin: 28px 0;
      border-left: 4px solid var(--ruby-red);
      border-radius: 6px;
    }

    .shadow-box {
      background: var(--panel);
      padding: 24px;
      margin: 28px 0;
      border-left: 4px solid var(--white);
      border-radius: 6px;
    }

    .challenge-box {
      border: 2px dashed var(--white);
      padding: 28px;
      margin: 52px 0;
      background: var(--panel2);
      border-radius: 6px;
    }

    .contact-box {
      background: var(--panel2);
      padding: 26px;
      margin: 52px 0;
      border-left: 4px solid var(--white);
      border-radius: 6px;
    }

    .ip-box{
      background: var(--panel2);
      padding: 26px;
      margin: 40px 0 18px;
      border-left: 4px solid var(--color-primary);
      border-radius: 6px;
    }

    .ip-box p{
      margin: 12px 0;
    }

    /* Lists */
ul {
  list-style: square;
  padding-left: 1.6rem;     /* consistent indent */
  margin: 14px 0 18px;      /* breathing room around lists */
}
li {
  margin: 0 0 10px 0;       /* tighter vertical rhythm */
  line-height: 1.6;
}
/* Nested lists */
ul ul {
  list-style: square;
  margin-top: 10px;
  margin-bottom: 10px;
  padding-left: 1.4rem;
}
/* Optional: use when you want slightly tighter bullets in dense sections */
ul.bullet-tight li {
  margin-bottom: 8px;
}

    /* Links */
    a { color: var(--white); text-decoration: none; font-weight: 700; }
    a:hover { text-decoration: underline; }

    /* Canonical principle link (USS) */
.principle-link {
  color: var(--color-primary);
  font-weight: 700;
}

.principle-link:hover {
  text-decoration: underline;
}


    /* Small labels */
    .red-team { color: var(--white); font-weight: 700; }
    .warning { color: var(--ruby-red); font-weight: 700; }

    /* Archive link button */
    .archive-link {
      display: inline-block;
      margin: 18px 0 6px;
      padding: 10px 16px;
      background: var(--panel);
      border: 1px solid var(--white);
      border-radius: 6px;
      font-family: var(--font-mono);
      font-size: 0.95rem;
    }

    /* Mailchimp box */
    .mailchimp-box {
      background: var(--panel);
      padding: 28px;
      margin: 52px 0;
      border: 1px solid var(--line);
      text-align: center;
      border-radius: 6px;
    }

    .mailchimp-box input[type="email"] {
      width: min(520px, 95%);
      padding: 12px 14px;
      margin: 16px 0 12px;
      background: var(--bg);
      border: 1px solid var(--white);
      color: var(--white);
      font-family: var(--font-body);
      font-size: 1rem;
      border-radius: 6px;
    }

    .mailchimp-box button {
      padding: 12px 22px;
      background: var(--white);
      color: var(--bg);
      border: none;
      font-weight: 800;
      cursor: pointer;
      font-family: var(--font-mono);
      text-transform: uppercase;
      border-radius: 6px;
    }

    .mailchimp-box button:hover { background: #d7d7d7; }

    /* Details/summary styling */
    details{
      margin-top: 14px;
      color: var(--muted);
    }

    summary{
      cursor: pointer;
      color: var(--white);
      font-weight: 800;
      font-family: var(--font-mono);
      letter-spacing: 0.6px;
    }

    /* Footer */
    .footer{
      margin-top: 62px;
      color: var(--muted);
      font-family: var(--font-mono);
      font-size: 0.9rem;
      line-height: 1.6;
    }

    /* Mobile tweaks */
    @media (max-width: 520px){
      html{ font-size: 17px; }
      body{ padding: 34px 14px; }
      .hero-mark{ font-size: 64px; }
      .hero-title{ font-size: 46px; }
    }


/* ================================
   NAVIGATION SYSTEM
   Mobile: Hamburger overlay menu
   Desktop: Fixed side menu
================================ */

/* DESKTOP SIDE MENU */
.side-menu {
  display: none; /* Hidden on mobile */
}

@media (min-width: 900px) {

  .side-menu {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    width: 240px;

    height: 100dvh;          /* replace 100vh */
    max-height: 100dvh;

    background: var(--panel);
    border-left: 1px solid var(--line);
    padding: 32px 24px 96px; /* add bottom runway here */
    overflow-y: auto;
    overscroll-behavior: contain;

    z-index: 100;
  }

  .side-menu__inner {
    padding-bottom: 96px;
  }

  /* Shift content left */
  body {
    padding-right: 280px;
  }
}

  .side-menu__inner {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .side-menu__heading {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    margin-top: 24px;
    margin-bottom: 8px;
  }

  .side-menu__heading:first-child {
    margin-top: 0;
  }

  .side-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
  }

  .side-menu a:hover {
    background: rgba(255,255,255,0.05);
    color: var(--white);
  }

  .side-menu a.active {
   background: var(--color-accent-soft);
    color: var(--color-primary);
    border-color: var(--color-primary);
    font-weight: 700;
  }

  /* Shift content left to make room for side menu */
  body {
    padding-right: 280px; /* Side menu width (240px) + extra spacing */
  }


/* MOBILE HAMBURGER & OVERLAY */
.hamburger {
  display: inline-flex;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 11000;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hamburger:hover {
  background: rgba(0,0,0,0.75);
  border-color: rgba(255,255,255,0.3);
}

.hamburger__icon {
  color: #fff;
  font-size: 22px;
  line-height: 1;
  transform: translateY(-1px);
}

/* When menu is open, change icon to X */
.hamburger.is-open .hamburger__icon {
  font-size: 28px;
  font-weight: 300;
}

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  /* iOS-safe viewport sizing */
  height: 100dvh;

  display: flex;
  justify-content: center;
  align-items: flex-start;

  padding: 80px 16px calc(28px + env(safe-area-inset-bottom));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu__backdrop {
  position: absolute;
  inset: 0;
  cursor: pointer;
}

.mobile-menu__panel {
  position: relative;
  width: min(420px, 92vw);

  /* iOS-safe height math */
  max-height: calc(100dvh - 120px);
  overflow-y: auto;

  background: #0d0d0d;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 16px;

  padding: 24px;
  padding-bottom: calc(44px + env(safe-area-inset-bottom)); /* guarantees you can reach the last item */

  box-shadow: 0 20px 60px rgba(0,0,0,0.9);

  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;

  z-index: 1;
}

.mobile-menu__title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-menu .nav-group {
  margin-bottom: 20px;
}

.mobile-menu .nav-label {
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin: 16px 0 10px;
}

.mobile-menu .nav-link {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 8px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.mobile-menu .nav-link:hover {
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
  color: var(--white);
}

/* Lock page scroll when menu is open */
body.menu-open {
  overflow: hidden;
}

/* Safety reset: never reserve side-menu space on phones/tablets */
@media (max-width: 899px) {
  body {
    padding-right: 0 !important;
  }
}
  

/* Make the menu panel scroll properly on mobile */
.mobile-menu__panel {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

/* Ensure panel is above backdrop for touch/scroll */
.mobile-menu__backdrop { z-index: 0; }
.mobile-menu__panel { z-index: 1; }

/* Fix: Ensure mobile menu can scroll to bottom items (e.g., Briefs) */
.mobile-menu__panel {
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  padding-bottom: 60px; /* extra space so last item isn't cut off */
}

.mobile-menu__backdrop {
  pointer-events: none;
}

/* PHONE MENU SCROLL FIX (iOS/Android): use dynamic viewport + give bottom runway */
@media (max-width: 899px) {

  .mobile-menu {
    height: 100dvh;            /* fixes iOS 100vh lying */
    max-height: 100dvh;
    overflow: hidden;          /* overlay itself should not scroll */
    padding-bottom: env(safe-area-inset-bottom);
  }

  .mobile-menu__panel {
    max-height: calc(100dvh - 120px); /* replaces any 100vh-based max-height */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;

    /* runway so the last nav group can scroll fully into view */
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  .mobile-menu__content {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }
}