/* ============================================
   AI Red Teaming Portfolio — Custom Theme
   Dark, terminal-inspired security aesthetic
   ============================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #1c2128;
  --bg-card: #1c2128;
  --border: #30363d;
  --border-light: #21262d;

  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #484f58;

  --accent-red: #f85149;
  --accent-orange: #d29922;
  --accent-green: #3fb950;
  --accent-blue: #58a6ff;
  --accent-purple: #bc8cff;
  --accent-cyan: #39d353;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', monospace;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --header-height: 60px;
  --sidebar-width: 240px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-icon {
  font-size: 20px;
}

.logo-text {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.3px;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-stat {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.status-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 20px;
}

.status-wip {
  background: rgba(210, 153, 34, 0.15);
  color: var(--accent-orange);
  border: 1px solid rgba(210, 153, 34, 0.3);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ---------- Layout ---------- */
.site-wrapper {
  display: flex;
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 20px 0;
}

.nav-section {
  margin-bottom: 24px;
}

.nav-section-title {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  padding: 0 20px;
  margin-bottom: 8px;
}

.nav-link {
  display: block;
  padding: 8px 20px;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
  border-left-color: var(--accent-blue);
}

.nav-link.active {
  color: var(--accent-blue);
  background: rgba(88, 166, 255, 0.06);
  border-left-color: var(--accent-blue);
}

.nav-link.sub {
  padding-left: 32px;
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ---------- Content ---------- */
.content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 40px 48px;
  max-width: 900px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  color: var(--text-primary);
  line-height: 1.3;
  margin-top: 2em;
  margin-bottom: 0.6em;
}

h1 {
  font-size: 2em;
  font-weight: 700;
  letter-spacing: -0.5px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

h2 {
  font-size: 1.5em;
  font-weight: 600;
  letter-spacing: -0.3px;
}

h3 {
  font-size: 1.2em;
  font-weight: 600;
  color: var(--text-secondary);
}

h1:first-child { margin-top: 0; }

p {
  margin-bottom: 1em;
  color: var(--text-secondary);
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-purple);
  text-decoration: underline;
}

strong {
  color: var(--text-primary);
  font-weight: 600;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}

/* ---------- Lists ---------- */
ul, ol {
  padding-left: 1.5em;
  margin-bottom: 1em;
}

li {
  margin-bottom: 0.4em;
  color: var(--text-secondary);
}

li strong {
  color: var(--text-primary);
}

/* ---------- Tables ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 14px;
}

thead th {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 10px 14px;
  text-align: left;
  border-bottom: 2px solid var(--border);
}

tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* ---------- Code ---------- */
code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--accent-orange);
  border: 1px solid var(--border);
}

pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  overflow-x: auto;
  margin: 1.5em 0;
  line-height: 1.5;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-secondary);
  font-size: 13px;
}

/* ---------- Blockquotes ---------- */
blockquote {
  border-left: 3px solid var(--accent-blue);
  padding: 12px 20px;
  margin: 1.5em 0;
  background: rgba(88, 166, 255, 0.04);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

blockquote p {
  margin-bottom: 0;
  color: var(--text-secondary);
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
  transition: border-color 0.3s ease, transform 0.2s ease;
}

.card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-1px);
}

.card-title {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.card-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.card-description {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ---------- Status Labels ---------- */
.label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 20px;
}

.label-safe {
  background: rgba(63, 185, 80, 0.12);
  color: var(--accent-green);
  border: 1px solid rgba(63, 185, 80, 0.25);
}

.label-partial {
  background: rgba(210, 153, 34, 0.12);
  color: var(--accent-orange);
  border: 1px solid rgba(210, 153, 34, 0.25);
}

.label-fail {
  background: rgba(248, 81, 73, 0.12);
  color: var(--accent-red);
  border: 1px solid rgba(248, 81, 73, 0.25);
}

.label-critical {
  background: rgba(248, 81, 73, 0.2);
  color: #ff7b72;
  border: 1px solid rgba(248, 81, 73, 0.4);
}

.label-planned {
  background: rgba(139, 148, 158, 0.12);
  color: var(--text-secondary);
  border: 1px solid rgba(139, 148, 158, 0.25);
}

.label-complete {
  background: rgba(63, 185, 80, 0.12);
  color: var(--accent-green);
  border: 1px solid rgba(63, 185, 80, 0.25);
}

/* ---------- Hero Section ---------- */
.hero {
  margin-bottom: 3em;
  padding-bottom: 2em;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: 2.4em;
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0.3em;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.1em;
  color: var(--text-secondary);
  margin-bottom: 1.5em;
  max-width: 600px;
}

.hero-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  min-width: 140px;
  transition: border-color 0.3s ease;
}

.stat:hover {
  border-color: var(--accent-blue);
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.8em;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---------- WIP Banner ---------- */
.wip-banner {
  background: rgba(210, 153, 34, 0.08);
  border: 1px solid rgba(210, 153, 34, 0.2);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin-bottom: 2em;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--accent-orange);
}

.wip-banner-icon {
  font-size: 18px;
}

/* ---------- Report Grid ---------- */
.report-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 1.5em 0;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 48px;
  margin-left: var(--sidebar-width);
  background: var(--bg-secondary);
}

.footer-inner {
  max-width: 900px;
}

.footer-author {
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.footer-disclaimer {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.6;
  margin-bottom: 8px;
}

.footer-copyright {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .sidebar {
    display: none;
  }

  .content {
    margin-left: 0;
    padding: 24px 20px;
  }

  .site-footer {
    margin-left: 0;
    padding: 24px 20px;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .header-meta .header-stat {
    display: none;
  }

  .hero h1 {
    font-size: 1.8em;
  }

  .hero-stats {
    gap: 10px;
  }

  .stat {
    min-width: 100px;
    padding: 12px 14px;
  }

  .stat-value {
    font-size: 1.4em;
  }

  table {
    font-size: 12px;
  }

  thead th, tbody td {
    padding: 8px 10px;
  }
}

@media (max-width: 480px) {
  .hero-stats {
    flex-direction: column;
  }

  .stat {
    min-width: auto;
  }
}
