:root {
  --shiva-blue: #2f6fb3;
  --shiva-blue-deep: #174f8f;
  --ink: #172033;
  --muted: #667085;
  --line: rgba(47, 111, 179, 0.16);
  --card: rgba(255, 255, 255, 0.58);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 4% 4%, rgba(47, 111, 179, 0.20), transparent 34rem),
    linear-gradient(135deg, rgba(234, 244, 255, 0.95) 0%, #ffffff 42%, #fbfdff 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(47, 111, 179, 0.12), transparent 58%);
  mask-image: linear-gradient(135deg, black, transparent 78%);
}

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

.page-shell {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
  padding: 96px 0 88px;
}

.intro {
  padding-bottom: 72px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--shiva-blue-deep);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.055em;
}

h1 {
  max-width: 720px;
  margin-bottom: 22px;
  font-size: clamp(3.3rem, 9vw, 6.8rem);
  line-height: 0.94;
}

.intro-copy {
  max-width: 660px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.24rem);
  line-height: 1.75;
}

.intro-link {
  display: inline-block;
  margin-top: 18px;
  color: var(--shiva-blue-deep);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.intro-link:hover {
  color: var(--shiva-blue-deep);
}

.blog-section {
  padding-top: 44px;
}

h2 {
  margin-bottom: 24px;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1;
}

.blog-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.blog-item {
  list-style: none;
  border-bottom: 1px solid var(--line);
}

.blog-link {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 28px;
  padding: 28px 0;
}

.blog-link:hover .blog-title {
  color: var(--shiva-blue-deep);
}

.blog-date {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.blog-content {
  display: grid;
  gap: 8px;
}

.blog-title {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  transition: color 180ms ease;
}

.blog-summary {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.7;
}

.article-shell {
  width: min(900px, calc(100% - 40px));
  max-width: 900px;
}

.back-link {
  display: inline-block;
  margin-bottom: 56px;
  color: var(--muted);
  font-size: 0.95rem;
}

.back-link:hover {
  color: var(--shiva-blue-deep);
}

.post-header {
  padding-bottom: 44px;
  border-bottom: 1px solid var(--line);
}

.post-header h1 {
  margin-top: 14px;
}

.post-content {
  padding-top: 42px;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.05rem, 1.7vw, 1.2rem);
  line-height: 1.78;
}

.post-content p {
  margin-bottom: 1.5em;
}

.post-content h2 {
  margin: 2.2em 0 0.7em;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
}

.post-content h3,
.post-content h4 {
  margin: 2em 0 0.7em;
  font-family: "Source Serif 4", Georgia, serif;
  letter-spacing: -0.035em;
}

.post-content h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.post-content a {
  color: var(--shiva-blue-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.post-content ul,
.post-content ol {
  margin: 0 0 1.5em;
  padding-left: 1.4em;
}

.post-content li {
  margin-bottom: 0.72em;
  padding-left: 0.2em;
}

.post-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 2.2em auto 1.2em;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.post-content table {
  display: block;
  width: 100%;
  margin: 2em 0;
  overflow-x: auto;
  border-collapse: collapse;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.88rem;
  line-height: 1.45;
  white-space: nowrap;
}

.post-content th,
.post-content td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.post-content th {
  color: var(--ink);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.55);
}

.post-content td {
  color: var(--muted);
}

.post-content tbody tr:hover td {
  background: rgba(255, 255, 255, 0.38);
}

.post-content pre {
  overflow-x: auto;
  margin: 1.8em 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  line-height: 1.65;
}

.post-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
}

.post-content :not(pre) > code {
  padding: 0.12em 0.32em;
  border: 1px solid var(--line);
  border-radius: 0.35em;
  background: rgba(255, 255, 255, 0.58);
}

.post-content .math.display,
.post-content mjx-container[display="true"] {
  display: block;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.35em 0;
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 28px, 760px);
    padding: 64px 0 64px;
  }

  .intro {
    padding-bottom: 52px;
  }

  .blog-link {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 24px 0;
  }
}
