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

:root {
  --bg:         #0a0a0f;
  --bg-raised:  #13131a;
  --text:       #f0e6ff;
  --text-muted: #9a8cb8;
  --accent:     #a855f7;
  --accent-glow: rgba(168, 85, 247, 0.55);
  --border:     #2a2040;
  --radius:     8px;
  --font:       "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

html {
  font-size: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
}

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 0 18px var(--accent-glow);
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 1.75rem; margin-top: 2.5rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.25rem; margin-top: 1.75rem; margin-bottom: 0.5rem; }

p {
  margin-bottom: 1.25rem;
  color: var(--text);
}

strong { color: #fff; }

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

a:hover,
a:focus-visible {
  color: #c084fc;
  text-shadow: 0 0 12px var(--accent-glow);
}

::selection {
  background: rgba(168, 85, 247, 0.35);
  color: #fff;
}

/* ── Navigation ──────────────────────────────────────────── */
nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  padding-bottom: 1.25rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

nav a {
  display: inline-block;
  padding: 0.45rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

nav a:hover,
nav a:focus-visible {
  color: #fff;
  background: rgba(168, 85, 247, 0.12);
  box-shadow: 0 0 14px var(--accent-glow);
}

/* Highlight the current page link (add class="active" in your template) */
nav a.active {
  color: #fff;
  background: rgba(168, 85, 247, 0.18);
  box-shadow: inset 0 0 12px var(--accent-glow);
}

/* ── Cards / Panels ──────────────────────────────────────── */
.card,
section {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: rgba(168, 85, 247, 0.35);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.08);
}

/* ── Buttons ─────────────────────────────────────────────── */
button,
.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: rgba(168, 85, 247, 0.08);
  color: var(--accent);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, color 0.2s;
  text-decoration: none;
}

button:hover,
.btn:hover,
button:focus-visible,
.btn:focus-visible {
  background: rgba(168, 85, 247, 0.2);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
}

/* ── Horizontal rule ─────────────────────────────────────── */
hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 2rem 0;
}

/* ── Code ────────────────────────────────────────────────── */
code {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15em 0.4em;
  font-size: 0.875em;
  color: #c084fc;
}

/* ── Lists ───────────────────────────────────────────────── */
ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

li {
  margin-bottom: 0.4rem;
}

/* ── Twitch Embed ───────────────────────────────────────── */
.twitch-layout {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.twitch-player {
  flex: 1 1 0;
  min-width: 400px;
  aspect-ratio: 16 / 9;
}

.twitch-player iframe {
  width: 100%;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.twitch-chat {
  flex: 0 0 340px;
}

.twitch-chat iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ── Socials Grid ────────────────────────────────────────── */
.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.75rem 1.25rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.social-card:hover,
.social-card:focus-visible {
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: 0 0 24px var(--accent-glow);
  transform: translateY(-2px);
  color: #fff;
  text-shadow: none;
}

.social-icon {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--accent);
  transition: color 0.2s;
}

.social-card:hover .social-icon {
  color: #c084fc;
}

.social-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.social-label {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.social-handle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Twitter / X Embed ────────────────────────────────── */
.twitter-embed {
  max-width: 560px;
  margin: 1.5rem auto;
  padding: 1.5rem 1.75rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.twitter-embed .twitter-timeline {
  width: 100%;
}

/* ── Footer ──────────────────────────────────────────────── */
footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}
