/* ==========================================================================
   Base — Custom Properties, Reset, Typography
   ========================================================================== */

/* --- Custom Properties --- */
:root {
  /* Colors */
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-card: #1f2940;
  --bg-code: #0f1523;

  --text-primary: #e0e0e0;
  --text-secondary: #a0a0b8;
  --text-muted: #6b6b80;

  --accent: #00d4ff;
  --accent-hover: #00a8cc;
  --accent-glow: rgba(0, 212, 255, 0.15);

  --border: #2a2a45;
  --border-light: #3a3a55;

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* Spacing */
  --content-width: 720px;
  --wide-width: 960px;
  --site-padding: 1.5rem;

  /* Transitions */
  --transition: 0.3s ease;
  --transition-fast: 0.15s ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  text-align: justify;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  width: 100%;
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 2rem var(--site-padding);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-hover);
}

::selection {
  background: var(--accent);
  color: var(--bg-primary);
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
}

h1 { font-size: 2.25rem; margin-bottom: 1rem; }
h2 { font-size: 1.5rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }

/* --- Prose content --- */
.prose p {
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.prose h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.prose h3 {
  margin-top: 2rem;
}

.prose ul, .prose ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  font-style: italic;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-code);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--accent);
}

.prose pre {
  background: var(--bg-code);
  padding: 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}

.prose pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
}

.prose img {
  margin: 2rem auto;
  border-radius: 8px;
}
