@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&display=swap');

:root {
  --cream: #F3EBD3;
  --ink: #111;
  --green: #61BB46;
  --yellow: #FDB827;
  --orange: #F5821F;
  --red: #E03A3E;
  --fuchsia: #963D97;
  --blue: #009DDC;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  background: var(--cream);
  color: var(--ink);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.58;
  background: var(--cream);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(var(--ink) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: .045;
}

a {
  color: var(--ink);
  text-decoration-color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}

a:hover { color: var(--blue); }

.site-shell {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 40px;
}

.bento-card {
  border: 1px solid var(--ink);
  border-radius: 0;
  box-shadow: none;
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
}

.site-header {
  margin-bottom: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: -.03em;
  text-decoration: none;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 28px;
  border: 1px solid var(--ink);
  border-radius: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: .75rem;
  font-weight: 700;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--mono);
  font-size: .86rem;
}

.site-nav a,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--ink);
  border-radius: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 600;
  text-decoration: none;
  box-shadow: none;
}

.site-nav a:hover,
.button:hover {
  background: var(--blue);
  color: var(--ink);
}

main { margin: 0; }

.hero,
.page-heading,
.article {
  padding: 24px;
}

.hero {
  min-height: 280px;
  display: grid;
  align-content: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
}

.hero::before,
.hero::after {
  content: none;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  background: var(--cream);
}

h1,
h2,
h3,
h4 {
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.045em;
}

h1 {
  max-width: 760px;
  margin: 0 0 6px;
  font-size: clamp(2.35rem, 6vw, 4.75rem);
}

.hero h1 {
  font-size: clamp(2.35rem, 6vw, 4.75rem);
}

.article-header h1 {
  max-width: 820px;
  margin: 0 0 12px;
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  line-height: 1.08;
}

h2 { font-size: clamp(1.35rem, 2.5vw, 2rem); }

h3 { font-size: 1.15rem; }

.hero p,
.lede {
  max-width: 720px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(1rem, 1.35vw, 1.15rem);
  line-height: 1.38;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.button {
  min-height: 38px;
  padding: 8px 14px;
  background: var(--green);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-top: 0;
}

.post-card {
  --card-accent: var(--blue);
  min-height: 260px;
  overflow: hidden;
  background: rgba(17, 17, 17, .06);
  border: 1px solid var(--ink);
  border-radius: 0;
  transition: none;
}

.post-card:nth-child(1) { grid-column: span 3; min-height: 320px; }
.post-card:nth-child(2) { grid-column: span 3; min-height: 320px; }
.post-card:nth-child(3),
.post-card:nth-child(4),
.post-card:nth-child(5) { grid-column: span 2; }
.post-card:nth-child(n+6) { grid-column: span 3; }

.post-card:hover {
  transform: none;
  background: var(--cream);
}

.post-card:hover .read-more {
  color: var(--blue);
}

.post-card a {
  display: flex;
  min-height: inherit;
  flex-direction: column;
  padding: 16px;
  color: var(--ink);
  text-decoration: none;
}

.post-card .eyebrow {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 24px;
  padding: 4px 6px;
  border: 1px solid var(--ink);
  color: var(--ink);
}

.post-card h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 1.625rem;
  line-height: 1.12;
}

.post-card p:not(.eyebrow) {
  color: var(--ink);
  font-size: .98rem;
}

.read-more {
  margin-top: auto;
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 700;
}

.article-header {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ink);
}

.meta-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: .82rem;
}

.tag-row span {
  display: inline-flex;
  padding: 3px 6px;
  border: 1px solid var(--ink);
  border-radius: 0;
  color: var(--ink);
}

.tldr-block {
  position: relative;
  max-width: 840px;
  margin: 0 0 28px;
  padding: 16px;
  border: 1px solid var(--ink);
  border-left: 8px solid;
  background: rgba(17, 17, 17, .06);
  color: var(--ink);
}

.tldr-block::before {
  content: none;
}

.tldr-block h2 {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.1rem;
}

.tldr-block p {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.5;
}

.tldr-block p:last-child {
  margin-bottom: 0;
}

.post-content {
  max-width: 760px;
  color: var(--ink);
  font-size: 1.04rem;
}

.post-content p,
.post-content li { color: var(--ink); }

.post-content h2 {
  margin-top: 44px;
  font-size: 1.625rem;
  line-height: 1.15;
}

.post-content img {
  max-width: 100%;
  border: 1px solid var(--ink);
  border-radius: 0;
  box-shadow: none;
}

.post-content pre,
.post-content code,
code {
  font-family: var(--mono);
}

.post-content pre {
  overflow-x: auto;
  padding: 14px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--cream);
}

.post-content code,
code {
  padding: 1px 3px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--yellow);
  color: var(--ink);
}

.post-content pre code {
  padding: 0;
  border: 0;
  background: var(--ink);
  color: var(--cream);
}

.post-content blockquote {
  margin-left: 0;
  padding: 14px 16px;
  border: 1px solid var(--ink);
  border-left: 1px solid var(--fuchsia);
  color: var(--ink);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 32px 0;
}

.pagination a {
  display: block;
  padding: 7px 10px;
  border: 1px solid var(--ink);
  border-radius: 0;
  color: var(--ink);
  font-family: var(--mono);
  text-decoration: none;
}

.site-footer {
  align-items: flex-start;
  margin-top: 16px;
  color: var(--ink);
  font-size: .9rem;
}

@media (max-width: 900px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .post-card,
  .post-card:nth-child(1),
  .post-card:nth-child(2),
  .post-card:nth-child(3),
  .post-card:nth-child(4),
  .post-card:nth-child(5),
  .post-card:nth-child(n+6) {
    grid-column: span 1;
    min-height: 240px;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(100% - 20px, 1180px);
    margin-top: 10px;
  }
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .hero,
  .page-heading,
  .article { padding: 16px; }
  .hero { min-height: 330px; }
  .hero::before {
    width: 126px;
    height: 88px;
  }
  .hero::after {
    top: 38px;
    right: 32px;
    font-size: .86rem;
  }
  .post-grid { grid-template-columns: 1fr; }
}
