/* Cyanotype: one blue ink on cool paper, blueprint grid only in the hero. */
:root {
  --paper: #eef2f6;
  --ink: #17365d;
  --ink-soft: #4a6585;
  --rule: #b9c7d8;
  --grid: rgba(23, 54, 93, 0.09);
  --mark: #f3d35b;
  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --body: "Source Serif 4", Georgia, serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f2340;
    --ink: #e6edf5;
    --ink-soft: #9fb3cb;
    --rule: #2c4668;
    --grid: rgba(230, 237, 245, 0.07);
    --mark: #d9b93a;
    color-scheme: dark;
  }
}

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

html {
  font-size: 112.5%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--mark);
  color: #17365d;
}

a {
  color: inherit;
  text-decoration-color: var(--mark);
  text-decoration-thickness: 0.18em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-color: currentColor;
}

a:focus-visible {
  outline: 3px solid var(--mark);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: min(100% - 2rem, 40rem);
  margin-inline: auto;
}

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-block: 1.5rem;
  font-family: var(--display);
  font-size: 0.95rem;
}

.site-header .home {
  font-weight: 700;
  text-decoration: none;
}

.site-header nav a {
  margin-left: 1.25rem;
  text-decoration: none;
  color: var(--ink-soft);
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  color: var(--ink);
}

/* Hero: the one bold element */
.hero {
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 1.5rem 1.5rem;
  border-block: 1px solid var(--rule);
  padding-block: 4.5rem 3.5rem;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3rem, 12vw, 6.25rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin: 0;
}

/* Dimension line under the name, like a blueprint callout */
.dimension {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.4rem;
  color: var(--ink-soft);
  font-family: var(--display);
  font-size: 0.9rem;
}

.dimension::before,
.dimension::after {
  content: "";
  width: 1px;
  height: 0.9rem;
  background: currentColor;
}

.dimension .line {
  height: 1px;
  background: currentColor;
}

.dimension .label {
  white-space: nowrap;
}

/* Content */
main {
  padding-block: 3rem 4rem;
}

main h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 2.75rem 0 0.75rem;
}

main h2:first-child {
  margin-top: 0;
}

main p {
  margin: 0 0 1rem;
  max-width: 66ch;
}

.topics {
  margin: 0;
  padding-left: 1.1rem;
}

.topics li {
  margin-bottom: 0.4rem;
}

.notes {
  list-style: none;
  margin: 0;
  padding: 0;
}

.notes li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  padding-block: 0.7rem;
  border-top: 1px solid var(--rule);
}

.notes li:last-child {
  border-bottom: 1px solid var(--rule);
}

.notes time {
  color: var(--ink-soft);
  font-family: var(--display);
  font-size: 0.9rem;
  padding-top: 0.15rem;
}

.empty {
  color: var(--ink-soft);
}

/* Articles */
.article-head {
  border-bottom: 1px solid var(--rule);
  padding-block: 3rem 2rem;
}

.article-head h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 2.9rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 0.75rem;
}

.article-head p {
  color: var(--ink-soft);
  margin: 0;
}

article h2 {
  font-size: 1.2rem;
}

article ul,
article ol {
  padding-left: 1.1rem;
  max-width: 66ch;
}

article li {
  margin-bottom: 0.4rem;
}

code {
  font-size: 0.88em;
  background: var(--grid);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 1.5rem 2.5rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

@media (max-width: 30rem) {
  .notes li {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }

  .dimension {
    font-size: 0.8rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .dimension .line {
    transform-origin: center;
    animation: draw 700ms ease-out 150ms both;
  }

  @keyframes draw {
    from {
      transform: scaleX(0);
    }
  }
}
