html {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, #020617, #020617);
  color: #e5e7eb;
}

body.theme-light {
  background: #f9fafb;
  color: #020617;
}

.blog-shell,
.post-shell {
  min-height: 100vh;
}

.blog-hero,
.post-hero {
  padding: 3.5rem 1.5rem 2rem;
}

.blog-hero-inner,
.post-hero-inner,
.blog-list-inner,
.post-body-inner {
  max-width: 960px;
  margin: 0 auto;
}

.blog-kicker,
.post-kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  color: #38bdf8;
  margin-bottom: 0.75rem;
}

.blog-title,
.post-title {
  font-size: clamp(2rem, 3.2vw, 2.6rem);
  letter-spacing: -0.04em;
  margin: 0 0 0.7rem;
}

.blog-intro,
.post-intro {
  max-width: 32rem;
  color: #9ca3af;
  font-size: 0.98rem;
  line-height: 1.7;
}

.blog-list {
  padding: 0.5rem 1.5rem 3rem;
}

.post-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.6rem;
  padding: 0;
  margin: 0;
}

.post-card {
  border-radius: 1.1rem;
  overflow: hidden;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.06), transparent 60%),
    rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow:
    0 24px 50px rgba(15, 23, 42, 0.9),
    0 0 0 1px rgba(15, 23, 42, 0.6);
}

.post-card-link {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.post-card-media {
  margin: 0;
  overflow: hidden;
}

.post-card-img {
  width: 100%;
  display: block;
  transform: scale(1.02);
  transition: transform 220ms ease-out, filter 220ms ease-out;
}

.post-card-body {
  padding: 1.2rem 1.25rem 1.3rem;
}

.post-card-date {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #93c5fd;
  margin-bottom: 0.35rem;
}

.post-card-title {
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}

.post-card-intro {
  font-size: 0.9rem;
  color: #9ca3af;
  line-height: 1.6;
}

.post-card:hover .post-card-img {
  transform: scale(1.06);
  filter: brightness(1.05);
}

.blog-empty {
  color: #9ca3af;
}

.post-hero-media {
  max-width: 960px;
  margin: 0 auto 1.5rem;
  padding-inline: 1.5rem;
}

.post-hero-img {
  width: 100%;
  border-radius: 1.1rem;
  display: block;
  box-shadow:
    0 24px 50px rgba(15, 23, 42, 0.9),
    0 0 0 1px rgba(15, 23, 42, 0.6);
}

.post-body {
  padding: 0 1.5rem 3rem;
}

.prose-markdown {
  max-width: 720px;
  margin: 0 auto;
  font-size: 0.98rem;
  line-height: 1.8;
}

.prose-markdown h2,
.prose-markdown h3,
.prose-markdown h4 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.prose-markdown h2 {
  font-size: 1.45rem;
}

.prose-markdown h3 {
  font-size: 1.2rem;
}

.prose-markdown p {
  margin: 0 0 1rem;
}

.prose-markdown a {
  color: #38bdf8;
  text-decoration: none;
}

.prose-markdown a:hover {
  text-decoration: underline;
}

.prose-markdown code {
  background: rgba(15, 23, 42, 0.8);
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  font-size: 0.9em;
}

.prose-markdown pre {
  background: #020617;
  padding: 1rem 1.1rem;
  border-radius: 0.8rem;
  overflow-x: auto;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.prose-markdown pre code {
  background: transparent;
  padding: 0;
}

.prose-markdown img {
  max-width: 100%;
  border-radius: 0.9rem;
  display: block;
  margin: 1.5rem auto;
  box-shadow:
    0 24px 40px rgba(15, 23, 42, 0.7),
    0 0 0 1px rgba(15, 23, 42, 0.5);
}

.breadcrumbs {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-bottom: 0.75rem;
}

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

.breadcrumbs a:hover {
  color: #38bdf8;
}

.breadcrumbs-sep {
  margin: 0 0.3rem;
}

.breadcrumbs-current {
  color: #e5e7eb;
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 1.4fr);
  gap: 2rem;
}

.post-main {
  min-width: 0;
}

.post-sidebar {
  border-left: 1px solid rgba(148, 163, 184, 0.35);
  padding-left: 1.5rem;
  font-size: 0.85rem;
}

.post-sidebar-title {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;
}

.post-sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-sidebar-item + .post-sidebar-item {
  margin-top: 0.4rem;
}

.post-sidebar-link {
  display: flex;
  gap: 0.5rem;
  text-decoration: none;
  color: #e5e7eb;
}

.post-sidebar-link:hover {
  color: #38bdf8;
}

.post-sidebar-date {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #9ca3af;
}

.post-sidebar-title-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 0.8rem;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: #38bdf8;
}

@media (max-width: 768px) {
  .blog-hero,
  .post-hero {
    padding-inline: 1.25rem;
    padding-top: 2.5rem;
  }

  .blog-list,
  .post-body {
    padding-inline: 1.25rem;
  }
}