:root {
  --bg: #ffffff;
  --ink: #050505;
  --muted: #606060;
  --soft: #f5f5f5;
  --pad: clamp(1.5rem, 5vw, 5rem);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, Arial, Helvetica, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  touch-action: manipulation;
}

button {
  touch-action: manipulation;
}

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

/* ── HEADER ── */
.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: 92px;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 29px;
  font-size: 18px;
  font-weight: 500;
}

.site-header nav a {
  opacity: .82;
  transition: opacity .2s ease;
}

.site-header nav a:hover {
  opacity: 1;
}

.nav-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
}

.nav-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.menu-toggle {
  display: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

/* ── SECTIONS ── */
.hero,
.work,
.about,
.links,
.contact {
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  padding-top: 140px;
  padding-bottom: 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  grid-template-rows: auto 1fr;
  column-gap: 10px;
  align-content: start;
}

.hero-name {
  grid-column: 1;
  grid-row: 1;
}

h1 {
  margin: 0;
  font-size: clamp(7rem, 12vw, 174px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
}

.hero-location {
  margin: 10px 0 0;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

/* Avatar as picture element */
picture.avatar {
  grid-column: 2;
  grid-row: 1;
  width: 168px;
  height: 168px;
  align-self: start;
  border-radius: 50%;
  overflow: hidden;
  display: block;
}

picture.avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-bottom {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: end;
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 720px);
  justify-content: space-between;
  align-items: start;
  gap: clamp(4rem, 10vw, 12rem);
}

.email-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.email-link {
  font-size: 26px;
  line-height: 1.3;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.copy-email {
  min-height: 34px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: opacity .2s ease, transform .2s cubic-bezier(.16, 1, .3, 1);
}

.copy-email svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .25s cubic-bezier(.16, 1, .3, 1);
}

.copy-email.is-copied svg {
  color: var(--ink);
  transform: scale(1.15);
}

.copy-email:hover {
  opacity: .62;
  transform: translateY(-1px);
}

.copy-email.is-copied {
  opacity: .55;
}

.copy-email:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.hero-bottom p,
.section-title p,
.about-copy p {
  margin: 0;
  font-size: clamp(2rem, 2.8vw, 40px);
  line-height: 1.1;
  font-weight: 500;
}

/* ── WORK ── */
.work {
  padding-top: 100px;
  padding-bottom: 120px;
}

.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 52px;
}

h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: 0;
}

.section-title p {
  max-width: 620px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 87%;
}

.media-card {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--soft);
  color: #ffffff;
  contain: layout style paint;
}

/* picture inside card needs to be block and full-size */
.media-card picture {
  display: block;
  width: 100%;
  height: 100%;
}

.media-card img,
.media-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .9s cubic-bezier(.16, 1, .3, 1), filter .7s ease;
}

.media-card:hover img,
.media-card:hover video {
  transform: scale(1.035);
  filter: brightness(.84);
}

.media-card.portrait {
  aspect-ratio: 2 / 3;
}

.media-card.landscape {
  grid-column: span 2;
  aspect-ratio: 16 / 10;
}

.reel video {
  object-fit: cover;
}

/* ── ABOUT ── */
.about {
  padding-top: 120px;
  padding-bottom: 120px;
  display: grid;
  grid-template-columns: minmax(0, 553px) minmax(0, 520px);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: center;
}

.about-image {
  overflow: hidden;
  background: var(--soft);
  border-radius: 50%;
  max-width: 380px;
}

.about-image picture {
  display: block;
}

.about-image img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center top;
}

.about-copy {
  display: grid;
  gap: 48px;
}

/* ── LINKS ── */
.links {
  padding-top: 120px;
  padding-bottom: 120px;
}

.links h2 {
  margin-bottom: 60px;
}

.link-list {
  display: grid;
  border-top: 1px solid rgba(0, 0, 0, .14);
}

.link-list > a,
.company-links {
  padding: 28px 0;
  border-bottom: 1px solid rgba(0, 0, 0, .14);
  font-size: clamp(3rem, 6vw, 86px);
  line-height: 1;
  font-weight: 500;
  transition: padding-left .3s ease, opacity .3s ease;
}

.link-list > a:hover {
  padding-left: 16px;
  opacity: .62;
}

.company-links {
  cursor: pointer;
}

.company-links summary {
  list-style: none;
  transition: padding-left .3s ease, opacity .3s ease;
}

.company-links summary::-webkit-details-marker {
  display: none;
}

.company-links summary:hover {
  padding-left: 16px;
  opacity: .62;
}

.company-links div {
  display: grid;
  gap: 12px;
  max-width: 520px;
  padding-top: 28px;
  cursor: default;
}

.company-links div a {
  font-size: clamp(1.15rem, 2vw, 1.8rem);
  line-height: 1.1;
  font-weight: 500;
  color: var(--muted);
  transition: color .2s ease, transform .2s cubic-bezier(.16, 1, .3, 1);
}

.company-links div a:hover {
  color: var(--ink);
  transform: translateX(8px);
}

/* ── CONTACT ── */
.contact {
  padding-top: 120px;
  padding-bottom: 120px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: clamp(3rem, 8vw, 8rem);
  background: #050505;
  color: #ffffff;
}

.contact-copy {
  display: grid;
  align-content: start;
  gap: 48px;
}

.contact-email {
  font-size: clamp(2.3rem, 5vw, 72px);
  line-height: 1.05;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.contact-form {
  display: grid;
  gap: 18px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, .66);
  font-size: 15px;
  line-height: 1.4;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .28);
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-size: 18px;
  padding: 12px 0;
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-bottom-color: #ffffff;
}

.contact-form textarea {
  min-height: 130px;
  resize: vertical;
}

.contact-form button {
  justify-self: start;
  margin-top: 18px;
  padding: 16px 28px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  color: #050505;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: transform .3s cubic-bezier(.16, 1, .3, 1), opacity .3s ease;
}

.contact-form button:hover {
  transform: translateY(-3px);
  opacity: .72;
}

.form-success {
  color: rgba(255, 255, 255, .86);
  font-size: 20px;
  line-height: 1.4;
  margin: 0;
  padding: 40px 0;
}

/* ── FOOTER ── */
footer {
  padding: 24px var(--pad) 36px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 15px;
}

/* ── REVEAL ANIMATIONS ── */
[data-reveal] {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.16, 1, .3, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.hero-name[data-reveal] {
  transform: translateY(-80px);
}

picture.avatar[data-reveal] {
  transform: scale(.7);
}

.media-grid [data-reveal]:nth-child(2n) {
  transition-delay: .07s;
}

.media-grid [data-reveal]:nth-child(3n) {
  transition-delay: .13s;
}

.hero-name[data-reveal].is-visible,
picture.avatar[data-reveal].is-visible {
  transform: none;
}

/* ── MOBILE ── */
@media (max-width: 809px) {
  .site-header {
    height: 80px;
    /* Simpler on mobile — reduce GPU cost */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .site-header nav {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    display: none;
    padding: 24px var(--pad) 32px;
    background: rgba(255, 255, 255, .97);
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .site-header nav.open {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: auto;
    padding-top: 116px;
    padding-bottom: 72px;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  h1 {
    font-size: clamp(4.4rem, 20vw, 7.2rem);
    line-height: .96;
  }

  picture.avatar {
    grid-column: 1;
    grid-row: 2;
    width: 116px;
    height: 116px;
    margin-top: 28px;
  }

  .hero-bottom {
    grid-column: 1;
    grid-row: 3;
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-self: start;
    margin-top: 54px;
  }

  .email-row {
    gap: 10px;
  }

  .email-link {
    font-size: clamp(1.15rem, 5.6vw, 1.6rem);
  }

  .section-title p,
  .about-copy p {
    font-size: clamp(1.7rem, 8vw, 3rem);
  }

  .hero-bottom p {
    max-width: 22rem;
    font-size: clamp(1.2rem, 5.5vw, 1.55rem);
    line-height: 1.12;
  }

  .work,
  .about,
  .links,
  .contact {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .section-title,
  .about,
  .contact {
    display: grid;
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .section-title {
    margin-bottom: 36px;
  }

  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    max-width: 100%;
  }

  .media-card.landscape {
    grid-column: span 2;
  }

  .links h2 {
    margin-bottom: 36px;
  }

  .link-list > a,
  .company-links {
    font-size: clamp(2.4rem, 12vw, 5rem);
    padding: 22px 0;
  }

  .company-links {
    display: block;
  }

  .company-links div {
    gap: 10px;
    padding-top: 18px;
  }

  .company-links div a {
    font-size: 1.05rem;
  }

  footer {
    display: grid;
  }

  /* Lighter transitions on mobile */
  [data-reveal] {
    transform: translateY(40px);
    transition: opacity .65s ease, transform .65s cubic-bezier(.16, 1, .3, 1);
  }

  .hero-name[data-reveal] {
    transform: translateY(-50px);
  }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
