/* MAURA PORTFOLIO â€” CLEAN STYLESHEET */

/* styles.css */

/* 01. GLOBAL + THREE-SIZE TYPOGRAPHY */
:root {
  --font-main: "Xanh Mono", monospace;
  --font-body: "Inter Tight", sans-serif;
  --type-large: clamp(40px, 4.5vw, 80px);
  --type-medium: 18px;
  --type-small: 13.5px;
  --line-height-main: 1.4;
  --link-color: #a4b51b;
  --link-hover: #ff87f4;
  --page-gutter: clamp(22px, 5vw, 72px);
  --gallery-height: 400px;
}
* {
  box-sizing: border-box;
  /* cursor: text !important; */
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: #fff;
  color: #111;
  font-family: var(--font-main);
  font-size: var(--type-small);
  line-height: var(--line-height-main);
}
button,
input,
textarea,
select {
  font: inherit;
}
img {
  display: block;
  width: 100%;
  height: auto;
}

/* BODY COPY — INTER TIGHT */
.project-intro,
.work-copy p,
.media-caption p,
.project-credits p,
.project-link-list a {
  font-family: var(--font-body);
  font-weight: 400;
}

.project-credits .interactive-text {
  font-family: var(--font-body);
}

/* Credits heading */
.project-credits h2,
.project-credits h3 {
  font-family: var(--font-main);
}

/* Credits list only */
.project-credits p,
.project-credits p .letter {
  font-family: var(--font-body);
  font-weight: 400;
}

/* Links: one consistent dotted style */
a:not(.project-card),
a:not(.project-card):visited {
  color: var(--link-color);
  text-decoration: underline dotted currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
a:not(.project-card):hover {
  color: var(--link-hover);
}
a .interactive-letter,
a .interactive-word {
  color: inherit;
}

/* Large: homepage introduction and project title */
.intro h1,
#maura-interactive {
  font-size: var(--type-large);
  font-weight: 400;
  line-height: 1.1;
}
/* Medium: all headings and navigational labels */
.site-header,
.site-header a,
/* .project-number, */
.card-caption,
.card-caption .brand,
.work-copy h2,
.project-links h2,
.project-credits h2,
.project-navigation,
.project-navigation a {
  font-size: var(--type-medium);
  line-height: var(--line-height-main);
  font-weight: 400;
}
/* Small: paragraphs, credit rows, press links and captions */
.project-intro,
.project-hero p,
.work-copy,
.work-copy p,
.project-link-list,
.project-link-list a,
.project-credits p,
.project-credits p span,
.media-caption,
.media-caption p,
.media-caption a,
.about {
  font-size: var(--type-small);
  line-height: var(--line-height-main);
}
/* Homepage typewriter hyperlinks */
#demo {
  line-height: 1.15 !important;
}
#demo .typewriter-link,
#demo .typewriter-link:visited {
  color: #a4b51b;
  text-decoration: none;
  border-bottom: 2px dotted #a4b51b;
}
#demo .typewriter-link .letter {
  color: inherit !important;
}
#demo .typewriter-link:hover {
  color: #ff87f4;
  border-bottom-color: #a4b51b;
}

/* Linked typewriter words turn pink on hover */
#demo .typewriter-link:hover,
#demo .typewriter-link:hover .letter {
  color: #ff87f4 !important;
}

/* 02. HEADER + HOMEPAGE INTRO */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px var(--page-gutter);
}
.intro {
  padding: 40px var(--page-gutter) 100px;
}
.intro h1 {
  max-width: 1200px;
  margin: 0;
}
.accent {
  color: #bbcc30;
}
/* Typewriter animations remain in typewriter.css. */

/* HOMEPAGE GRID */

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  /* gap: 55px; */
  gap: 35px;
  align-items: start;
  padding: 80px var(--page-gutter) 150px;
}

/* DESKTOP — 12 COLUMNS */

@media (min-width: 601px) {
  .project-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: clamp(8px, 1.5vw, 24px);
    /* row-gap: clamp(40px, 6vw, 100px); */
  }
}

.project-card,
.project-card.large {
  /* grid-column: auto; */
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  transform: none;
  color: inherit;
  text-decoration: none;
}
.project-card:visited,
.project-card:hover {
  color: inherit;
  text-decoration: none;
}
.project-card figure {
  margin: 0;
}
.project-card .cover {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  /* max-height: 33vh; */
  /* max-height: clamp(300px, 45vh, 550px); */
  max-height: clamp(350px, 55vh, 650px);
  max-height: clamp(400px, 60vh, 750px);
  object-fit: cover;
  aspect-ratio: auto;
  cursor: crosshair;
}
/* Preserve individual cover widths and homepage arrangement. */

/* INDIVIDUAL PROJECT IMAGE SIZES — DESKTOP */

/* INDIVIDUAL PROJECT IMAGE SIZES */

@media (min-width: 601px) {
  .project-card:nth-child(1) {
    grid-column: 1 / span 5;
  }

  .project-card:nth-child(2) {
    grid-column: 8 / span 4;
    /* margin-top: -150px; */
  }

  .project-card:nth-child(3) {
    grid-column: 2 / span 4;
    margin-top: -50px;
  }

  /* Fanta only */
  .project-card:nth-child(3) .cover {
    width: 80%;
    height: auto;
    aspect-ratio: 4 / 5;
    max-height: none;
    object-fit: cover;
  }

  .project-card:nth-child(4) {
    grid-column: 7 / span 6;
    margin-top: 80px;
  }

  .project-card:nth-child(5) {
    grid-column: 3 / span 4;
  }

  .project-card:nth-child(6) {
    grid-column: 8 / span 4;
    margin-top: 60px;
  }

  .project-card:nth-child(7) {
    grid-column: 2 / span 5;
  }

  .project-card:nth-child(8) {
    grid-column: 9 / span 3;
    margin-top: 60px;
  }

  .project-card:nth-child(9) {
    grid-column: 3 / span 5;
    margin-top: -100px;
  }
}

/* .project-number {
  margin-bottom: 6px;
} */
.card-caption {
  margin-top: 8px;
}

.card-caption .brand {
  color: #a4b51b;
  transition: color 0.2s ease;
}

.project-card:hover .card-caption .brand {
  color: #ff87f4;
}

.placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #d9e3d0, #efb6cb 55%, #9c94c4);
  color: #39333a;
  text-align: center;
  padding: 20px;
}
.about {
  padding: 80px var(--page-gutter);
}
/* 04. PROJECT PAGE HEADER + HERO */
.project-detail {
  padding: 18px var(--page-gutter) 80px;
}

.project-brand {
  font-size: 18px;
  line-height: 1.2;
  text-transform: uppercase;
  margin: 0 0 4px;
  color: #a4b51b;
  /* text-decoration: underline dotted #a4b51b; */
  transition: color 0.2s ease;
}

.project-heading {
  font-family: "Xanh Mono", monospace;
  font-size: clamp(28px, 3vw, 48px);
  font-weight: 400;
  font-style: italic;
  line-height: 1.1;
  max-width: 1100px;
  margin: 0;
  overflow-wrap: break-word;
  /* text-transform: uppercase; */
}

/* Landing page project titles */
.project-card .card-caption {
  font-style: italic;
}

/* Keep the brand name non-italic */
.project-card .card-caption .brand {
  font-style: normal;
  text-transform: uppercase;
}

.project-heading-group {
  margin-bottom: 36px;
}

.project-hero {
  display: grid;
  grid-template-columns: minmax(250px, 30%) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  margin: 0 0 40px;
}

.project-hero p {
  max-width: 380px;
  margin: 0;
}

.project-intro {
  white-space: pre-line;
}

/* 12-COLUMN PROJECT HERO GRID */

.project-hero-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 32px;
  align-items: start;
  /* margin: 0 0 40px; */
  margin: 0 0 60px;
}

/* Walmart: staggered text around portrait video */
@media (min-width: 801px) {
  .walmart-hero-grid {
    grid-template-rows: repeat(3, minmax(0, 1fr));
    align-items: start;
    row-gap: 0;
  }

  /* Portrait video spans the entire grid height */
  .walmart-hero-grid .portrait-hero {
    grid-row: 1 / 4;
    align-self: stretch;
  }

  .walmart-hero-grid .portrait-hero video {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 16;
    object-fit: contain;
  }

  /* Middle paragraph */
  .walmart-hero-grid .hero-block:nth-child(2) {
    align-self: center;
  }

  /* Bottom paragraph */
  .walmart-hero-grid .hero-block:nth-child(4) {
    align-self: end;
  }
}

.hero-block {
  grid-column: var(--col) / span var(--span);
  grid-row: var(--row);
  min-width: 0;
}

.hero-block .project-intro {
  margin: 0;
  max-width: none;
  white-space: pre-line;
}

.hero-block img.media-item,
.hero-block video.media-item {
  width: 100%;
  height: auto;
  max-width: 100%;
  aspect-ratio: auto;
  object-fit: contain;
}

/* Hero videos maintain their natural proportions */
.hero-block video.media-item {
  display: block;
  width: 100%;
  height: auto;
}

/* Hero: one-third viewport height; width follows natural proportions */
.hero-media {
  width: 100%;
  max-width: 900px;
  min-width: 0;
}
.hero-media img.media-item,
.hero-media video.media-item {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(33vh, 450px);
  aspect-ratio: auto;
  object-fit: cover;
}

/* Desktop vertical positioning */
@media (min-width: 801px) {
  .hero-block {
    transform: translateY(var(--offset-y, 0px));
  }
}

/* Portrait hero video */
.hero-block.portrait-hero video.media-item {
  display: block;
  width: 100%;
  height: auto;
  max-height: 65vh;
  aspect-ratio: 9 / 16;
  object-fit: contain;
}

/* 05. HORIZONTAL GALLERIES */
.work-section {
  margin-bottom: 54px;
}
.work-scroll {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 8px;
}
.work-scroll::-webkit-scrollbar {
  display: none;
}

.work-copy {
  flex: 0 0 calc((100% - 11 * 24px) / 12 * 3 + 2 * 24px);
  padding-right: 14px;
}

.work-copy h2 {
  margin: 0 0 12px;
  color: #a4b51b;
}
.work-copy p {
  margin: 0;
}
/* 06. MEDIA + OPTIONAL CAPTIONS */
.media-item {
  display: block;
  flex: 0 0 auto;
  width: clamp(220px, 32vw, 540px);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: rgb(255, 255, 255);
  /* background: red; */
  border: 0;
}
.media-item.portrait {
  width: clamp(170px, 19vw, 320px);
  aspect-ratio: 9 / 16;
}
.media-item.social {
  width: clamp(170px, 18vw, 280px);
  aspect-ratio: 4 / 5;
}
.media-item.tweet {
  width: clamp(250px, 31vw, 460px);
  aspect-ratio: 2.4;
}
.media-item.wide {
  width: clamp(280px, 40vw, 680px);
}
.media-entry {
  flex: 0 0 auto;
  width: clamp(220px, 32vw, 540px);
  margin: 0;
}
.media-entry:has(.portrait) {
  width: clamp(170px, 19vw, 320px);
}
.media-entry:has(.social) {
  width: clamp(170px, 18vw, 280px);
}
.media-entry:has(.tweet) {
  width: clamp(250px, 31vw, 460px);
}
.media-entry:has(.wide) {
  width: clamp(280px, 40vw, 680px);
}
.media-entry .media-item {
  width: 100%;
}
img.media-item {
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}
video.media-item,
iframe.media-item {
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}
video.media-item.portrait,
iframe.media-item.portrait {
  aspect-ratio: 9 / 16;
}
video.media-item.social,
iframe.media-item.social {
  aspect-ratio: 4 / 5;
}
.media-placeholder {
  display: grid;
  place-items: center;
  padding: 16px;
  background: #f0edf0;
  text-align: center;
}
.work-scroll iframe {
  border: 0;
}
.media-caption {
  margin-top: 12px;
}
.media-caption strong {
  font-weight: 600;
}
.media-caption p {
  margin: 4px 0;
}
.media-caption a {
  display: inline-block;
  margin-top: 6px;
}
/* Gallery: consistent height, natural width, no cropping */
.work-scroll img.media-item,
.work-scroll video.media-item {
  width: auto;
  height: var(--gallery-height);
  max-width: none;
  aspect-ratio: auto;
  object-fit: contain;
}
.work-scroll .media-entry {
  width: max-content;
  max-width: none;
}
.work-scroll .media-entry img.media-item,
.work-scroll .media-entry video.media-item {
  width: auto;
  height: var(--gallery-height);
  max-width: none;
}

/* Default gallery: 400px */

/* Selected galleries: 25% taller */
.work-section.gallery-tall {
  --gallery-height: 500px;
}

.work-section.gallery-large {
  --gallery-height: 580px; /* +20% */
}

/* Allow taller content without vertical clipping */
.work-section.gallery-tall .work-scroll {
  max-height: none;
}

/* make gallery bigger ^^ */

/* 07. PRESS + CREDITS: GROUPED ON RIGHT */
.project-bottom {
  display: grid;
  grid-template-columns: 350px minmax(0, 390px);
  justify-content: end;
  /* gap: 20px; */
  margin-top: 100px;
  padding-top: 24px;
  border-top: 1.3px dotted #a4b51b;
}
.project-press,
.project-bottom .project-credits {
  text-align: left;
}
.project-press .project-links,
.project-bottom .project-credits {
  margin: 0;
}
.project-links h2,
.project-credits h2 {
  margin: 0 0 18px;
}
.project-link-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.project-credits p {
  display: grid;
  grid-template-columns: max-content max-content;
  justify-content: space-between;
  column-gap: 30px;
  align-items: start;
  margin: 0 0 14px;
}

.project-credits p span:first-child {
  text-align: left;
  white-space: nowrap;
}

.project-credits p span:last-child {
  text-align: right;
  white-space: pre-line;
}

/* 08. PREVIOUS / NEXT */
.project-navigation {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 100px;
  padding-top: 24px;
  border-top: 1.3px dotted #a4b51b;
}
/* 09. INTERACTIVE LETTERS */
.interactive-letter {
  display: inline-block;
  position: relative;
  cursor: inherit;
  transition:
    color 0.15s ease,
    transform 0.2s ease;
}

.interactive-letter:hover {
  color: #f43f25;
  transform: translateY(-2px);
}

/* Interactive headings on project pages */
.project-brand .interactive-letter,
.work-copy h2 .interactive-letter,
.project-links h2 .interactive-letter,
.project-credits h2 .interactive-letter {
  cursor: crosshair;
}

/* Keep original heading colors */
.project-brand .interactive-letter,
.work-copy h2 .interactive-letter {
  color: inherit;
}

/* Letter trail interaction */
.interactive-text .letter {
  display: inline;
  transition: color 0.15s ease;
}

/* Keep the original green on Press links */
.project-link-list a.interactive-text {
  color: #a4b51b;
}

/* Preserve clickable links */
.project-link-list a.interactive-text .letter {
  cursor: pointer;
}

.interactive-word {
  display: inline-block;
  white-space: nowrap;
}
.interactive-space {
  white-space: pre-wrap;
}

/* PRESS — simple pink hover */
.project-press .project-link-list a:hover,
.project-press .project-link-list a:hover .letter {
  color: #ff87f4 !important;
}

/* Keep spaces and line wrapping natural */
.project-credits .interactive-text {
  white-space: normal;
}

/* TABLET: MORE SPACE FOR TEXT */
@media (min-width: 601px) and (max-width: 800px) {
  /* @media (min-width: 601px) and (max-width: 1100px) { */
  .project-hero-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    column-gap: 20px;
    row-gap: 32px;
  }

  .hero-block {
    grid-column: auto;
    grid-row: auto;
    min-width: 0;
  }

  .hero-block:has(.project-intro) {
    grid-column: span 3;
  }

  .hero-block:has(img),
  .hero-block:has(video) {
    grid-column: span 3;
  }

  /* new added with rows columns */
  .walmart-hero-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: auto;
    row-gap: 24px;
  }

  .walmart-hero-grid .hero-block {
    grid-column: 1 / -1;
    grid-row: auto;
    transform: none;
  }

  .walmart-hero-grid .portrait-hero video {
    width: min(100%, 340px);
    height: auto;
  }
}

/* 10. MOBILE */
@media (max-width: 600px) {
  :root {
    --type-large: clamp(34px, 8vw, 48px);
    --type-medium: 16px;
    --type-small: 14px;
    --page-gutter: 20px;
    --gallery-height: 280px;
  }

  .project-hero-grid {
    grid-template-columns: 1fr;
    row-gap: 24px;
  }

  .hero-block {
    grid-column: 1;
    grid-row: auto;
    order: var(--mobile-order);
  }

  .hero-block .project-intro {
    max-width: 100%;
  }

  /* do i need this below? */
  .project-card {
    grid-column: 1 / -1;
    margin-top: 0;
  }

  .site-header {
    padding: 20px;
  }
  .intro {
    padding: 30px 20px 60px;
  }
  .project-grid {
    grid-template-columns: 1fr;
    gap: 55px;
    padding: 40px 20px 80px;
  }
  .project-card,
  .project-card.large,
  .project-card:nth-child(even) {
    margin-top: 0;
    transform: none;
  }
  .project-card .cover {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: none;
    object-fit: contain;
  }

  .project-card .cover-wrapper {
    width: 100%;
    max-width: 100%;
  }

  .about {
    padding: 60px 20px;
  }
  .project-detail {
    padding: 16px 20px 70px;
  }
  .project-heading {
    font-size: clamp(28px, 7vw, 42px);
  }

  .project-heading-group {
    margin-bottom: 28px;
  }
  .project-hero {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 42px;
  }

  .hero-block .project-intro {
    max-width: 550px;
  }
  .work-section {
    margin-bottom: 38px;
  }
  .work-scroll {
    gap: 12px;
    margin-right: -20px;
    padding-right: 20px;
  }

  .work-copy {
    flex: 0 0 40vw;
    padding-right: 12px;
  }

  .work-copy p {
    max-width: 100%;
  }

  .work-scroll > .media-item,
  .work-scroll > .media-entry {
    width: 76vw;
  }
  .work-scroll > .media-item.portrait,
  .work-scroll > .media-item.social,
  .work-scroll > .media-entry:has(.portrait),
  .work-scroll > .media-entry:has(.social) {
    width: 58vw;
  }
  .work-scroll > .media-item.tweet,
  .work-scroll > .media-entry:has(.tweet) {
    width: 78vw;
  }
  .project-bottom {
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 60px;
  }

  /* new added with rows columns */
  .walmart-hero-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    row-gap: 24px;
  }

  .walmart-hero-grid .hero-block {
    grid-column: 1;
    grid-row: auto;
    transform: none;
  }

  .walmart-hero-grid .portrait-hero video {
    width: min(100%, 280px);
    height: auto;
  }
}

@media (hover: none) {
  .project-card .cover {
    cursor: pointer;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .interactive-letter {
    transition: none;
  }
  .interactive-letter:hover {
    transform: none;
  }
}

/* Horizontal gallery arrow cursor */
.work-scroll {
  cursor: none;
}

.work-scroll,
.work-scroll * {
  cursor: none !important;
}

.gallery-cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  color: #a4b51b;
}

.gallery-cursor.visible {
  opacity: 1;
}

.gallery-cursor svg {
  width: 60px;
  height: 60px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

/* THREE INDEPENDENT HORIZONTAL ROWS */

.staggered-section {
  display: grid;
  grid-template-columns:
    calc((100% - 11 * 24px) / 12 * 3 + 2 * 24px)
    minmax(0, 1fr);
  column-gap: 24px;
  align-items: start;
}

.staggered-section .work-copy {
  flex: none;
  min-width: 0;
  padding-right: 14px;
}

.staggered-gallery {
  min-width: 0;
  overflow: hidden;
}

.staggered-track {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.staggered-row-scroll {
  display: block;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  padding-bottom: 0;
  cursor: none;
}

.staggered-row-scroll::-webkit-scrollbar {
  display: none;
}

.staggered-row {
  display: flex;
  align-items: center;
  gap: 24px;
  width: max-content;
  min-width: 100%;
}

/* No staggering — every row starts at the same X */
.staggered-row:nth-child(2),
.staggered-row:nth-child(3) {
  padding-left: 0;
}

.staggered-row img.media-item {
  display: block;
  width: auto;
  height: 75px;
  max-width: none;
  object-fit: contain;
}

.staggered-row .media-entry {
  flex: none;
  width: max-content;
  max-width: none;
}

.staggered-row-scroll:active {
  cursor: grabbing;
}

.staggered-row img.media-item {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

/* Twitter uses the same custom arrow cursor as other galleries */
.staggered-row-scroll.work-scroll {
  display: block;
  gap: 0;
  padding-bottom: 0;
}

@media (min-width: 601px) and (max-width: 1100px) {
  .staggered-section {
    grid-template-columns: 30% minmax(0, 1fr);
    column-gap: 20px;
  }

  .staggered-row img.media-item {
    height: 65px;
  }
}

@media (max-width: 600px) {
  .staggered-section {
    grid-template-columns: 1fr;
    row-gap: 18px;
  }

  .staggered-section .work-copy {
    width: 100%;
    padding-right: 0;
  }

  .staggered-gallery {
    margin-right: -20px;
  }

  .staggered-track {
    gap: 12px;
  }

  .staggered-row {
    gap: 14px;
  }

  .staggered-row img.media-item {
    height: 55px;
  }

  .staggered-row-scroll {
    touch-action: auto;
  }
}

/* INTERACTIVE TEXT — SAME ANIMATION AS TYPEWRITER */

.project-credits .interactive-text {
  white-space: normal;
}

.interactive-text .letter {
  display: inline-block;
  position: relative;
  font-family: "Xanh Mono", monospace;
  transition: transform 0.18s ease;
}

.interactive-text .letter.active {
  animation: letterJump 0.45s ease;
}

/* Same bounce as landing page */
@keyframes letterJump {
  0%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-8px);
  }

  70% {
    transform: translateY(2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .interactive-text .letter.active {
    animation: none;
  }
}

/* Hide gallery arrow only on touch devices */
@media (hover: none), (pointer: coarse) {
  .gallery-cursor {
    display: none !important;
  }

  .work-scroll,
  .work-scroll *,
  .staggered-row-scroll,
  .staggered-row-scroll * {
    cursor: auto !important;
  }
}

/* MOBILE: Equal spacing between horizontal gallery images */
@media (max-width: 600px) {
  .work-scroll {
    display: flex;
    gap: 16px;
    align-items: flex-start;
  }

  /* Remove fixed viewport widths from gallery items */
  .work-scroll > .media-item,
  .work-scroll > .media-entry,
  .work-scroll > .media-item.portrait,
  .work-scroll > .media-item.social,
  .work-scroll > .media-item.tweet,
  .work-scroll > .media-entry:has(.portrait),
  .work-scroll > .media-entry:has(.social),
  .work-scroll > .media-entry:has(.tweet) {
    flex: 0 0 auto;
    width: max-content;
    max-width: none;
  }

  /* All gallery images have the same height */
  /* All mobile gallery images: consistent height */
  .work-scroll > img.media-item,
  .work-scroll > video.media-item,
  .work-scroll > .media-entry img.media-item,
  .work-scroll > .media-entry video.media-item {
    display: block;
    width: auto;
    height: 320px;
    max-width: none;
    max-height: none;
    aspect-ratio: auto;
    object-fit: contain;
  }
}

@media (max-width: 600px) {
  .work-copy {
    flex: 0 0 30%;
    width: 30%;
    min-width: 0;
    padding-right: 8px;
  }

  .work-copy,
  .work-copy * {
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
  }
}

/* BASKIN-ROBBINS × IF — MOBILE ONLY */
@media (max-width: 600px) {
  #project-root[data-project="baskin-if"] .work-scroll > .work-copy {
    flex: 0 0 42% !important;
    width: 42% !important;
    min-width: 0;
    padding-right: 12px;
    /* background: #ffffcc !important; */
  }
}

/* MOBILE: Swipe homepage covers */
@media (max-width: 600px) {
  #projects .project-card .cover {
    touch-action: pan-y;
    user-select: none;
    -webkit-user-drag: none;
  }
}

@media (max-width: 600px) {
  .project-card .cover {
    width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: 4 / 5;
    object-fit: cover;
  }

  /* Fanta: portrait */
  .project-card:nth-child(3) .cover {
    aspect-ratio: 3 / 4;
  }

  /* Baskin-Robbins: landscape */
  .project-card:nth-child(4) .cover {
    aspect-ratio: 16 / 9;
  }
}

/* @media (max-width: 600px) {
  body.is-baskin .work-scroll > .work-copy {
    flex: 0 0 45%;
    width: 45%;
    padding-right: 12px;
  }
} */

/* PROJECT GALLERY — SUBTLE HOVER PUSH */

/* .work-scroll img.media-item,
.work-scroll video.media-item,
.staggered-row img.media-item,
.staggered-row video.media-item {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

@media (hover: hover) {
  .work-scroll img.media-item:hover,
  .work-scroll video.media-item:hover,
  .staggered-row img.media-item:hover,
  .staggered-row video.media-item:hover {
    transform: translate(8px, -6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .work-scroll img.media-item,
  .work-scroll video.media-item,
  .staggered-row img.media-item,
  .staggered-row video.media-item {
    transition: none;
    transform: none;
  }
} */
/* changed fieldset */

/* CUSTOM CURSOR SYMBOL TRAIL */

.cursor-sparkles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 9998;
}

.cursor-sparkle {
  position: absolute;
  left: 0;
  top: 0;
  font-family: "Xanh Mono", monospace;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  will-change: transform, opacity;
}

@media (hover: none), (pointer: coarse) {
  .cursor-sparkles {
    display: none;
  }
}

.gallery-cursor {
  position: fixed;
  pointer-events: none !important;
  z-index: 99999;
  transform: translate(-50%, -50%);
}

.gallery-cursor {
  pointer-events: none !important;
  z-index: 99999;
  transition: none !important;
}

.gallery-cursor {
  pointer-events: none !important;
  transition: none !important;
}

@media (hover: hover) and (pointer: fine) {
  html,
  body,
  body * {
    cursor: none !important;
  }

  .work-scroll,
  .work-scroll *,
  .staggered-row-scroll,
  .staggered-row-scroll * {
    cursor: none !important;
  }

  .work-scroll iframe {
    pointer-events: none;
  }
}

/* ========================================
   ANIMATED BUTTERFLY GIF CURSOR
   ======================================== */

#gif-cursor {
  position: fixed;
  top: 0;
  left: 0;

  width: 40px;
  height: 40px;
  object-fit: contain;

  pointer-events: none;
  user-select: none;
  z-index: 999999;

  opacity: 0;
  transform: translate(-50%, -50%);
  will-change: transform;
}

/* Hide default cursor on desktop */

@media (hover: hover) and (pointer: fine) {
  html,
  body,
  body * {
    cursor: none !important;
  }

  /* Keep custom gallery cursor */
  .work-scroll,
  .work-scroll *,
  .staggered-row-scroll,
  .staggered-row-scroll * {
    cursor: none !important;
  }
}

/* Hide butterfly when hovering galleries */

body:has(.work-scroll:hover) #gif-cursor,
body:has(.staggered-row-scroll:hover) #gif-cursor {
  opacity: 0 !important;
}

/* Hide GIF cursor on mobile */

@media (hover: none), (pointer: coarse) {
  #gif-cursor {
    display: none;
  }
}

/* help */

/* Thicken Xanh Mono heading and individual letters */
/* .about-heading,
.about-heading .letter,
.about-contact h2,
.about-contact h2 .letter,
.about-extra h2,
.about-extra h2 .letter {
  -webkit-text-stroke: 0.7px red !important;
} */

/* .about-heading {
  color: red !important;
  outline: 2px solid red !important;
} */

/* Xanh Mono — thicker text, including JS-generated letters */
:root {
  --xanh-stroke: 0.015em;
}

:is(
  .card-caption,
  .project-heading,
  .project-brand,
  .about-heading,
  .about-contact h2,
  .about-extra h2,
  .work-copy h2,
  .site-header,
  .project-navigation,
  .project-links h2
),
:is(
    .card-caption,
    .project-heading,
    .project-brand,
    .about-heading,
    .about-contact h2,
    .about-extra h2,
    .work-copy h2,
    .project-navigation,
    .project-links h2
  )
  * {
  -webkit-text-stroke: var(--xanh-stroke) currentColor !important;
  paint-order: stroke fill;
}

/* TEST: JavaScript-generated text */
.interactive-text,
.interactive-text *,
.letter,
.interactive-letter {
  -webkit-text-stroke: 0.015em currentColor !important;
  paint-order: stroke fill;
}
