*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --black: #0d0d0d;
  --white: #f5f3ef;
  --orange: #e84d1c;
  --text: #1a1a1a;
  --muted: #888;
  --border: #ddd;
  --card-green: #2d4a3e;
}
div,
p,
span,
a,
section,
blockquote {
  z-index: 10;
}
html {
  scroll-behavior: smooth;
  cursor: none;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--text);
  overflow-x: hidden;
}

/* PRELOADER */
html.preloading,
html.preloading body {
  overflow: hidden;
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  transition: transform 0.6s ease;
}

.preloader video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preloader--done {
  transform: translateY(-100%);
}

/* NAV */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 40px;
  background: rgba(245, 243, 239, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.nav-brand {
  /* position + a z-index above .nav-links (150) is required - without it
     this link is static/lower and gets painted under the fixed mobile
     nav-links overlay (a positioned sibling with its own z-index), hiding
     the logo whenever the mobile menu is open */
  position: relative;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text);
  text-decoration: none;
}

.nav-brand img {
  height: 22px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--orange);
}

.nav-links .cta a {
  background: var(--black);
  color: var(--white);
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  transition: background 0.2s;
}
.nav-links .cta a:hover {
  background: var(--orange);
  color: #fff;
}

.lang-toggle {
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.lang-toggle:hover {
  color: var(--orange);
}

.nav-toggle {
  /* position is required for z-index to apply (see .nav-brand comment) */
  position: relative;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 200;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--black);
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* HERO */
.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding-bottom: 60px;
}

/* dedicated clip box for the orb - overflow:hidden on .hero itself would
   also clip the fixed-position ghost name inside .fixedHero */
.hero-orb-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  top: -80px;
  left: -120px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 40% 40%,
    #f5a623 0%,
    #e84d1c 35%,
    #c0392b 55%,
    #8e44ad 75%,
    rgba(100, 60, 180, 0.2) 100%
  );
  filter: blur(60px);
  opacity: 0.85;
  animation: orbFloat 8s ease-in-out infinite alternate;
}

@keyframes orbFloat {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(30px, 40px) scale(1.06);
  }
}

.hero-tagline {
  position: absolute;
  top: 120px;
  right: 40px;
  max-width: 280px;
  text-align: right;
  opacity: 0;
  animation: fadeUp 0.8s 0.4s forwards;
}

.hero-tagline p {
  font-size: 12px;
  line-height: 1.7;
  color: #444;
  margin-bottom: 20px;
}

.hero-tagline .arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--text);
  padding: 8px 16px;
  border-radius: 100px;
  transition:
    background 0.2s,
    color 0.2s;
}
.hero-tagline .arrow-link:hover {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.hero-title {
  position: relative;
  z-index: 2;
  padding: 0 20px;
  width: 100%;
  opacity: 0;
  animation: fadeUp 0.9s 0.2s forwards;
}

.hero-title h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(80px, 15vw, 200px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--black);
}

.hero-title h1 span {
  color: var(--orange);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* SECTION SHARED */
section {
  padding: 100px 40px;
}
.section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 40px;
}

/* PROJECTS */
.projects {
  /* position is required for the section's z-index (set globally on
     `section`) to actually apply - without it the section stays static
     and paints behind .hero's positioned stacking context, letting the
     fixed ghost name show through on top of the project thumbnails */
  position: relative;
}

.projects h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 32px;
  font-weight: 400;
  margin-bottom: 40px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.project-card {
  cursor: pointer;
}

.project-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 14px;
  background: #e8e4de;
  position: relative;
}

.project-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s;
}

.project-card:hover .project-thumb::after {
  background: rgba(0, 0, 0, 0.1);
}

/* placeholder visuals for project images */
.project-thumb.p1 {
  background: linear-gradient(135deg, #f0ede8 0%, #d4cfc8 100%);
}
.project-thumb.p2 {
  background: linear-gradient(135deg, #e8e4de 0%, #c8c3bc 100%);
}
.project-thumb.p3 {
  background: linear-gradient(135deg, #dce8f0 0%, #b8d0e0 100%);
}
.project-thumb.p4 {
  background: linear-gradient(135deg, #e0e8dc 0%, #b8ceb4 100%);
}

.project-thumb svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.5;
  width: 60px;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.project-card:hover .project-thumb img {
  transform: scale(1.05);
}

.project-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
}

.project-name .arrow {
  font-size: 12px;
  color: var(--muted);
  transition: transform 0.2s;
}

.project-card:hover .project-name .arrow {
  transform: translate(3px, -3px);
}

/* PHILOSOPHY */
.philosophy {
  /* position is required for z-index to apply, see .projects comment above */
  position: relative;
  z-index: 10;
  text-align: center;
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.philosophy h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  font-weight: 400;
  margin-bottom: 40px;
}

.pac-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
  color: var(--muted);
}

.pac-divider span {
  width: 40px;
  height: 1px;
  background: var(--muted);
  display: block;
}

.philosophy blockquote {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 400;
  line-height: 1.3;
  max-width: 560px;
  margin: 0 auto;
  color: var(--text);
  font-style: italic;
}

/* CARDS */
.cards-row {
  /* position is required for z-index to apply, see .projects comment above */
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 40px;
}

.service-card {
  border-radius: 12px;
  padding: 40px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s;
}

.service-card:hover {
  transform: translateY(-4px);
}

.card-green {
  background: var(--card-green);
  color: #fff;
}

.card-gradient {
  background: linear-gradient(135deg, #c8b8f0 0%, #e8a8b8 50%, #f0c8a0 100%);
  color: #222;
}

.card-gradient::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 60%, rgba(200, 100, 150, 0.6), transparent 60%);
  mix-blend-mode: multiply;
}

.service-card h3 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 400;
  line-height: 1.1;
  position: relative;
  z-index: 1;
}

.service-card p {
  font-size: 12px;
  line-height: 1.7;
  opacity: 0.75;
  max-width: 340px;
  position: relative;
  z-index: 1;
  margin-top: 16px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
  position: relative;
  z-index: 1;
}

.btn-outline {
  height: fit-content;
  width: fit-content;
  font-size: 11px;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.2s,
    color 0.2s;
}

.card-green .btn-outline:hover {
  background: rgba(255, 255, 255, 0.2);
}

.card-gradient .btn-outline:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* INFO */
.info-section {
  /* position is required for z-index to apply, see .projects comment above */
  position: relative;
  padding: 100px 40px;
  border-top: 1px solid var(--border);
}

.info-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.info-bio p {
  font-size: 15px;
  line-height: 1.75;
  color: #333;
  max-width: 460px;
}

.download-cv {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.download-cv:hover {
  color: var(--orange);
}

.download-cv .line {
  width: 32px;
  height: 1px;
  background: currentColor;
}

.info-right h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 72px;
  font-weight: 400;
  line-height: 1;
  color: var(--black);
  text-align: right;
  margin-bottom: 48px;
}

/* skills/experience table */
.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.info-table tr {
  border-top: 1px solid var(--border);
}

.info-table td {
  padding: 14px 0;
  vertical-align: top;
}

.info-table td:first-child {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  width: 120px;
  padding-right: 20px;
  padding-top: 16px;
}

.skills-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 20px;
}

.skills-cols span {
  font-size: 12px;
  color: #444;
  line-height: 1.8;
}

.work-entry {
  margin-bottom: 18px;
}

.work-entry:last-child {
  margin-bottom: 0;
}

.work-entry .role {
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}

.work-entry .company {
  color: var(--muted);
  margin-bottom: 4px;
  font-size: 11px;
}

.work-entry .desc {
  color: #555;
  line-height: 1.6;
}

/* FOOTER HERO */
.footer-hero {
  padding: 80px 20px 40px;
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border);
}

.footer-orb {
  position: absolute;
  bottom: -100px;
  right: -100px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, #f5a623 0%, #e84d1c 40%, #8e44ad 70%, transparent 100%);
  filter: blur(70px);
  opacity: 0.6;
}

.footer-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(60px, 13vw, 180px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--black);
  position: relative;
  z-index: 1;
}

.footer-title span {
  color: var(--orange);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 40px 40px 30px;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.footer-cta-text {
  font-size: 13px;
  /* var(--muted) is #888, 3.19:1 on this background - fails WCAG AA for
     normal-size text (needs 4.5:1); darkened just for this instance */
  color: #6b6b6b;
}

.footer-cta-link {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: color 0.2s;
}

.footer-cta-link:hover {
  color: var(--orange);
}

.footer-meta {
  font-size: 10px;
  color: var(--muted);
  text-align: right;
  line-height: 1.8;
}

/* SCROLL REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* CURSOR */
.cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--orange);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.15s ease;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.8);
}

.cursor-ring {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(232, 77, 28, 0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transition: all 0.25s ease;
}

@media (max-width: 768px) {
  /* cover on a narrow/tall viewport zooms the wide (1280x800) logo animation
     until it fills the height, blowing it up and cropping the sides -
     contain keeps the whole mark visible instead */
  .preloader video {
    object-fit: contain;
    width: 70%;
    height: 70%;
  }

  nav {
    padding: 14px 20px;
  }
  section {
    padding: 60px 20px;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .cards-row {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  .card-actions {
    gap: 3px;
  }
  .info-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .info-right h2 {
    text-align: left;
    font-size: 48px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }
  .footer-meta {
    text-align: left;
  }

  html {
    cursor: auto;
  }
  .cursor,
  .cursor-ring {
    display: none !important;
  }

  /* stack tagline above the name instead of an absolute overlay -
       avoids overlap on short viewports and reads better on a narrow column.
       height is capped (not min-height) and content centered so the block
       never gets shoved to the bottom leaving dead space up top. */
  .hero {
    height: 100dvh;
    min-height: unset;
    flex-direction: column;
    justify-content: space-around;
    padding: 80px 0 50px;
  }

  .hero-orb {
    width: 340px;
    height: 340px;
    top: -60px;
    left: auto;
    right: -100px;
  }

  .hero-tagline {
    position: static;
    max-width: 90%;
    text-align: right;
    padding: 0 20px;
  }

  /* clamp() min-widths were tuned for desktop and overflow narrow phones */
  .hero-title h1,
  .fixedHero p {
    font-size: clamp(44px, 16vw, 110px);
    line-height: 1;
  }
  .footer-title {
    font-size: clamp(36px, 14vw, 90px);
  }

  /* at 500px the orb's bright core sits directly behind the orange "Diaz"
     span on narrow screens, washing it out - shrink and push it further
     into the corner so the name stays readable */
  .footer-orb {
    width: 260px;
    height: 260px;
    bottom: -80px;
    right: -80px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 0;
    background: var(--white);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 36px;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    z-index: 150;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 24px;
  }

  /* the language toggle is a secondary action, not a nav destination -
     without this it inherits the same 24px/dark styling as Projects/Info
     and reads as just another nav link instead of a distinct toggle */
  .nav-links .lang-toggle {
    font-size: 14px;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 6px 18px;
  }

  .nav-links .cta a {
    font-size: 18px;
    padding: 12px 26px;
  }

  body.nav-open {
    overflow: hidden;
  }
}

.fixedHero {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  padding: 0 20px;
  z-index: -100;
}

.fixedHero p {
  position: fixed;
  opacity: 0.3;
  z-index: -1;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(80px, 15vw, 200px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 2px var(--black);
}
.fixedHero p span {
  color: transparent;
  -webkit-text-stroke: 2px var(--orange);
}

#tt {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translateY(6px) scale(0.97);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}
#tt.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.tt-inner {
  background: #0d0d0d;
  color: #f5f3ef;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 8px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tt-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e84d1c;
  flex-shrink: 0;
}
.tt-copy {
  font-size: 11px;
  color: rgba(245, 243, 239, 0.45);
  padding-left: 6px;
  border-left: 1px solid rgba(245, 243, 239, 0.15);
}
.tt-arrow {
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 6px;
  overflow: hidden;
}
.tt-arrow::before {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  background: #0d0d0d;
  transform: rotate(45deg);
  margin-top: -5px;
}

/* PROJECT MODAL */
.modal-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 74px 20px 40px;
  background: rgba(13, 13, 13, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 500;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

body.modal-open {
  overflow: hidden;
}

.project-modal {
  background: var(--white);
  width: min(936px, 100%);
  max-height: min(90vh, calc(100vh - 114px));
  overflow-y: auto;
  border-radius: 16px;
  position: relative;
  transform: scale(0.96);
  transition: transform 0.25s ease;
}

.modal-backdrop.open .project-modal {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 20;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-gallery {
  position: relative;
  aspect-ratio: 936 / 416;
  margin: 20px 20px 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  transition: aspect-ratio 0.3s ease;
}

.modal-gallery-track {
  display: flex;
  height: 100%;
  transition: transform 0.35s ease;
}

.modal-gallery-slide {
  flex: 0 0 100%;
  height: 100%;
}
.modal-gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--white);
  display: block;
}

.modal-gallery-slide.p1 {
  background: linear-gradient(135deg, #f0ede8 0%, #d4cfc8 100%);
}
.modal-gallery-slide.p2 {
  background: linear-gradient(135deg, #e8e4de 0%, #c8c3bc 100%);
}
.modal-gallery-slide.p3 {
  background: linear-gradient(135deg, #dce8f0 0%, #b8d0e0 100%);
}
.modal-gallery-slide.p4 {
  background: linear-gradient(135deg, #e0e8dc 0%, #b8ceb4 100%);
}

.modal-gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.modal-gallery:hover .modal-gallery-arrow {
  opacity: 1;
}
.modal-gallery-arrow.prev {
  left: 16px;
}
.modal-gallery-arrow.next {
  right: 16px;
}

.modal-gallery-dots {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.modal-gallery-dots button {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 0;
}

.modal-gallery-dots button[aria-current='true'] {
  background: var(--white);
}

.modal-title-card {
  background: var(--white);
  margin: -20px 20px 0;
  padding: 50px 24px 20px 24px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 1;
}

.modal-title-card h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  font-weight: 400;
  margin-bottom: 10px;
}

.modal-tagline {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 16px;
}

.modal-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-stack span {
  font-size: 11px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.modal-body {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  padding: 28px 24px 32px;
}

.modal-description h4,
.modal-secondary h4 {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.modal-description p {
  font-size: 14px;
  line-height: 1.7;
  color: #333;
}

.modal-links {
  display: flex;
  flex-direction: row;
  gap: 10px;
}

.modal-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--text);
  padding: 10px 16px;
  border-radius: 100px;
  width: fit-content;
  transition:
    background 0.2s,
    color 0.2s;
}

.modal-links a:hover {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.modal-challenges p {
  font-size: 13px;
  line-height: 1.7;
  color: #333;
}

@media (max-width: 768px) {
  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }
  .project-modal {
    width: 100%;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
  }
  .modal-gallery {
    margin: 16px 16px 0;
  }
  .modal-gallery-arrow {
    opacity: 1;
  }
  .modal-title-card {
    margin: -18px 16px 0;
    padding: 16px 18px;
  }
  .modal-body {
    grid-template-columns: 1fr;
    padding: 24px 18px 28px;
    gap: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal-backdrop,
  .project-modal,
  .modal-gallery-track {
    transition: none;
  }
}
