/* ============================================================
   Threat Forge — Base Element Styles
   ============================================================ */

/* ── Google Font Import ──────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Body ────────────────────────────────────────────────────── */
body {
  font-family: var(--font-family);
  font-size: var(--text-md);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-dark);
  overflow-x: hidden;
  position: relative;
}

/* ── Headings ────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-heading);
  line-height: var(--leading-tight);
  font-weight: var(--weight-bold);
}

h1 {
  font-size: var(--text-6xl);
  font-weight: var(--weight-extrabold);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

h2 {
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
  line-height: var(--leading-tight);
}

h3 {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.01em;
}

h4 {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
}

h5 {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
}

h6 {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Paragraphs ──────────────────────────────────────────────── */
p {
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  max-width: 72ch;
}

p:last-child {
  margin-bottom: 0;
}

/* ── Links ───────────────────────────────────────────────────── */
a {
  color: var(--primary);
  transition: var(--transition-base);
}

a:hover {
  color: var(--text-heading);
}

a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── Section Label (small uppercase cyan tag) ────────────────── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: var(--space-4);
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--primary-glow-strong);
}

/* ── Selection ───────────────────────────────────────────────── */
::selection {
  background-color: rgba(0, 240, 255, 0.25);
  color: var(--text-heading);
}

::-moz-selection {
  background-color: rgba(0, 240, 255, 0.25);
  color: var(--text-heading);
}

/* ── Focus Visible ───────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ── Code / Pre ──────────────────────────────────────────────── */
code,
kbd,
pre,
samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

code {
  background: rgba(0, 240, 255, 0.08);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  color: var(--primary);
}

pre {
  background: var(--bg-card);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow-x: auto;
}

pre code {
  background: none;
  padding: 0;
  font-size: var(--text-sm);
}

/* ── Lists (when styled) ─────────────────────────────────────── */
.styled-list li {
  position: relative;
  padding-left: var(--space-6);
  margin-bottom: var(--space-3);
  color: var(--text-secondary);
}

.styled-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: var(--weight-bold);
}

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.20);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) var(--bg-dark);
}

/* ── Utility: Container ──────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.container-wide {
  max-width: var(--container-wide);
}

/* ── Section Spacing ─────────────────────────────────────────── */
section {
  position: relative;
  padding-top: var(--space-24);
  padding-bottom: var(--space-24);
}

/* ── Mark / Highlight ────────────────────────────────────────── */
mark {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(123, 97, 255, 0.2));
  color: var(--text-heading);
  padding: 0.1em 0.3em;
  border-radius: var(--radius-sm);
}

/* ── Gradient Text Utility ───────────────────────────────────── */
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cyan-text {
  color: var(--primary);
}
