:root {
  color-scheme: light;
  --background: #ffffff;
  --text: #242424;
  --muted: #707070;
  --line: #e6e6e6;
  --link: #245ea8;
  --measure: 42rem;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.04rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

::selection {
  background: #dce9f8;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

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

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

.container {
  width: min(calc(100% - 2.5rem), var(--measure));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.5rem 0.75rem;
  transform: translateY(-180%);
  background: var(--text);
  color: var(--background);
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.5rem;
  border-bottom: 1px solid var(--line);
}

.site-nav {
  display: flex;
  gap: 1.1rem;
  font-family: var(--sans);
  font-size: 0.95rem;
}

.site-header > .site-nav:only-child {
  margin-left: auto;
}

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

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

.site-nav [aria-current="page"] {
  color: var(--text);
}

.intro {
  max-width: 38rem;
  padding: 4rem 0 3.5rem;
}

.intro h1 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 6vw, 2.8rem);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.intro > p {
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.intro-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  font-family: var(--sans);
  font-size: 0.92rem;
}

.profile-section {
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
}

.profile-section:last-of-type {
  padding-bottom: 3.5rem;
}

.profile-section h2 {
  margin-bottom: 1.35rem;
  font-size: 1.35rem;
  font-weight: 650;
}

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

.profile-item {
  padding: 0.55rem 0;
}

.profile-item strong,
.profile-item span {
  display: block;
}

.profile-item strong {
  font-weight: 650;
}

.profile-item span {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.profile-item strong a {
  color: var(--text);
  text-decoration-color: var(--line);
}

.profile-item strong a:hover {
  color: var(--link);
  text-decoration-color: currentColor;
}

/* Slightly tighter vertical rhythm for the About page. */

.about-page .intro {
  padding: 3rem 0 2.5rem;
}

.about-page .profile-section,
.about-page .profile-section:last-of-type {
  padding: 1.75rem 0;
}

.about-page .profile-section:last-of-type {
  padding-bottom: 2.5rem;
}

.about-page .profile-section h2 {
  margin-bottom: 1rem;
}

.about-page .profile-item {
  padding: 0.4rem 0;
}

.page {
  padding-top: 4.5rem;
  padding-bottom: 5rem;
}

.page-header {
  margin-bottom: 3rem;
}

.page-header h1 {
  margin-bottom: 0.75rem;
  font-size: clamp(2rem, 6vw, 2.8rem);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.page-header p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.work-section + .work-section {
  margin-top: 3.5rem;
}

.work-section-title {
  margin-bottom: 0.9rem;
  font-size: 1.25rem;
  font-weight: 650;
}

.work-section .project-list {
  padding-top: 1.5rem;
}

.project-list {
  padding-top: 2.25rem;
  border-top: 1px solid var(--line);
}

.project + .project {
  margin-top: 2.25rem;
}

.project h2,
.project h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.55rem;
  margin-bottom: 0.4rem;
  font-size: 1.12rem;
  font-weight: 650;
}

.project h2 .project-category,
.project h3 .project-category {
  color: var(--muted);
  font: 400 0.74rem/1.4 var(--sans);
  white-space: nowrap;
}

.project h2 a,
.project h3 a {
  color: var(--text);
  text-decoration-color: var(--line);
}

.project h2 a:hover,
.project h3 a:hover {
  color: var(--link);
  text-decoration-color: currentColor;
}

.project > p:not(.meta) {
  max-width: 37rem;
  margin-bottom: 0.55rem;
  color: var(--muted);
}

.meta {
  margin-bottom: 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.01em;
}

.site-footer {
  padding: 2rem 0 3.5rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.78rem;
}

.site-footer p {
  margin-bottom: 0;
}

/* Notes */

.article-page {
  max-width: 38rem;
  padding-top: 4.5rem;
  padding-bottom: 5rem;
}

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

.article-header .eyebrow {
  margin-bottom: 1rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.7rem;
}

.article-header h1 {
  margin-bottom: 0.75rem;
  font-size: clamp(2.1rem, 7vw, 3rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.article-lede {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.prose {
  padding-top: 2rem;
}

.prose p {
  margin-bottom: 1.35rem;
}

.article-footer {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 0.85rem;
}

@media (max-width: 34rem) {
  .container {
    width: min(calc(100% - 2rem), var(--measure));
  }

  .site-header {
    min-height: 4rem;
  }

  .site-nav {
    gap: 0.7rem;
    font-size: 0.88rem;
  }

  .intro {
    padding: 3.25rem 0 2.75rem;
  }

  .profile-section {
    padding: 2.15rem 0;
  }

  .profile-section:last-of-type {
    padding-bottom: 3rem;
  }

  .about-page .intro {
    padding: 2.5rem 0 2.25rem;
  }

  .about-page .profile-section,
  .about-page .profile-section:last-of-type {
    padding: 1.5rem 0;
  }

  .about-page .profile-section:last-of-type {
    padding-bottom: 2rem;
  }

  .page {
    padding-top: 3.75rem;
    padding-bottom: 4rem;
  }
}

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