:root {
  --paper: #f5f2ea;
  --ink: #1c211e;
  --muted: #61675f;
  --line: #d8d4c9;
  --accent: #a4412d;
  --accent-dark: #713020;
  --serif: Iowan Old Style, Baskerville, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

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

.shell {
  margin-inline: auto;
  max-width: 72rem;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.skip-link {
  background: var(--ink);
  color: var(--paper);
  left: 1rem;
  padding: 0.5rem 0.75rem;
  position: fixed;
  top: -4rem;
  z-index: 10;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  border-bottom: 1px solid var(--line);
}

.header-inner,
.footer-inner {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.header-inner {
  min-height: 5rem;
}

.site-name {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
}

.site-nav a {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

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

.page-content {
  min-height: calc(100vh - 11rem);
}

.hero {
  max-width: 58rem;
  padding-block: clamp(5rem, 12vw, 10rem);
}

.eyebrow {
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.13em;
  margin: 0 0 1.25rem;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.hero h1 {
  font-size: clamp(3rem, 7vw, 6.25rem);
  margin: 0;
  max-width: 16ch;
}

.hero-intro {
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.5;
  margin: 2rem 0 0;
  max-width: 42rem;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin-top: 2rem;
}

.text-link {
  font-weight: 700;
}

.text-link::after {
  content: " →";
}

.home-section {
  border-top: 1px solid var(--line);
  padding-block: clamp(3rem, 7vw, 5rem);
}

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

.section-heading h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin: 0;
}

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

.post-list > li {
  border-top: 1px solid var(--line);
}

.post-list > li:last-child {
  border-bottom: 1px solid var(--line);
}

.post-list-item {
  display: grid;
  gap: 1rem clamp(2rem, 7vw, 7rem);
  grid-template-columns: 8rem 1fr;
  padding-block: 1.75rem;
}

.post-list time,
.article-header time {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.post-list h2 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  margin: 0;
}

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

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

.post-list p {
  color: var(--muted);
  margin: 0.6rem 0 0;
  max-width: 44rem;
}

.empty-state,
.home-note {
  color: var(--muted);
}

.empty-state {
  border-block: 1px solid var(--line);
  padding-block: 2rem;
}

.home-note {
  padding-block: 0 5rem;
}

.contact-list {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(2, 1fr);
  padding-bottom: 5rem;
}

.contact-list a {
  border: 1px solid var(--line);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  margin: 0 -1px -1px 0;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  text-decoration: none;
}

.contact-list a:hover {
  color: var(--accent-dark);
}

.contact-list span {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.contact-list strong {
  font-family: var(--serif);
  font-size: 1.8rem;
  margin-top: 0.4rem;
}

.page-header {
  max-width: 46rem;
  padding-block: clamp(4rem, 9vw, 7rem);
}

.page-header h1,
.article-header h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
  margin: 0;
}

.page-header > p:last-child,
.article-deck {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.25rem;
  margin: 1.5rem 0 0;
}

.project-list {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(2, 1fr);
  padding-bottom: 5rem;
}

.project-card {
  border: 1px solid var(--line);
  margin: 0 -1px -1px 0;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.project-card h2 {
  font-size: 1.8rem;
  margin: 0.75rem 0;
}

.project-card > p {
  color: var(--muted);
}

.project-links {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-top: 1.25rem;
}

.project-links a:not(.text-link) {
  font-size: 0.85rem;
}

.investing-note {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.25rem;
  margin: 0 0 5rem;
  padding-top: 2rem;
}

.project-meta {
  color: var(--muted);
  display: flex;
  font-size: 0.72rem;
  gap: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article {
  margin-inline: auto;
  max-width: 46rem;
  padding-block: clamp(4rem, 9vw, 7rem);
}

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

.article-header time {
  display: block;
  margin-top: 1.5rem;
}

.prose {
  font-family: var(--serif);
  font-size: 1.12rem;
}

.prose h2,
.prose h3 {
  color: var(--ink);
  line-height: 1.25;
  margin: 2.5rem 0 1rem;
}

.prose img {
  height: auto;
  max-width: 100%;
}

.prose blockquote {
  border-left: 3px solid var(--accent);
  color: var(--muted);
  margin: 2rem 0;
  padding-left: 1.5rem;
}

.prose code {
  font-size: 0.88em;
}

.article-footer {
  border-top: 1px solid var(--line);
  margin-top: 4rem;
  padding-top: 2rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

.footer-inner {
  justify-content: space-between;
  min-height: 6rem;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@media (max-width: 42rem) {
  html {
    font-size: 16px;
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
    justify-content: center;
    min-height: 6.5rem;
  }

  .site-nav {
    width: 100%;
  }

  .post-list-item,
  .project-list,
  .contact-list {
    grid-template-columns: 1fr;
  }

  .post-list-item {
    gap: 0.45rem;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: no-preference) {
  a {
    transition: color 150ms ease;
  }
}
