@font-face {
  font-family: "Inter";
  src: url("assets/InterVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --background: #f4f3f0;
  --ink: #141414;
  --muted: #6f6f69;
  --line: #d9d8d3;
  --placeholder-a: #e9e8e4;
  --placeholder-b: #e2e1dd;
  --page-gutter: clamp(1.25rem, 3.75vw, 4.25rem);
  --grid-gap: clamp(1rem, 1.25vw, 1.5rem);
  color: var(--ink);
  background: var(--background);
  font-family: "Inter", Arial, Helvetica, sans-serif;
  font-synthesis: none;
}

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

* {
  box-sizing: border-box;
}

body {
  min-width: 20rem;
  margin: 0;
  overflow-x: hidden;
  background: var(--background);
  font-size: 1rem;
  line-height: 1.5;
  text-rendering: geometricPrecision;
}

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

a,
button {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 0.3rem;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

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

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 50%;
  z-index: 100;
  padding: 0.65rem 0.9rem;
  background: var(--ink);
  color: var(--background);
  transform: translate(-50%, -180%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

.section-pad {
  padding-right: var(--page-gutter);
  padding-left: var(--page-gutter);
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.45rem var(--page-gutter) 1.35rem;
  background: rgb(244 243 240 / 0);
  font-size: 0.8125rem;
  line-height: 1.2;
  transition: background-color 180ms ease, box-shadow 180ms ease;
}

.site-header.is-scrolled {
  background: rgb(244 243 240 / 94%);
  box-shadow: 0 1px 0 rgb(20 20 20 / 8%);
  backdrop-filter: blur(8px);
}

.site-name {
  flex: 0 0 auto;
  font-weight: 500;
}

.site-nav {
  display: flex;
  gap: clamp(1.5rem, 2.15vw, 2.6rem);
}

.site-header a,
.text-link,
.back-to-top {
  transition: opacity 160ms ease;
}

.site-header a:hover,
.text-link:hover,
.back-to-top:hover {
  opacity: 0.52;
}

.hero {
  position: relative;
  min-height: 100svh;
  padding: 25.4svh var(--page-gutter) 6rem;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero h1 {
  width: min(68vw, 80rem);
  font-size: clamp(1.75rem, 2.085vw, 2.5rem);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.027em;
}

.hero h1 strong {
  font-weight: 650;
}

.hero-summary {
  width: min(27rem, 36vw);
  margin-top: clamp(2.75rem, 4.15vh, 3rem);
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.55;
}

.render-frame {
  position: relative;
  overflow: hidden;
}

.render-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
  opacity: 0;
}

.render-canvas.is-active {
  opacity: 1;
}

.hero-portrait {
  position: absolute;
  top: 40.5svh;
  right: max(1.25rem, calc(var(--page-gutter) - 1.5rem));
  width: clamp(17rem, 22.25vw, 26.7rem);
  aspect-ratio: 427 / 580;
  overflow: hidden;
  background: #5a5856;
}

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

.section-label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.35;
}

.projects {
  min-height: 100svh;
  padding-top: clamp(7.5rem, 10vw, 10rem);
  padding-bottom: clamp(7.5rem, 10vw, 10rem);
}

.projects > .section-label {
  margin-bottom: clamp(3.5rem, 4.6vw, 4.375rem);
}

.project-list {
  display: grid;
  gap: clamp(6rem, 8vw, 8.75rem);
}

.project {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--grid-gap);
  align-items: start;
}

.project-copy {
  grid-column: 1 / span 4;
}

.project h3 {
  max-width: 24rem;
  margin-bottom: 1.125rem;
  font-size: clamp(1.375rem, 1.36vw, 1.625rem);
  font-weight: 520;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.project p {
  max-width: 24rem;
  margin-bottom: 1.25rem;
  color: var(--muted);
  line-height: 1.55;
}

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

.project-visual {
  grid-column: 7 / -1;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: repeating-linear-gradient(
    90deg,
    var(--placeholder-a) 0 0.5rem,
    var(--placeholder-b) 0.5rem 1rem
  );
  color: #a4a49e;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.6875rem;
}

.all-projects-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--grid-gap);
  margin-top: clamp(3rem, 4vw, 4rem);
}

.all-projects-row .text-link {
  grid-column: 7 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2.75rem;
  border-top: 1px solid var(--line);
}

.text-link {
  font-size: 1rem;
}

.about {
  display: flex;
  align-items: flex-start;
  gap: clamp(3rem, 6.25vw, 7.5rem);
  min-height: 50svh;
  padding-top: clamp(8rem, 14vw, 14rem);
}

.architecture {
  flex: 1 1 auto;
  min-width: 0;
}

.architecture .render-frame {
  width: 100%;
  aspect-ratio: 5 / 4;
}

.architecture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.architecture figcaption {
  margin-top: 0.75rem;
  font-size: 0.75rem;
}

.about-copy {
  flex: 0 0 calc(50% - (var(--grid-gap) / 2));
}

.about-copy > .section-label {
  margin-bottom: 2.5rem;
}

.about-body {
  max-width: 43rem;
  font-size: 1rem;
  line-height: 1.5;
}

.about-body p + p {
  margin-top: 1rem;
}

.contact {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  min-height: 60svh;
  padding-top: clamp(8rem, 15vw, 15rem);
  padding-bottom: clamp(8rem, 15vw, 15rem);
}

.contact p {
  max-width: 34ch;
  font-size: clamp(1.5rem, 1.67vw, 2rem);
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.site-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3rem;
  min-height: 40svh;
  padding-top: 5rem;
  padding-bottom: 3rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
}

.footer-links .text-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid currentColor;
}

.back-to-top {
  flex: 0 0 auto;
  font-size: 1rem;
}

[data-reveal].is-pending {
  opacity: 0;
  transform: translateY(1.5rem);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 650ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 1000px) {
  .site-header {
    padding-top: 1.15rem;
    padding-bottom: 1.15rem;
  }

  .hero {
    min-height: auto;
    padding-top: clamp(9rem, 25vh, 11rem);
    padding-bottom: 6rem;
  }

  .hero h1 {
    width: 100%;
    max-width: 43rem;
    font-size: clamp(1.625rem, 5.5vw, 2rem);
    line-height: 1.34;
  }

  .hero-break {
    display: none;
  }

  .hero-summary {
    width: min(100%, 28rem);
    margin-top: 3rem;
    font-size: 1rem;
  }

  .hero-portrait {
    position: relative;
    top: auto;
    right: auto;
    width: min(100%, 20rem);
    margin: 4rem 0 0 auto;
  }

  .project-list {
    gap: 6.5rem;
  }

  .project {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  .project-copy {
    width: min(100%, 31rem);
  }

  .project-visual {
    order: -1;
  }

  .all-projects-row {
    display: block;
  }

  .all-projects-row .text-link {
    width: 100%;
  }

  .about {
    flex-direction: column;
    gap: 4.5rem;
  }

  .architecture,
  .about-copy {
    flex: 0 0 auto;
    width: 100%;
  }

  .about-body {
    max-width: 39rem;
  }

  .site-footer {
    align-items: flex-start;
    min-height: 50svh;
  }

  .footer-links {
    flex-direction: column;
    align-items: flex-start;
  }

  .back-to-top {
    align-self: flex-end;
  }
}

@media (max-width: 520px) {
  :root {
    --page-gutter: 1.25rem;
  }

  .site-header {
    gap: 0.75rem;
    font-size: 0.75rem;
  }

  .site-nav {
    gap: 0.9rem;
  }

  html {
    scroll-padding-top: 3.5rem;
  }

  .projects {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }

  .architecture .render-frame {
    aspect-ratio: 4 / 3;
  }

  .contact {
    min-height: 75svh;
  }

  .site-footer {
    flex-direction: column;
    justify-content: flex-end;
    gap: 5rem;
  }

  .back-to-top {
    align-self: flex-start;
  }
}

@media (max-width: 1000px), (hover: none), (pointer: coarse) {
  .render-canvas {
    display: none;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
