@font-face {
  font-family: "Cabinet Grotesk";
  src: url("assets/fonts/cabinet/CabinetGrotesk-Thin.woff2") format("woff2"),
       url("assets/fonts/cabinet/CabinetGrotesk-Thin.woff") format("woff");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cabinet Grotesk";
  src: url("assets/fonts/cabinet/CabinetGrotesk-Extralight.woff2") format("woff2"),
       url("assets/fonts/cabinet/CabinetGrotesk-Extralight.woff") format("woff");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cabinet Grotesk";
  src: url("assets/fonts/cabinet/CabinetGrotesk-Light.woff2") format("woff2"),
       url("assets/fonts/cabinet/CabinetGrotesk-Light.woff") format("woff");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cabinet Grotesk";
  src: url("assets/fonts/cabinet/CabinetGrotesk-Regular.woff2") format("woff2"),
       url("assets/fonts/cabinet/CabinetGrotesk-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cabinet Grotesk";
  src: url("assets/fonts/cabinet/CabinetGrotesk-Medium.woff2") format("woff2"),
       url("assets/fonts/cabinet/CabinetGrotesk-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cabinet Grotesk";
  src: url("assets/fonts/cabinet/CabinetGrotesk-Bold.woff2") format("woff2"),
       url("assets/fonts/cabinet/CabinetGrotesk-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cabinet Grotesk";
  src: url("assets/fonts/cabinet/CabinetGrotesk-Extrabold.woff2") format("woff2"),
       url("assets/fonts/cabinet/CabinetGrotesk-Extrabold.woff") format("woff");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cabinet Grotesk";
  src: url("assets/fonts/cabinet/CabinetGrotesk-Black.woff2") format("woff2"),
       url("assets/fonts/cabinet/CabinetGrotesk-Black.woff") format("woff");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f5f5f3;
  --text: #1a1a2e;
  --muted: #5a5a6e;
  --line: rgba(26, 26, 46, 0.1);
  --accent: #0135fb;
  --accent-soft: rgba(1, 53, 251, 0.12);
  --green: #b7ff4a;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: "Cabinet Grotesk", sans-serif;
  font-weight: 300;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  max-width: 100%;
}

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

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

.page-shell {
  width: min(calc(100% - 3rem), var(--max-width));
  margin: 0 auto;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2.5rem;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background 300ms ease, backdrop-filter 300ms ease;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.brand-logo {
  display: block;
  width: auto;
  height: 36px;
  object-fit: contain;
}

.header-nav-group {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.site-nav a {
  position: relative;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  transition: color 300ms ease, letter-spacing 300ms ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.site-nav a:hover {
  letter-spacing: 0.06em;
  color: #f75a4b;
}

.site-nav a:hover::after {
  transform: scaleX(1);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 1.35rem;
  border-radius: 999px;
  background: #1a1a2e;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  transition:
    transform 300ms cubic-bezier(0.22, 1, 0.36, 1),
    background 300ms ease;
}

.nav-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #1a1a2e;
  color: #fff;
  transition:
    transform 300ms cubic-bezier(0.22, 1, 0.36, 1),
    background 300ms ease;
}

.nav-cta:hover .nav-contact,
.nav-cta:hover .nav-arrow {
  background: #f75a4b;
}

.nav-arrow:hover {
  transform: rotate(45deg);
}

.brand {
  transition: transform 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.brand:hover {
  transform: scale(1.04);
}

/* Full-bleed breakout from .page-shell (do not use max-width: 100% — it kills 100vw) */
.hero,
.about-panel {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5.5rem 0 1.25rem;
}

.hero-bands {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  margin: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(40px);
  animation: heroEnter 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

.hero-band-row {
  display: flex;
  gap: 0.5em;
  white-space: nowrap;
  animation: marquee-left 20s linear infinite;
}

.hero-band-row-reverse {
  animation: marquee-right 20s linear infinite;
}

.hero-band {
  margin: 0;
  font-family: "Cabinet Grotesk", sans-serif;
  font-weight: 800;
  font-size: clamp(3.2rem, 14vw, 10rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: #f75a4b;
  flex-shrink: 0;
}

.hero-portrait {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(160px, 24vw, 300px);
  margin: 0;
  z-index: 2;
  overflow: hidden;
  opacity: 0;
  animation: portraitEnter 1s cubic-bezier(0.22, 1, 0.36, 1) 0.45s forwards;
}

.hero-portrait img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  filter: grayscale(1) contrast(1.1);
  transition: transform 800ms cubic-bezier(0.22, 1, 0.36, 1), filter 500ms ease;
}

.hero-portrait:hover img {
  transform: scale(1.05);
  filter: grayscale(0.4) contrast(1.05);
}

.hero-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
  margin: 1.25rem 0 0;
  padding: 1.1rem 2.5rem 0;
  box-sizing: border-box;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px solid var(--line);
  opacity: 0;
  animation: fadeUp 0.8s ease 0.8s forwards;
}

.hero-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulseDot 2s ease-in-out infinite;
}

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

@keyframes portraitEnter {
  from {
    opacity: 0;
    transform: translate(-50%, -40%) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

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

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(183, 255, 74, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(183, 255, 74, 0); }
}

@keyframes marquee-left {
  from { transform: translateX(0); }
  to { transform: translateX(-25%); }
}

@keyframes marquee-right {
  from { transform: translateX(-25%); }
  to { transform: translateX(0); }
}

/* Sections */
.section {
  padding: 6rem 0;
  border-top: 1px solid var(--line);
}

.section-label {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 2rem;
}

.section-title {
  margin: 0 0 2rem;
  font-family: "Cabinet Grotesk", sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #f75a4b;
}

/* About */
.about-panel {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 7rem 1.5rem 4rem;
  background: #141414;
  color: #f4f4f4;
  border-top: 0;
}

.about-panel-inner {
  width: min(100%, 980px);
  text-align: center;
}

.about-headline {
  margin: 0 auto 1.75rem;
  max-width: 28ch;
  font-family: "Cabinet Grotesk", sans-serif;
  font-size: clamp(1.8rem, 4.2vw, 3.4rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: #fff;
}

.about-sub {
  margin: 0 auto 2.5rem;
  max-width: 52ch;
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
}

.about-cta {
  display: inline-flex;
}

/* Split button — pill + arrow circle */
.btn-group {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 1.5rem;
  border-radius: 999px;
  background: var(--green);
  color: #141414;
  font-family: "Cabinet Grotesk", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  transition:
    transform 300ms cubic-bezier(0.22, 1, 0.36, 1),
    background 300ms ease;
}

.btn-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--green);
  color: #141414;
  transition:
    transform 300ms cubic-bezier(0.22, 1, 0.36, 1),
    background 300ms ease;
}

.btn-group:hover .btn-pill,
.btn-group:hover .btn-circle {
  background: #d4ff6a;
}

.btn-circle:hover {
  transform: rotate(45deg);
}

.btn-group:hover .btn-pill {
  transform: translateX(-2px);
}

.about-panel-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 0 2.5rem;
  box-sizing: border-box;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
}

.about-panel-footer a {
  transition: color 250ms ease;
}

.about-panel-footer a:hover {
  color: var(--green);
}

@media (max-width: 768px) {
  .about-headline {
    max-width: none;
  }

  .about-panel-footer {
    padding: 0 1rem;
    gap: 0.75rem;
  }
}

/* Work */
.work-title {
  margin: 0;
  font-family: "Cabinet Grotesk", sans-serif;
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-align: center;
  color: #f75a4b;
}

.work-subtitle {
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1rem 0 4rem;
}

.work-list {
  display: grid;
  gap: 6rem;
}

.work-item {
  display: grid;
  gap: 1.5rem;
  transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.work-item:hover {
  transform: translateY(-6px);
}

.work-item-meta {
  display: flex;
  gap: 2rem;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 300ms ease;
}

.work-item:hover .work-item-meta {
  color: #f75a4b;
}

.work-item-title {
  margin: 0;
  font-family: "Cabinet Grotesk", sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #f75a4b;
}

.work-item-desc {
  margin: 0;
  max-width: 600px;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
}

.work-item-media {
  overflow: hidden;
  margin-top: 0.5rem;
}

.work-item-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.work-item:hover .work-item-media img {
  transform: scale(1.04);
}

.work-cta {
  text-align: center;
  margin-top: 4rem;
}

.contact-cta {
  margin-top: 2rem;
}

/* Expertise */
.expertise {
  padding-left: 0;
  padding-right: 0;
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.expertise-card {
  position: relative;
  display: grid;
  gap: 1.1rem;
  align-content: start;
  padding: 1.75rem 1.4rem 2rem;
  border-right: 1px solid var(--line);
  min-height: 300px;
  transition: background 300ms ease;
}

.expertise-card:nth-child(3n) {
  border-right: 0;
}

.expertise-card:nth-child(-n+3) {
  border-bottom: 1px solid var(--line);
}

.expertise-card:hover {
  background: rgba(255, 255, 255, 0.45);
}

.expertise-index {
  position: absolute;
  top: 1.4rem;
  right: 1.2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.expertise-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green);
  color: #141414;
}

.expertise-card h3 {
  margin: 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  font-family: "Cabinet Grotesk", sans-serif;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.expertise-card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--muted);
}

/* Contact */
.contact-intro {
  margin: 0 0 2rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 500px;
}

.contact-links {
  display: grid;
  gap: 1rem;
}

.contact-links a {
  position: relative;
  width: fit-content;
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  transition: color 300ms ease, letter-spacing 400ms cubic-bezier(0.22, 1, 0.36, 1), transform 400ms ease;
}

.contact-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: #f75a4b;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

.contact-links a:hover {
  color: #f75a4b;
  letter-spacing: 0.01em;
  transform: translateX(6px);
}

.contact-links a:hover::after {
  transform: scaleX(1);
}

.contact-social {
  margin-top: 2rem;
  display: flex;
  gap: 1.5rem;
}

.contact-social a {
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 200ms;
}

.contact-social a:hover {
  opacity: 0.5;
}

/* Footer */
.site-footer {
  display: flex;
  justify-content: space-between;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .hero-band-row,
  .hero-bands,
  .hero-portrait,
  .hero-footer,
  .work-item,
  .portfolio-card,
  .expertise-card {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
  }

  /* Never force the closed project overlay visible */
  .project-modal.is-open .project-modal-title,
  .project-modal.is-open .project-modal-meta,
  .project-modal.is-open .project-modal-body,
  .project-modal.is-open .project-modal-gallery {
    animation: none !important;
  }

  .status-dot {
    animation: none !important;
  }
}

/* Responsive */
@media (max-width: 1100px) {
  .expertise-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .expertise-card:nth-child(3n) {
    border-right: 1px solid var(--line);
  }

  .expertise-card:nth-child(-n+3) {
    border-bottom: 1px solid var(--line);
  }

  .expertise-card:nth-child(2n) {
    border-right: 0;
  }

  .expertise-card:nth-child(-n+4) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 900px) {
  .project-modal-body {
    grid-template-columns: 1fr;
  }

  .project-modal-desc {
    grid-column: 1;
  }

  .project-modal-meta {
    flex-wrap: wrap;
    gap: 1.25rem;
  }
}

@media (max-width: 768px) {
  .page-shell {
    width: min(calc(100% - 1.5rem), var(--max-width));
  }

  /* Keep true full-bleed on mobile too */
  .hero,
  .about-panel {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }

  .hero-bands {
    width: 100%;
    opacity: 1;
    transform: none;
    animation: none;
  }

  .hero-portrait,
  .hero-footer {
    opacity: 1;
    animation: none;
  }

  .hero-portrait {
    transform: translate(-50%, -50%);
  }

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

  .site-header {
    padding: 0.85rem 1rem;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .brand-logo {
    height: 28px;
  }

  .header-nav-group {
    gap: 0.65rem;
    margin-left: auto;
  }

  .site-nav {
    display: none;
  }

  .nav-contact {
    min-height: 34px;
    padding: 0 0.9rem;
    font-size: 0.75rem;
  }

  .nav-arrow {
    width: 34px;
    height: 34px;
  }

  .hero {
    min-height: 100svh;
    padding: 4.5rem 0 1rem;
  }

  .hero-band {
    font-size: clamp(2.2rem, 12vw, 3.6rem);
  }

  .hero-portrait {
    width: clamp(110px, 32vw, 160px);
  }

  .hero-footer {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.55rem 0.75rem;
    padding: 1rem 1rem 0;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
  }

  .about-panel {
    padding: 5.5rem 1rem 5rem;
  }

  .section {
    padding: 3.25rem 0;
  }

  .expertise-grid {
    grid-template-columns: 1fr;
  }

  .expertise-card,
  .expertise-card:nth-child(2n),
  .expertise-card:nth-child(3n),
  .expertise-card:nth-child(-n+3),
  .expertise-card:nth-child(-n+4) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .expertise-card {
    min-height: 0;
    padding: 1.4rem 1rem 1.5rem;
  }

  .expertise-card:last-child {
    border-bottom: 0;
  }

  .work-item-meta {
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
  }

  .contact-links a {
    font-size: clamp(1.15rem, 6vw, 1.6rem);
  }

  .site-footer {
    flex-direction: column;
    gap: 0.5rem;
  }

  .project-modal-inner {
    width: min(calc(100% - 1.5rem), var(--max-width));
    padding: 1.25rem 0 3rem;
  }

  .project-modal-hero {
    padding: 1.25rem 0 0.85rem;
  }

  .project-modal-title {
    font-size: clamp(2rem, 11vw, 3.2rem);
  }

  .portfolio-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .header-nav-group .site-nav {
    display: none;
  }

  .about-headline {
    font-size: clamp(1.45rem, 7vw, 2rem);
  }

  .btn-pill {
    min-height: 42px;
    padding: 0 1.2rem;
    font-size: 0.85rem;
  }

  .btn-circle {
    width: 42px;
    height: 42px;
  }
}

/* Project Modal — must stay fully hidden until .is-open (iOS Reduce Motion used to force opacity:1) */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  background: var(--bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.project-modal.is-open {
  display: block;
}

.project-modal-inner {
  width: min(calc(100% - 3rem), var(--max-width));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.project-modal.is-open .project-modal-title,
.project-modal.is-open .project-modal-meta,
.project-modal.is-open .project-modal-body,
.project-modal.is-open .project-modal-gallery {
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.project-modal.is-open .project-modal-meta {
  animation-delay: 0.08s;
}

.project-modal.is-open .project-modal-body {
  animation-delay: 0.16s;
}

.project-modal.is-open .project-modal-gallery {
  animation-delay: 0.24s;
}

.project-modal-close {
  position: sticky;
  top: 1.5rem;
  z-index: 10;
  background: none;
  border: none;
  font-family: "Cabinet Grotesk", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  padding: 0.5rem 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 200ms;
}

.project-modal-close:hover {
  opacity: 0.5;
}

.project-modal-hero {
  min-height: 0;
  display: block;
  padding: 2.5rem 0 1.25rem;
}

.project-modal-title {
  margin: 0;
  font-family: "Cabinet Grotesk", sans-serif;
  font-size: clamp(2.4rem, 8vw, 5.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: #f75a4b;
  width: 100%;
}

.project-modal-meta {
  display: flex;
  gap: 3rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.project-modal-meta-item {
  display: grid;
  gap: 0.35rem;
}

.project-modal-meta-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-modal-meta-value {
  font-size: 0.95rem;
  font-weight: 400;
}

.project-modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 3rem 0;
}

.project-modal-desc {
  grid-column: 2;
  margin: 0;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--muted);
}

.project-modal-gallery {
  display: grid;
  gap: 2rem;
  padding-bottom: 4rem;
}

.project-modal-gallery img {
  width: 100%;
  display: block;
}

.project-modal-next {
  padding: 3rem 0;
  border-top: 1px solid var(--line);
}

.project-modal-next a {
  display: grid;
  gap: 0.5rem;
  text-decoration: none;
  transition: opacity 200ms;
}

.project-modal-next a:hover {
  opacity: 0.6;
}

.project-modal-next-label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-modal-next-title {
  font-family: "Cabinet Grotesk", sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text);
}

.project-modal-next-info {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Make work items clickable */
.work-item[data-project] {
  cursor: pointer;
}

.portfolio-page {
  padding-top: 7rem;
}

.portfolio-groups {
  display: grid;
  gap: 3rem;
}

.portfolio-group-title {
  margin: 0 0 1.25rem;
  color: #f75a4b;
  font-family: "Cabinet Grotesk", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.portfolio-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.portfolio-card {
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.35);
  transition:
    transform 500ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 300ms ease,
    box-shadow 500ms ease;
}

.portfolio-card:hover {
  transform: translateY(-8px);
  border-color: rgba(247, 90, 75, 0.4);
  box-shadow: 0 20px 40px rgba(26, 26, 46, 0.08);
}

.portfolio-card-media {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #101014;
}

.portfolio-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.portfolio-card:hover .portfolio-card-media img {
  transform: scale(1.06);
}

.portfolio-card-body {
  display: grid;
  gap: 0.75rem;
  padding: 1.1rem 1.15rem 1.25rem;
}

.portfolio-card-body h4 {
  margin: 0;
  font-family: "Cabinet Grotesk", sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.portfolio-card-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.92rem;
}

.portfolio-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.portfolio-card-tags li {
  padding: 0.35rem 0.65rem;
  background: rgba(247, 90, 75, 0.12);
  color: #f75a4b;
  font-size: 0.78rem;
}

@media (max-width: 768px) {
  .project-modal-body {
    grid-template-columns: 1fr;
  }

  .project-modal-desc {
    grid-column: 1;
  }

  .project-modal-meta {
    flex-wrap: wrap;
    gap: 1.5rem;
  }
}
