
:root {
  --bg-primary: #090a0f;
  --bg-secondary: #12151f;
  --bg-card: rgba(22, 27, 39, 0.7);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(56, 189, 248, 0.4);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-cyan: #38bdf8;
  --accent-emerald: #10b981;
  --accent-violet: #818cf8;
  --code-bg: #0f172a;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Pretendard", "Helvetica Neue", sans-serif;
  --font-mono: "JetBrains Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-cyan); text-decoration: none; transition: color 0.2s; }
a:hover { color: #7dd3fc; text-decoration: underline; }

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
header.site-header {
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 10, 15, 0.85);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 68px;
}
.brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.brand-badge {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 9999px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
nav.site-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
}
nav.site-nav a {
  color: var(--text-secondary);
}
nav.site-nav a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

/* Hero Section */
.hero {
  padding: 4.5rem 0 3rem 0;
  border-bottom: 1px solid var(--border-color);
}
.hero-tag {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p.lead {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 720px;
}

/* Post Cards */
.posts-grid {
  display: grid;
  gap: 2rem;
  padding: 3rem 0;
}
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 30px -10px rgba(56, 189, 248, 0.15);
}
.post-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #1e293b;
}
.post-card-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.post-card-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
}
.post-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.75rem;
}
.post-card-title a { color: var(--text-primary); }
.post-card-title a:hover { color: var(--accent-cyan); text-decoration: none; }
.post-card-excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  flex: 1;
}
.post-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

/* Article Styling */
article.post-detail {
  padding: 3rem 0 5rem 0;
}
article.post-detail h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1.25rem;
}
.post-meta-bar {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}
.article-banner {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 2.5rem;
  border: 1px solid var(--border-color);
}
.toc-nav {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}
.toc-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}
.toc-list { list-style: none; padding-left: 0; }
.toc-item { margin-bottom: 0.4rem; font-size: 0.9rem; }
.toc-item.toc-sub { padding-left: 1.25rem; }
.toc-item a { color: var(--text-secondary); }
.toc-item a:hover { color: var(--accent-cyan); }

article.post-detail h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 2.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  letter-spacing: -0.02em;
}
article.post-detail h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
article.post-detail p {
  margin-bottom: 1.3rem;
  color: #e2e8f0;
  font-size: 1.05rem;
}
article.post-detail blockquote {
  border-left: 3px solid var(--accent-cyan);
  padding: 0.75rem 1.25rem;
  background: rgba(56, 189, 248, 0.05);
  margin-bottom: 1.5rem;
  border-radius: 0 8px 8px 0;
  color: #cbd5e1;
}
article.post-detail ul, article.post-detail ol {
  margin-bottom: 1.5rem;
  padding-left: 1.75rem;
  color: #e2e8f0;
}
article.post-detail li { margin-bottom: 0.4rem; }
article.post-detail img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
  border: 1px solid var(--border-color);
}
.anchor-link {
  opacity: 0.3;
  margin-left: 0.4rem;
  font-size: 0.85em;
}
.anchor-link:hover { opacity: 1; text-decoration: none; }

/* Table styling */
.table-container {
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}
th, td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
}
th {
  background: rgba(255, 255, 255, 0.03);
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* Code */
pre {
  background: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.5;
}
code.inline-code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.875em;
  color: #38bdf8;
}

/* Footer */
footer.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 3rem 0;
  margin-top: 4rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}
