/* ================= VARIABLES ================= */
:root {
  /* Colors */
  --color-bg: #10141a;
  --color-surface: #181e26;
  --color-text: #eef1f5;
  --color-primary: #23c1ad;
  --color-success: #56e39f;
  --color-warning: #ffe156;
  --color-danger: #ff5252;
  --color-gray-100: #f5f6fa;
  --color-gray-200: #e9ecef;
  --color-gray-300: #cfd8dc;
  --color-gray-400: #b0b8c1;
  --color-gray-500: #8797a1;
  --color-gray-600: #536170;
  --color-gray-700: #383f4a;
  --color-gray-800: #232730;
  --color-gray-900: #16181f;

  /* Typography */
  --font-sans: 'Inter', 'Segoe UI', 'Arial', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Mono', monospace;
  --font-base-size: 1rem; /* 16px */
  --font-xs: 0.75rem;
  --font-sm: 0.875rem;
  --font-md: 1rem;
  --font-lg: 1.25rem;
  --font-xl: 1.5rem;
  --font-xxl: 2rem;
  --line-height-tight: 1.2;
  --line-height-base: 1.5;
  --line-length: 70ch;

  /* Spacing (0-96px, 4px scale) */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;

  /* Radius, Shadows, Transitions */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 16px;

  --shadow-xs: 0 1px 2px rgba(16, 20, 26, 0.04);
  --shadow-sm: 0 2px 6px rgba(16, 20, 26, 0.08);
  --shadow: 0 4px 16px rgba(16, 20, 26, 0.13);

  --transition-fast: 120ms;
  --transition: 240ms cubic-bezier(0.5,0,0.45,1);
}

/* ================ RESET & NORMALIZE ================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
  background: var(--color-bg);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--font-base-size);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition), color var(--transition);
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

ul,ol {
  margin: 0;
  padding-left: var(--space-4);
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
  margin: 0;
}

hr {
  border: none;
  border-top: 1px solid var(--color-gray-700);
  margin: var(--space-8) 0;
}

pre, code, kbd, samp {
  font-family: var(--font-mono);
}

/* ================= BASE STYLES ================= */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  font-family: var(--font-sans);
  line-height: var(--line-height-tight);
  color: var(--color-primary);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

h1 {
  font-size: var(--font-xxl);
  letter-spacing: -1px;
}
h2 {
  font-size: var(--font-xl);
}
h3 {
  font-size: var(--font-lg);
}
h4 {
  font-size: var(--font-md);
}
h5 {
  font-size: var(--font-sm);
}
h6 {
  font-size: var(--font-xs);
}

p {
  font-size: var(--font-md);
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

a {
  color: var(--color-primary);
  text-decoration: underline;
  transition: color var(--transition);
}
a:hover,
a:focus-visible {
  color: var(--color-success);
  text-decoration: none;
  outline: none;
}
a:active {
  color: var(--color-danger);
}

/* Accessibility: Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation-duration: 0.0001ms !important;
    animation-iteration-count: 1 !important;
  }
  html {
    scroll-behavior: auto;
  }
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* =================== UTILITIES ==================== */
.container {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
  width: 100%;
}

.flex {
  display: flex;
  gap: var(--space-4);
}
.grid {
  display: grid;
  gap: var(--space-4);
}
.space-between {
  justify-content: space-between;
  align-items: center;
}
.items-center {
  align-items: center;
}
.justify-center {
  justify-content: center;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
  white-space: nowrap;
}

/* =================== COMPONENTS =================== */
.button, button, input[type="button"], input[type="submit"], input[type="reset"] {
  display: inline-block;
  padding: var(--space-3) var(--space-6);
  font-size: var(--font-md);
  font-family: inherit;
  font-weight: 600;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition), color var(--transition);
}
.button:hover, button:hover,
.button:focus-visible, button:focus-visible {
  background: var(--color-success);
  color: var(--color-bg);
  box-shadow: var(--shadow-sm);
}
.button:disabled, button:disabled,
input:disabled[type="submit"], input:disabled[type="button"] {
  background: var(--color-gray-700);
  color: var(--color-gray-400);
  cursor: not-allowed;
  opacity: 0.7;
}

input, textarea, select {
  font-family: inherit;
  font-size: var(--font-md);
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-gray-700);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(35,193,173,0.3);
}
input:disabled, textarea:disabled, select:disabled {
  background: var(--color-gray-800);
  color: var(--color-gray-500);
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: var(--space-8);
  margin-bottom: var(--space-8);
  color: var(--color-text);
  transition: box-shadow var(--transition);
}
.card:hover, .card:focus-within {
  box-shadow: 0 6px 28px rgba(35,193,173,0.13);
}

/* ===== Custom accents for espionage theme ===== */
.mark, mark, .highlight {
  background: linear-gradient(90deg, var(--color-primary) 20%, var(--color-bg) 100%);
  color: var(--color-bg);
  border-radius: var(--radius-sm);
  padding: 0 2px;
}

code {
  background: var(--color-gray-900);
  border-radius: var(--radius-sm);
  padding: 0 4px;
  color: var(--color-warning);
  font-size: var(--font-sm);
}

/* ============ END OF BASE.CSS ============ */


/* ================= HEADER & FOOTER STYLES (from home.css) ================= */
.site-header {
  background: var(--color-surface);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: var(--shadow-xs);
  padding: var(--space-2) 0;
}
.site-logo {
  display: flex;
  align-items: center;
  font-size: var(--font-lg);
  font-weight: 700;
  text-decoration: none;
  color: var(--color-primary);
}
.logo-icon {
  font-size: 1.6em;
  margin-right: var(--space-2);
}
.site-name {
  letter-spacing: 1px;
}

.main-nav {
  position: relative;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
  width: 40px;
  height: 36px;
}
.nav-toggle span {
  display: block;
  height: 4px;
  width: 20px!important;
  background: var(--color-primary);
  border-radius: 2px;
  transition: transform 180ms, background 180ms;
}

.nav-menu {
  gap: var(--space-4);
  list-style: none;
  align-items: center;
}
.nav-menu a {
  font-weight: 500;
  font-size: var(--font-md);
  text-decoration: none;
  color: var(--color-text);
  transition: color var(--transition);
}
.nav-menu a:hover, .nav-menu a:focus-visible {
  color: var(--color-primary);
}
/* Responsive navigation (mobile) */
@media (max-width: 840px) {
  .nav-toggle {
    display: flex;
    align-items: center;
  }
  .nav-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--color-bg);
    box-shadow: var(--shadow);
    flex-direction: column;
    min-width: 210px;
    align-items: flex-start;
    padding: var(--space-6);
    z-index: 11;
    border-radius: var(--radius-lg);
    display: none;
  }
  .nav-menu.open {
    display: flex;
  }
}

/* =========== Footer Styles =========== */
.site-footer {
  background: var(--color-surface);
  padding: var(--space-10) 0 var(--space-6) 0;
  color: var(--color-gray-200);
  box-shadow: var(--shadow-xs);
}
.footer-brand {
  font-weight: 700;
  font-size: var(--font-md);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.footer-nav ul,
.footer-legal ul {
  gap: var(--space-4);
  list-style: none;
}
.footer-nav a, .footer-legal a {
  color: var(--color-primary);
  text-decoration: none;
  font-size: var(--font-sm);
}
.footer-nav a:hover,
.footer-legal a:hover,
.footer-nav a:focus-visible,
.footer-legal a:focus-visible {
  color: var(--color-success);
  text-decoration: underline;
}
.copyright {
  margin-top: var(--space-6);
  text-align: center;
  color: var(--color-gray-300);
}

/* Responsive tweaks for footer/nav */
@media (max-width: 530px) {
  .footer-nav ul,
  .footer-legal ul {
    flex-direction: column;
    gap: var(--space-2);
  }
  .footer-brand { font-size: var(--font-base-size); }
}

/* =========== Cookie Consent Banner =========== */
.cookie-consent {
  position: fixed;
  z-index: 10000;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg);
  color: var(--color-text);
  box-shadow: 0 -2px 8px rgba(16,20,26,0.18);
  padding: 0;
  display: none;
  width: 100vw;
}
.cookie-consent.active {
  display: block;
}
.cookie-content {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: flex-start;
}
.cookie-message {
  font-size: var(--font-sm);
  color: var(--color-text);
}
.cookie-actions {
  display: flex;
  gap: var(--space-4);
}
@media (max-width: 530px) {
  .cookie-content { padding: var(--space-4) var(--space-1); }
}

/* ============ END OF HEADER & FOOTER STYLES ============ */
