/* =====================================================
   PORTFOLIO (layout layer only)
   Depends on global styles.css variables
===================================================== */
/* =====================================================
   VARIABLES
===================================================== */
:root {
  --midnight: #1a1a2e;
  --champagne: #c9a86c;
  --champagne_light: #ebe0c3;
  --olive: #4a5d23;
  --bg-light: #f7f4ef;
  --bg-dark: #282828;
  --bg-light-alt:rgba(20, 18, 16, 0.03);
  --bg-dark-alt: #353535;
  --bg-darker: #1c1c1c;
  --text-light: #191919;
  --text-dark: #f5f3ef;
  --muted-light: #666666;
  --muted-dark: #c4c0ba;
  --card-light:
    rgba(255,255,255,0.78);
  --card-dark:
    rgba(255,255,255,0.02);
  --border-light:
    rgba(201,168,108,0.16);
  --border-dark:
    rgba(201,168,108,0.12);
  --transition:
    260ms ease;
  --radius: 24px;
  --max-width: 1320px;
/* 
--------------------------------------------------------
   SPACING SYSTEM
-------------------------------------------------------- */
--space-1: 0.5rem;
--space-2: 1rem;
--space-3: 1.5rem;
--space-4: 2rem;
--space-5: 3rem;
--space-6: 5rem;
/* semantic spacing */
--section-y: var(--space-6);
--section-y-mobile: var(--space-4);
--content-gap: var(--space-3);
--card-padding: var(--space-5);
--container-padding: var(--space-4);
}
/* 
--------------------------------------------------------
   LIGHT THEME
--------------------------------------------------------
 */
html[data-theme="light"] {
  --bg: var(--bg-light);
  --text: var(--text-light);
  --muted: var(--muted-light);
  --card: var(--card-light);
  --border: var(--border-light);
  --btn-primary-bg: var(--midnight);
  --btn-primary-text: var(--champagne_light);
  --btn-secondary-text: var(--text-light);
  --footer-bg: rgba(0,0,0,0.14);
  --bg-alt: var(--bg-light-alt);
  --bg-tools: var(--champagne_light);
}
/* 
--------------------------------------------------------
   DARK THEME
--------------------------------------------------------
 */
html[data-theme="dark"] {
  --bg: var(--bg-dark);
  --text: var(--text-dark);
  --muted: var(--muted-dark);
  --card: var(--card-dark);
  --border: var(--border-dark);
  --btn-primary-bg: var(--champagne_light);
  --btn-primary-text: var(--bg-dark);
  --btn-secondary-text: var(--champagne_light);
  --footer-bg: rgba(0,0,0,0.5);
  --bg-alt: var(--bg-dark-alt);
 --bg-tools: var(--bg-darker);

}

html {
  scroll-behavior: smooth;
}


/* =====================================================
   2. HEADER & SUBHEADER
===================================================== */
.portfolio-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  backdrop-filter: blur(14px);
  background: rgba(20, 18, 16, 0.72);
  border-bottom: 1px solid var(--border);
}

.portfolio-header .nav {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.portfolio-header .main-logo {
  height: 70px;
  width: auto;
}

/* Subheader (Scroll Reveal) */
.portfolio-subheader {
  position: sticky;
  top: 78px;
  z-index: 900;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.portfolio-subheader.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.portfolio-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 0.8rem 1rem;
}

.portfolio-nav a {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.portfolio-nav a:hover {
  color: var(--champagne);
}

.portfolio-nav a.active {
  color: var(--text);
  position: relative;
}

.portfolio-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--champagne);
  opacity: 0.8;
}

.portfolio-subheader::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 40px;
  height: 100%;
  background: linear-gradient(to right, transparent, var(--bg));
  pointer-events: none;
}

/* =====================================================
   3. HERO SECTION
===================================================== */
.portfolio-hero {
  min-height: 72vh;
  display: flex;
  align-items: center;
  padding: 6rem 0 5rem;
}

.portfolio-hero-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 6rem;
  align-items: start;
}

.portfolio-intro {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.portfolio-intro-line {
  width: 72px;
  height: 1px;
  background: var(--champagne);
  opacity: 0.6;
}

.portfolio-meta {
  font-size: 0.92rem;
  line-height: 1.9;
  color: var(--muted);
  max-width: 28ch;
}

.portfolio-meta.secondary { opacity: 0.82; }
.portfolio-meta.tertiary { opacity: 0.68; font-size: 0.84rem; }

.portfolio-main {
  max-width: 800px;
}

.portfolio-main h1 {
  font-size: clamp(3rem, 6vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
}

.portfolio-description {
  font-size: 1.08rem;
  line-height: 1.9;
  max-width: 62ch;
  color: var(--muted);
}
/* =====================================================
   4. CAPABILITY INDEX & DIVIDERS
===================================================== */
.capability-index {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  padding: 0 var(--space-3) 5rem;
}

.capability-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-decoration: none;
  color: var(--text);
  transition: var(--transition);
  backdrop-filter: blur(10px);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.capability-card:hover {
  transform: translateY(-3px);
  border-color: rgba(201, 168, 108, 0.25);
}

.capability-card span {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.4rem;
}

.section-divider {
  width: min(240px, 28%);
  height: 1px;
  margin: 0 auto;
  background: linear-gradient(to right, transparent, var(--champagne), transparent);
  opacity: 0.35;
}

.section-divider + .use-case {
  margin-top: 7rem;
}



/* =====================================================
   5. PARALLAX SECTIONS (RESTORED)
===================================================== */
.parallax-section {
  height: 25vh;
  background-attachment: fixed;
  background-position: left;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0.5;
  position: relative;
}

.copyright-overlay {
  position: absolute;
  padding: 6px 10px;
  border-radius: 6px;
  bottom: 10px;
  right: 10px;
  background-color: var(--bg);
  opacity: 0.85;
  z-index: 2;
}

.copyright-overlay p {
  margin: 0;
  font-size: 0.7rem;
  color: var(--text);
}

/* Mobile Parallax Fix */
@media (max-width: 900px) {
  .parallax-section {
    background-attachment: scroll; /* Better performance on mobile */
  }
}


/* =====================================================
   SECTIONS
===================================================== */

.portfolio-section {
  padding: 7rem 0;
  scroll-margin-top: 110px; /* accounts for header + subheader */
  background: transparent;
  position: relative;
}
.portfolio-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(240px, 28%);
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--champagne),
    transparent
  );
  opacity: 0.25;
}
/* alternating rhythm */
.portfolio-section:nth-child(odd of .portfolio-section) {
  background: var(--bg-alt)
}

.section-heading {
  margin-bottom: 6rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* divider */
.section-heading::after {
  content: "";
  width: 72px;
  height: 1px;
  margin-top: 1.5rem;
  background: linear-gradient(
    to right,
    transparent,
    var(--champagne),
    transparent
  );
  opacity: 0.6;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 4rem);
  margin-bottom: 1.5rem;
}
.section-heading p {
  color: var(--muted);
  max-width: 65ch;
}

/* Parallax section styles */
.parallax-section {
    height: 25vh;
    background-attachment: fixed;
    background-position: left;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0.5    ;
    position: relative;
}
/* Copyright overlay for parallax sections */
.copyright-overlay {
    position: absolute;
      padding: 6px 10px;
  border-radius: 6px;
  bottom: 10px;
    right: 10px;
    background-color: var(--bg);
    opacity: 0.85;
}
.copyright-overlay p {
    margin: 0;
    font-size: 0.7rem;
    color: var(--text);
}
/* =====================================================
   7. CASE STUDY LAYOUT
===================================================== */

.use-case {
  margin-bottom: 7rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: start;
}
.use-case.reverse-layout {
  grid-template-columns: 0.9fr 1.1fr;
}

.use-case.reverse-layout .use-case-intro {
  order: 2; /* Push content to the right (or bottom on mobile) */
}

.use-case.reverse-layout .evidence-column {
  order: 1; /* Push images to the left (or top on mobile) */
}

/* Ensure Mobile Stacking remains logical (Images on top, then text) */
@media (max-width: 940px) {
  .use-case.reverse-layout .use-case-intro,
  .use-case.reverse-layout .evidence-column {
    order: unset; /* Reset order on mobile */
  }}

.use-case-intro {
  margin-bottom: 3rem;
}
.use-case-meta {
  color: var(--champagne);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.use-case h3 {
  font-size: clamp(1.8rem, 2vw, 2.6rem);
  line-height: 1.25;
padding-block:var(--space-3);
 max-width: 30ch;
}
.use-case p,
.use-case-summary {
  color: var(--muted);
  font-size: 1rem;
  max-width: 70ch;
  padding-block: var(--space-2);
  line-height: 1.9;
}

.use-case-summary {
  margin-bottom: 2rem;
}

/* -----------------------------------------------------
   TAG GROUPS
----------------------------------------------------- */
.tag-group {
  margin-bottom: 1.5rem;
}
.tag-group-label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--champagne);
  margin-bottom: 0.8rem;
}
.tool-tags,
.focus-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.focus-tags span {
  background: var(--btn-primary-bg);
  color: var(--bg);
  border-radius: 8px;
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.tool-tags span {
  background: var(--bg-tools);
  color: var(--btn-primary-bg);
  border-radius: 8px;
  padding: 0.4rem 0.8rem;
  font-size: 0.70rem;
  opacity: 0.88;
}
/* CTA Button */
.case-study-button {
  margin-top: 1rem;
  background: transparent;
  border: 1px solid var(--champagne);
  color: var(--champagne);
  padding: 0.95rem 1.4rem;
  border-radius: 999px;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.case-study-button:hover,
.case-study-button:focus-visible {
  background: var(--champagne);
  color: var(--bg);
  transform: translateY(-2px);
}

/* =====================================================
   8. EVIDENCE GRID & CARDS
===================================================== */
.evidence-column {
  display: flex;
  flex-direction: column;
}

.evidence-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(2, 1fr);
  padding-top: var(--space-6);
  align-items: center;
}

.evidence-grid:has(> :only-child),
.evidence-grid > :only-child {
  grid-template-columns: 1fr;
  margin-left: auto;
  margin-right: auto;
  max-width: 430px;
  width: 100%;
}

.evidence-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  padding: 0;
  aspect-ratio: 4 / 5;
  transition: box-shadow 0.3s ease;
}

.evidence-card.pub-card {
  border-radius: 4px;
  cursor: default;
  aspect-ratio: 3.5 / 5;
}

.evidence-card.photo-card {
  aspect-ratio: 3.5 / 5;
  max-height: 50vh;
  margin-top: -20px;
  width: auto;
}

.horizontal-card {
  aspect-ratio: 5 / 4;
}

.evidence-image-button {
  all: unset;
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.evidence-image-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.45s ease;
}

.evidence-overlay {
  position: absolute;
  left: 0;
  bottom: 1vh;
  width: 100%;
  padding: 0.75rem;
  background: rgba(25, 25, 25, 0.82);
  backdrop-filter: blur(2px);
  color: white;
  display: flex;
  flex-direction: column;
  text-align: left;
  cursor: default;
  pointer-events: none;
}

.evidence-type {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--champagne);
  margin: 0;
}

.evidence-overlay h4 {
  font-size: 0.95rem;
  margin: 0.25rem 0 -1.25rem;
  color: white;
}

.evidence-overlay p {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.evidence-link {
  font-size: 0.8rem;
  color: var(--champagne_light);
  font-weight: normal;
  pointer-events: auto;
  margin-top: 0.5rem;
  text-decoration: none;
}

.evidence-link:hover {
  font-weight: bold;
  text-decoration: underline;
}

.evidence-card:hover img,
.evidence-card:focus-visible img {
  transform: scale(1.03);
  opacity: 0.92;
}

.evidence-more {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  opacity: 0.85;
  margin-top: 1rem;
  text-align: center;
}

.evidence-card:has(.evidence-image-button:focus),
.evidence-card:focus-within {
  overflow: visible !important;
  z-index: 100;
  position: relative;
}

.evidence-image-button:focus img {
  transform: scale(0.98);
  outline: none;
}

/* =====================================================
   9. MODAL SYSTEM
===================================================== */
.case-modal {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: none;
}

.case-modal.active {
  display: block;
}

.case-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

.case-modal-content {
  position: relative;
  width: min(1200px, 92vw);
  max-height: 90vh;
  margin: 5vh auto;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 3rem;
  z-index: 2;
}

.case-modal-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background 0.2s ease;
}

.case-modal-close:hover {
  background: var(--bg-alt);
}

.case-modal-header {
  margin-bottom: 2rem;
  max-width: 90ch;
}

.case-modal-header h2 {
  font-size: clamp(2rem, 3vw, 4rem);
  line-height: 1.05;
}

.case-study-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.case-card {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  display: block;
  margin: 0 0 1.25rem;
  gap: 0.7rem;
}

.case-card:last-child {
  grid-column: 1 / -1;
}

#editorial-modal .case-study-cards,
#photo-modal .case-study-cards {
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

#editorial-modal .case-card:last-child,
#photo-modal .case-card:last-child {
  grid-column: auto;
}

.case-card h3 {
  position: relative;
  display: inline-block;
  margin: 0 0 1.2rem;
  padding-bottom: 0.5rem;
  font-size: 1.3rem;
  color: var(--champagne);
}

.case-card h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 120%;
  height: 1px;
  background: linear-gradient(to right, var(--champagne), transparent);
  opacity: 0.5;
}

.case-card p,
.case-card li {
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.94rem;
}

.case-card p + p { margin-top: 1.5rem; }
.case-card ul { padding-left: 1.2rem; margin-top: 0.4rem; }
.case-card li + li { margin-top: 0.7rem; }

/* =====================================================
   10. GALLERY SYSTEM
===================================================== */
.gallery-section-label {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--champagne);
  margin-bottom: 1rem;
  opacity: 0.75;
}

.case-gallery {
  margin-top: 4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 95vh;
  position: relative;
}

.gallery-image-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 75vh;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid transparent;
  background: black;
  line-height: 0;
  width: 100%;
  margin-bottom: 0;
}

.gallery-image-wrapper img {
  position: relative;
  max-width: 100%;
  max-height: 75vh;
  width: auto;
  height: auto;
  object-fit: contain;
  background: var(--card);
  display: block;
  margin: 0;
  padding: 0;
}

.gallery-caption,
.gallery-caption-vertical {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 4;
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgba(25, 25, 25, 0.82);
  backdrop-filter: blur(3px);
  color: white;
  font-size: 0.92rem;
  line-height: 1.5;
  text-align: left;
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
}

.gallery-caption { margin-bottom: 3rem; }
.gallery-caption-vertical { margin-bottom: 0; }

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: rgba(25, 25, 25, 0.45);
  backdrop-filter: blur(3px);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  opacity: 0.6;
  margin: 0 3rem;
}

.gallery-arrow:hover,
.gallery-arrow:focus-visible {
  opacity: 1;
  background: rgba(0, 0, 0, 0.8);
  transform: translateY(-50%) scale(1.1);
}

.gallery-arrow::before {
  content: "";
  width: 15px;
  height: 15px;
  border-top: 1.5px solid white;
  border-right: 1.5px solid white;
  display: block;
}

[id$="-gallery-next"]::before { transform: rotate(45deg); margin-right: 5px; }
[id$="-gallery-prev"]::before { transform: rotate(-135deg); margin-left: 5px; }

[id$="-gallery-prev"] { left: 1rem; }
[id$="-gallery-next"] { right: 1rem; }

.gallery-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  position: relative;
  z-index: 10;
  margin-top: 1.5rem;
}

.gallery-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

html[data-theme="light"] .gallery-dot {
  background: var(--muted-dark);
}

.gallery-dot.sample-start {
  border-color: var(--champagne_light);
  background: var(--champagne_light);
}

html[data-theme="light"] .gallery-dot.sample-start {
  border-color: var(--muted-light);
  background: var(--muted-light);
}

.gallery-dot.active {
  background: var(--champagne);
  transform: scale(1.15);
}

html[data-theme="light"] .gallery-dot.active {
  border-color: var(--champagne);
  background: var(--champagne);
}

/* =====================================================
   11. RESPONSIVE MEDIA QUERIES
===================================================== */
/* =====================================================
   TABLET & SMALL DESKTOP (max-width: 980px)
===================================================== */
@media (max-width: 980px) {
  /* Layout & Grid */
  .portfolio-hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .two-columns,
  .three-columns {
    grid-template-columns: 1fr;
  }
  .evidence-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding-top: 0;
  }
  #editorial-modal .case-study-cards,
  #photo-modal .case-study-cards {
    grid-template-columns: 1fr;
  }

  /* Ordering */
  .portfolio-intro {
    order: 2;
  }
  .portfolio-main {
    order: 1;
  }

  /* Spacing & Dimensions */
  .portfolio-hero {
    min-height: auto;
    padding: 10rem 0 5rem;
    scroll-snap-align: start;
    scroll-margin-top: 110px;
  }
  .portfolio-section {
    padding: 5rem 0;
  }
  .case-modal-content {
    width: 100vw;
    height: 100vh;
    max-height: none;
    margin: 0;
    border-radius: 0;
    padding: 2rem 1.25rem 5rem;
  }

  /* Typography */
  .case-modal-header h2 {
    font-size: 2.4rem;
  }

  /* Navigation */
  .nav-links {
    display: none;
  }

  /* Components */
  .gallery-controls {
    gap: 1rem;
  }
  .evidence-overlay {
    padding: 0.75rem 0.85rem;
  }
  .focus-tags,
  .tool-tags {
    gap: 0.5rem;
  }
  .case-study-button {
    width: fit-content;
  }
  .evidence-more {
    margin-top: 1rem;
    max-width: 100%;
  }
}

/* =====================================================
   MOBILE LANDSCAPE / LARGE MOBILE (max-width: 900px)
   Note: Overrides 980px rules where specific
===================================================== */
@media (max-width: 900px) {
  /* Specific overrides if needed, though most are covered in 980px */
}

/* =====================================================
   STANDARD MOBILE (max-width: 768px)
===================================================== */
@media (max-width: 768px) {
  /* Navigation Scroll */
  .portfolio-nav {
    justify-content: flex-start;
    overflow-x: auto;
    gap: 1.2rem;
    padding: 0.8rem 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .portfolio-nav::-webkit-scrollbar {
    display: none;
  }
  .portfolio-nav a {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .nav-dot {
    display: none;
  }

  /* Gallery Controls */
  .gallery-arrow {
    width: 36px;
    height: 36px;
  }
  [id$="-gallery-prev"] {
    left: 10px;
  }
  [id$="-gallery-next"] {
    right: 10px;
  }
}

/* Desktop-only toggle */
@media (min-width: 769px) {
  .portfolio-subheader::after {
    display: none;
  }
}

/* =====================================================
   SMALL MOBILE (max-width: 720px)
===================================================== */
@media (max-width: 720px) {
  .gallery-controls {
    flex-direction: column;
  }
}

/* =====================================================
   EXTRA SMALL MOBILE (max-width: 640px)
===================================================== */
@media (max-width: 640px) {
  /* Use Case Layout */
  .use-case {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 5rem;
  }
  .use-case-intro {
    max-width: 100%;
    margin-bottom: 0;
  }
  .use-case h3 {
    max-width: 100%;
    font-size: clamp(1.8rem, 6vw, 2.6rem);
    line-height: 1.15;
  }
  .use-case-summary,
  .use-case p {
    max-width: 100%;
  }

  /* Evidence Grid Refinements */
  .evidence-card {
    aspect-ratio: 4 / 3;
    border-radius: 6px;
  }
  .evidence-overlay h4 {
    font-size: 0.95rem;
  }
  .evidence-overlay p,
  .evidence-link,
  .evidence-more {
    font-size: 0.78rem;
    line-height: 1.5;
  }

  /* Tags */
  .focus-tags span,
  .tool-tags span {
    font-size: 0.72rem;
    padding: 0.38rem 0.7rem;
  }
}