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

/* === Tokens === */
:root {
  --font: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --bg: #0b1120;
  --bg-card: #111827;
  --surface: #1e293b;
  --border: #1e3a5f;
  --text: #e2e8f0;
  --text-dim: #94a3b8;
  --accent: #38bdf8;
  --accent-2: #22d3ee;
  --earth-green: #34d399;
  --glow: rgb(56 189 248 / 15%);
  --radius: 10px;
  --max-w: 720px;
}

/* === Base === */
html { font-size: 17px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-2); }

/* === Globe background === */
.globe-bg {
  position: fixed;
  top: -30vh;
  right: -20vw;
  width: 80vw;
  height: 80vw;
  max-width: 700px;
  max-height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%,
    rgb(52 211 153 / 8%) 0%,
    rgb(56 189 248 / 5%) 40%,
    transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

/* === Layout === */
.site-wrapper {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === Header === */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 600;
  font-size: 1.1rem;
}
.logo:hover { color: var(--accent); }
.logo-icon { font-size: 1.4rem; }

.site-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
}
.site-nav a { color: var(--text-dim); }
.site-nav a:hover { color: var(--accent); }

/* === Hero === */
.hero {
  text-align: center;
  padding: 2rem 0 3.5rem;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--accent), var(--earth-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.hero-sub {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.authors {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: border-color .2s, box-shadow .2s;
}
.author:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--glow);
}

.author-name {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
}

.author-sep {
  color: var(--text-dim);
  font-size: 1.1rem;
}

/* === Posts list === */
.posts-section { flex: 1; }

.section-heading {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.post-card a {
  display: block;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  background: var(--bg-card);
  transition: border-color .2s, box-shadow .2s, transform .15s;
}
.post-card a:hover {
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--glow);
  transform: translateY(-1px);
}

.post-card time {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}

.post-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 0.25rem;
}

.post-desc {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-top: 0.35rem;
}

.no-posts { color: var(--text-dim); font-style: italic; }

/* === Single post === */
.post-main { flex: 1; }

.post-header {
  margin-bottom: 2.5rem;
}
.post-header time {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-dim);
}
.post-header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 0.5rem;
  line-height: 1.2;
}

.post-tags {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}
.tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--accent);
  background: rgb(56 189 248 / 6%);
}

/* === Post content === */
.post-content {
  font-size: 1rem;
  line-height: 1.75;
}
.post-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.01em;
}
.post-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
}
.post-content p { margin-bottom: 1.25rem; }
.post-content ul, .post-content ol { margin: 0 0 1.25rem 1.5rem; }
.post-content li { margin-bottom: 0.35rem; }
.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  color: var(--text-dim);
  margin: 1.5rem 0;
  font-style: italic;
}
.post-content code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--surface);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}
.post-content pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}
.post-content pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
}
.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1.5rem 0;
}
.post-content a { text-decoration: underline; text-underline-offset: 2px; }
.post-content a:hover { color: var(--accent-2); }

/* === Archive === */
.archive-main { flex: 1; }
.archive-main > h1 {
  font-size: 1.8rem;
  margin-bottom: 2rem;
}

/* === Footer === */
.site-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* === Responsive === */
@media (width <= 600px) {
  html { font-size: 15px; }
  .hero h1 { font-size: 2rem; }
  .site-header { flex-direction: column; gap: 1rem; }
  .post-card a { padding: 1rem; }
}
