@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:ital,wght@0,400;0,500;1,400&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400&display=swap');

:root {
  color-scheme: dark light;
  --bg: #0c0d14;
  --bg-elevated: #141622;
  --bg-glass: rgba(20, 22, 34, 0.7);
  --text: #e2e4f0;
  --text-muted: #8b90ad;
  --accent: #a78bfa;
  --accent-bright: #c4b5fd;
  --accent-cyan: #38bdf8;
  --border: #25283d;
  --glow: rgba(167, 139, 250, 0.16);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f6fa;
    --bg-elevated: #ececf4;
    --bg-glass: rgba(236, 236, 244, 0.7);
    --text: #181926;
    --text-muted: #5a5f7a;
    --accent: #6d28d9;
    --accent-bright: #5b21b6;
    --accent-cyan: #0284c7;
    --border: #d4d6e5;
    --glow: rgba(109, 40, 217, 0.08);
  }
}

body {
  background-color: var(--bg);
  background-image: radial-gradient(circle at 50% 0%, var(--glow) 0%, transparent 65%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1.15rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* Top navigation strip */
.strip {
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  padding: 0.75rem 1.5rem;
}

.strip a {
  color: var(--accent-bright);
  text-decoration: none;
  transition: color 0.15s ease;
}

.strip a:hover {
  color: var(--accent-cyan);
  text-decoration: underline;
}

/* Layout containers */
.masthead, main, .colophon {
  max-width: 42rem;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Masthead */
.masthead {
  padding-top: 3.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.avatar {
  width: 4.5rem;
  height: 4.5rem;
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 0 14px var(--glow));
}

.blog-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 3rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.1;
  margin: 0;
  color: var(--text);
}

.blog-title a {
  color: inherit;
  text-decoration: none;
}

.blog-title a:hover {
  color: var(--accent-bright);
}

.tagline {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  line-height: 1.5;
}

/* Front page sections */
.about {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 1.25rem 1.75rem;
  margin-bottom: 3rem;
  font-size: 1.05rem;
  box-shadow: 0 8px 24px -12px var(--glow);
}

.about p:first-child { margin-top: 0; }
.about p:last-child { margin-bottom: 0; }

/* Headings */
h1, h2, h3, h4 {
  color: var(--text);
  font-weight: 500;
}

.post-header {
  margin-bottom: 2.25rem;
}

.post-header h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 2.6rem;
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 0.5rem 0;
}

h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.25rem;
}

.posts h2 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  border-bottom: none;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
}

/* Post list */
.post-list li {
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
  transition: padding-left 0.15s ease;
}

.post-list li:first-child {
  border-top: 1px solid var(--border);
}

.post-link {
  font-size: 1.2rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
}

.post-link:hover {
  color: var(--accent-bright);
}

time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Body elements */
a {
  color: var(--accent-bright);
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

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

blockquote {
  border-left: 2px solid var(--accent-cyan);
  background: var(--bg-elevated);
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  border-radius: 0 4px 4px 0;
  font-style: italic;
}

code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 0.15em 0.35em;
  border-radius: 4px;
}

pre {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.25rem;
}

pre code {
  border: none;
  padding: 0;
  background: transparent;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem auto;
  width: 40%;
}

.empty, .notice {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

.receipt, .colophon {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.receipt {
  margin-top: 3.5rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}

.colophon {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  padding-bottom: 3.5rem;
}

@media (max-width: 600px) {
  body { font-size: 1.05rem; }
  .blog-title { font-size: 2.3rem; }
  .post-header h1 { font-size: 2rem; }
  .about { padding: 1rem 1.25rem; }
}
