:root {
  --bg-top: #1a1a2e;
  --bg-mid: #16213e;
  --bg-bot: #0f3460;
  --text: #f1f1f5;
  --text-muted: rgba(241, 241, 245, 0.65);
  --accent: #00d4ff;
  --link: #7b2cbf;
  --rule: rgba(255, 255, 255, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: auto; min-height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, var(--bg-top) 0%, var(--bg-mid) 50%, var(--bg-bot) 100%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.65;
  padding: 0 1.25rem;
  -webkit-font-smoothing: antialiased;
}

header {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 0 1.5rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  background: linear-gradient(90deg, var(--accent), var(--link));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  margin-left: 1.25rem;
  transition: color 0.2s;
}

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

main {
  max-width: 760px;
  margin: 0 auto 4rem;
  padding: 1rem 0;
}

h1 {
  font-size: 2.25rem;
  margin: 0.5rem 0 1rem;
  line-height: 1.2;
}

h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

h3 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.5rem;
}

p, ul, ol {
  margin-bottom: 1rem;
}

ul, ol {
  padding-left: 1.5rem;
}

li { margin-bottom: 0.35rem; }

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

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

hr { display: none; }

blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 1rem 0;
  color: var(--text-muted);
}

code {
  font-family: 'SF Mono', Monaco, monospace;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.9em;
}

footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 0 3rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--rule);
}

footer a { color: var(--text-muted); margin: 0 0.5rem; }
footer a:hover { color: var(--text); }

@media (max-width: 600px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.25rem; }
  header { padding-top: 1.5rem; }
}
