:root {
  --paper: #FFFFFF;
  --ink: #111111;
  --red: #E30613;
  --muted: #666666;
  --wash: #F4F4F3;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { height: 100%; }

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.topbar {
  height: 6px;
  background: var(--red);
  flex-shrink: 0;
}

header, main, footer {
  width: 100%;
  max-width: 44rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2rem);
}

header {
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav a {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.nav a:hover { color: var(--red); }

.nav a[aria-current="page"] {
  color: var(--red);
  border-bottom: 2px solid var(--red);
}

main {
  flex: 1;
  padding-block: 3.5rem 5rem;
}

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

/* ---- site mark / breadcrumb ---- */

.mark {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mark a {
  color: var(--ink);
  text-decoration: none;
}

.mark a:hover { color: var(--red); }

.mark .sep { color: var(--red); }

/* ---- headings ---- */

h1 {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

h1.giant { font-size: clamp(3rem, 9vw, 4.5rem); }

h1.title { font-size: clamp(2.25rem, 6vw, 3rem); }

.role {
  font-size: 1.125rem;
  margin-top: 0.75rem;
}

.rule {
  border: none;
  border-top: 2px solid var(--ink);
  margin-block: 1.75rem;
}

/* ---- labels ---- */

.label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}

.note {
  font-size: 0.9375rem;
  color: var(--muted);
  margin-top: 1.5rem;
}

.bio { max-width: 36rem; }

.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2rem;
  margin-top: 2.25rem;
}

.cols p {
  font-size: 0.9375rem;
  margin-top: 0.4rem;
  max-width: 26rem;
}

.bio a,
.cols a,
.note a,
.post-list .summary a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--red);
  text-underline-offset: 3px;
}

.bio a:hover,
.cols a:hover,
.note a:hover,
.post-list .summary a:hover { color: var(--red); }

/* ---- buttons ---- */

.btnrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-block;
  border: 2px solid var(--ink);
  padding: 0.7rem 1.4rem;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  background: var(--paper);
}

.btn:hover {
  border-color: var(--red);
  color: var(--red);
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--red);
  border-color: var(--red);
  color: var(--paper);
}

/* ---- footer ---- */

footer {
  border-top: 1px solid var(--ink);
  padding-block: 0.75rem 1.5rem;
  font-size: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.fleft {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

footer .site { font-weight: 700; letter-spacing: 0.08em; }

footer .copy { color: var(--muted); }

.flinks {
  display: flex;
  gap: 1.25rem;
}

.flinks a {
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.flinks a:hover { color: var(--red); }

/* ---- blog index ---- */

.post-list {
  list-style: none;
  border-top: 2px solid var(--ink);
  margin-top: 2rem;
}

.post-list li {
  border-bottom: 1px solid var(--ink);
  padding-block: 1.5rem;
}

.post-list h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-top: 0.35rem;
}

.post-list h2 a {
  color: var(--ink);
  text-decoration: none;
}

.post-list h2 a:hover { color: var(--red); }

.post-list .summary {
  margin-top: 0.35rem;
  max-width: 34rem;
}

/* ---- post ---- */

.post-meta { margin-bottom: 0.75rem; }

.post-body > * + * { margin-top: 1.25rem; }

.post-body h2 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-top: 2.25rem;
}

.post-body a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--red);
  text-underline-offset: 3px;
}

.post-body a:hover { color: var(--red); }

.post-body img {
  max-width: 100%;
  height: auto;
  display: block;
}

.post-body figcaption {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.post-body code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--wash);
  padding: 0.1em 0.35em;
}

.post-body pre {
  background: var(--wash);
  padding: 1rem 1.25rem;
  overflow-x: auto;
}

.post-body pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
}

.post-body blockquote {
  border-left: 4px solid var(--red);
  padding-left: 1.25rem;
}

.post-body ul,
.post-body ol { padding-left: 1.4rem; }

.back { margin-top: 3rem; }
