@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Fira+Code:wght@400;500;600&display=swap');

:root {
  --green: #3cb371;
  --green-strong: #2d9a5e;
  --green-bright: #5fe09a;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f0faf4;
  --text: #1a202c;
  --text-soft: #334155;
  --muted: #64748b;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(60, 179, 113, 0.22);
  --shadow: 0 18px 44px -18px rgba(7, 26, 15, 0.12);
  --accent-text: #2d9a5e;
  --chip-bg: rgba(60, 179, 113, 0.08);
  --band-soft: #f4f6f9;
}

body.dark-mode {
  --green: #3cb371;
  --green-strong: #5fe09a;
  --green-bright: #5fe09a;
  --bg: #070c14;
  --surface: #101828;
  --surface-2: #0d1a12;
  --text: #e8f0fe;
  --text-soft: #c8d4e0;
  --muted: #8ba0b8;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(60, 179, 113, 0.28);
  --shadow: 0 24px 56px -22px rgba(0, 0, 0, 0.55);
  --accent-text: #5fe09a;
  --chip-bg: rgba(60, 179, 113, 0.12);
  --band-soft: #070c14;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}
.mono { font-family: 'Fira Code', monospace; }

.t-soft { color: var(--text-soft); }
.t-muted { color: var(--muted); }
.t-accent { color: var(--accent-text); }

.section-band { position: relative; z-index: 1; }
.section-soft { background: var(--band-soft); }

.g-text {
  background: linear-gradient(120deg, var(--green) 10%, var(--green-bright) 50%, var(--green) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: background 0.3s, border-color 0.3s;
}

.btn-p {
  background: linear-gradient(135deg, #3cb371, #2d9a5e);
  color: #fff;
  font-weight: 700;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  border: none;
  box-shadow: 0 10px 30px -10px rgba(45, 154, 94, 0.6);
  transition: box-shadow 0.25s, transform 0.25s;
}
.btn-p:hover {
  box-shadow: 0 16px 40px -10px rgba(45, 154, 94, 0.75);
  transform: translateY(-2px);
}

.btn-o {
  background: var(--chip-bg);
  color: var(--accent-text);
  border: 1px solid var(--border-strong);
  font-weight: 600;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.btn-o:hover {
  background: var(--surface-2);
  border-color: var(--green);
}

.theme-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-soft);
  transition: border-color 0.2s, color 0.2s;
}
.theme-btn:hover { border-color: var(--green); color: var(--accent-text); }
.theme-btn .icon-sun { display: none; }
body.dark-mode .theme-btn .icon-sun { display: block; }
body.dark-mode .theme-btn .icon-moon { display: none; }

.portal-footer {
  background: #0a3d22;
  border-top: 1px solid rgba(60, 179, 113, 0.15);
  color: rgba(255, 255, 255, 0.45);
}
.portal-footer p:not([style*="color:#3cb371"]),
.portal-footer a,
.portal-footer div.flex.flex-col {
  color: rgba(255, 255, 255, 0.45) !important;
}
.portal-footer .footer-copy,
.portal-footer .footer-copy p {
  color: rgba(255, 255, 255, 0.72) !important;
}
.portal-footer .site-footer-powered {
  color: rgba(255, 255, 255, 0.58) !important;
  opacity: 1 !important;
}
.portal-footer a:hover { color: #3cb371 !important; }

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--chip-bg);
  border: 1px solid var(--border-strong);
  color: var(--accent-text);
}

/* ── Portal header (mobile: logo + SPECTRE + menu only) ── */
.portal-brand-sub {
  display: block;
  font-size: 0.5rem;
  line-height: 1.3;
  letter-spacing: 0.14em;
}
@media (min-width: 640px) {
  .portal-brand-sub { font-size: 0.5625rem; letter-spacing: 0.2em; }
}
.header-menu-btn { display: inline-flex; }
.header-actions-desktop { display: none; }
@media (min-width: 1024px) {
  .header-menu-btn { display: none; }
  .header-actions-desktop {
    display: flex;
    align-items: center;
    gap: 0.625rem;
  }
}

/* ── Mobile nav sidebar ── */
#mobile-nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 60;
  backdrop-filter: blur(2px);
}
#mobile-nav-backdrop.open { display: block; }
#mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 280px;
  z-index: 70;
  transform: translateX(-100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
}
#mobile-nav.open { transform: translateX(0); }
.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
  text-decoration: none;
  transition: background 0.18s, color 0.18s;
  border: none;
  background: none;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.mobile-nav-link:hover {
  background: rgba(60, 179, 113, 0.12);
  color: var(--accent-text);
}
.mobile-nav-theme {
  width: 100%;
  height: auto;
  padding: 11px 14px;
  justify-content: flex-start;
  gap: 12px;
  border-radius: 12px;
}
.mobile-nav-theme .theme-toggle-label { font-size: 0.9rem; font-weight: 600; }

/* ── Sleek theme mode toggle ── */
.theme-mode-toggle-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: var(--chip-bg);
  cursor: pointer;
  transition: background .2s, border-color .2s;
  font-family: inherit;
}
.theme-mode-toggle-btn:hover {
  background: var(--surface-2);
  border-color: var(--green);
}
.theme-mode-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-soft);
}
.theme-switch {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: var(--border-strong);
  position: relative;
  flex-shrink: 0;
  transition: background .25s;
}
.theme-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
  transition: transform .25s;
}
body.dark-mode .theme-switch { background: #3cb371; }
body.dark-mode .theme-knob { transform: translateX(16px); }
.theme-mode-toggle-btn .icon-sun { display: none; }
body.dark-mode .theme-mode-toggle-btn .icon-sun { display: block; }
body.dark-mode .theme-mode-toggle-btn .icon-moon { display: none; }
