/* ─── RESET ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* ─── BASE ───────────────────────────────────────── */
body {
  font-family: 'Georgia', 'Times New Roman', serif;
  line-height: 1.8;
  color: #1a1a2e;
  background: #fafafa;
  margin: 0;
  padding: 0;
}

/* ─── CONTENT WRAPPER ────────────────────────────── */
.content {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ─── TYPOGRAPHY ─────────────────────────────────── */
h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: #0f0f23;
  margin-bottom: 0.3rem;
  line-height: 1.3;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #16213e;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #16213e;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

p {
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
}

a { color: #e74c3c; text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
  background: #eef0f5;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.92em;
  color: #c0392b;
}

/* ─── SUBTITLE ───────────────────────────────────── */
.post-subtitle {
  font-size: 1.1rem;
  color: #6c6c8a;
  font-style: italic;
  margin-bottom: 1rem;
  padding-bottom: 0;
  line-height: 1.8;
}

/* ─── POST META ──────────────────────────────────── */
.post-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.8rem 0;
  margin-bottom: 2rem;
  border-top: 1px solid #e8e8f0;
  border-bottom: 1px solid #e8e8f0;
  font-family: 'Fira Code', Consolas, monospace;
  font-size: 0.82rem;
  color: #6c6c8a;
  flex-wrap: wrap;
}

.post-meta a {
  color: #1a1a2e;
  text-decoration: none;
  font-weight: 600;
}

.post-meta a:hover {
  color: #e74c3c;
}

/* ─── NAV ────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250,250,250,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid #e8e8f0;
}
.nav-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 13px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: 'Fira Code', Consolas, monospace;
  font-size: 13px;
  font-weight: 600;
  color: #1a1a2e;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.logo-cursor {
  display: inline-block;
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.nav .back {
  font-family: 'Fira Code', Consolas, monospace;
  font-size: 12px;
  color: #6c6c8a;
  text-decoration: none;
  transition: color .15s;
}
.nav .back:hover { color: #e74c3c; }

/* ─── HIGHLIGHT / CALLOUT BOXES ──────────────────── */
.highlight-box {
  background: linear-gradient(135deg, #fff5f5, #fff0f0);
  border-left: 4px solid #e74c3c;
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
}
.highlight-box p { margin-bottom: 0.5rem; }
.highlight-box p:last-child { margin-bottom: 0; }

.green-box {
  background: linear-gradient(135deg, #f0faf5, #edf8f2);
  border-left: 4px solid #27ae60;
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
}
.green-box p { margin-bottom: 0.5rem; }
.green-box p:last-child { margin-bottom: 0; }

.purple-box {
  background: linear-gradient(135deg, #f8f6ff, #f0edff);
  border-left: 4px solid #7c3aed;
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
}
.purple-box p { margin-bottom: 0.5rem; }
.purple-box p:last-child { margin-bottom: 0; }

/* ─── CODE BLOCKS ────────────────────────────────── */
.code-block {
  background: #1a1a2e;
  color: #ccd6f6;
  border-radius: 10px;
  padding: 1.5rem 2rem;
  margin: 1.5rem 0;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.88rem;
  line-height: 1.9;
  overflow-x: auto;
}

.code-block .file-label {
  color: #64ffda;
  font-size: 0.8rem;
  display: block;
  margin-bottom: 0.8rem;
  opacity: 0.8;
}

.code-block .comment { color: #5c6370; }
.code-block .keyword { color: #c678dd; }
.code-block .function { color: #61afef; }
.code-block .string { color: #98c379; }
.code-block .number { color: #d19a66; }
.code-block .highlight-line { color: #f0b90b; font-weight: 600; }
.code-block .danger { color: #e74c3c; font-weight: 600; }
.code-block .error-tag { color: #e06c75; font-weight: 700; }
.code-block .ok-tag { color: #98c379; font-weight: 700; }

/* ─── CONCEPT BLOCKS ─────────────────────────────── */
.concept-block {
  background: #1a1a2e;
  color: #ccd6f6;
  border-radius: 10px;
  padding: 1.5rem 2rem;
  margin: 1.5rem 0;
  font-size: 1rem;
  line-height: 2;
}

.concept-block .title,
.concept-block .concept-title {
  color: #64ffda;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  display: block;
  font-family: 'Fira Code', 'Consolas', monospace;
}

.concept-block em { color: #8892b0; font-style: italic; }

/* ─── STATS BOX ──────────────────────────────────── */
.stats-box {
  background: #16213e;
  color: #ccd6f6;
  border-radius: 10px;
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.92rem;
  line-height: 2;
}

.stats-box a { color: #64ffda; text-decoration: none; }
.stats-box a:hover { text-decoration: underline; }
.stats-box .stat-highlight { color: #64ffda; font-weight: 700; }

/* ─── TAKEAWAYS ──────────────────────────────────── */
.takeaways {
  counter-reset: takeaway;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.takeaways li {
  counter-increment: takeaway;
  position: relative;
  padding: 1rem 1rem 1rem 3.5rem;
  margin-bottom: 1rem;
  background: #f4f6fb;
  border-radius: 8px;
  font-size: 1.02rem;
  line-height: 1.7;
}

.takeaways li::before {
  content: counter(takeaway);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 1.7rem;
  height: 1.7rem;
  background: #1a1a2e;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.takeaways li strong {
  color: #16213e;
}

/* ─── CLOSING ────────────────────────────────────── */
.closing {
  font-size: 1.15rem;
  font-style: italic;
  color: #4a4a6a;
  text-align: center;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid #e8e8f0;
}

/* ─── VERSUS BOX ─────────────────────────────────── */
.versus-box {
  background: #1a1a2e;
  color: #ccd6f6;
  border-radius: 10px;
  padding: 1.5rem 2rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  line-height: 2;
}

/* ─── SECTION DIVIDER ────────────────────────────── */
.section-divider {
  border: none;
  border-top: 2px solid #e8e8f0;
  margin: 3rem 0;
}

/* ─── SITE FOOTER ────────────────────────────────── */
.site-footer {
  border-top: 1px solid #e8e8f0;
  padding: 28px 24px;
  text-align: center;
  font-family: 'Fira Code', Consolas, monospace;
  font-size: 12px;
  color: #6c6c8a;
}
.site-footer a {
  color: #1a1a2e;
  text-decoration: none;
  transition: color .15s;
}
.site-footer a:hover { color: #e74c3c; }

/* ─── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 600px) {
  .content { padding: 1.5rem 1rem; }
  h1 { font-size: 1.6rem; }
  .code-block { padding: 1rem; font-size: 0.82rem; }
}
