:root {
  --brand-blue: #1d3557;
  --brand-red: #e63946;
  --brand-teal: #457b9d;
  --brand-sand: #a8dadc;
  --brand-cream: #f1faee;
  --page-bg: #fafafa;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

html {
  scroll-behavior: smooth;
}

body.blog-page {
  margin: 0;
  background: var(--page-bg);
  color: var(--brand-blue);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.625;
}

.blog-page *,
.blog-page *::before,
.blog-page *::after {
  box-sizing: border-box;
}

.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.geo-pattern {
  pointer-events: none;
  background-image: linear-gradient(rgba(230, 57, 70, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(230, 57, 70, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

.blog-page a:focus-visible {
  outline: 3px solid var(--brand-red);
  outline-offset: 3px;
}

.blog-page main,
.related-band,
.language-list-section {
  position: relative;
}

.blog-page main {
  padding: 3rem 1.5rem 5rem;
}

.blog-shell {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
}

.blog-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 2rem;
  color: var(--gray-500);
  font-size: 0.875rem;
}

.blog-breadcrumbs a {
  color: var(--brand-teal);
  text-decoration: none;
}

.blog-breadcrumbs a:hover {
  color: var(--brand-red);
}

.blog-hero,
.article-hero {
  max-width: 56rem;
  margin: 0 auto 4rem;
  text-align: center;
}

.blog-kicker,
.article-kicker {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  margin: 0 0 2rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(168, 218, 220, 0.3);
  border-radius: 9999px;
  background: var(--brand-cream);
  color: var(--brand-blue);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.blog-kicker::before,
.article-kicker::before {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: var(--brand-red);
  content: "";
}

.blog-hero h1,
.article-hero h1 {
  margin: 0;
  color: var(--brand-blue);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(3rem, 7vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 0.95;
}

.article-hero h1 {
  font-size: clamp(2.5rem, 6vw, 3.75rem);
}

.blog-lead,
.article-deck {
  max-width: 42rem;
  margin: 1.5rem auto 0;
  color: var(--gray-600);
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  line-height: 1.625;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  margin-top: 1.5rem;
  color: var(--gray-500);
  font-size: 0.875rem;
}

.prompt-slip {
  max-width: 42rem;
  margin: 2rem auto 0;
  padding: 2rem;
  border: 2px solid var(--gray-200);
  border-radius: 1.5rem;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.prompt-slip span {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--brand-red);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.prompt-slip strong {
  display: block;
  color: var(--brand-blue);
  font-size: clamp(1.25rem, 3vw, 1.875rem);
  line-height: 1.25;
}

.blog-section {
  margin-bottom: 4rem;
}

.blog-section-head {
  display: flex;
  gap: 2rem;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.blog-section h2,
.related-band h2 {
  margin: 0;
  color: var(--brand-blue);
  font-size: clamp(1.875rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.blog-section-head p {
  max-width: 32rem;
  margin: 0;
  color: var(--gray-600);
}

.blog-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.blog-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 2rem;
  border: 2px solid var(--gray-200);
  border-radius: 1.5rem;
  background: #fff;
  color: var(--brand-blue);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
  border-color: var(--brand-sand);
  box-shadow: 0 20px 40px rgba(29, 53, 87, 0.1);
  transform: translateY(-4px);
}

.blog-card-mark {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 1.25rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  background: var(--brand-cream);
  color: var(--brand-teal);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.blog-card h2,
.blog-card h3 {
  margin: 0;
  color: var(--brand-blue);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
}

.blog-card p {
  margin: 0.875rem 0 1.5rem;
  color: var(--gray-600);
}

.blog-card-cta {
  margin-top: auto;
  color: var(--brand-red);
  font-weight: 600;
}

.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 48rem) minmax(14rem, 1fr);
  gap: 2rem;
  align-items: start;
}

.article-body,
.article-aside {
  border: 2px solid var(--gray-200);
  border-radius: 1.5rem;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.article-body {
  min-width: 0;
  padding: clamp(2rem, 5vw, 3rem);
  color: var(--gray-600);
  font-size: 1.0625rem;
}

.article-body > p:first-child {
  color: var(--gray-600);
  font-size: 1.125rem;
}

.article-body h2 {
  margin: 3rem 0 1rem;
  color: var(--brand-blue);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.article-body h3 {
  margin: 2rem 0 0.625rem;
  color: var(--brand-blue);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}

.article-body p,
.article-body ul,
.article-body ol {
  margin: 0 0 1.25rem;
}

.article-body ul,
.article-body ol {
  padding-left: 1.5rem;
}

.article-body li {
  margin: 0.5rem 0;
}

.article-body a:not(.tool-cta) {
  color: var(--brand-teal);
  font-weight: 600;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.article-body a:not(.tool-cta):hover {
  color: var(--brand-red);
}

.tool-cta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-radius: 1rem;
  background: var(--brand-blue);
  color: #fff;
  text-decoration: none;
  transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.tool-cta:hover {
  background: var(--brand-red);
  box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3);
  transform: translateY(-2px);
}

.tool-cta small {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--brand-sand);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tool-cta:hover small {
  color: #fff;
}

.tool-cta strong {
  display: block;
  font-size: 1.125rem;
  line-height: 1.35;
}

.tool-cta b {
  font-size: 1.5rem;
  line-height: 1;
}

.tool-shot {
  margin: 2rem 0 2.5rem;
  padding: 0.75rem;
  border: 2px solid var(--gray-200);
  border-radius: 1.5rem;
  background: var(--page-bg);
}

.tool-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1rem;
}

.tool-shot figcaption {
  padding: 0.75rem 0.5rem 0.125rem;
  color: var(--gray-500);
  font-size: 0.875rem;
}

.article-aside {
  position: sticky;
  top: 6.5rem;
  padding: 1.5rem;
}

.article-aside strong {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--brand-blue);
}

.article-aside a {
  display: block;
  padding: 0.5rem 0;
  color: var(--brand-teal);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.article-aside a:hover {
  color: var(--brand-red);
}

.idea-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.idea-box,
.play-box,
.article-note {
  padding: 1.5rem;
  border: 2px solid var(--gray-200);
  border-radius: 1rem;
  background: var(--page-bg);
}

.idea-box h3,
.play-box h3 {
  margin-top: 0;
}

.idea-box ul,
.play-box p:last-child {
  margin-bottom: 0;
}

.play-box {
  margin: 1rem 0;
}

.article-note {
  margin: 1.5rem 0;
  border-color: rgba(168, 218, 220, 0.7);
  background: var(--brand-cream);
}

.article-note strong {
  color: var(--brand-blue);
}

.checklist {
  list-style: none;
  padding-left: 0 !important;
}

.checklist li {
  position: relative;
  padding-left: 1.75rem;
}

.checklist li::before {
  position: absolute;
  left: 0;
  color: var(--brand-red);
  font-weight: 700;
  content: "✓";
}

.related-band {
  padding: 0 1.5rem 1rem;
  background: transparent;
}

.related-band .blog-card-grid {
  margin-top: 1.5rem;
}

.blog-tool-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.blog-tool-strip a {
  padding: 1.25rem;
  border: 2px solid var(--gray-200);
  border-radius: 1rem;
  background: #fff;
  color: var(--brand-blue);
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.blog-tool-strip a:hover {
  border-color: var(--brand-sand);
  color: var(--brand-red);
  transform: translateY(-2px);
}

.language-list-section {
  border-top: 1px solid var(--gray-200);
  background: var(--page-bg);
  padding: 1.5rem 0;
}

.language-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  max-width: 75rem;
  margin: 0 auto;
  padding: 0 2rem;
}

.language-link {
  padding: 0.25rem 0;
  color: var(--gray-500);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.language-link:hover {
  color: var(--brand-blue);
}

.language-active {
  color: var(--brand-red);
  font-weight: 600;
}

@media (max-width: 820px) {
  .blog-card-grid,
  .blog-tool-strip,
  .article-grid {
    grid-template-columns: 1fr;
  }

  .blog-section-head {
    display: block;
  }

  .blog-section-head p {
    margin-top: 0.75rem;
  }

  .article-aside {
    position: static;
    order: -1;
  }
}

@media (max-width: 560px) {
  .blog-page main {
    padding: 2rem 1rem 4rem;
  }

  .blog-hero,
  .article-hero {
    margin-bottom: 3rem;
  }

  .blog-hero h1,
  .article-hero h1 {
    font-size: clamp(2.5rem, 13vw, 3.25rem);
  }

  .article-body,
  .blog-card,
  .prompt-slip {
    padding: 1.5rem;
  }

  .idea-columns,
  .tool-cta {
    grid-template-columns: 1fr;
  }

  .tool-cta b {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .blog-card,
  .blog-tool-strip a,
  .tool-cta {
    transition: none;
  }
}
