:root {
  --bg: #eaf4ff;
  --bg-soft: #dcecff;
  --panel: rgba(255, 251, 242, 0.92);
  --ink: #17348b;
  --ink-strong: #0f2366;
  --line: rgba(28, 63, 162, 0.18);
  --line-strong: rgba(20, 52, 139, 0.34);
  --text: #183278;
  --muted: #4e6bb8;
  --yellow: #f4c635;
  --yellow-soft: #ffe68a;
  --shadow: 0 24px 60px rgba(61, 104, 204, 0.16);
  --max-width: 1460px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 10% 8%, rgba(255, 255, 255, 0.8), transparent 18%),
    radial-gradient(circle at 82% 10%, rgba(93, 136, 255, 0.16), transparent 22%),
    linear-gradient(180deg, #edf6ff 0%, #dcecff 100%);
  color: var(--text);
  font-family: "Inter", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(23, 52, 139, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 52, 139, 0.14) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 76%);
  content: "";
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto;
  width: 100%;
  border-bottom: 1px solid var(--line-strong);
  backdrop-filter: blur(16px);
  background: rgba(234, 244, 255, 0.84);
}

.brand,
.nav-links a {
  color: var(--ink-strong);
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 0 28px;
  border-right: 1px solid var(--line-strong);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}

.brand-mark {
  position: relative;
  width: 22px;
  height: 18px;
  display: inline-block;
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  inset: 0;
  border-radius: 10px 10px 0 0;
  background: var(--ink-strong);
  content: "";
}

.brand-mark::after {
  inset: 0 0 0 48%;
  border-radius: 0 10px 10px 0;
}

.nav-links {
  display: flex;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  padding: 0 18px;
  border-left: 1px solid var(--line-strong);
  font-size: 0.85rem;
  font-weight: 600;
}

main {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto 28px;
}

.hero,
.blog-shell {
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 24px;
  margin-top: 20px;
  padding: 28px;
  background: rgba(255, 252, 246, 0.6);
}

.eyebrow,
.post-kicker,
.howto-tag {
  margin: 0;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink-strong);
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  line-height: 0.95;
}

h1 {
  max-width: 8ch;
  margin-top: 10px;
  font-size: clamp(4.2rem, 7vw, 7.2rem);
}

.hero-copy p,
.hero-note p,
.post-summary,
.post-body p,
.howto-copy,
.index-link-note {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.7;
}

.hero-subhead {
  max-width: 36rem;
  margin-top: 24px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  color: var(--ink-strong);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.button-primary {
  background: var(--yellow);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.66);
}

.hero-note {
  align-self: stretch;
  display: grid;
  align-content: space-between;
  gap: 18px;
  min-height: 280px;
  padding: 22px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(220, 236, 255, 0.86));
}

.hero-note-card {
  padding: 18px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 252, 246, 0.9);
}

.hero-note-card h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.blog-shell {
  position: relative;
  margin-top: -10px;
  padding: 34px 24px 24px;
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.84) 0%, rgba(255, 252, 246, 0.72) 100%);
  backdrop-filter: blur(12px);
}

.blog-shell::before {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 68px;
  background: linear-gradient(180deg, rgba(220, 236, 255, 0.9), rgba(220, 236, 255, 0));
  pointer-events: none;
  content: "";
}

.blog-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(230px, 0.34fr) minmax(0, 0.66fr);
  gap: 24px;
}

.blog-index {
  position: sticky;
  top: 94px;
  align-self: start;
  padding: 22px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 252, 246, 0.88);
  box-shadow: var(--shadow);
}

.blog-index h2 {
  font-size: 2rem;
  margin-top: 10px;
}

.blog-index-links {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.blog-index-links a {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--line);
  color: var(--ink-strong);
  text-decoration: none;
  background: rgba(220, 236, 255, 0.34);
}

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

.blog-post {
  padding: 24px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 252, 246, 0.88);
  box-shadow: var(--shadow);
  scroll-margin-top: 90px;
}

.post-header {
  display: grid;
  gap: 12px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.post-date {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: rgba(220, 236, 255, 0.34);
  color: var(--ink-strong);
  font-size: 0.78rem;
  font-weight: 600;
}

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

.post-summary {
  max-width: 44rem;
}

.post-body {
  margin-top: 18px;
  display: grid;
  gap: 16px;
}

.post-body h3 {
  font-size: 1.8rem;
}

.post-divider {
  height: 1px;
  background: var(--line);
}

.howto {
  padding: 20px;
  border: 1px dashed var(--line-strong);
  background: rgba(220, 236, 255, 0.32);
}

.howto-tag {
  margin-bottom: 10px;
}

.howto-copy strong {
  color: var(--ink-strong);
}

@media (max-width: 1120px) {
  .hero,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-index {
    position: relative;
    top: auto;
  }
}

@media (max-width: 760px) {
  .navbar {
    position: static;
    grid-template-columns: 1fr;
    backdrop-filter: none;
  }

  .brand {
    min-height: 56px;
    padding: 0 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
    font-size: 0.84rem;
  }

  .nav-links {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    flex: 0 0 auto;
    min-width: max-content;
    min-height: 48px;
    padding: 0 14px;
  }

  main {
    width: min(calc(100% - 14px), var(--max-width));
  }

  .hero,
  .blog-shell {
    padding: 20px;
  }

  .hero {
    gap: 18px;
    margin-top: 14px;
  }

  h1 {
    max-width: none;
    font-size: clamp(3rem, 14vw, 4.5rem);
  }

  .hero-subhead,
  .hero-note p,
  .post-summary,
  .post-body p,
  .howto-copy {
    font-size: 0.95rem;
    line-height: 1.56;
  }

  .hero-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .blog-shell {
    margin-top: -6px;
  }

  .blog-grid {
    gap: 16px;
  }

  .blog-index,
  .blog-post {
    padding: 18px;
  }

  .blog-index h2 {
    font-size: 1.7rem;
  }

  .post-title {
    font-size: 1.9rem;
    line-height: 0.98;
  }

  .post-body h3 {
    font-size: 1.45rem;
  }
}
