:root {
  --dark: #2a0002;
  --light: #fffef8;
  --line: rgba(42, 0, 2, 0.55);
  --text: #170001;
  --muted: rgba(23, 0, 1, 0.7);
  --accent-pink: #3262f9;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--light);
  background-image:
    linear-gradient(rgba(42, 0, 2, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 0, 2, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
  color: var(--text);
  font-family: "Agenda One", "Avenir Next", Avenir, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

@media (pointer: fine) {
  body.has-custom-cursor,
  body.has-custom-cursor * {
    cursor: none;
  }
}

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

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

::selection {
  background: var(--accent-pink);
  color: var(--light);
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 24px;
  height: 24px;
  background: var(--accent-pink);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 160ms ease;
}

.custom-cursor.is-visible {
  opacity: 1;
}

.script {
  font-family: "adobe-handwriting-ernie", "Brush Script MT", "Segoe Script", cursive;
  font-weight: 400;
  font-style: normal;
  line-height: 0.9;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 36px 36px 20px;
  position: relative;
  z-index: 5;
}

.logo {
  font-size: clamp(2.2rem, 4.2vw, 3.7rem);
  display: grid;
  gap: 0;
  width: max-content;
  transition: transform 180ms ease;
}

.logo small {
  justify-self: end;
  margin-top: -0.62em;
  padding-left: 2.35em;
  font-family: "Agenda One", "Avenir Next", Avenir, Helvetica, Arial, sans-serif;
  font-size: clamp(0.68rem, 1.1vw, 0.96rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
}

.logo:hover,
.logo:focus-visible {
  color: var(--accent-pink);
  transform: translateY(-3px) rotate(-2deg) scale(1.03);
}

body[data-page="home"] .site-header,
body[data-page="project"] .site-header,
body[data-page="all-work"] .site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--light);
}

body[data-page="home"] .site-header::before,
body[data-page="project"] .site-header::before,
body[data-page="all-work"] .site-header::before {
  content: "";
  position: absolute;
  inset: 100% 0 auto;
  height: 42px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255, 254, 248, 1) 0%,
    rgba(255, 254, 248, 0.84) 22%,
    rgba(255, 254, 248, 0.38) 62%,
    rgba(255, 254, 248, 0) 100%
  );
}

.site-nav {
  display: flex;
  gap: clamp(18px, 4vw, 42px);
  align-items: center;
  font-size: 0.95rem;
}

.site-nav a,
.nav-dropdown summary {
  display: inline-block;
  padding: 8px 0;
  color: inherit;
  list-style: none;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown div {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 150px;
  display: grid;
  gap: 6px;
  padding: 12px 14px 14px;
  background: var(--light);
  border: 1px solid rgba(42, 0, 2, 0.42);
  box-shadow: 0 12px 20px rgba(42, 0, 2, 0.08);
}

.nav-dropdown:not([open]) div {
  display: none;
}

.nav-dropdown div a {
  width: max-content;
  padding: 0;
}

.site-nav a.is-active,
.site-nav a:hover,
.nav-dropdown summary:hover,
.nav-dropdown[open] summary {
  color: var(--accent-pink);
  transform: translateY(-3px) rotate(-1deg);
}

.section {
  max-width: 1220px;
  margin: 0 auto;
  padding: 58px 28px;
}

.hero {
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(280px, 430px) minmax(260px, 340px);
  align-items: center;
  justify-content: center;
  gap: clamp(72px, 9vw, 150px);
}

.hero-copy {
  justify-self: end;
  text-align: center;
  transform: none;
}

.hero-copy p {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin: 0 0 8px;
  transform: translate(-142px, 6px);
}

.hero-copy h1 {
  font-size: clamp(5.4rem, 11vw, 10rem);
  margin: 0;
  color: var(--accent-pink);
}

.hero-note {
  --hero-note-shift: 58px;
  display: grid;
  grid-template-columns: 190px max-content;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-top: 2px;
  opacity: 0;
  transform: translate(var(--hero-note-shift), 14px);
  animation: heroNoteIn 560ms ease forwards;
  animation-delay: 1620ms;
}

.hero-note img {
  width: 190px;
  transform: translateY(-24px) rotate(8deg);
}

.hero-copy .hero-note p {
  margin: 0;
  font-size: clamp(0.92rem, 1.35vw, 1.15rem);
  line-height: 1.2;
  text-align: left;
  transform: none;
}

.hero-copy span {
  display: inline-block;
  opacity: 0;
  transform: translateY(14px);
  animation: introWord 520ms ease forwards;
  transition: transform 180ms ease;
}

.hero-copy span:hover {
  transform: translateY(-5px) rotate(-2deg);
}

.hero-copy p span:nth-child(1) {
  animation-delay: 180ms;
}

.hero-copy p span:nth-child(2) {
  animation-delay: 430ms;
}

.hero-copy h1 span {
  animation-delay: 720ms;
}

@keyframes introWord {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroNoteIn {
  to {
    opacity: 1;
    transform: translate(var(--hero-note-shift), 0);
  }
}

@keyframes portraitIn {
  from {
    opacity: 0;
    transform: translateY(18px) rotate(1deg) scale(0.98);
  }
  to {
    opacity: 1;
    transform: rotate(5deg) scale(1);
  }
}

.stamp {
  background:
    radial-gradient(circle at 12px 12px, var(--dark) 0 10px, transparent 11px) -12px -12px / 24px 24px,
    var(--dark);
  padding: 22px;
  margin: 0;
  transform: rotate(4deg);
  box-shadow: 0 18px 40px rgba(42, 0, 2, 0.12);
}

.stamp img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: grayscale(1);
}

.uploaded-image {
  margin: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.uploaded-image img {
  aspect-ratio: auto;
  object-fit: contain;
  filter: none;
  transition: transform 180ms ease;
}

.uploaded-image:hover img {
  transform: rotate(-2deg) scale(1.015);
}

.portrait-stamp {
  max-width: 340px;
  transform: rotate(5deg);
  opacity: 0;
  animation: portraitIn 680ms ease forwards;
  animation-delay: 1040ms;
}

.skills-ticker {
  width: 100%;
  overflow: hidden;
  color: var(--dark);
}

.skills-ticker {
  padding: 8px 0 34px;
}

.skills-track {
  display: flex;
  width: max-content;
  gap: 18px;
}

.skills-track {
  animation: skillsMove 28s linear infinite reverse;
}

.skills-track span {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  flex: 0 0 auto;
  font-size: 0.95rem;
  white-space: nowrap;
}

.skills-track span::after {
  content: "•";
  color: var(--accent-pink);
}

@keyframes skillsMove {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.section-title {
  text-align: center;
  font-size: clamp(2.7rem, 5vw, 4.9rem);
  margin: 0 0 44px;
}

.work {
  padding-top: 36px;
  margin-top: 0;
  scroll-margin-top: 118px;
}

.project-marquee {
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
  overflow-x: hidden;
  overflow-y: hidden;
  padding: 12px 36px 28px;
}

.project-track {
  display: flex;
  gap: 24px;
  width: max-content;
  padding: 0 0 12px;
}

.project-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100vw;
  margin-left: 50%;
  margin-top: 6px;
  padding: 0 36px;
  transform: translateX(-50%);
}

.carousel-buttons {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 18px;
}

.carousel-buttons button {
  appearance: none;
  min-width: 44px;
  border: 0;
  background: transparent;
  color: var(--dark);
  font: inherit;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease;
}

.carousel-buttons button[data-project-control="toggle"] {
  min-width: 44px;
  font-size: 1.4rem;
  line-height: 1;
}

.carousel-buttons button[data-project-control="prev"],
.carousel-buttons button[data-project-control="next"] {
  font-size: 1.8rem;
  line-height: 1;
}

.carousel-buttons button:hover,
.carousel-buttons button:focus-visible {
  transform: translateY(-3px) rotate(-2deg);
}

.carousel-buttons button:active {
  transform: scale(0.96);
}

.carousel-buttons button {
  color: var(--accent-pink);
}

.project-card {
  width: clamp(210px, 21vw, 300px);
  flex: 0 0 auto;
  display: block;
  position: relative;
  overflow: hidden;
}

.project-card img {
  aspect-ratio: 1 / 1;
  background: var(--light);
  object-fit: cover;
  transition: transform 180ms ease;
}

.project-card[data-project="project-three"] img {
  object-position: 58% center;
}

.all-work-card[href*="project-three"] img {
  object-position: 58% center;
}

.project-card span {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  gap: 4px;
  padding: 52px 16px 16px;
  color: var(--light);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
  font-family: "Agenda One", "Avenir Next", Avenir, Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
  line-height: 1.25;
  text-align: left;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.project-card i {
  width: max-content;
  max-width: 92%;
  padding: 0;
  background: transparent;
  color: var(--light);
  font-size: 0.72rem;
  font-style: normal;
  transform: none;
}

.project-card b {
  display: block;
  font-size: 1.12rem;
  font-weight: 800;
  text-transform: lowercase;
  color: var(--light);
}

.project-card small {
  display: block;
  max-width: 24ch;
  font-size: 0.8rem;
}

.project-card:hover img,
.project-card.is-centered-pulse img {
  transform: scale(1.035) rotate(-1deg);
}

.project-card:hover span,
.project-card:focus-visible span,
.project-card.is-centered-pulse span {
  opacity: 1;
  transform: translateY(0);
}

.more-work-link {
  display: inline-flex;
  grid-column: 3;
  justify-self: end;
  align-items: center;
  gap: 6px;
  width: max-content;
  margin: 0;
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  transition: color 180ms ease, transform 180ms ease;
}

.more-work-link span {
  color: var(--accent-pink);
  font-size: 1.8rem;
  line-height: 1;
}

.more-work-link:hover,
.more-work-link:focus-visible {
  color: var(--accent-pink);
  transform: translateY(-3px) rotate(-1deg);
}

.all-work-page {
  width: 100%;
  max-width: none;
  min-height: 760px;
  margin: 48px 0 90px;
  padding: 0 36px;
}

.all-work-page .section-title {
  margin-bottom: 34px;
}

.work-filters {
  width: max-content;
  margin: -4px 0 42px auto;
  position: relative;
  z-index: 3;
}

.filter-menu {
  position: relative;
}

.filter-menu summary {
  width: max-content;
  list-style: none;
  border-bottom: 1px solid currentColor;
  color: var(--dark);
  cursor: pointer;
  transition: color 180ms ease, transform 180ms ease;
}

.filter-menu summary::-webkit-details-marker {
  display: none;
}

.filter-menu summary::after {
  content: " ↓";
  color: var(--accent-pink);
}

.filter-menu[open] summary,
.filter-menu summary:hover,
.filter-menu summary:focus-visible {
  color: var(--accent-pink);
  transform: translateY(-2px) rotate(-1deg);
}

.filter-menu div {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 170px;
  display: grid;
  gap: 9px;
  padding: 14px 16px 16px;
  background: var(--light);
  border: 1px solid rgba(42, 0, 2, 0.45);
  box-shadow: 0 14px 24px rgba(42, 0, 2, 0.08);
}

.work-filters button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--dark);
  width: max-content;
  padding: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: color 180ms ease, transform 180ms ease;
}

.work-filters button:hover,
.work-filters button:focus-visible,
.work-filters button.is-active {
  color: var(--accent-pink);
  transform: translateY(-2px) rotate(-1deg);
}

.all-work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 36px;
}

.more-coming-soon {
  margin: 54px 0 0;
  color: var(--dark);
  font-family: "adobe-handwriting-ernie", "Brush Script MT", "Segoe Script", cursive;
  font-size: clamp(1.8rem, 3.2vw, 3rem);
  font-weight: 400;
  line-height: 0.9;
  text-align: center;
}

.all-work-card {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
  overflow: hidden;
  background: rgba(255, 254, 248, 0.58);
  transition: transform 180ms ease;
}

.all-work-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0));
  pointer-events: none;
}

.all-work-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transform: scale(1);
  transition: opacity 180ms ease, transform 180ms ease;
}

.all-work-card span {
  position: absolute;
  left: 24px;
  bottom: 22px;
  z-index: 1;
  max-width: 28ch;
  display: grid;
  gap: 3px;
  font-size: 0.96rem;
  line-height: 1.22;
}

.all-work-card b,
.all-work-card i,
.all-work-card small {
  color: var(--light);
  width: max-content;
  max-width: 100%;
  padding: 0;
}

.all-work-card b {
  font-weight: 700;
}

.all-work-card i {
  font-style: normal;
}

.all-work-card small {
  display: block;
  color: var(--light);
}

.all-work-card:hover,
.all-work-card:focus-visible {
  transform: rotate(-0.5deg);
}

.all-work-card:hover img,
.all-work-card:focus-visible img {
  transform: scale(1.025);
}

.about {
  padding-top: 88px;
  margin-top: 0;
  scroll-margin-top: 64px;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(230px, 380px) 150px minmax(280px, 1fr);
  grid-template-rows: auto auto;
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
}

.about-photo {
  grid-column: 1;
  grid-row: 1 / span 2;
  transform: rotate(-6deg);
}

.about-title {
  grid-column: 2 / 4;
  grid-row: 1;
  align-self: end;
  margin: 0 0 8px;
  text-align: left;
}

.about-text {
  grid-column: 3;
  grid-row: 2;
  max-width: 620px;
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  align-self: start;
  transform: translateY(-34px);
}

.about-text p {
  margin: 0 0 24px;
}

.craft-note {
  font-weight: 700;
  color: var(--accent-pink);
}

.about-arrow {
  grid-column: 2;
  grid-row: 2;
  width: min(150px, 22vw);
  justify-self: center;
  align-self: start;
  transform: translateY(-58px) rotate(5deg);
}

.contact {
  width: 100%;
  max-width: none;
  min-height: 390px;
  margin: 72px 0 0;
  padding: clamp(62px, 8vw, 108px) 36px 54px;
  background: var(--accent-pink);
  color: var(--light);
  display: grid;
  grid-template-columns: minmax(280px, 520px) minmax(280px, 520px);
  gap: clamp(38px, 8vw, 110px);
  align-items: center;
  justify-content: center;
}

.contact-statement {
  display: grid;
  gap: 24px;
  font-size: clamp(3.2rem, 7vw, 6.7rem);
}

.contact-links {
  font-size: clamp(1.1rem, 2vw, 1.7rem);
}

.copy-email {
  appearance: none;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  border: 0;
  border-bottom: 1px solid rgba(255, 254, 244, 0.55);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: center;
  padding-bottom: 14px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: border-color 180ms ease;
}

.copy-email span {
  grid-column: 2;
  justify-self: center;
  display: inline-block;
  transition: transform 180ms ease;
}

.copy-email small {
  grid-column: 3;
  justify-self: end;
  flex: 0 0 auto;
  font-size: 0.75rem;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.copy-email:hover small,
.copy-email:focus-visible small,
.copy-email.is-copied small {
  opacity: 0.68;
  transform: translateX(0);
}

.copy-email:hover,
.copy-email:focus-visible,
.contact-links a:hover,
.contact-links a:focus-visible {
  transform: translateY(-3px) rotate(-1deg);
}

.copy-email:hover,
.copy-email:focus-visible {
  transform: none;
}

.copy-email:hover span,
.copy-email:focus-visible span {
  transform: translateY(-3px) rotate(-1deg);
}

.copy-email:hover,
.copy-email:focus-visible {
  border-color: rgba(255, 254, 244, 0.55);
}

.contact-links div {
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.contact-links a {
  display: inline-block;
  transition: transform 180ms ease, opacity 180ms ease;
}

.copy-email:active,
.contact-links a:active {
  transform: translateY(0) scale(0.98);
}

.copy-email:active {
  transform: none;
}

.scallop-up {
  position: relative;
}

.scallop-up::before {
  content: "";
  position: absolute;
  inset: -41px 0 auto;
  height: 42px;
  background: radial-gradient(circle at 28px 42px, var(--accent-pink) 0 27px, transparent 28px) 0 0 / 56px 42px repeat-x;
}

.project-page {
  width: 100%;
  max-width: none;
  margin: 44px 0 80px;
  padding: 0 36px;
  opacity: 0;
  transition: opacity 120ms ease;
}

body.is-project-loaded .project-page {
  opacity: 1;
}

.project-hero img {
  aspect-ratio: 16 / 5;
  object-fit: cover;
  background: var(--light);
}

.project-intro {
  display: grid;
  grid-template-columns: minmax(190px, 0.62fr) clamp(34px, 5vw, 78px) repeat(3, minmax(210px, 1fr));
  column-gap: clamp(24px, 4vw, 54px);
  row-gap: 24px;
  align-items: start;
  padding: 42px 0 72px;
}

.project-intro h1 {
  font-family: "Agenda One", "Avenir Next", Avenir, Helvetica, Arial, sans-serif;
  font-size: clamp(2.5rem, 5vw, 4.4rem);
  font-weight: 400;
  line-height: 1;
  margin: 0 0 8px;
}

.project-intro p,
.project-copy {
  margin: 0;
  max-width: 38ch;
  line-height: 1.35;
}

.project-copy {
  display: grid;
  gap: 1em;
}

.project-copy p {
  margin: 0;
  max-width: none;
}

.project-intro #projectSummary {
  grid-column: 3;
}

.project-intro #projectDetails {
  grid-column: 4;
}

.project-intro #projectExtra {
  grid-column: 5;
}

body.is-video-project .project-page {
  margin-top: 18px;
}

.project-intro > div:first-child {
  display: grid;
  gap: 18px;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 28px;
  align-items: stretch;
}

.project-gallery figure {
  margin: 0;
  min-height: 0;
  background: var(--light);
  position: relative;
  overflow: hidden;
}

.project-gallery figure:nth-child(1) {
  grid-column: 1 / span 5;
  min-height: 330px;
}

.project-gallery figure:nth-child(2) {
  grid-column: 6 / span 7;
  min-height: 330px;
}

.project-gallery figure:nth-child(3) {
  grid-column: 1 / span 12;
  min-height: 82px;
  height: 82px;
  margin-top: 4px;
}

.project-gallery figure:nth-child(4) {
  grid-column: 1 / span 7;
  min-height: 330px;
}

.project-gallery figure:nth-child(5) {
  grid-column: 8 / span 5;
  min-height: 330px;
}

.project-gallery figure:nth-child(6) {
  grid-column: 1 / span 4;
  min-height: 330px;
}

.project-gallery figure:nth-child(7),
.project-gallery figure:nth-child(8) {
  grid-column: span 4;
  min-height: 330px;
}

.project-gallery[data-project="project-five"] figure:nth-child(4),
.project-gallery[data-project="project-five"] figure:nth-child(5),
.project-gallery[data-project="project-five"] figure:nth-child(6) {
  grid-column: span 4;
  min-height: 330px;
}

.project-gallery[data-project="project-two"] figure:nth-child(1),
.project-gallery[data-project="project-two"] figure:nth-child(7) {
  grid-column: 1 / span 12;
  height: min(760px, 72vw);
  min-height: 520px;
  margin-top: 0;
}

.project-gallery[data-project="project-two"] figure:nth-child(2) {
  grid-column: 1 / span 5;
  min-height: 330px;
}

.project-gallery[data-project="project-two"] figure:nth-child(3) {
  grid-column: 6 / span 7;
  height: auto;
  min-height: 330px;
  margin-top: 0;
}

.project-gallery[data-project="project-two"] figure:nth-child(4) {
  grid-column: 1 / span 12;
  height: 82px;
  min-height: 82px;
}

.project-gallery[data-project="project-two"] figure:nth-child(5) {
  grid-column: 1 / span 7;
  min-height: 330px;
}

.project-gallery[data-project="project-two"] figure:nth-child(6) {
  grid-column: 8 / span 5;
  min-height: 330px;
}

.project-gallery[data-project="project-four"] {
  gap: 22px;
}

.project-gallery[data-project="project-four"] figure:nth-child(1) {
  grid-column: 1 / span 5;
  height: 410px;
  min-height: 410px;
}

.project-gallery[data-project="project-four"] figure:nth-child(2) {
  grid-column: 6 / span 7;
  height: 410px;
  min-height: 410px;
}

.project-gallery[data-project="project-four"] figure:nth-child(3) {
  grid-column: 1 / span 7;
  height: 390px;
  min-height: 390px;
  margin-top: 0;
}

.project-gallery[data-project="project-four"] figure:nth-child(4) {
  grid-column: 8 / span 5;
  height: 390px;
  min-height: 390px;
}

.project-gallery[data-project="project-four"] figure:nth-child(5),
.project-gallery[data-project="project-four"] figure:nth-child(6),
.project-gallery[data-project="project-four"] figure:nth-child(7) {
  grid-column: span 4;
  height: 310px;
  min-height: 310px;
}

.project-gallery figure:nth-child(n + 9) {
  display: none;
}

.project-gallery[data-project="project-three"] figure:nth-child(n) {
  display: block;
  height: 360px;
  min-height: 360px;
  margin-top: 0;
  border: 0;
  background: transparent;
}

.project-gallery[data-project="project-three"] figure:nth-child(1) {
  grid-column: 1 / span 5;
}

.project-gallery[data-project="project-three"] figure:nth-child(2) {
  grid-column: 6 / span 7;
}

.project-gallery[data-project="project-three"] figure:nth-child(3) {
  grid-column: 1 / span 12;
  height: 82px;
  min-height: 82px;
}

.project-gallery[data-project="project-three"] figure:nth-child(4) {
  grid-column: 1 / span 12;
}

.project-gallery[data-project="project-three"] figure:nth-child(5),
.project-gallery[data-project="project-three"] figure:nth-child(6) {
  grid-column: span 6;
}

.project-gallery[data-project="project-three"] figure:nth-child(7) {
  grid-column: 1 / span 12;
}

.project-gallery[data-project="project-three"] figure:nth-child(9),
.project-gallery[data-project="project-three"] figure:nth-child(10),
.project-gallery[data-project="project-three"] figure:nth-child(8),
.project-gallery[data-project="project-three"] figure:nth-child(11) {
  grid-column: span 6;
  height: 210px;
  min-height: 210px;
}

.project-gallery img {
  height: 100%;
  object-fit: cover;
}

.project-gallery figure:nth-child(3) img {
  object-fit: cover;
}

.project-gallery[data-project="project-three"] img {
  object-fit: cover;
}

.project-hero img[data-project="project-three"] {
  object-position: 42% center;
}

.project-gallery[data-layout="video"] {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(34px, 5vw, 70px);
  align-items: start;
}

.project-gallery[data-layout="video"] figure {
  margin: 0;
  border: 0;
  background: var(--light);
}

.project-gallery[data-layout="video"] video {
  display: block;
  width: 100% !important;
  height: 100% !important;
  background: var(--dark);
  object-fit: cover;
  box-shadow: none;
}

.project-gallery[data-layout="video"] .video-feature {
  grid-column: 1 / -1;
  width: 104vw;
  aspect-ratio: 16 / 8.8;
  min-height: 0;
  margin-left: 50%;
  margin-bottom: 0;
  position: relative;
  transform: translateX(-50%);
  box-shadow: none;
}

.project-gallery[data-layout="video"] .video-detail-row {
  display: grid !important;
  grid-column: 1 / -1;
  grid-template-columns: minmax(230px, 0.85fr) minmax(320px, 1.15fr) !important;
  gap: clamp(42px, 7vw, 96px);
  align-items: start;
  width: 100%;
  margin-top: 0 !important;
}

.project-gallery[data-layout="video"] .video-secondary {
  aspect-ratio: 16 / 9;
  align-self: start;
  grid-column: auto;
  min-height: 0;
  width: 100%;
  max-width: none;
  box-shadow: none;
}

.project-gallery[data-layout="video"] .video-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 14px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  width: 100%;
  align-self: start;
  padding-top: 4px;
}

.video-copy h2 {
  margin: 0;
  color: var(--accent-pink);
  font-size: clamp(1.5rem, 2.8vw, 2.4rem);
  line-height: 1;
}

.video-copy p {
  margin: 0;
  max-width: 36ch;
}

.video-controls {
  position: absolute;
  left: 50%;
  top: 24px;
  z-index: 2;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.video-controls button {
  appearance: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 254, 248, 0.8);
  border-radius: 50%;
  background: rgba(255, 254, 248, 0.82);
  color: var(--dark);
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.video-controls button:hover,
.video-controls button:focus-visible {
  background: var(--accent-pink);
  color: var(--light);
  transform: translateY(-2px) rotate(-1deg);
}

@media (min-width: 601px) {
  .project-gallery[data-layout="video"] .video-detail-row {
    display: grid !important;
    grid-template-columns: minmax(230px, 0.85fr) minmax(320px, 1.15fr) !important;
    align-items: start;
  }

  .project-gallery[data-layout="video"] .video-copy {
    grid-column: 1;
    grid-row: 1;
  }

  .project-gallery[data-layout="video"] .video-secondary {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
  }
}

.project-bottom-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  margin-top: 34px;
}

.process-link {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  margin-top: 8px;
  padding-bottom: 8px;
  font-size: clamp(1.15rem, 1.85vw, 1.65rem);
  position: relative;
  transition: transform 180ms ease;
}

.process-link span {
  width: clamp(30px, 4.4vw, 54px);
  height: 2px;
  background: var(--accent-pink);
  position: relative;
}

.process-link span::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--accent-pink);
  border-bottom: 2px solid var(--accent-pink);
  position: absolute;
  right: 0;
  top: -4px;
  transform: rotate(-45deg);
}

.process-link small {
  position: absolute;
  right: 0;
  bottom: -6px;
  font-family: "Agenda One", "Avenir Next", Avenir, Helvetica, Arial, sans-serif;
  font-size: 0.82rem;
  line-height: 1;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.process-link:hover,
.process-link:focus-visible {
  transform: translateY(-3px) rotate(-1deg);
}

.process-link:hover strong,
.process-link:focus-visible strong {
  color: var(--accent-pink);
}

.process-link:hover small,
.process-link:focus-visible small {
  opacity: 0.72;
  transform: translateY(0);
}

.back-home {
  display: inline-block;
  width: max-content;
  font-size: 1rem;
  transition: transform 180ms ease;
}

.back-home::before {
  content: "← ";
}

.back-home:hover,
.back-home:focus-visible {
  color: var(--accent-pink);
  transform: translateY(-3px) rotate(-1deg);
}

@media (max-width: 850px) {
  html,
  body {
    overflow-x: hidden;
  }

  body {
    font-size: 0.96rem;
  }

  .site-header,
  .dark-header {
    width: 100%;
    margin-top: 0;
    padding: 18px 16px 12px;
    gap: 16px;
  }

  body[data-page="home"] .site-header::before,
  body[data-page="project"] .site-header::before,
  body[data-page="all-work"] .site-header::before {
    height: 28px;
  }

  .logo {
    font-size: clamp(2.2rem, 13vw, 3rem);
    flex: 0 0 auto;
  }

  .site-nav {
    justify-content: flex-end;
    gap: 10px;
    font-size: clamp(0.76rem, 3.2vw, 0.9rem);
    line-height: 1;
    flex-wrap: wrap;
  }

  .nav-dropdown div {
    right: 0;
    left: auto;
    min-width: 132px;
  }

  .section {
    padding: 42px 18px;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 34px;
    gap: 32px;
  }

  .hero-copy {
    justify-self: center;
    transform: none;
    width: min(100%, 420px);
  }

  .hero-copy p {
    font-size: clamp(1.9rem, 10vw, 3rem);
    transform: translate(-42px, 2px);
  }

  .hero-copy h1 {
    font-size: clamp(4.9rem, 24vw, 7rem);
  }

  .hero-note {
    --hero-note-shift: 0px;
    grid-template-columns: minmax(96px, 128px) minmax(0, 1fr);
    gap: 10px;
    margin-top: 0;
    width: min(100%, 360px);
    justify-content: center;
  }

  .hero-note img {
    width: min(128px, 34vw);
    transform: translateY(-14px) rotate(8deg);
  }

  .hero-copy .hero-note p {
    font-size: clamp(0.78rem, 3.4vw, 0.9rem);
    transform: none;
  }

  .portrait-stamp {
    justify-self: center;
    max-width: min(320px, 82vw);
  }

  .skills-ticker {
    padding-bottom: 18px;
  }

  .about-grid,
  .project-intro,
  .contact {
    grid-template-columns: 1fr;
  }

  .about-photo,
  .about-title,
  .about-text,
  .about-arrow,
  .project-intro #projectSummary,
  .project-intro #projectDetails,
  .project-intro #projectExtra {
    grid-column: auto;
    grid-row: auto;
  }

  .about-title {
    text-align: center;
  }

  .about-text {
    transform: none;
  }

  .about-arrow {
    display: none;
  }

  .contact {
    margin-top: 40px;
    gap: 34px;
    min-height: 310px;
    padding: 56px 20px 42px;
  }

  .contact-links div {
    flex-direction: column;
    gap: 12px;
  }

  .contact-statement {
    font-size: clamp(3rem, 18vw, 5.8rem);
  }

  .contact-links {
    width: min(100%, 430px);
  }

  .copy-email span {
    font-size: clamp(0.92rem, 4vw, 1.15rem);
    text-align: center;
  }

  .project-page {
    margin-top: 34px;
    padding: 0 18px;
  }

  body.is-video-project .project-page {
    margin-top: 34px;
  }

  .project-hero img {
    aspect-ratio: 4 / 3;
    width: 100%;
  }

  .project-intro {
    gap: 22px;
    padding: 28px 0 38px;
  }

  .project-intro h1 {
    font-size: clamp(2.8rem, 15vw, 4.2rem);
    max-width: 10ch;
  }

  .project-intro p,
  .project-copy {
    max-width: none;
    font-size: clamp(0.98rem, 4vw, 1.08rem);
    line-height: 1.42;
  }

  .project-gallery,
  .project-gallery[data-project],
  .project-gallery[data-layout="video"] {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .project-gallery figure,
  .project-gallery figure:nth-child(n),
  .project-gallery[data-project] figure:nth-child(n) {
    grid-column: auto;
    width: 100%;
    min-height: 0;
    height: auto;
    aspect-ratio: 4 / 3;
    margin-top: 0;
  }

  .project-gallery figure:nth-child(n + 9) {
    display: block;
  }

  .project-gallery figure:nth-child(3),
  .project-gallery[data-project="project-two"] figure:nth-child(4) {
    aspect-ratio: 16 / 5;
    height: auto;
    min-height: 0;
  }

  .project-gallery[data-project="project-three"] figure:nth-child(9),
  .project-gallery[data-project="project-three"] figure:nth-child(10),
  .project-gallery[data-project="project-three"] figure:nth-child(8),
  .project-gallery[data-project="project-three"] figure:nth-child(11) {
    aspect-ratio: 16 / 8;
  }

  .project-gallery[data-layout="video"] {
    gap: 28px;
  }

  .project-gallery[data-layout="video"] .video-feature,
  .project-gallery[data-layout="video"] .video-detail-row,
  .project-gallery[data-layout="video"] .video-secondary {
    grid-column: auto;
  }

  .project-gallery[data-layout="video"] .video-feature {
    width: calc(100vw + 36px);
    aspect-ratio: 16 / 9;
    margin-left: 50%;
    transform: translateX(-50%);
  }

  .project-gallery[data-layout="video"] .video-detail-row {
    grid-template-columns: 1fr !important;
    gap: 18px;
  }

  .project-gallery[data-layout="video"] .video-copy {
    min-height: 0;
    padding-top: 0;
  }

  .project-gallery[data-layout="video"] .video-secondary {
    aspect-ratio: 16 / 9;
  }

  .video-controls {
    top: 12px;
  }

  .video-controls button {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
  }

  .project-bottom-nav {
    align-items: flex-start;
    flex-direction: column-reverse;
    margin-top: 26px;
  }

  .process-link {
    grid-column: auto;
    justify-self: start;
    align-self: auto;
    font-size: clamp(1.05rem, 6vw, 1.35rem);
  }

  .all-work-page {
    margin-top: 28px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .work-filters {
    margin: 0 0 28px auto;
  }

  .filter-menu div {
    right: 0;
    left: auto;
    min-width: 150px;
  }

  .all-work-grid {
    grid-template-columns: 1fr;
  }

  .all-work-card {
    aspect-ratio: 16 / 10;
  }

  .all-work-card img {
    height: 100%;
  }
}

@media (max-width: 520px) {
  .site-header,
  .dark-header {
    align-items: flex-start;
  }

  .site-nav {
    max-width: 220px;
  }

  .hero-copy p {
    transform: translate(-28px, 2px);
  }

  .hero-note {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .project-controls {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 0 18px;
  }

  .project-controls .more-work-link,
  .carousel-buttons {
    grid-column: 1;
    justify-self: center;
  }

  .project-controls .more-work-link {
    order: 2;
  }

  .carousel-buttons {
    order: 1;
  }

  .project-marquee {
    padding-left: 18px;
    padding-right: 18px;
  }

  .project-card {
    width: min(72vw, 280px);
    height: min(72vw, 280px);
  }

  .about {
    padding-top: 54px;
  }

  .about-photo {
    max-width: min(320px, 84vw);
    justify-self: center;
  }

  .about-title,
  .all-work-page .section-title,
  .work .section-title {
    font-size: clamp(3.1rem, 17vw, 5rem);
  }

  .project-gallery[data-layout="video"] .video-feature {
    width: calc(100vw + 64px);
  }
}

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

  .hero-copy span {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .hero-note,
  .portrait-stamp {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .skills-track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
  }

}
