:root {
  color-scheme: light dark;
  --background: #f5f4ef;
  --surface: #ebeae5;
  --text: #18252c;
  --muted: #59656a;
  --line: rgba(24, 37, 44, 0.2);
  --accent: #1d5d63;
  --focus: #895766;
  --page: 960px;
  --gutter: clamp(1.25rem, 4vw, 2.75rem);
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #151817;
    --surface: #202422;
    --text: #eef0ec;
    --muted: #b5bcb8;
    --line: rgba(238, 240, 236, 0.22);
    --accent: #8ebfc0;
    --focus: #c893a0;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.25vw + 0.94rem, 1.08rem);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

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

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

::selection {
  background: var(--accent);
  color: var(--background);
}

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

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

.page-width {
  width: min(var(--page), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

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

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

.site-header nav {
  display: flex;
  gap: 1.35rem;
}

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

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

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12.5rem;
  gap: clamp(3rem, 9vw, 7rem);
  align-items: start;
  padding-block: clamp(4rem, 9vw, 6.5rem);
}

.intro > div {
  max-width: 39rem;
}

.location,
.metadata {
  margin: 0 0 0.65rem;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0.8rem;
  font-size: clamp(3rem, 7vw, 4.8rem);
  font-weight: 680;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.lead {
  max-width: 31rem;
  margin-bottom: 1.75rem;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.intro p:not(.location):not(.lead) {
  color: var(--muted);
}

.portrait {
  width: 12.5rem;
  height: 12.5rem;
  object-fit: cover;
  object-position: 50% 18%;
  background: var(--surface);
}

.section {
  padding-block: clamp(3.25rem, 6vw, 4.75rem);
  border-top: 1px solid var(--line);
}

h2 {
  margin-bottom: clamp(2.25rem, 4vw, 3.25rem);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 670;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

h3 {
  margin-bottom: 1rem;
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  font-weight: 670;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.featured-project {
  display: grid;
  grid-template-columns: minmax(11rem, 0.72fr) minmax(0, 1.28fr);
  column-gap: clamp(2rem, 7vw, 5.5rem);
}

.project-copy,
.other-projects article > p,
.contact > div,
.about > div {
  color: var(--muted);
}

.project-image,
.project-details {
  grid-column: 1 / -1;
}

.project-image {
  margin: clamp(2rem, 4vw, 3rem) 0 0;
}

.project-image img {
  width: 100%;
  height: clamp(12rem, 43vw, 27rem);
  object-fit: cover;
  background: var(--surface);
}

figcaption {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: baseline;
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.photo-credit {
  white-space: nowrap;
}

.photo-credit a {
  color: var(--text);
}

.project-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 4vw, 2.75rem);
  margin: 2.25rem 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.92rem;
  list-style: none;
}

.project-details li {
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.project-details h4 {
  margin: 0 0 0.65rem;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.project-details a {
  display: block;
  margin-top: 0.45rem;
  color: var(--text);
}

.other-projects {
  margin-top: clamp(3.25rem, 7vw, 5.5rem);
  border-top: 1px solid var(--line);
}

.other-projects article {
  display: grid;
  grid-template-columns: minmax(11rem, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(2rem, 7vw, 5.5rem);
  padding-block: 2.25rem;
}

.other-projects article + article {
  border-top: 1px solid var(--line);
}

.other-projects article > p {
  max-width: 38rem;
  margin-bottom: 0;
}

.writing-list {
  max-width: 45rem;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.writing-list li {
  border-bottom: 1px solid var(--line);
}

.writing-list a {
  display: block;
  padding-block: 1rem;
  font-weight: 650;
}

.writing-note {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.contact,
.about {
  display: grid;
  grid-template-columns: minmax(11rem, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(2rem, 7vw, 5.5rem);
}

.contact h2,
.about h2 {
  margin-bottom: 0;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 1.5rem 0 0;
}

.contact-actions a {
  color: var(--text);
  font-weight: 650;
}

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

.about p:last-child {
  margin-bottom: 0;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 2rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 700px) {
  .site-header {
    align-items: flex-start;
    padding-block: 1.15rem;
  }

  .site-header nav {
    gap: 0.9rem;
  }

  .intro {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-block: 3.5rem 4rem;
  }

  .portrait {
    width: 8.75rem;
    height: 8.75rem;
  }

  .featured-project,
  .other-projects article,
  .contact,
  .about {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .project-details {
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 0;
  }

  .project-details li {
    padding-block: 1.1rem;
  }

  figcaption {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .contact h2,
  .about h2 {
    margin-bottom: 0.5rem;
  }

  .site-footer {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .site-header {
    display: block;
  }

  .site-header nav {
    justify-content: space-between;
    margin-top: 0.75rem;
  }

  h1 {
    font-size: 3.1rem;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: currentColor;
  }

  a,
  .contact-actions a {
    text-decoration-thickness: 0.14em;
  }
}

@media (forced-colors: active) {
  .portrait,
  .project-image img {
    border: 1px solid CanvasText;
  }
}

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

@media print {
  .site-header nav,
  .skip-link,
  .contact-actions {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  a {
    color: black;
  }
}
