/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: #07070d;
  color: #c4c4d0;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Gradient Orbs (background decoration) ─── */
body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  pointer-events: none;
  z-index: -1;
}
body::before {
  width: 600px; height: 600px;
  background: #7c5cfc;
  top: -200px; right: -200px;
}
body::after {
  width: 500px; height: 500px;
  background: #1a8fff;
  bottom: -150px; left: -150px;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* ─── Links ─── */
a { color: #8b7cfc; text-decoration: none; transition: color 0.15s; }
a:hover { color: #a99eff; }

/* ─── Header ─── */
.header {
  border-bottom: 1px solid rgba(255,255,255,0.04);
  background: rgba(7,7,13,0.85);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav {
  max-width: 820px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-size: 16px;
  font-weight: 700;
  color: #e4e4ee;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo .mark { color: #7c5cfc; font-weight: 800; }
.logo:hover { color: #e4e4ee; }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a {
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.15s;
  letter-spacing: 0.2px;
}
.nav-links a:hover { color: #c4c4d0; }

/* ─── Main ─── */
.main {
  flex: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 56px 24px;
  width: 100%;
}

/* ─── Hero (Index) ─── */
.hero {
  margin-bottom: 56px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.hero h1 {
  font-size: 36px;
  font-weight: 700;
  color: #e4e4ee;
  line-height: 1.2;
  letter-spacing: -0.5px;
}
.hero h1 .hl { color: #7c5cfc; }
.hero p {
  font-size: 15px;
  color: rgba(255,255,255,0.35);
  margin-top: 10px;
  max-width: 540px;
  line-height: 1.6;
}
.hero .meta-line {
  display: flex;
  gap: 16px;
  margin-top: 14px;
  font-size: 12px;
  color: rgba(255,255,255,0.2);
  flex-wrap: wrap;
}
.hero .meta-line span { display: flex; align-items: center; gap: 4px; }

/* ─── Post List ─── */
.post-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.post-list li {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 10px;
  transition: all 0.2s;
}
.post-list li:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(124,92,252,0.15);
  transform: translateY(-1px);
}
.post-list a {
  text-decoration: none;
  display: block;
  padding: 22px 24px;
}
.post-list .card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.post-list h2 {
  font-size: 16px;
  font-weight: 600;
  color: #e4e4ee;
  line-height: 1.4;
  transition: color 0.15s;
}
.post-list li:hover h2 { color: #8b7cfc; }
.post-meta {
  font-size: 12px;
  color: rgba(255,255,255,0.25);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}
.post-excerpt {
  font-size: 13.5px;
  color: rgba(255,255,255,0.35);
  margin-top: 8px;
  line-height: 1.5;
}
.post-tags {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.tag {
  font-size: 10.5px;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(124,92,252,0.08);
  color: #8b7cfc;
  border: 1px solid rgba(124,92,252,0.12);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* ─── Single Post ─── */
.post-header { margin-bottom: 36px; }
.post-header .breadcrumb {
  font-size: 12px;
  color: rgba(255,255,255,0.2);
  margin-bottom: 16px;
}
.post-header .breadcrumb a { color: rgba(255,255,255,0.3); }
.post-header .breadcrumb a:hover { color: #8b7cfc; }
.post-header h1 {
  font-size: 30px;
  font-weight: 700;
  color: #e4e4ee;
  line-height: 1.25;
  letter-spacing: -0.3px;
}
.post-date {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.25);
}
.post-date .dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,0.15); }
.post-tags-header {
  display: flex;
  gap: 6px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.post-body {
  font-size: 15px;
  color: #c4c4d0;
  line-height: 1.75;
}
.post-body h2 {
  font-size: 21px;
  font-weight: 600;
  color: #e4e4ee;
  margin: 40px 0 12px;
  letter-spacing: -0.2px;
}
.post-body h3 {
  font-size: 17px;
  font-weight: 600;
  color: #d4d4e0;
  margin: 28px 0 8px;
}
.post-body p { margin-bottom: 16px; }
.post-body a { color: #8b7cfc; text-decoration: underline; text-underline-offset: 2px; }
.post-body a:hover { color: #a99eff; }
.post-body strong { color: #dcdce8; font-weight: 600; }
.post-body ul, .post-body ol { margin: 0 0 20px 24px; }
.post-body li { margin-bottom: 6px; }
.post-body li::marker { color: rgba(124,92,252,0.5); }
.post-body blockquote {
  border-left: 2px solid rgba(124,92,252,0.25);
  padding: 6px 20px;
  margin: 20px 0;
  color: rgba(255,255,255,0.4);
  font-style: italic;
  background: rgba(124,92,252,0.03);
  border-radius: 0 6px 6px 0;
}
.post-body img { max-width: 100%; border-radius: 10px; margin: 20px 0; border: 1px solid rgba(255,255,255,0.04); }

/* ─── Code ─── */
.post-body code {
  font-family: 'Fira Code', 'JetBrains Mono', monospace;
  font-size: 13px;
  background: rgba(255,255,255,0.05);
  padding: 2px 7px;
  border-radius: 4px;
  color: #dcdce8;
}
.post-body pre {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 20px;
  margin: 20px 0 28px;
  overflow-x: auto;
  position: relative;
}
.post-body pre code {
  background: none;
  padding: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: #c4c4d0;
}
.post-body pre::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(124,92,252,0.3), transparent);
  border-radius: 10px 10px 0 0;
}
.post-body hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  margin: 40px 0;
}
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 13.5px;
}
.post-body th, .post-body td {
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.06);
  text-align: left;
}
.post-body th {
  background: rgba(255,255,255,0.03);
  color: #d4d4e0;
  font-weight: 600;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─── Post Nav ─── */
.post-nav {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.04);
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}
.post-nav a { color: rgba(255,255,255,0.3); text-decoration: none; max-width: 45%; }
.post-nav a:hover { color: #8b7cfc; }
.post-nav .prev { text-align: left; }
.post-nav .next { text-align: right; }
.post-nav .label { font-size: 11px; color: rgba(255,255,255,0.15); display: block; margin-bottom: 2px; }

/* ─── Section Title ─── */
.section-title {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.15);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
}

/* ─── Footer ─── */
.footer {
  text-align: center;
  padding: 28px 24px 36px;
  font-size: 12px;
  color: rgba(255,255,255,0.12);
  border-top: 1px solid rgba(255,255,255,0.03);
}
.footer a { color: rgba(255,255,255,0.2); text-decoration: none; }
.footer a:hover { color: #8b7cfc; }
.footer .footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 8px; }
.footer .footer-links a { font-size: 12px; }

/* ─── Responsive ─── */
@media (max-width: 700px) {
  .main { padding: 32px 16px; }
  .nav { padding: 12px 16px; }
  .hero h1 { font-size: 26px; }
  .post-header h1 { font-size: 22px; }
  .post-list a { padding: 18px 16px; }
  .post-list .card-top { flex-direction: column; gap: 6px; }
  .post-meta { white-space: normal; }
}
