:root {
  --canvas: #f4f2ec;
  --surface: #fcfcf9;
  --ink: #1b211f;
  --muted: #66706c;
  --accent: #0e746c;
  --line: #d6d7d0;
  --font: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: #bedbd6; color: var(--ink); }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .22em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 20;
  padding: .7rem 1rem;
  background: var(--ink);
  color: var(--surface);
  transform: translateY(-160%);
  transition: transform .3s var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

.site-header,
.hero,
.work,
.about,
footer {
  width: min(100% - 2.5rem, 1240px);
  margin-inline: auto;
}

.site-header {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -.02em;
}
.site-header nav { display: flex; gap: clamp(1rem, 3vw, 2.2rem); }
.site-header nav a {
  color: var(--muted);
  font-size: .92rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s ease;
}
.site-header nav a:hover { color: var(--accent); }

.hero {
  min-height: calc(100svh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .75fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: center;
  padding-block: clamp(4rem, 9vw, 8rem);
  border-bottom: 1px solid var(--line);
}
.hero-copy { max-width: 700px; }
.availability {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin: 0 0 1.6rem;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 500;
}
.availability span {
  width: .62rem;
  height: .62rem;
  border-radius: 50%;
  background: var(--accent);
}
.hero h1 {
  margin: 0;
  max-width: 10.5ch;
  font-size: clamp(3.5rem, 7vw, 7rem);
  line-height: .96;
  letter-spacing: -.035em;
  font-weight: 650;
  text-wrap: balance;
}
.hero-intro {
  max-width: 58ch;
  margin: 1.8rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
}
.primary-action {
  display: inline-flex;
  margin-top: 2rem;
  padding: .85rem 1.15rem;
  border-radius: 10px;
  background: var(--ink);
  color: var(--surface);
  font-weight: 600;
  text-decoration: none;
  transition: background-color .2s ease, transform .3s var(--ease-out);
}
.primary-action:hover { background: var(--accent); transform: translateY(-2px); }

.portrait {
  margin: 0;
  justify-self: end;
  width: min(100%, 460px);
  overflow: hidden;
  border-radius: 14px;
  background: #6ce1d9;
}
.portrait img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

.work { padding-block: clamp(5rem, 9vw, 9rem); }
.section-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding-bottom: clamp(3rem, 6vw, 5rem);
}
.section-intro h2,
.about h2 {
  margin: 0;
  font-size: clamp(2.5rem, 4.5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -.03em;
  font-weight: 600;
}
.section-intro p { margin: .3rem 0 0; color: var(--muted); font-size: 1.05rem; }

.project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: center;
  padding-block: clamp(4rem, 8vw, 7.5rem);
  border-top: 1px solid var(--line);
}
.project-reverse .project-copy { order: 2; }
.project-reverse .project-image { order: 1; }
.project-copy { max-width: 440px; min-width: 0; }
.project h3 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 4.1rem);
  line-height: 1;
  letter-spacing: -.03em;
  font-weight: 600;
}
.project-copy p {
  margin: 1.3rem 0 1.5rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.14rem);
  max-width: 48ch;
}
.project-copy a,
.about a {
  color: var(--accent);
  font-weight: 600;
  text-decoration-thickness: 1px;
  transition: color .2s ease;
}
.project-copy a:hover,
.about a:hover { color: var(--ink); }

.project-image {
  position: relative;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  display: block;
  aspect-ratio: 1800 / 824;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  text-decoration: none;
}
.project-image img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .7s var(--ease-out), opacity .2s ease;
}
.project-image:hover img { opacity: .94; transform: scale(1.015); }
.image-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 2rem;
  color: var(--muted);
  font-size: clamp(1.3rem, 3vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -.02em;
  opacity: 0;
}
.project-image.is-missing .image-fallback { opacity: 1; }
.project-image.is-missing img { display: none; }

.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 8vw, 8rem);
  padding-block: clamp(5rem, 9vw, 9rem);
  border-top: 1px solid var(--line);
}
.about > div { max-width: 580px; }
.about p { margin: 0 0 1rem; color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.25rem); }
.about a { display: inline-block; margin-top: .75rem; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
}
footer a { text-decoration: none; }
footer a:hover { color: var(--accent); }

/* Purposeful load and scroll motion. Hidden states only apply when JavaScript is available. */
html.js .site-header,
html.js .hero-copy,
html.js .portrait {
  opacity: 0;
  will-change: transform, opacity;
}
html.js .site-header { transform: translateY(-14px); }
html.js .hero-copy { transform: translateY(28px); }
html.js .portrait { transform: translateY(24px) scale(.975); }
html.js body.is-loaded .site-header,
html.js body.is-loaded .hero-copy,
html.js body.is-loaded .portrait {
  opacity: 1;
  transform: none;
  transition-property: opacity, transform;
  transition-duration: .8s;
  transition-timing-function: var(--ease-out);
}
html.js body.is-loaded .hero-copy { transition-delay: .08s; }
html.js body.is-loaded .portrait { transition-delay: .17s; }

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .75s var(--ease-out), transform .75s var(--ease-out);
  will-change: opacity, transform;
}
html.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
html.js .project[data-reveal] .project-image {
  transform: translateY(18px) scale(.985);
  transition: transform .85s var(--ease-out), border-color .2s ease;
}
html.js .project[data-reveal].is-visible .project-image { transform: none; }
html.js .project[data-reveal] .project-copy > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}
html.js .project[data-reveal].is-visible .project-copy > * {
  opacity: 1;
  transform: none;
}
html.js .project[data-reveal].is-visible .project-copy > :nth-child(2) { transition-delay: .07s; }
html.js .project[data-reveal].is-visible .project-copy > :nth-child(3) { transition-delay: .13s; }

@media (max-width: 820px) {
  .site-header,
  .hero,
  .work,
  .about,
  footer { width: min(100% - 1.5rem, 1240px); }

  .site-header { height: 68px; }
  .site-header nav { gap: 1rem; }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 2.6rem;
    padding-block: 4.5rem;
  }
  .hero h1 { max-width: 11ch; }
  .portrait { justify-self: start; width: min(100%, 500px); }

  .section-intro,
  .project,
  .about { grid-template-columns: 1fr; }
  .section-intro { gap: 1rem; }

  .project,
  .project-reverse { gap: 2.5rem; }
  .project-reverse .project-copy,
  .project-reverse .project-image { order: initial; }
  .project-copy { max-width: 620px; }
  .about { gap: 2rem; }
}

@media (max-width: 520px) {
  .wordmark { font-size: .92rem; }
  .site-header nav a { font-size: .86rem; }
  .hero h1 { font-size: clamp(3rem, 16vw, 4.3rem); }
  .primary-action { width: 100%; justify-content: center; }
  footer { flex-direction: column; gap: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  html.js .site-header,
  html.js .hero-copy,
  html.js .portrait,
  html.js [data-reveal],
  html.js .project[data-reveal] .project-image,
  html.js .project[data-reveal] .project-copy > * {
    opacity: 1 !important;
    transform: none !important;
  }
}
