:root {
  --ivory: #faf8f4;
  --graphite: #2b2b2b;
  --muted: #8e877f;
  --border: #e8e1d8;
  --bronze: #9b7b55;
  --serif: "Instrument Serif", "Cormorant Garamond", "Canela", Georgia, serif;
  --sans: Inter, "General Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --hero-image-scale: 1;
  --hero-text-opacity: 1;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--graphite);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  text-align: left;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::selection {
  background: rgba(155, 123, 85, 0.22);
}

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

a {
  color: inherit;
}

a:focus-visible {
  outline: 1px solid var(--bronze);
  outline-offset: 0.4rem;
}

article:focus-visible {
  outline: none;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  transform: translateY(-140%);
  background: var(--graphite);
  color: var(--ivory);
  padding: 0.65rem 0.85rem;
  text-decoration: none;
}

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

.portfolio-back-link {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-bottom: 1px solid transparent;
  color: var(--muted);
  padding-block: 0.35rem;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: border-color 200ms ease, color 200ms ease, transform 200ms ease;
}

.portfolio-back-link--fixed {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 80;
}

.portfolio-back-link:hover,
.portfolio-back-link:focus-visible {
  color: var(--graphite);
  border-bottom-color: currentColor;
  transform: translateY(-1px);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 700ms ease, border-color 700ms ease;
}

.site-header.is-scrolled {
  background: rgba(250, 248, 244, 0.96);
  border-color: var(--border);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.75rem;
  padding: 0.95rem var(--gutter);
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.18rem;
  line-height: 1;
  margin-left: max(0rem, calc(9.5rem - var(--gutter)));
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(1rem, 3vw, 2.8rem);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--graphite);
  font-size: 0.86rem;
}

.nav-links a {
  position: relative;
  display: inline-flex;
  padding-block: 0.35rem;
  text-decoration: none;
}

.nav-links a::after,
.selected-work-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.12rem;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 420ms ease;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after,
.selected-work-link:hover::after,
.selected-work-link:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.hero {
  position: relative;
  min-height: 100svh;
  overflow: clip;
  isolation: isolate;
  background: var(--ivory);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(250, 248, 244, 0.2);
  pointer-events: none;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(var(--hero-image-scale));
  transform-origin: center;
  transition: transform 120ms linear;
}

.hero-content {
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  max-width: 52rem;
  padding: 8.5rem var(--gutter) 6.6rem;
  opacity: var(--hero-text-opacity);
  transition: opacity 120ms linear;
}

.hero h1,
.manifesto h2,
.project h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 0.9;
  text-align: left;
}

.hero h1 {
  font-size: 7.8rem;
  max-width: 7.4ch;
}

.hero h1 span,
.manifesto h2 span {
  display: block;
}

.manifesto h2 span {
  white-space: nowrap;
}

.selected-work-link {
  position: relative;
  display: inline-flex;
  margin-top: 3.4rem;
  padding-bottom: 0.25rem;
  color: var(--graphite);
  font-size: 0.94rem;
  text-decoration: none;
}

.manifesto {
  min-height: 108svh;
  display: flex;
  align-items: center;
  padding: 7.5rem var(--gutter);
}

.manifesto-inner {
  width: min(100%, 82rem);
}

.manifesto h2 {
  max-width: none;
  font-size: 5.25rem;
  line-height: 1.16;
}

.featured-projects {
  padding-top: 9rem;
}

.projects-introduction {
  max-width: 31.25rem;
  margin: 0 var(--gutter) 4.5rem;
}

.section-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 400;
}

.projects-introduction p {
  max-width: 31.25rem;
  margin: 2.25rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.project {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(2rem, 6vw, 7rem);
  min-height: 94svh;
  padding: 4.5rem var(--gutter);
}

.project-detail-link {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  text-decoration: none;
}

.project-reverse {
  flex-direction: row-reverse;
}

.project-image {
  flex: 1 1 68%;
  height: min(72svh, 48rem);
  overflow: hidden;
  background: var(--border);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.92) saturate(0.94);
  transform: scale(1.005);
  transition: filter 650ms ease, transform 900ms ease;
}

.project-copy {
  position: relative;
  flex: 0 0 min(24rem, 28%);
}

.project:focus-within .project-copy {
  outline: 1px solid var(--bronze);
  outline-offset: 0.65rem;
}

.project h3 {
  font-size: 4.4rem;
}

.project-meta {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin: 2.7rem 0 0;
  color: var(--muted);
  opacity: 0;
  transform: translateY(0.65rem);
  transition: opacity 520ms ease, transform 520ms ease;
}

.project-meta div {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

.project-meta dt {
  color: var(--muted);
  font-size: 0.72rem;
}

.project-meta dd {
  margin: 0;
  color: var(--graphite);
  font-size: 0.9rem;
}

.project-arrow {
  display: inline-block;
  margin-top: 2rem;
  color: var(--bronze);
  font-size: 1.2rem;
  opacity: 0;
  transform: translateX(-0.45rem);
  transition: opacity 520ms ease, transform 520ms ease;
}

.project:hover .project-image img,
.project:focus .project-image img,
.project:focus-within .project-image img {
  filter: brightness(1.03) saturate(0.98);
  transform: scale(1.018);
}

.project:hover .project-meta,
.project:focus .project-meta,
.project:focus-within .project-meta,
.project:hover .project-arrow,
.project:focus .project-arrow,
.project:focus-within .project-arrow {
  opacity: 1;
  transform: translate(0);
}

@media (min-width: 90rem) {
  .hero h1 {
    font-size: 9.4rem;
  }

  .manifesto h2 {
    font-size: 5.55rem;
  }

  .project h3 {
    font-size: 5.8rem;
  }
}

@media (min-width: 100rem) {
  .manifesto h2 {
    font-size: 5.85rem;
  }
}

@media (max-width: 68rem) {
  .hero h1 {
    font-size: 6.1rem;
  }

  .manifesto h2 {
    font-size: 3.2rem;
  }

  .project,
  .project-reverse {
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 2.25rem;
    min-height: 96svh;
    padding-block: 4.5rem;
  }

  .project-image {
    flex: none;
    height: 64svh;
  }

  .project-copy {
    flex: none;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
  }

  .project h3 {
    max-width: 8ch;
    font-size: 4rem;
  }

  .project-meta {
    min-width: 12.5rem;
    margin-top: 0;
  }
}

@media (max-width: 52rem) {
  .manifesto h2 {
    font-size: 2.75rem;
  }
}

@media (max-width: 45rem) {
  .site-nav {
    min-height: 4.35rem;
    align-items: flex-start;
    gap: 1rem;
    padding-top: 1rem;
  }

  .wordmark {
    font-size: 1.08rem;
    margin-left: max(0rem, calc(8.5rem - var(--gutter)));
    padding-top: 0.22rem;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 0.15rem 0.85rem;
    font-size: 0.78rem;
  }

  .hero-media img {
    object-position: 58% center;
  }

  .hero-content {
    padding-top: 7.5rem;
    padding-bottom: 4.5rem;
  }

  .hero h1 {
    font-size: 3.75rem;
  }

  .selected-work-link {
    margin-top: 2.6rem;
  }

  .manifesto {
    min-height: 92svh;
    padding: 7rem 1rem;
  }

  .manifesto h2 {
    font-size: 1.55rem;
    line-height: 1.28;
  }

  .featured-projects {
    padding-top: 6rem;
    scroll-margin-top: 1.5rem;
  }

  .projects-introduction {
    margin-bottom: 2.8rem;
  }

  .section-label {
    margin-bottom: 0;
  }

  .projects-introduction p {
    margin-top: 1.6rem;
    font-size: 0.96rem;
  }

  .project,
  .project-reverse {
    min-height: 98svh;
    padding-block: 3.4rem;
    gap: 1.7rem;
  }

  .project-image {
    height: 61svh;
    margin-inline: calc(var(--gutter) * -1);
  }

  .project-copy {
    display: block;
  }

  .project h3 {
    font-size: 3.2rem;
  }

  .project-meta {
    margin-top: 2.1rem;
    opacity: 1;
    transform: none;
  }

  .project-arrow {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 32.5rem) {
  .portfolio-back-link--fixed {
    top: 0.75rem;
    left: 0.75rem;
  }

  .portfolio-back-link {
    font-size: 0.78rem;
  }
}

@media (max-width: 24rem) {
  .hero h1 {
    font-size: 3.25rem;
  }

  .project h3 {
    font-size: 3rem;
  }

  .manifesto h2 {
    font-size: 1.4rem;
  }
}

@media (hover: none), (pointer: coarse) {
  .project-meta,
  .project-arrow {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }

  .hero-media img,
  .project-image img {
    transform: none !important;
  }

  .hero-content {
    opacity: 1 !important;
  }
}
