@font-face {
  font-family: "Departure Mono";
  src: url("/assets/fonts/departure-mono.woff2") format("woff2");
  font-display: swap;
  font-weight: 400;
}

:root {
  color-scheme: light;
  --ink: #142a45;
  --muted: #58708c;
  --blue: #1c5d9b;
  --blue-deep: #14365f;
  --blue-soft: #dcecff;
  --paper: #f5f8fd;
  --card: #ffffff;
  --line: #cfdef0;
  --mono: "Departure Mono", "SFMono-Regular", Consolas, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 86% 0%, rgba(196, 221, 250, 0.6), transparent 34rem),
    var(--paper);
  font: 17px/1.72 var(--sans);
}

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

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

img,
video {
  max-width: 100%;
  height: auto;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid #438bd0;
  outline-offset: 4px;
}

h1,
h2,
h3,
h4,
.eyebrow,
.site-nav,
.home-kicker,
.button,
.term-chip {
  font-family: var(--mono);
  font-weight: 400;
}

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

h1,
h2,
h3 {
  color: var(--blue-deep);
  line-height: 1.25;
}

h1 {
  margin-bottom: 1.15rem;
  font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: -0.055em;
}

h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: -0.04em;
}

h3 {
  font-size: 1.2rem;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  transform: translateY(-160%);
  border-radius: 0.5rem;
  color: white;
  background: var(--blue-deep);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
.site-main,
.site-footer {
  width: min(100% - 2.5rem, 1080px);
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.45rem;
  border-bottom: 1px solid var(--line);
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--ink);
  text-decoration: none;
}

.site-avatar {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
}

.brand-copy {
  display: grid;
  gap: 0.1rem;
}

.brand-copy strong {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: -0.035em;
}

.brand-copy > span {
  color: var(--muted);
  font-size: 0.82rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
  font-size: 0.87rem;
}

.site-nav a {
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--blue-deep);
  background: var(--blue-soft);
}

.site-main {
  min-height: calc(100vh - 230px);
  padding-block: clamp(2.5rem, 6vw, 5rem);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.35rem 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer a {
  white-space: nowrap;
}

.home-kicker,
.eyebrow {
  margin-bottom: 1rem;
  color: var(--blue);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home-kicker {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  margin-bottom: 1.5rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
}

.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 100%;
  background: #4495d4;
  box-shadow: 0 0 0 3px #dcecff;
}

.home-content,
.page-shell,
.article-shell,
.archive-shell {
  max-width: 790px;
  margin-inline: auto;
}

.home-content {
  max-width: none;
  margin-bottom: 0;
}

.home-intro {
  display: grid;
  grid-template-columns: 158px minmax(0, 1fr);
  align-items: start;
  gap: 2rem;
}

.home-avatar {
  width: 158px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.entry-header {
  margin-bottom: 2.5rem;
}

.entry-header .eyebrow {
  margin-bottom: 0.8rem;
}

.article-header {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.article-header h1 {
  max-width: 18ch;
}

.term-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.term-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue-deep);
  background: #f1f7ff;
  font-size: 0.75rem;
  line-height: 1.5;
  text-decoration: none;
}

.term-chip:hover {
  border-color: #9abce0;
  background: var(--blue-soft);
}

.featured-image {
  display: block;
  max-height: 28rem;
  margin-top: 2rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  object-fit: cover;
}

.prose > :first-child {
  margin-top: 0;
}

.prose > :last-child {
  margin-bottom: 0;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote {
  margin-bottom: 1.35rem;
}

.prose h2,
.prose h3,
.prose h4 {
  margin-top: 2.2rem;
}

.prose blockquote {
  margin-inline: 0;
  padding: 0.8rem 1.2rem;
  border-left: 3px solid #75a8da;
  color: var(--muted);
  background: rgba(220, 236, 255, 0.5);
}

.prose pre,
.prose .code-block {
  overflow: auto;
  padding: 1.1rem 1.25rem;
  border: 1px solid #26476e;
  border-radius: 0.85rem;
  color: #e7f2ff;
  background: #102a49;
  font: 0.9rem/1.65 var(--mono);
}

.prose pre code {
  padding: 0;
  color: inherit;
  background: transparent;
}

.prose code {
  padding: 0.12em 0.35em;
  border-radius: 0.3rem;
  color: #224d7b;
  background: #e3effd;
  font: 0.9em var(--mono);
}

.prose figure {
  margin: 2rem 0;
}

.prose figure img {
  border: 1px solid var(--line);
  border-radius: 0.8rem;
}

.prose figcaption {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.prose .content-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.prose .content-column {
  flex: 1 1 240px;
}

.home-content .content-columns-wide {
  gap: 0;
}

.home-content .home-avatar {
  border-radius: 50%;
}

.home-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  border-block: 0;
}

.home-details h2 {
  margin-bottom: 0.8rem;
  font-size: 1.35rem;
}

.home-details h3 {
  margin-bottom: 0.8rem;
  font-size: 1.35rem;
}

.home-about p:last-child,
.home-social p:last-of-type {
  margin-bottom: 0;
}

.home-latest {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--card);
  box-shadow: 0 8px 26px rgba(37, 73, 113, 0.045);
}

.home-latest .eyebrow {
  margin-bottom: 0.6rem;
}

.home-latest h2 a,
.home-latest h3 a {
  color: inherit;
  text-decoration: none;
}

.home-latest time {
  display: block;
  margin: -0.3rem 0 0.75rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.home-latest-image {
  display: block;
  margin-bottom: 0.8rem;
}

.home-latest-image img {
  width: 100%;
  max-height: 9rem;
  border-radius: 0.55rem;
  object-fit: cover;
}

.home-latest > p:not(.eyebrow) {
  margin-bottom: 0.85rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.home-social ul {
  margin-bottom: 0;
  padding-left: 1.2rem;
}

.home-social > :last-child {
  margin-bottom: 0;
}

.prose .latest-post {
  margin: 0;
  padding: 0;
  list-style: none;
}

.prose .latest-post-image {
  margin-bottom: 0.75rem;
}

.prose .latest-post-image img {
  max-height: 9rem;
  object-fit: cover;
}

.prose .latest-post-title {
  display: block;
  font-family: var(--mono);
}

.prose .latest-post-date {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.prose .latest-post-excerpt {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.prose .content-buttons,
.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.prose .button-link,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border: 1px solid var(--blue-deep);
  border-radius: 0.55rem;
  color: white;
  background: var(--blue-deep);
  font-size: 0.9rem;
  text-decoration: none;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
}

.prose th,
.prose td {
  padding: 0.6rem;
  border: 1px solid var(--line);
  text-align: left;
}

.recent-posts {
  padding-top: 2.5rem;
}

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

.section-heading .eyebrow {
  margin-bottom: 0.5rem;
}

.section-heading h2 {
  margin-bottom: 0;
}

.text-link,
.card-more {
  font-family: var(--mono);
  font-size: 0.86rem;
  text-decoration: none;
}

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

.post-card {
  display: flex;
  min-height: 14rem;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--card);
  box-shadow: 0 8px 26px rgba(37, 73, 113, 0.045);
}

.post-card h3 {
  margin-bottom: 0.7rem;
  font-size: 1.05rem;
}

.post-card h3 a,
.post-row h2 a {
  color: inherit;
  text-decoration: none;
}

.post-card h3 a:hover,
.post-row h2 a:hover {
  color: var(--blue);
}

.post-card p:not(.card-date) {
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.91rem;
}

.card-date,
.post-row time {
  margin-bottom: 0.55rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.card-more {
  margin-top: auto;
}

.archive-header {
  margin-bottom: 2.3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.archive-header > p:last-child {
  max-width: 52ch;
  margin-bottom: 0;
  color: var(--muted);
}

.post-list {
  display: grid;
}

.post-row {
  display: grid;
  grid-template-columns: 10.5rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}

.post-row time {
  padding-top: 0.35rem;
}

.post-row h2 {
  margin-bottom: 0.55rem;
  font-size: 1.3rem;
}

.post-row p {
  margin-bottom: 0.75rem;
  color: var(--muted);
}

.post-row .term-list {
  margin-top: 0.5rem;
}

.article-back {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.9rem;
}

.article-back a {
  text-decoration: none;
}

.not-found {
  max-width: 650px;
  margin: 4rem auto;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: var(--card);
}

.not-found > p:not(.eyebrow) {
  color: var(--muted);
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.85rem;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  .home-intro {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .home-details {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .home-avatar {
    width: 120px;
  }

  .post-card {
    min-height: 0;
  }
}

@media (max-width: 540px) {
  .site-header,
  .site-main,
  .site-footer {
    width: min(100% - 1.4rem, 1080px);
  }

  .brand-copy > span {
    font-size: 0.76rem;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    font-size: 0.82rem;
  }

  .site-nav a {
    padding-inline: 0.55rem;
  }

  .site-main {
    padding-block: 2.4rem;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .post-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .post-row time {
    padding-top: 0;
  }
}

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