:root {
  color-scheme: light;
  --bg: #fbfbfa;
  --text: #161616;
  --muted: #666666;
  --line: #dededb;
  --accent: #9dff57;
  --max: 760px;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
}

body {
  margin: 0;
  min-width: 320px;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #000000;
}

::selection {
  background: color-mix(in srgb, var(--accent), transparent 45%);
}

h1,
h2,
h3,
p {
  margin: 0;
}

.site-header,
.site-main,
.site-footer {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.35rem 0 1.1rem;
  border-bottom: 2px solid var(--accent);
}

.site-name {
  position: relative;
  width: fit-content;
  color: var(--text);
  font-size: clamp(1.05rem, 4vw, 1.45rem);
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.site-name::after {
  position: absolute;
  right: -0.55rem;
  bottom: 0.08rem;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 999px;
  background: var(--accent);
  content: "";
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
}

.site-nav a {
  color: var(--muted);
}

.site-nav a:hover {
  color: var(--text);
  text-decoration-color: var(--accent);
}

.site-main {
  padding: 2.4rem 0 3.8rem;
}

.section-shell + .section-shell {
  margin-top: 2.4rem;
}

.hero,
#blog,
.blog-page,
.about-page,
.post-page {
  display: grid;
  gap: 1rem;
}

.hero {
  padding: 0.8rem 0 1.2rem;
}

.hero-copy {
  display: grid;
  gap: 0.85rem;
}

.hero h1,
.blog-page h1,
.about-page h1,
.post-page h1 {
  max-width: 14ch;
  font-size: clamp(1.85rem, 6vw, 2.75rem);
  line-height: 1.04;
}

.hero h1 {
  width: fit-content;
  padding: 0 0.12em 0.04em;
  background: linear-gradient(
    transparent 42%,
    color-mix(in srgb, var(--accent), transparent 8%) 42%
  );
  box-decoration-break: clone;
}

.hero-subtitle,
.hero-note,
.about-page p,
.post-page p,
.markdown-content {
  max-width: 40rem;
}

.hero-subtitle {
  font-size: 1.18rem;
}

.hero-note,
.eyebrow,
.note-card time,
.site-footer {
  color: var(--muted);
}

.eyebrow,
.note-card time {
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.section-heading {
  display: grid;
  gap: 0.15rem;
  margin-bottom: 1.15rem;
}

.section-heading h2 {
  font-size: 2rem;
  line-height: 1.15;
}

.note-card {
  position: relative;
  margin-left: -0.7rem;
  border-top: 1px solid var(--line);
  border-radius: 0.35rem;
  padding-top: 1rem;
  padding-right: 0.7rem;
  padding-left: 0.7rem;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.note-card h2,
.note-card h3 {
  margin-top: 0.15rem;
  font-size: 1.05rem;
}

.note-card p {
  margin-top: 0.25rem;
  color: var(--muted);
}

.note-card a {
  text-decoration-color: transparent;
}

.note-card a::after {
  position: absolute;
  inset: 0;
  content: "";
}

.note-card:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent), transparent 88%);
}

.note-card:hover h3 a {
  text-decoration-color: var(--accent);
}

.notes-list {
  display: grid;
  gap: 1.2rem;
}

.note-card {
  display: grid;
  gap: 0.35rem;
}

.post-page time {
  color: var(--muted);
}

.markdown-content > * + * {
  margin-top: 1rem;
}

.markdown-content code,
.post-page code {
  font-size: 0.92em;
}

.site-footer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.4rem 0 2rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
}

.site-footer-copy {
  display: grid;
  gap: 0.2rem;
}

.site-footer-brand {
  width: fit-content;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.site-footer-brand:hover {
  color: var(--text);
}

.locale-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  width: fit-content;
  padding: 0.22rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f3f3f1;
}

.locale-switcher-divider {
  color: #a4a4a1;
  font-size: 0.8rem;
}

.locale-link {
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition:
    background-color 120ms ease,
    color 120ms ease,
    box-shadow 120ms ease;
}

.locale-link:hover {
  color: var(--text);
  background: #ecece8;
}

.locale-link.is-selected {
  color: var(--text);
  background: #e2e2de;
  box-shadow: inset 0 0 0 1px rgba(22, 22, 22, 0.05);
}

@media (min-width: 680px) {
  .note-card {
    grid-template-columns: 9rem 1fr;
  }

  .site-footer {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
  }
}

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