@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Newsreader:opsz,wght@6..72,400;6..72,500;6..72,600;6..72,700&display=swap');

:root {
  --yaml-red: #c23b22;
  --yaml-red-dark: #8f2818;
  --yaml-ink: #20201e;
  --yaml-paper: #fffaf2;
  --yaml-cream: #f4eadb;
  --yaml-gold: #e9a23b;
  --yaml-rule: rgba(32, 32, 30, 0.16);
  --md-primary-fg-color: var(--yaml-red);
  --md-primary-fg-color--light: #d96850;
  --md-primary-fg-color--dark: var(--yaml-red-dark);
  --md-accent-fg-color: var(--yaml-red);
  --md-text-font: "Newsreader", Georgia, serif;
  --md-code-font: "DM Mono", monospace;
}

[data-md-color-scheme="default"] {
  --md-default-bg-color: var(--yaml-paper);
  --md-default-fg-color: var(--yaml-ink);
  --md-typeset-a-color: var(--yaml-red);
  --yaml-card: #fffdf8;
}

[data-md-color-scheme="slate"] {
  --md-default-bg-color: #1c1b19;
  --md-default-fg-color: #f6eee2;
  --md-primary-fg-color: #a8321e;
  --md-typeset-a-color: #f08a70;
  --yaml-paper: #1c1b19;
  --yaml-cream: #292622;
  --yaml-ink: #f6eee2;
  --yaml-rule: rgba(255, 250, 242, 0.17);
  --yaml-card: #23211e;
}

html {
  scroll-behavior: smooth;
}

body {
  letter-spacing: 0.005em;
}

.md-header {
  background: color-mix(in srgb, var(--yaml-paper) 94%, transparent);
  color: var(--yaml-ink);
  border-bottom: 1px solid var(--yaml-rule);
  box-shadow: none;
  backdrop-filter: blur(14px);
}

.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  height: 1.7rem;
}

.md-header__title,
.md-tabs__link,
.md-footer {
  font-family: "DM Mono", monospace;
}

.md-header__title {
  font-weight: 500;
}

.md-tabs {
  background: var(--yaml-paper);
  color: var(--yaml-ink);
  border-bottom: 1px solid var(--yaml-rule);
}

.md-tabs__link {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.md-main__inner {
  margin-top: 0;
}

.md-content__inner {
  padding-top: 2.2rem;
}

.md-typeset {
  font-size: 0.9rem;
  line-height: 1.75;
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  color: var(--yaml-ink);
  font-weight: 600;
  letter-spacing: -0.025em;
}

.md-typeset h1 {
  font-size: clamp(2.5rem, 7vw, 4.8rem);
  line-height: 0.98;
}

.md-typeset h2 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.md-typeset code,
.md-typeset pre {
  font-family: "DM Mono", monospace;
}

.md-typeset .highlight {
  border-left: 3px solid var(--yaml-red);
}

.yaml-kicker {
  margin: 0 0 1rem;
  color: var(--yaml-red);
  font: 500 0.68rem/1.4 "DM Mono", monospace;
  letter-spacing: 0.16em;
}

.yaml-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: center;
  min-height: min(720px, calc(100vh - 8rem));
  padding: 4.5rem 0 5rem;
}

.md-typeset .yaml-hero h1 {
  margin: 0;
  font-size: clamp(2.25rem, 5.7vw, 5.5rem);
  line-height: 0.88;
}

.md-typeset .yaml-hero__headline,
.md-typeset .yaml-hero__accent {
  display: block;
}

.md-typeset .yaml-hero__headline {
  font-size: 0.84em;
  letter-spacing: -0.035em;
  line-height: 1;
  white-space: nowrap;
}

.md-typeset .yaml-hero__accent {
  color: var(--yaml-red);
  font-style: italic;
  font-weight: 500;
}

.yaml-hero__lede {
  max-width: 34rem;
  margin: 2rem 0;
  font-size: 1.18rem;
  line-height: 1.55;
}

.yaml-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.md-typeset .yaml-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.65rem 1.2rem;
  border: 1px solid var(--yaml-ink);
  border-radius: 999px;
  color: var(--yaml-ink);
  font: 500 0.72rem/1 "DM Mono", monospace;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 150ms ease, background 150ms ease, color 150ms ease;
}

.md-typeset .yaml-button:hover {
  transform: translateY(-2px);
}

.md-typeset .yaml-button--primary {
  border-color: var(--yaml-red);
  background: var(--yaml-red);
  color: #fffaf2;
}

.yaml-hero__document {
  overflow: hidden;
  border: 1px solid rgba(255, 250, 242, 0.15);
  border-radius: 0.8rem;
  background: #292724;
  box-shadow: 1.4rem 1.4rem 0 var(--yaml-cream);
  color: #fffaf2;
  transform: rotate(1.5deg);
}

.yaml-document__bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid rgba(255, 250, 242, 0.12);
  font: 400 0.58rem/1 "DM Mono", monospace;
}

.yaml-document__bar span {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--yaml-red);
}

.yaml-document__bar span:nth-child(2) { background: var(--yaml-gold); }
.yaml-document__bar span:nth-child(3) { background: #70a66b; }
.yaml-document__bar b { margin-left: auto; font-weight: 400; opacity: 0.55; }

.md-typeset .yaml-hero__document pre {
  margin: 0;
  padding: clamp(1.3rem, 4vw, 2.3rem);
  background: transparent;
  color: #f8ead8;
  font-size: clamp(0.65rem, 1.7vw, 0.82rem);
  line-height: 1.8;
}

.md-typeset .yaml-hero__document code {
  background: transparent;
  color: inherit;
}

.yaml-hero__document i {
  color: #9c968e;
  font-style: normal;
}

.yaml-intro {
  max-width: 52rem;
  padding: clamp(4rem, 9vw, 8rem) 0 4rem;
  border-top: 1px solid var(--yaml-rule);
}

.yaml-intro h2 {
  margin: 0 0 1rem;
}

.yaml-intro > p:last-child {
  max-width: 46rem;
  font-size: 1.2rem;
}

.yaml-topics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--yaml-rule);
  border-bottom: 1px solid var(--yaml-rule);
}

.yaml-topics article {
  padding: 2rem;
  border-right: 1px solid var(--yaml-rule);
}

.yaml-topics article:first-child { padding-left: 0; }
.yaml-topics article:last-child { border-right: 0; }

.yaml-topics span {
  color: var(--yaml-red);
  font: 500 0.65rem/1 "DM Mono", monospace;
}

.yaml-topics h3 {
  margin: 1.2rem 0 0.5rem;
  font-size: 1.4rem;
}

.yaml-topics p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.55;
}

.yaml-featured {
  padding: clamp(5rem, 10vw, 9rem) 0;
}

.yaml-featured__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.yaml-featured__heading h2 { margin: 0; }

.yaml-featured__heading > a {
  padding-bottom: 0.5rem;
  font: 500 0.72rem/1 "DM Mono", monospace;
  text-transform: uppercase;
}

.md-typeset .yaml-post-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1.5rem, 5vw, 3.5rem);
  border: 1px solid var(--yaml-rule);
  background: var(--yaml-card);
  color: var(--yaml-ink);
  text-decoration: none;
  transition: border 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.md-typeset .yaml-post-card:hover {
  border-color: var(--yaml-red);
  box-shadow: 0.7rem 0.7rem 0 var(--yaml-cream);
  transform: translate(-0.2rem, -0.2rem);
}

.yaml-post-card__meta {
  color: var(--yaml-red);
  font: 500 0.62rem/1.4 "DM Mono", monospace;
  letter-spacing: 0.08em;
}

.yaml-post-card h3 {
  margin: 0.7rem 0;
  font-size: clamp(1.8rem, 5vw, 3rem);
}

.yaml-post-card p:last-child {
  max-width: 42rem;
  margin: 0;
}

.yaml-post-card__arrow {
  color: var(--yaml-red);
  font-size: 2.5rem;
}

.yaml-author {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 6rem;
  padding: 2rem 0;
  border-top: 1px solid var(--yaml-rule);
  border-bottom: 1px solid var(--yaml-rule);
}

.yaml-author img {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  filter: grayscale(1);
}

.yaml-author h2,
.yaml-author p {
  margin: 0;
}

.yaml-author .yaml-kicker { margin-bottom: 0.4rem; }

.md-typeset .yaml-rss {
  display: inline-block;
  margin-bottom: 1rem;
  font: 500 0.7rem/1 "DM Mono", monospace;
  text-transform: uppercase;
}

.md-post__meta,
.md-post__action,
.md-post__authors {
  font-family: "DM Mono", monospace;
}

.md-footer {
  background: #20201e;
}

@media screen and (max-width: 800px) {
  .yaml-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 3rem;
  }

  .yaml-hero__document {
    max-width: 34rem;
    box-shadow: 0.7rem 0.7rem 0 var(--yaml-cream);
    transform: none;
  }

  .yaml-topics {
    grid-template-columns: 1fr;
  }

  .yaml-topics article,
  .yaml-topics article:first-child {
    padding: 1.5rem 0;
    border-right: 0;
    border-bottom: 1px solid var(--yaml-rule);
  }

  .yaml-topics article:last-child { border-bottom: 0; }

  .yaml-author {
    grid-template-columns: auto 1fr;
  }

  .yaml-author .yaml-button {
    grid-column: 1 / -1;
  }
}

@media screen and (max-width: 500px) {
  .yaml-featured__heading {
    align-items: start;
    flex-direction: column;
    gap: 1rem;
  }

  .yaml-post-card__arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
