:root {
  --bg: #0c0c0d;
  --surface: #141416;
  --fg: #f2f0eb;
  --muted: #9a9892;
  --subtle: #6f6d68;
  --accent: #e8e4dc;
  --accent-fg: #0c0c0d;
  --border: #2c2b29;
  --font-sans: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --font-serif: "Instrument Serif", ui-serif, Georgia, "Times New Roman", serif;
  --text-display: clamp(3.25rem, 3rem + 6vw, 8.25rem);
  --text-title: clamp(2rem, 1.2rem + 3.4vw, 4.25rem);
  --text-lede: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.5;
}

::selection {
  background: var(--fg);
  color: var(--bg);
}

img {
  max-width: 100%;
  display: block;
  outline: 1px solid color-mix(in oklab, var(--fg) 10%, transparent);
  outline-offset: -1px;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  text-wrap: balance;
  margin: 0;
}

p {
  text-wrap: pretty;
  margin: 0;
}

.wrap {
  width: min(80rem, calc(100% - 2.5rem));
  margin-inline: auto;
}

@media (min-width: 640px) {
  .wrap {
    width: min(80rem, calc(100% - 4rem));
  }
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 80;
  background: var(--accent);
  color: var(--accent-fg);
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
}

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

.kicker {
  font-size: 0.6875rem;
  line-height: 1.3;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted);
}

header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: blur(12px);
}

.site-bar {
  display: flex;
  height: 4rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.logo:hover,
.nav a:hover,
.work-link:hover,
.mail:hover {
  opacity: 0.7;
}

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

.nav a {
  display: inline-flex;
  height: 2.75rem;
  align-items: center;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
}

.nav a:hover {
  color: var(--fg);
  opacity: 1;
}

.hero {
  display: grid;
  gap: 2.5rem;
  padding: 2.5rem 0 4rem;
}

@media (min-width: 1024px) {
  .hero {
    grid-template-columns: 7fr 5fr;
    gap: 3rem;
    padding: 4rem 0 6rem;
    align-items: start;
  }

  .portrait {
    justify-self: end;
  }
}

.display {
  margin-top: 1.25rem;
  font-family: var(--font-serif);
  font-size: var(--text-display);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.03em;
}

.lede {
  margin-top: 2rem;
  max-width: 36rem;
  font-size: var(--text-lede);
  line-height: 1.45;
  color: var(--muted);
}

.hero-actions {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}

.cta {
  display: inline-flex;
  height: 3rem;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--fg);
  padding-bottom: 0.15rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.cta svg {
  width: 1rem;
  height: 1rem;
}

.note {
  font-size: 0.875rem;
  color: var(--subtle);
}

.portrait {
  width: 100%;
  max-width: 24rem;
}

.portrait-frame {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--surface);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

figcaption {
  margin-top: 0.75rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--subtle);
}

.section-head {
  padding: 3rem 0 1.5rem;
}

.section-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.875rem, 2vw + 1.2rem, 2.25rem);
  letter-spacing: -0.02em;
  font-weight: 400;
}

.section-head p {
  margin-top: 0.5rem;
  max-width: 36rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.filter-bar {
  position: sticky;
  top: 4rem;
  z-index: 40;
  border-block: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
}

.filter-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem 0;
}

@media (min-width: 1024px) {
  .filter-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.chip-track {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.chip-pill {
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 999px;
  background: var(--accent);
  transition: transform 200ms var(--ease), width 200ms var(--ease), height 200ms var(--ease);
}

.chip {
  position: relative;
  z-index: 1;
  display: inline-flex;
  height: 2.75rem;
  align-items: center;
  padding: 0 0.9rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
}

.chip:hover {
  color: var(--fg);
}

.chip[aria-selected="true"] {
  color: var(--accent-fg);
}

.project {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 500ms var(--ease), opacity 500ms var(--ease);
}

.project[hidden] {
  display: grid;
}

.project.is-hidden {
  grid-template-rows: 0fr;
  opacity: 0;
  pointer-events: none;
}

.project-clip {
  overflow: hidden;
}

.project-banner {
  display: block;
  width: 100%;
  color: inherit;
}

.project-media {
  position: relative;
  overflow: hidden;
  height: min(72svh, 46rem);
  min-height: 22rem;
  background: var(--surface);
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 700ms var(--ease), filter 500ms var(--ease);
}

.project-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    color-mix(in oklab, var(--bg) 82%, transparent) 0%,
    color-mix(in oklab, var(--bg) 28%, transparent) 42%,
    transparent 68%
  );
  opacity: 0.88;
  transition: opacity 250ms var(--ease);
}

.project-overlay {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
}

@media (min-width: 640px) {
  .project-overlay {
    padding: 2rem 2.5rem;
  }
}

.project-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.project-top .kicker {
  color: color-mix(in oklab, var(--fg) 70%, transparent);
}

.project-title {
  margin-top: 0.5rem;
  font-family: var(--font-serif);
  font-size: var(--text-title);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.project-year {
  flex-shrink: 0;
  padding-bottom: 0.25rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-style: italic;
  font-variant-numeric: tabular-nums;
  color: color-mix(in oklab, var(--fg) 80%, transparent);
}

.project-copy {
  max-width: 38rem;
  opacity: 0;
  transform: translateY(12px);
  filter: blur(2px);
  transition: opacity 250ms var(--ease), transform 250ms var(--ease), filter 250ms var(--ease);
}

.project-copy p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: color-mix(in oklab, var(--fg) 85%, transparent);
}

.project-copy .kicker {
  margin-top: 0.75rem;
  color: color-mix(in oklab, var(--fg) 55%, transparent);
}

.project-banner:hover .project-media img,
.project-banner:focus-visible .project-media img {
  transform: scale(1.05);
  filter: saturate(1.05) contrast(1.04);
}

.project-banner:hover .project-shade,
.project-banner:focus-visible .project-shade {
  opacity: 1;
}

.project-banner:hover .project-copy,
.project-banner:focus-visible .project-copy {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

.project-below {
  display: none;
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.25rem 1.5rem;
}

.project-below p {
  max-width: 42rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted);
}

.project-below .kicker {
  margin-top: 0.75rem;
}

@media (max-width: 767px) {
  .project-media {
    height: min(58svh, 28rem);
    min-height: 16.5rem;
  }

  .project-copy {
    display: none;
  }

  .project-below {
    display: block;
  }
}

@media (hover: none) {
  .project-copy {
    display: none;
  }

  .project-below {
    display: block;
  }

  .project-media img {
    transform: none;
  }
}

footer.site {
  scroll-margin-top: 4rem;
  border-top: 1px solid var(--border);
}

.footer-main {
  padding: 4rem 0;
}

.footer-main .display {
  margin-top: 1rem;
}

.mail {
  margin-top: 2rem;
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--fg);
  padding-bottom: 0.15rem;
  font-size: 1.125rem;
}

.mail svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .mail {
    font-size: 1.5rem;
  }

  .mail svg {
    width: 1.5rem;
    height: 1.5rem;
  }

  .project-year {
    font-size: 1.5rem;
  }
}

.mail:hover .arrow {
  transform: translate(2px, -2px);
}

.arrow {
  transition: transform 150ms var(--ease);
}

.footer-grid {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-grid h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  font-weight: 400;
  margin-top: 0.75rem;
}

.footer-grid p,
.footer-grid li {
  font-size: 0.875rem;
  color: var(--muted);
}

.footer-grid ul {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.footer-grid li + li {
  margin-top: 0.5rem;
}

.work-link span {
  margin-left: 0.5rem;
  font-variant-numeric: tabular-nums;
  color: var(--subtle);
}

.colophon {
  margin-top: 0.75rem;
  line-height: 1.6;
}

.footer-bar {
  border-top: 1px solid var(--border);
}

.footer-bar-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem 0;
  font-size: 0.75rem;
  color: var(--subtle);
}

@media (min-width: 640px) {
  .footer-bar-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

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

  .project-media img,
  .project-shade,
  .project-copy,
  .chip-pill,
  .arrow {
    transition: none;
  }

  .project-banner:hover .project-media img {
    transform: none;
    filter: none;
  }

  .project-copy {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
