@font-face {
  font-family: 'Manrope';
  src: url('/assets/fonts/manrope.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --background: #f4f6f4;
  --text: #25302e;
  --muted: #65716e;
  --line: #d5dcd8;
  --accent: #496b65;
  --focus: #315e56;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --content-width: 1240px;
  --radius: 16px;
  font-family: 'Manrope', Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #18201f;
    --text: #eef2f0;
    --muted: #aeb8b5;
    --line: #35403d;
    --accent: #91afa9;
    --focus: #b7d1cc;
  }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: inherit;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

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

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

.skip-link {
  position: fixed;
  z-index: 10;
  top: 1rem;
  left: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: var(--text);
  color: var(--background);
  font-size: 0.82rem;
  font-weight: 700;
  transform: translateY(-200%);
}

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

.site-header,
.hero,
.projects,
footer {
  width: min(calc(100% - (var(--gutter) * 2)), var(--content-width));
  margin-inline: auto;
}

.site-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.025em;
}

.hero {
  min-height: calc(100svh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: center;
  padding-block: clamp(3rem, 7vh, 6rem);
}

.hero-copy {
  max-width: 610px;
}

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

figure {
  margin-right: 0;
  margin-bottom: 0;
  margin-left: 0;
}

h1 {
  max-width: 9ch;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
  font-size: clamp(3.8rem, 7.4vw, 7rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.hero-copy p {
  max-width: 520px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.7;
}

.hero-image {
  margin-bottom: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--line);
}

.hero-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.projects {
  padding-block: clamp(6rem, 12vw, 10rem);
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: 660px;
  margin-bottom: clamp(4rem, 8vw, 7rem);
}

.section-heading h2 {
  margin-bottom: 1.25rem;
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.03;
}

.section-heading p {
  max-width: 540px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

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

.project {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: center;
  padding-block: clamp(3rem, 7vw, 6rem);
  border-top: 1px solid var(--line);
}

.project-image {
  margin-bottom: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--line);
}

.project-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}

.project-copy {
  max-width: 440px;
}

.project-copy h3 {
  margin-bottom: 1.25rem;
  font-size: clamp(2rem, 3.5vw, 3.4rem);
  font-weight: 550;
  letter-spacing: -0.05em;
  line-height: 1;
}

.project-copy p {
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.75;
}

.project-copy a,
footer a {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35rem;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

.project-copy a:hover,
footer a:hover {
  color: var(--text);
  text-decoration-color: currentColor;
}

footer {
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

@media (prefers-color-scheme: dark) {
  .hero-image img,
  .project-image img {
    filter: brightness(0.88) saturate(0.86);
  }
}

@media (max-width: 820px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 3rem;
    padding-block: 4.5rem 6rem;
  }

  h1 {
    max-width: 8ch;
    font-size: clamp(3.5rem, 15vw, 5.7rem);
  }

  .hero-image {
    width: min(100%, 660px);
  }

  .project {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .project-copy {
    max-width: 580px;
  }
}

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

  .site-header {
    min-height: 68px;
  }

  .hero {
    padding-block: 3.5rem 5rem;
  }

  h1 {
    font-size: clamp(3.25rem, 16vw, 4.4rem);
  }

  .projects {
    padding-block: 5rem;
  }

  .section-heading {
    margin-bottom: 3.5rem;
  }

  .project {
    padding-block: 3.5rem;
  }

  footer {
    min-height: 130px;
  }
}

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

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