﻿/* =========================================================
   eCube — Multi-page extra styles
   Extends styles.css — DO NOT modify styles.css
   ========================================================= */

/* ========== HERO TWO-COLUMN LAYOUT (text left, image slider right) ========== */
/* Base: hidden on mobile */
.hero-img-panel {
  display: none;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(15, 58, 46, 0.22);
}
.hero-img-panel .carousel-wrap {
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4/5;
  background: var(--forest);
  display: block;
}
.hero-img-panel .carousel-track {
  height: 100%;
}
.hero-img-panel .carousel-slide {
  height: 100%;
}
.hero-img-panel .carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  padding: 14px 0 4px;
}
.hero-dots .carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(15, 58, 46, 0.2);
  border: none;
  cursor: pointer;
  transition: background 0.3s, width 0.3s, border-radius 0.3s;
  padding: 0;
}
.hero-dots .carousel-dot.active {
  background: var(--forest);
  width: 22px;
  border-radius: 4px;
}
/* Desktop: show side-by-side */
@media (min-width: 960px) {
  .hero-inner {
    display: flex;
    align-items: stretch;
    gap: 56px;
  }
  .hero-content {
    flex: 0 0 50%;
    min-width: 0;
  }
  .hero-img-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
  }
  .hero-img-panel .carousel-wrap {
    flex: 1;
    aspect-ratio: unset;
  }
}

/* ========== INNER PAGE: always solid nav (dark hero sections sit below) ========== */
/* NOTE: backdrop-filter/-webkit-backdrop-filter intentionally omitted here.
   In iOS Safari, any -webkit-backdrop-filter on a position:fixed ancestor
   makes that ancestor the containing block for fixed descendants — so the
   nav-links overlay (position:fixed;inset:0) would be clamped to the 64px
   header instead of the full viewport, hiding all menu items. A more opaque
   background achieves the same frosted look without triggering that bug. */
body.inner-page #header {
  background: rgba(245, 241, 232, 0.97);
  border-bottom-color: var(--rule);
}

/* ========== HERO CAROUSEL OVERLAY ARROWS ========== */
.hero-carousel-btn {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 10;
  width: 40px !important;
  height: 40px !important;
  background: rgba(11, 31, 26, 0.55) !important;
  color: var(--bone) !important;
  border-radius: 50% !important;
  border: 1px solid rgba(245, 241, 232, 0.25) !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background var(--t), transform var(--t) !important;
  flex-shrink: 0;
}
.hero-carousel-btn:hover {
  background: var(--forest) !important;
  transform: translateY(-50%) scale(1.1) !important;
}
.carousel-wrap .carousel-prev.hero-carousel-btn {
  left: 12px;
}
.carousel-wrap .carousel-next.hero-carousel-btn {
  right: 12px;
}

/* ========== MOBILE NAV — COMPACT PANEL (replaces fullscreen overlay) ========== */
@media (max-width: 959px) {
  /* iOS Safari fix: -webkit-backdrop-filter on a position:fixed ancestor makes
     that ancestor the containing block for fixed children — nav overlay ends up
     clamped to the 64px header instead of the full viewport. Remove blur on
     mobile and use a more opaque solid background instead. */
  #header.scrolled,
  body.inner-page #header {
    background: rgba(245, 241, 232, 0.97) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Compact top-anchored panel instead of inset:0 fullscreen */
  .nav-links {
    top: 0;
    left: 0;
    right: 0;
    bottom: unset;
    justify-content: flex-start;
    padding: calc(var(--nav-h) + 14px) 24px 28px;
    max-height: 90svh;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    box-shadow: 0 24px 64px rgba(11, 31, 26, 0.5);
  }

  /* Tighter font + padding per link */
  .nav-link {
    font-size: clamp(1.15rem, 5.5vw, 1.5rem) !important;
    padding: 13px 0 !important;
  }
  /* Mobile nav CTA — ochre-filled pill, full width, at bottom of panel */
  .nav-cta {
    margin-top: 16px !important;
    width: 100% !important;
    justify-content: center !important;
    padding: 15px 22px !important;
    font-size: 1rem !important;
    border-radius: 12px !important;
  }
}

/* Fix transition: add transform so link reveal animation actually plays */
.nav-link {
  transition: color var(--t), padding-left var(--t), transform 0.5s var(--ease-2) !important;
}
.nav-links:not(.open) .nav-link {
  transition-delay: 0s !important;
}

/* ========== HAMBURGER Z-INDEX (must sit above .nav-links overlay) ========== */
.hamburger {
  position: relative;
  z-index: 960;
}

/* ========== LOGO IMAGE ========== */
.logo-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ========== NAV DROPDOWN ========== */
/* Mobile: show sub-items inline, collapsible */
.nav-has-dropdown > .nav-link {
  display: flex;
  align-items: baseline;
  gap: 16px;
  position: relative;
}
.dropdown-arrow {
  margin-left: 4px;
  font-size: 0.65em;
  transition: transform 0.3s var(--ease);
  display: inline-block;
}
.nav-has-dropdown.dropdown-open .dropdown-arrow {
  transform: rotate(180deg);
}

@media (max-width: 959px) {
  .nav-dropdown {
    display: none;
    padding-left: 28px;
    padding-bottom: 4px;
  }
  .nav-has-dropdown.dropdown-open .nav-dropdown {
    display: block;
  }
  .nav-dropdown li {
    border-bottom: 1px solid rgba(245,241,232,0.08) !important;
    overflow: hidden;
  }
  .nav-dropdown a {
    display: block;
    font-family: var(--font-sans) !important;
    font-size: 1.3rem !important;
    padding: 12px 0 !important;
    color: rgba(245,241,232,0.72) !important;
    transition: color var(--t), padding-left var(--t) !important;
    transform: none !important;
    letter-spacing: -0.01em;
  }
  .nav-dropdown a:hover {
    color: var(--ochre) !important;
    padding-left: 8px !important;
  }
}

/* Desktop: hover dropdown */
@media (min-width: 960px) {
  .nav-has-dropdown {
    position: relative;
  }
  .nav-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    background: var(--bone);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    min-width: 260px;
    padding: 8px;
    padding-top: 16px;
    margin-top: -8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
    box-shadow: var(--shadow);
    z-index: 1000;
    list-style: none;
  }
  .nav-has-dropdown:hover .nav-dropdown,
  .nav-has-dropdown:focus-within .nav-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }
  .nav-dropdown li {
    width: auto !important;
    border-bottom: none !important;
    overflow: visible !important;
  }
  .nav-dropdown a {
    display: block !important;
    padding: 10px 14px !important;
    font-family: var(--font-sans) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--forest) !important;
    border-radius: var(--radius-sm) !important;
    transition: background var(--t), padding-left var(--t) !important;
    transform: none !important;
    letter-spacing: 0 !important;
    line-height: 1.4 !important;
  }
  .nav-dropdown a:hover {
    background: rgba(15, 58, 46, 0.08) !important;
    color: var(--forest) !important;
    padding-left: 18px !important;
  }
  .dropdown-arrow { display: none; }
}

/* ========== IMAGE PLACEHOLDERS ========== */
.img-placeholder {
  background: linear-gradient(135deg, var(--sand-2) 0%, var(--rule) 100%);
  border: 2px dashed var(--rule);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-muted);
  text-align: center;
  padding: 32px 16px;
  width: 100%;
  height: 100%;
}
.img-placeholder svg {
  opacity: 0.35;
  color: var(--forest);
  width: 40px;
  height: 40px;
}
.img-placeholder span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.7;
}
.img-placeholder strong {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
}

/* ========== CAROUSEL / SLIDER ========== */
.carousel-section {
  padding: 40px 0;
  background: var(--sand);
  overflow: hidden;
}
@media (min-width: 960px) {
  .carousel-section { padding: 56px 0; }
}
.carousel-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.carousel-track {
  display: flex;
  transition: transform 0.7s var(--ease-2);
  will-change: transform;
}
.carousel-slide {
  flex: 0 0 100%;
  position: relative;
}
.slide-visual {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: block;
  background: var(--forest);
}
.slide-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.slide-visual-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--bone);
  position: relative;
}
.slide-visual-placeholder::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-2) 50%, var(--ink) 100%);
}
.slide-visual-placeholder > * { position: relative; z-index: 1; }
.slide-placeholder-icon { opacity: 0.25; }
.slide-placeholder-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ochre);
}
.slide-placeholder-name {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  font-weight: 300;
  letter-spacing: -0.025em;
  text-align: center;
  max-width: 16ch;
}
.slide-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 40px 32px 28px;
  background: linear-gradient(transparent, rgba(11, 31, 26, 0.82));
}
.slide-caption-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ochre);
  padding: 4px 10px;
  border: 1px solid rgba(233,180,76,0.5);
  border-radius: 100px;
  margin-bottom: 10px;
}
.slide-caption h3 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 4vw, 2rem);
  font-weight: 400;
  color: var(--bone);
  letter-spacing: -0.015em;
  margin-bottom: 4px;
  line-height: 1.2;
}
.slide-caption p {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245,241,232,0.65);
}
.slide-caption a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--ochre);
  transition: gap var(--t);
}
.slide-caption a:hover { gap: 14px; }

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.carousel-controls--unified {
  justify-content: center;
  gap: 16px;
}
.carousel-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}
.carousel-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--rule);
  cursor: pointer;
  transition: background var(--t), transform var(--t), width var(--t);
  border: none;
  padding: 0;
  flex-shrink: 0;
}
.carousel-dot.active {
  background: var(--forest);
  width: 24px;
  border-radius: 100px;
}
.carousel-arrows {
  display: flex;
  gap: 10px;
}
.carousel-btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--forest);
  color: var(--bone);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t), transform var(--t);
  flex-shrink: 0;
}
.carousel-btn:hover {
  background: var(--clay);
  transform: scale(1.08);
}

/* ========== INNER PAGE HERO ========== */
.inner-hero {
  padding: calc(var(--nav-h) + 60px) var(--gutter) 80px;
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-2) 60%, var(--ink) 100%);
  color: var(--bone);
  position: relative;
  overflow: hidden;
}
.inner-hero::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 440px; height: 440px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233,180,76,0.16), transparent 70%);
  pointer-events: none;
}
.inner-hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196,122,86,0.1), transparent 70%);
  pointer-events: none;
}
.inner-hero .eyebrow { color: var(--ochre); margin-bottom: 20px; }
.inner-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 8vw, 5.5rem);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.03em;
  max-width: 22ch;
  position: relative;
}
.inner-hero-title em { font-style: italic; color: var(--ochre); }
.inner-hero-lede {
  margin-top: 20px;
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  line-height: 1.75;
  color: rgba(245,241,232,0.78);
  max-width: 60ch;
  position: relative;
}

/* ========== SERVICES PAGE ========== */
.services-cards-section {
  padding: 40px 0;
  background: var(--sand);
}
@media (min-width: 960px) { .services-cards-section { padding: 56px 0; } }

.services-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 48px;
}
@media (min-width: 640px) {
  .services-card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .services-card-grid { grid-template-columns: repeat(4, 1fr); gap: 24px; }
}
.svc-page-card {
  background: var(--bone);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 34px 26px 30px;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
  position: relative;
  overflow: hidden;
}
.svc-page-card::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(300px 200px at var(--mx, 50%) var(--my, 50%), rgba(233,180,76,0.1), transparent 60%);
  opacity: 0; transition: opacity var(--t);
  pointer-events: none;
}
.svc-page-card:hover::after { opacity: 1; }
.svc-page-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: transparent; }
.svc-page-card-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--clay);
  margin-bottom: 18px;
  text-transform: uppercase;
}
.svc-page-card h3 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 400;
  color: var(--forest);
  letter-spacing: -0.015em;
  margin-bottom: 6px;
  line-height: 1.2;
}
.svc-page-card-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 14px;
}
.svc-page-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* Featured service card */
.svc-page-card--featured {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--bone);
  grid-column: 1 / -1;
}
@media (min-width: 960px) {
  .svc-page-card--featured { grid-column: span 2; }
}
.svc-page-card--featured .svc-page-card-num { color: var(--ochre); }
.svc-page-card--featured h3 { color: var(--bone); }
.svc-page-card--featured .svc-page-card-sub { color: rgba(233,180,76,0.8); }
.svc-page-card--featured p { color: rgba(245,241,232,0.75); }

/* FAQ / Accordion */
.faq-section {
  padding: 40px 0;
  background: var(--sand-2);
}
@media (min-width: 960px) { .faq-section { padding: 56px 0; } }
.faq-list {
  max-width: 860px;
  margin: 48px auto 0;
}
.faq-item {
  border-top: 1px solid var(--rule);
}
.faq-item:last-child { border-bottom: 1px solid var(--rule); }
.faq-question {
  width: 100%;
  text-align: left;
  padding: 22px 0;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 400;
  color: var(--forest);
  letter-spacing: -0.01em;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  background: none;
  border: none;
  transition: color var(--t);
}
.faq-question:hover { color: var(--clay); }
.faq-chevron {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t), border-color var(--t), transform var(--t);
  color: var(--forest);
}
.faq-item.open .faq-chevron {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--bone);
  transform: rotate(180deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease-2);
}
.faq-answer-inner {
  padding-bottom: 22px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 70ch;
}
.faq-item.open .faq-answer { max-height: 500px; }

/* ========== PROJECT DETAIL PAGE ========== */
.project-detail-hero {
  padding: calc(var(--nav-h) + 60px) var(--gutter) 70px;
  background: var(--forest);
  color: var(--bone);
  position: relative;
  overflow: hidden;
}
.project-detail-hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 400px at 80% 20%, rgba(233,180,76,0.12), transparent 60%),
    radial-gradient(400px 400px at 10% 80%, rgba(196,122,86,0.08), transparent 60%);
  pointer-events: none;
}
.project-detail-hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}
@media (min-width: 960px) {
  .project-detail-hero .container {
    grid-template-columns: 1fr 360px;
    gap: 70px;
    align-items: center;
  }
}
.project-detail-eyebrow { color: var(--ochre); margin-bottom: 18px; }
.project-detail-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 7vw, 4.8rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.project-detail-description {
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(245,241,232,0.82);
  max-width: 56ch;
}
.project-meta-card {
  background: rgba(245,241,232,0.06);
  border: 1px solid rgba(245,241,232,0.15);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
}
.project-meta-row {
  padding: 14px 0;
  border-bottom: 1px solid rgba(245,241,232,0.1);
  display: grid;
  gap: 4px;
}
.project-meta-row:last-child { border-bottom: none; padding-bottom: 0; }
.project-meta-row:first-child { padding-top: 0; }
.project-meta-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ochre);
}
.project-meta-value {
  color: rgba(245,241,232,0.88);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Gallery section */
.gallery-section {
  padding: 40px 0;
  background: var(--sand);
}
@media (min-width: 960px) { .gallery-section { padding: 56px 0; } }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 40px;
}
@media (min-width: 640px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}
@media (min-width: 960px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
  .gallery-grid .gallery-item--featured {
    grid-column: span 2;
    grid-row: span 2;
  }
}
.gallery-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--sand-2);
  cursor: zoom-in;
}
.gallery-item .img-placeholder {
  width: 100%; height: 100%;
  border-radius: 0;
  border: none;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
  display: block;
}
.gallery-item:hover img { transform: scale(1.06); }

/* Project prev/next nav */
.project-nav-strip {
  padding: 40px 0;
  background: var(--ink);
  color: var(--bone);
}
.project-nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.project-nav-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: inherit;
  text-decoration: none;
  transition: opacity var(--t);
  max-width: 300px;
}
.project-nav-link:hover { opacity: 0.72; }
.project-nav-dir {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ochre);
  display: flex;
  align-items: center;
  gap: 6px;
}
.project-nav-name {
  font-family: var(--font-display);
  font-size: clamp(1rem, 3vw, 1.45rem);
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* ========== PORTFOLIO / INTERIORS PAGE ========== */
.portfolio-page-content {
  padding: 40px 0;
  background: var(--sand);
}
@media (min-width: 960px) { .portfolio-page-content { padding: 56px 0; } }
.portfolio-intro {
  max-width: 660px;
  margin: 0 auto 56px;
  text-align: center;
}
.portfolio-intro p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-top: 14px;
}
.portfolio-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
@media (min-width: 640px) {
  .portfolio-card-grid { grid-template-columns: repeat(2, 1fr); }
}
.portfolio-proj-card {
  background: var(--bone);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--t), box-shadow var(--t);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.portfolio-proj-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}
.portfolio-proj-card-img {
  aspect-ratio: 4/3;
  overflow: hidden;
  position: relative;
}
.portfolio-proj-card-img .img-placeholder {
  width: 100%; height: 100%;
  border-radius: 0;
  border: none;
  aspect-ratio: unset;
}
.portfolio-proj-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s var(--ease);
}
.portfolio-proj-card:hover .portfolio-proj-card-img img { transform: scale(1.06); }
.portfolio-proj-card-body {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.portfolio-proj-card-body p {
  flex: 1;
}
.portfolio-proj-card-type {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 10px;
}
.portfolio-proj-card-body h3 {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 400;
  color: var(--forest);
  letter-spacing: -0.015em;
  margin-bottom: 8px;
  line-height: 1.15;
}
.portfolio-proj-card-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 18px;
}
.portfolio-proj-card-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--forest);
  transition: gap var(--t), color var(--t);
}
.portfolio-proj-card:hover .portfolio-proj-card-arrow {
  gap: 14px;
  color: var(--clay);
}

/* ========== RESEARCH PAGE ========== */
.research-page-content {
  padding: 40px 0;
  background: var(--sand);
}
@media (min-width: 960px) { .research-page-content { padding: 56px 0; } }

/* Publication List */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pub-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0 28px;
  padding: 36px 0;
  border-bottom: 1px solid var(--rule);
  transition: background var(--t);
  position: relative;
}
.pub-card:first-child { border-top: 1px solid var(--rule); }

@media (min-width: 760px) {
  .pub-card { grid-template-columns: 72px 1fr; gap: 0 36px; padding: 40px 0; }
}

.pub-index {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  padding-top: 4px;
  opacity: 0.72;
  user-select: none;
}

.pub-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pub-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.pub-type-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  font-weight: 600;
}
.pub-type--conference {
  background: rgba(15,58,46,0.08);
  color: var(--forest);
}
.pub-type--thesis {
  background: rgba(196,122,86,0.1);
  color: var(--clay);
}
.pub-type--article {
  background: rgba(180,140,60,0.12);
  color: #8a6a1a;
}

.pub-venue {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text);
}

.pub-year-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--clay);
  margin-left: auto;
  white-space: nowrap;
  font-weight: 600;
}

.pub-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 500;
  color: var(--forest);
  letter-spacing: -0.02em;
  line-height: 1.28;
  margin: 0;
}

/* Abstract toggle */
.pub-abstract-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pub-abstract-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--forest);
  transition: color var(--t);
  width: fit-content;
  opacity: 0.72;
}
.pub-abstract-toggle:hover { color: var(--forest); opacity: 1; }
.pub-abstract-toggle[aria-expanded="true"] { color: var(--forest); opacity: 1; }
.pub-abstract-toggle[aria-expanded="true"] .pub-toggle-icon {
  transform: rotate(180deg);
}
.pub-toggle-icon {
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.pub-abstract {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease, margin-top 0.25s ease;
  opacity: 0;
  margin-top: 0;
}
.pub-abstract.is-open {
  max-height: 1000px;
  opacity: 1;
  margin-top: 14px;
}
.pub-abstract p {
  font-size: 0.96rem;
  line-height: 1.78;
  color: var(--text);
  margin-bottom: 12px;
}
.pub-abstract p:last-child { margin-bottom: 0; }

/* Footer row */
.pub-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
}

.pub-read-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--forest);
  text-decoration: none;
  border-bottom: 1px solid rgba(15,58,46,0.35);
  padding-bottom: 2px;
  transition: color var(--t), border-color var(--t), gap var(--t);
}
.pub-read-link:hover {
  color: var(--clay);
  border-color: var(--clay);
  gap: 9px;
}
.pub-read-link svg { flex-shrink: 0; }

.pub-no-link {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-style: italic;
}

/* ========== TEAM PAGE ========== */
.team-page-section {
  padding: 40px 0;
  background: linear-gradient(180deg, var(--forest) 0%, var(--forest-2) 100%);
  position: relative;
  overflow: hidden;
}
.team-page-section::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233,180,76,0.12), transparent 70%);
  top: -100px; right: -100px;
  pointer-events: none;
}
@media (min-width: 960px) { .team-page-section { padding: 56px 0; } }

.about-vivid {
  padding: 40px 0;
  background: var(--sand);
}
@media (min-width: 960px) { .about-vivid { padding: 56px 0; } }
.about-vivid-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}
@media (min-width: 960px) {
  .about-vivid-inner { grid-template-columns: 1fr 1fr; gap: 60px; }
}
.about-vivid-text .section-title { text-align: left; }
.about-vivid-text p {
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.75;
}
.about-vivid-img {
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.about-vivid-img .img-placeholder {
  width: 100%; height: 100%;
  border-radius: 0;
  border: none;
  aspect-ratio: unset;
  min-height: 280px;
}

/* Member portrait image override (for real photos) */
.member-portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1s var(--ease);
}
.member:hover .member-portrait img { transform: scale(1.06); }

/* ========== PROVIDENCE PARK PAGE ========== */
.pp-render-section {
  padding: 40px 0;
  background: var(--sand);
}
@media (min-width: 960px) { .pp-render-section { padding: 56px 0; } }
.pp-render-main {
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: var(--shadow-lg);
}
.pp-render-main .img-placeholder {
  width: 100%; height: 100%;
  border-radius: 0;
  border: none;
  aspect-ratio: unset;
  min-height: 320px;
}

.pp-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 32px;
}
@media (min-width: 640px) {
  .pp-info-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .pp-info-grid { grid-template-columns: repeat(4, 1fr); }
}
.pp-info-card {
  background: var(--bone);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  transition: transform var(--t), box-shadow var(--t);
}
.pp-info-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.pp-info-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 8px;
}
.pp-info-value {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 400;
  color: var(--forest);
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.pp-info-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ========== PP INFO CHIPS (inline in about column) ========== */
.pp-info-chips {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 4px;
}
.pp-info-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--rule);
}
.pp-info-chip:last-child { border-bottom: none; }
.pp-chip-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay);
  flex-shrink: 0;
}
.pp-chip-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--forest);
  text-align: right;
  line-height: 1.3;
}
/* Available status badge */
.pp-chip-available {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 700;
  color: #1a7a4a;
  background: rgba(26, 122, 74, 0.1);
  border: 1px solid rgba(26, 122, 74, 0.25);
  border-radius: 100px;
  padding: 3px 10px 3px 8px;
  letter-spacing: 0.02em;
}
.pp-chip-available::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1a7a4a;
  flex-shrink: 0;
  animation: pp-pulse 2s ease-in-out infinite;
}

.pp-section {
  padding: 40px 0;
  background: var(--sand-2);
}
@media (min-width: 960px) { .pp-section { padding: 56px 0; } }
.pp-section:nth-child(odd) { background: var(--sand); }
.pp-section-head {
  margin-bottom: 36px;
}
.pp-section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 400;
  color: var(--forest);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.pp-section-head p {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 60ch;
}

.pp-plan-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 28px;
}
@media (min-width: 640px) {
  .pp-plan-grid { grid-template-columns: repeat(2, 1fr); }
}
.pp-plan-card {
  background: var(--bone);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.pp-plan-card-img {
  aspect-ratio: 3/2;
  overflow: hidden;
}
.pp-plan-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.pp-render-main img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.pp-plan-card-img .img-placeholder {
  width: 100%; height: 100%;
  border-radius: 0;
  border: none;
  aspect-ratio: unset;
  min-height: 200px;
}
.pp-plan-card-body {
  padding: 20px 22px;
  border-top: 1px solid var(--rule);
}
.pp-plan-card-body h4 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--forest);
  margin-bottom: 8px;
}
.pp-plan-specs {
  display: grid;
  gap: 6px;
}
.pp-plan-spec {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
  font-size: 0.95rem;
}
.pp-plan-spec dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clay);
}
.pp-plan-spec dd { color: var(--text-muted); }

/* Contact form on inner pages */
.contact-section-inner {
  padding: 40px 0;
  background: var(--sand);
}
@media (min-width: 960px) { .contact-section-inner { padding: 56px 0; } }

/* Active nav highlight — desktop only (light background, dark text readable) */
@media (min-width: 960px) {
  .nav-link.active-page {
    background: rgba(15, 58, 46, 0.08);
    color: var(--forest);
  }
}
/* Mobile: nav overlay is dark green — active link must be light, not forest */
@media (max-width: 959px) {
  .nav-link.active-page {
    color: var(--ochre) !important;
    background: rgba(233, 180, 76, 0.1) !important;
  }
}

/* ========== CONTACT US NAV BUTTON — DESKTOP RESTYLE ========== */
/* Replace heavy ochre pill with a clean bordered button that matches nav scale */
@media (min-width: 960px) {
  .nav-cta {
    background: transparent !important;
    color: var(--forest) !important;
    border: 1.5px solid var(--forest) !important;
    padding: 8px 18px !important;
    font-size: 14px !important;
    border-radius: 100px !important;
    opacity: 1 !important;
    margin-top: 0 !important;
    transition: background var(--t), color var(--t), border-color var(--t) !important;
    transition-delay: 0s !important;
  }
  .nav-cta:hover {
    background: var(--forest) !important;
    color: var(--bone) !important;
    padding-left: 18px !important;
  }
}

/* ========== HERO TITLE CLIP FIX ========== */
.hero-title .line {
  padding-bottom: 0.18em;
  margin-bottom: -0.18em;
}

/* ========== CURSOR OVERRIDE (disable custom cursor, use default) ========== */
.cursor, .cursor-ring { display: none !important; }
body { cursor: auto !important; }
@media (hover: hover) and (pointer: fine) {
  body { cursor: auto !important; }
  a, button, [role="button"], .magnetic, [data-cursor] { cursor: pointer !important; }
  input, select { cursor: pointer !important; }
  textarea, input[type="text"], input[type="email"], input[type="tel"] { cursor: text !important; }
}

/* ========== CREDENTIALS & STATS SECTION ========== */
.credentials-section {
  background: var(--forest);
  padding: 40px 0;
  position: relative;
  overflow: hidden;
}
.credentials-section::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233,180,76,0.1), transparent 60%);
  pointer-events: none;
}
.credentials-badges {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
  justify-content: center;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(245,241,232,0.12);
  margin-bottom: 48px;
}
@media (min-width: 760px) {
  .credentials-badges { flex-direction: row; gap: 0; }
}
.credential-badge {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 40px;
  flex: 1;
}
.credential-badge-icon {
  flex-shrink: 0;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(233,180,76,0.12);
  border: 1px solid rgba(233,180,76,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ochre);
}
.credential-badge-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.credential-badge-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ochre);
}
.credential-badge-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  color: var(--bone);
  letter-spacing: -0.01em;
  line-height: 1.3;
  max-width: 28ch;
}
.credential-divider {
  width: 1px;
  height: 64px;
  background: rgba(245,241,232,0.15);
  flex-shrink: 0;
  display: none;
}
@media (min-width: 760px) { .credential-divider { display: block; } }
.stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-item {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 240px;
}
.stat-number {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 600;
  color: var(--ochre);
  letter-spacing: -0.04em;
  line-height: 1;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(245,241,232,0.55);
}
.stat-divider {
  width: 1px;
  height: 72px;
  background: rgba(245,241,232,0.15);
  flex-shrink: 0;
  margin: 0 48px;
}

/* ========== PROJECT HISTORY TIMELINE ========== */
.pp-timeline-section {
  background: linear-gradient(160deg, var(--forest) 0%, var(--forest-2) 60%, var(--ink) 100%);
  padding: 40px 0;
  position: relative;
  overflow: hidden;
}
@media (min-width: 960px) { .pp-timeline-section { padding: 56px 0; } }
.pp-timeline-section::before {
  content: '';
  position: absolute;
  top: -160px; right: -160px;
  width: 520px; height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233,180,76,0.1), transparent 65%);
  pointer-events: none;
}
.pp-timeline-section::after {
  content: '';
  position: absolute;
  bottom: -120px; left: -120px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196,122,86,0.08), transparent 65%);
  pointer-events: none;
}

.tl-track {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding-left: 32px;
}
.tl-track::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(233,180,76,0.4) 10%, rgba(233,180,76,0.4) 90%, transparent);
}

.tl-item {
  position: relative;
  padding-bottom: 28px;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: '';
  position: absolute;
  left: -32px;
  top: 22px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--ochre);
  transform: translateX(-5px);
  box-shadow: 0 0 0 3px rgba(233,180,76,0.2), 0 0 12px rgba(233,180,76,0.3);
  transition: box-shadow 0.3s;
}
.tl-item:hover::before {
  box-shadow: 0 0 0 5px rgba(233,180,76,0.25), 0 0 20px rgba(233,180,76,0.5);
}

.tl-card {
  background: rgba(245,241,232,0.05);
  border: 1px solid rgba(245,241,232,0.1);
  border-radius: var(--radius-lg);
  padding: 26px 30px;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}
.tl-card:hover {
  background: rgba(245,241,232,0.09);
  border-color: rgba(233,180,76,0.3);
  transform: translateX(4px);
}
.tl-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.tl-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ochre);
  background: rgba(233,180,76,0.12);
  border: 1px solid rgba(233,180,76,0.25);
  border-radius: 100px;
  padding: 3px 10px;
  flex-shrink: 0;
}
.tl-date {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 400;
  color: var(--bone);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.tl-desc {
  color: rgba(245,241,232,0.6);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 58ch;
}

/* ========== PROJECT TIMELINE STEPS ========== */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.step {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.step:last-child {
  border-bottom: none;
}
.step-num {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--forest);
  color: var(--bone);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-top: 2px;
}
.step div {
  flex: 1;
  min-width: 0;
}
.step h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--forest);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  line-height: 1.3;
}
.step p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ========== FOOTER SOCIAL ICONS ========== */
.footer-social {
  display: flex;
  gap: 14px;
  margin-top: 18px;
  align-items: center;
}
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(245,241,232,0.08);
  border: 1px solid rgba(245,241,232,0.15);
  color: rgba(245,241,232,0.6);
  transition: background var(--t), color var(--t), border-color var(--t);
}
.footer-social a:hover {
  background: var(--ochre);
  color: var(--ink);
  border-color: var(--ochre);
}

/* ========== CREDENTIALS E1/E2 PILLAR STYLE ========== */
.cred-pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 0;
}
/* Two-pillar variant (E1+E2 only) */
@media (min-width: 480px) {
  .cred-pillars--two { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (min-width: 640px) {
  .cred-pillars { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .cred-pillars--two { grid-template-columns: repeat(2, 1fr); gap: 28px; max-width: 740px; margin-left: auto; margin-right: auto; }
}
.cred-pillar {
  background: rgba(245,241,232,0.05);
  border: 1px solid rgba(245,241,232,0.12);
  border-radius: var(--radius-lg);
  padding: 20px 20px 18px;
  position: relative;
  overflow: hidden;
  transition: background 0.3s, border-color 0.3s;
}
.cred-pillar:hover {
  background: rgba(245,241,232,0.09);
  border-color: rgba(233,180,76,0.3);
}
.cred-pillar-mark {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--ochre);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 14px;
}
.cred-pillar-mark sup {
  font-size: 0.6em;
  vertical-align: super;
}
.cred-pillar h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--bone);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  line-height: 1.2;
}
.cred-pillar-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ochre);
  margin-bottom: 12px;
  display: block;
}
.cred-pillar p {
  color: rgba(245,241,232,0.62);
  font-size: 0.95rem;
  line-height: 1.65;
}
.cred-pillar-icon {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  color: var(--ochre);
  opacity: 0.25;
}
.cred-pillar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 8px;
  padding: 8px 16px;
  margin-bottom: 14px;
  width: fit-content;
  height: 56px;
  box-sizing: border-box;
}

/* Centre all content in the two partner cards */
.cred-pillars--two .cred-pillar {
  text-align: center;
}
.cred-pillars--two .cred-pillar-logo {
  margin-left: auto;
  margin-right: auto;
}
.cred-pillar-logo img {
  max-height: 38px;
  max-width: 150px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.cred-pillar-name {
  font-family: var(--font-display) !important;
  font-size: 1.625rem !important;
  font-weight: 700 !important;
  color: var(--bone) !important;
  letter-spacing: -0.02em !important;
  margin-bottom: 6px !important;
  line-height: 1.1 !important;
}

/* ========== UNIFORM SERVICES GRID (homepage + services page) ========== */
.services-uniform-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 560px) {
  .services-uniform-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; grid-auto-rows: 1fr; }
}
@media (min-width: 960px) {
  .services-uniform-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; grid-auto-rows: 1fr; }
}
.services-uniform-grid .svc {
  display: flex;
  flex-direction: column;
  grid-column: unset !important;
  grid-row: unset !important;
  min-height: 160px;
}
.services-uniform-grid .svc h3 {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  margin-bottom: 10px;
}
.services-uniform-grid .svc p {
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.65;
}

/* Services page: 4 col → 2 col → 1 col, all equal */
.services-card-grid {
  grid-template-columns: 1fr !important;
}
@media (min-width: 560px) {
  .services-card-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (min-width: 960px) {
  .services-card-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 20px !important; }
}
.svc-page-card--featured { grid-column: unset !important; }

/* ========== TEAM SECTION LABEL ========== */
.team-section-label {
  margin-bottom: 24px;
}
/* Single member grid — centred */
.team-grid--single {
  display: flex !important;
  justify-content: center;
  grid-template-columns: unset !important;
}
.team-grid--single .member {
  width: 100%;
  max-width: 480px;
}

/* ========== CONTACT FORM FIXES ========== */
/* Button + note always span full width of the form grid */
.contact-form .btn,
.contact-form .form-note {
  grid-column: 1 / -1;
}
/* Ensure select has full height and correct appearance */
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235c6b63' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

/* ========== CONTACT PAGE HERO ========== */
.contact-page-hero { padding-bottom: 80px; }

.contact-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: start;
}

@media (min-width: 900px) {
  .contact-page-hero { padding-bottom: 100px; }
  .contact-hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 72px;
    align-items: center;
  }
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(245,241,232,0.14);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(245,241,232,0.08);
  color: var(--bone);
  text-decoration: none;
  transition: background 0.2s;
}
.contact-info-item:last-child { border-bottom: none; }
a.contact-info-item:hover { background: rgba(245,241,232,0.06); }

.contact-info-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(233,180,76,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-info-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(245,241,232,0.55);
  text-transform: uppercase;
  margin: 0 0 5px;
}

.contact-info-val {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--bone);
  line-height: 1.5;
}

.contact-social-row {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.contact-social-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(245,241,232,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bone);
  transition: background 0.2s;
}
.contact-social-btn:hover { background: rgba(245,241,232,0.18); }

/* ========== PROVIDENCE PARK TWO-COLUMN LAYOUT ========== */
.pp-two-col-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}
@media (min-width: 900px) {
  .pp-two-col-section {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
  }
}
.pp-two-col-left, .pp-two-col-right { min-width: 0; }

/* ========== PP MILESTONE LIST ========== */
.pp-milestone-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}
/* Vertical connector line */
.pp-milestone-list::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--rule);
  border-radius: 2px;
}
.pp-milestone-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  position: relative;
}
.pp-milestone-item:not(:last-child) {
  border-bottom: 1px solid var(--rule);
}
/* The dot */
.pp-milestone-dot {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--rule);
  background: var(--sand-2);
  position: relative;
  z-index: 1;
  transition: background 0.2s, border-color 0.2s;
}
/* Done state — green filled checkmark */
.pp-milestone-done .pp-milestone-dot {
  background: var(--forest);
  border-color: var(--forest);
}
.pp-milestone-done .pp-milestone-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  display: block;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23f5f1e8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='2,6 5,9 10,3'/%3E%3C/svg%3E") center/10px no-repeat;
}
/* Active state — amber pulsing */
.pp-milestone-active .pp-milestone-dot {
  background: var(--ochre);
  border-color: var(--ochre);
  box-shadow: 0 0 0 4px rgba(233,180,76,0.18);
  animation: pp-pulse 2s ease-in-out infinite;
}
@keyframes pp-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(233,180,76,0.18); }
  50%       { box-shadow: 0 0 0 7px rgba(233,180,76,0.08); }
}
/* Upcoming state — hollow muted */
.pp-milestone-upcoming .pp-milestone-dot {
  background: transparent;
  border-color: rgba(15,58,46,0.25);
}
/* Milestone name */
.pp-milestone-name {
  flex: 1;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.4;
}
.pp-milestone-done .pp-milestone-name {
  color: var(--forest);
}
.pp-milestone-upcoming .pp-milestone-name {
  color: var(--text-muted);
}
/* Bold status badge */
.pp-milestone-status {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  white-space: nowrap;
}
.pp-milestone-done .pp-milestone-status {
  color: var(--forest);
}
.pp-milestone-active .pp-milestone-status {
  color: var(--ochre);
}
.pp-milestone-upcoming .pp-milestone-status {
  color: var(--text-muted);
  font-weight: 600;
}

/* ========== PP CAROUSEL SMALLER ========== */
.pp-carousel-render .slide-visual,
.pp-carousel-site .slide-visual,
.pp-carousel-interiors .slide-visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* ========== PP CREDITS ========== */
.pp-credits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 760px) {
  .pp-credits-grid {
    grid-template-columns: 1fr 1fr;
    gap: 48px 56px;
  }
  .pp-credits-contact {
    grid-column: span 2;
    border-top: 1px solid rgba(245,241,232,0.12);
    padding-top: 32px;
  }
}
@media (min-width: 1060px) {
  .pp-credits-grid {
    grid-template-columns: 1.4fr 1fr 0.9fr;
    gap: 0 56px;
  }
  .pp-credits-contact {
    grid-column: unset;
    border-top: none;
    padding-top: 0;
    border-left: 1px solid rgba(245,241,232,0.12);
    padding-left: 56px;
  }
}
.pp-credits-primary,
.pp-credits-secondary {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.pp-credit-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pp-credit-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ochre);
}
.pp-credit-value {
  font-size: 0.95rem;
  color: rgba(245,241,232,0.82);
  line-height: 1.5;
}

/* ========== VISION & MISSION — verify per brochure ========== */
/* Vision: High-Performance, Net-Zero, Climate-Adaptive Buildings */
/* Mission: innovative design + sustainable practices, lasting comfort, reducing environmental impact */

/* ========================================================
   MOBILE RESPONSIVE STYLES
   Breakpoints: 320px–768px (primary), up to 900px (nav)
   ======================================================== */

/* ---- GLOBAL MOBILE FIXES ---- */
@media (max-width: 768px) {
  :root {
    --gutter: 16px;
  }

  /* Prevent horizontal overflow */
  body, html { overflow-x: hidden; }
  .container { padding: 0 16px; }

  /* ---- LOGO SIZE on mobile (slightly smaller to fit 64px nav) ---- */
  .logo-img { width: 44px; height: 44px; }
  .logo-text strong { font-size: 18px; }

  /* ---- HERO SECTION ---- */
  .hero { padding-top: calc(var(--nav-h) + 32px); min-height: auto; }
  .hero-title { font-size: clamp(2.8rem, 12vw, 4rem) !important; }
  .hero-lede { font-size: 0.95rem; }
  .hero-ctas { flex-direction: column; align-items: stretch; gap: 12px; }
  .hero-ctas .btn { justify-content: center; }

  /* Flagship card on mobile */
  .flagship-card { margin-top: 24px; }
  .flagship-body { flex-direction: column; }
  .flagship-img { width: 100%; max-height: 180px; object-fit: cover; border-radius: 0 0 var(--radius) var(--radius); }

  /* ---- CREDENTIALS / PILLARS ---- */
  .cred-pillars { grid-template-columns: 1fr; }
  .credentials-section { padding: 40px 0; }
  .stats-row { flex-direction: column; gap: 24px; }
  .stat-divider { width: 60px; height: 1px; margin: 0; }
  .stat-number { font-size: clamp(2.4rem, 10vw, 3.5rem); }

  /* ---- ABOUT / PILLARS ---- */
  .pillars { grid-template-columns: 1fr !important; }
  .pillar { padding: 28px 20px; }
  .mission-grid { grid-template-columns: 1fr !important; }

  /* ---- SERVICES BENTO ---- */
  .services-bento { grid-template-columns: 1fr !important; }
  .services-uniform-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
  .services-card-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .svc--lg, .svc--wide { grid-column: 1 !important; }

  /* ---- CAROUSEL SECTION ---- */
  .carousel-section { padding: 40px 0; }
  .slide-caption { padding: 24px 16px 16px; }
  .slide-caption h3 { font-size: 1.2rem; }
  .carousel-controls { flex-direction: column; align-items: flex-start; gap: 16px; }
  .carousel-controls--unified { flex-direction: row; align-items: center; justify-content: center; gap: 12px; }

  /* ---- INNER HERO ---- */
  .inner-hero { padding: calc(var(--nav-h) + 40px) 16px 60px; }
  .inner-hero-title { font-size: clamp(2rem, 10vw, 3rem); }

  /* ---- SERVICES PAGE GRID ---- */
  .services-card-grid { grid-template-columns: 1fr !important; }
  .services-uniform-grid { grid-template-columns: 1fr !important; }
  .svc-page-card--featured { grid-column: 1 !important; }

  /* ---- PROJECT DETAIL HERO ---- */
  .project-detail-hero .container { grid-template-columns: 1fr !important; }
  .project-detail-title { font-size: clamp(1.8rem, 8vw, 3rem); }

  /* ---- GALLERY GRID ---- */
  .gallery-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
  .gallery-grid .gallery-item--featured { grid-column: 1 !important; grid-row: 1 !important; }

  /* ---- PORTFOLIO CARD GRID ---- */
  .portfolio-card-grid { grid-template-columns: 1fr !important; }

  /* ---- TEAM ---- */
  .team-grid { grid-template-columns: 1fr !important; }
  .team-grid--single { max-width: 100%; }
  .member { flex-direction: column; }
  .member-portrait { width: 100%; }
  .about-vivid-inner { grid-template-columns: 1fr !important; }

  /* ---- CONTACT ---- */
  .contact-grid { grid-template-columns: 1fr !important; gap: 40px; }
  .contact-form { grid-template-columns: 1fr !important; }
  .field--full { grid-column: 1 !important; }
  .contact-form .btn { grid-column: 1 !important; }

  /* ---- FOOTER ---- */
  .footer-grid { grid-template-columns: 1fr !important; gap: 32px; }
  .footer-cta h2 { font-size: clamp(1.8rem, 8vw, 2.5rem); }
  .footer-mail { font-size: clamp(1rem, 4vw, 1.4rem); word-break: break-all; }

  /* ---- CTA BAND ---- */
  .cta-band .container { flex-direction: column; text-align: center; gap: 20px; }
  .cta-band h2 { font-size: clamp(1.5rem, 6vw, 2rem); }
  .cta-inner { flex-direction: column !important; align-items: center; }

  /* ---- PROVIDENCE PARK ---- */
  .pp-info-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .pp-two-col-section { grid-template-columns: 1fr !important; gap: 32px; }
  .pp-plan-grid { grid-template-columns: 1fr !important; }
  .pp-render-main { border-radius: var(--radius); }
  .tl-track { padding-left: 24px; }
  .tl-item::before { left: -24px; }
  .tl-card { padding: 18px 20px; }
  .tl-date { font-size: 1rem; }

  /* ---- RESEARCH PAGE ---- */
  .pub-card { grid-template-columns: 40px 1fr; gap: 0 16px; padding: 28px 0; }
  .pub-year-badge { display: none; }
  .pub-meta-row { gap: 8px 10px; }

  /* ---- NAV CTA ---- */
  .nav-cta span + svg { display: none; }

  /* ---- SECTION HEADS ---- */
  .section-title { font-size: clamp(1.8rem, 7vw, 2.6rem); }
  .section-head { margin-bottom: 32px; }
  .section-lede { font-size: 0.95rem; }

  /* ---- PROJECT NAV STRIP ---- */
  .project-nav-inner { flex-direction: column; align-items: flex-start; gap: 24px; }
  .project-nav-link { max-width: 100%; }

  /* ---- PLAN SPEC TABLE ---- */
  .pp-plan-spec { grid-template-columns: 100px 1fr; }

  /* ---- CREDENTIALS BADGES SECTION (old style fallback) ---- */
  .credential-badge { padding: 0 16px; }

  /* ---- CERTS GRID ---- */
  .certs-grid { grid-template-columns: 1fr !important; }
}

/* ========== WHATSAPP FLOATING BUTTON ========== */
.whatsapp-float {
  position: fixed;
  left: 24px;
  bottom: 40px;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}
.whatsapp-float:hover {
  transform: translateY(-3px) scale(1.07);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.55);
}
/* 320–425px */
@media (max-width: 425px) {
  .whatsapp-float { bottom: 90px; width: 38px; height: 38px; }
  .whatsapp-float svg { width: 20px; height: 20px; }
}

/* 426–639px */
@media (min-width: 426px) and (max-width: 639px) {
  .whatsapp-float { bottom: 86px; width: 32px; height: 32px; }
  .whatsapp-float svg { width: 18px; height: 18px; }
}

/* 640–1023px */
@media (min-width: 640px) and (max-width: 1023px) {
  .whatsapp-float { bottom: 65px; width: 38px; height: 38px; }
  .whatsapp-float svg { width: 20px; height: 20px; }
}

/* ========== RESEARCH TEASER CARDS ========== */
.research-teaser-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 36px;
}
@media (min-width: 640px) {
  .research-teaser-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .research-teaser-grid { grid-template-columns: repeat(3, 1fr); }
}
/* Two-card variant — always 2 col side by side, never 3 */
@media (min-width: 640px) {
  .research-teaser-grid--two {
    grid-template-columns: repeat(2, 1fr) !important;
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
  }
}
@media (min-width: 960px) {
  .research-teaser-grid--two {
    grid-template-columns: repeat(2, 1fr) !important;
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
  }
}

.research-teaser-card {
  background: var(--bone);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.25s, transform 0.25s;
}
.research-teaser-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.research-teaser-card--more {
  background: var(--sand-2);
  border-style: dashed;
}

.rtc-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.rtc-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--forest);
  background: rgba(15,58,46,0.08);
  border: 1px solid rgba(15,58,46,0.15);
  border-radius: 100px;
  padding: 3px 10px;
  flex-shrink: 0;
}
.rtc-date {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.research-teaser-card h3 {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 400;
  color: var(--forest);
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 0;
}
.research-teaser-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
  flex: 1;
}

.rtc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--forest);
  text-decoration: none;
  margin-top: auto;
  transition: gap 0.2s;
}
.rtc-link:hover { gap: 10px; }

/* ---- 480px and below ---- */
@media (max-width: 480px) {
  .pp-info-grid { grid-template-columns: 1fr !important; }
  .gallery-grid { grid-template-columns: 1fr !important; }
  .hero-title { font-size: clamp(2.4rem, 13vw, 3.2rem) !important; }
  .inner-hero-title { font-size: clamp(1.8rem, 11vw, 2.6rem); }
  .flagship-card { padding: 16px; }
  .btn { font-size: 0.9rem; padding: 12px 20px; }
}

/* ---- Touch-friendly carousels (already have touch events in JS, ensure sizing) ---- */
@media (max-width: 768px) {
  .carousel-wrap { border-radius: var(--radius); }
  .carousel-btn { width: 36px !important; height: 36px !important; }
  .hero-carousel-btn { width: 34px !important; height: 34px !important; }
  .hero-dots { gap: 5px; }
  .hero-dots .carousel-dot { width: 6px; height: 6px; }
  .hero-dots .carousel-dot.active { width: 18px; }
}

/* ---- Wide content that might overflow on mobile ---- */
@media (max-width: 768px) {
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  pre, code { overflow-x: auto; max-width: 100%; }
  svg { max-width: 100%; }
  img { max-width: 100%; height: auto; }
}

/* ---- Hamburger nav: ensure links are visible and tappable ---- */
@media (max-width: 959px) {
  .nav-links.open .nav-link {
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    padding: 10px 0;
    min-height: 48px;
    display: flex;
    align-items: center;
  }
  .nav-links li {
    width: 100%;
  }
  .hamburger {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* ---- PP milestone list: narrow screens ---- */
@media (max-width: 768px) {
  .pp-milestone-name { font-size: 0.9rem; }
  .pp-milestone-status { font-size: 11px; }
  .pp-milestone-item { gap: 10px; padding: 11px 0; }
}

/* ---- Brochure CTA button ---- */
.btn svg { flex-shrink: 0; }

/* ========== PP FEATURES GRID — symmetric 7-card layout ========== */
/* 1 col mobile → 2 col tablet (last card spans 2) → 4 col desktop (last card spans 2) */
.pp-features-grid {
  grid-template-columns: 1fr !important;
}
@media (min-width: 560px) {
  .pp-features-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 16px !important; }
  /* Last card fills the final row: 3×2 + 1×full = symmetric */
  .pp-features-grid .cert--wide { grid-column: span 2; }
}
@media (min-width: 1024px) {
  .pp-features-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 20px !important; }
  /* Row 1: cards 1–4. Row 2: cards 5, 6, 7(span 2) = fills 4 cols */
  .pp-features-grid .cert--wide { grid-column: span 2; }
}

/* ========== CARD SYMMETRY — equal height, bottom-aligned actions ========== */
/* Cert cards (features & benefits, green certs) */
.cert {
  display: flex;
  flex-direction: column;
}
.cert p { flex: 1; }

/* Research / paper cards */
.paper {
  display: flex;
  flex-direction: column;
}
.paper p { flex: 1; }

/* Team member cards */
.member {
  display: flex;
  flex-direction: column;
}
.member-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.member-bio { flex: 1; }

/* ===== COMPACT MEMBER CARD ===== */
.member--compact .member-portrait {
  aspect-ratio: 4 / 3;
}
.member--compact .member-info {
  padding: 14px 16px 18px;
}
.member--compact .member-info .member-role-badge {
  position: static;
  display: inline-block;
  margin-bottom: 8px;
  font-size: 11px;
  padding: 4px 10px;
}
.member--compact .member-info h3 {
  font-size: 1.2rem;
  margin-bottom: 3px;
}
.member--compact .member-title {
  font-size: 11px;
  margin-bottom: 10px;
}
.member--compact .member-credentials {
  padding: 8px 0;
  margin-bottom: 8px;
  gap: 3px;
}
.member--compact .member-credentials li {
  font-size: 13px;
}
.member--compact .member-bio {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Service page cards */
.svc-page-card {
  display: flex;
  flex-direction: column;
}
.svc-page-card p { flex: 1; }

/* ========== RESEARCH PAPER DETAIL PAGES ========== */
/* Centered content well — keeps all detail content in a readable column */
.rp-article {
  max-width: 800px;
  margin: 0 auto;
}

/* Back-to-list link inside the dark inner-hero */
.rp-back-hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: rgba(245,241,232,0.75);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.18s;
  margin-bottom: 28px;
}
.rp-back-hero:hover { color: var(--bone); }
.rp-back-hero svg { transition: transform 0.18s; }
.rp-back-hero:hover svg { transform: translateX(-3px); }

/* Hero meta row — adapts pub-meta-row colours for dark background */
.rp-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 22px;
}

/* Research paper detail pages — smaller, less dramatic title */
.inner-hero:has(.rp-back-hero) .inner-hero-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.015em;
  max-width: 36ch;
}
.inner-hero:has(.rp-back-hero) .inner-hero-title em {
  font-style: italic;
  color: var(--ochre);
}

/* Override badge colours for dark hero — light background badges become invisible on dark green */
.inner-hero .pub-type-badge {
  background: rgba(245,241,232,0.14);
  border: 1px solid rgba(245,241,232,0.22);
}
.inner-hero .pub-type--conference { color: var(--ochre); }
.inner-hero .pub-type--thesis { color: rgba(245,241,232,0.88); }
.inner-hero .pub-type--article { color: rgba(233,180,76,0.95); }
.rp-hero-meta .pub-venue {
  color: rgba(245,241,232,0.82);
}
.rp-hero-meta .pub-year-badge {
  color: var(--ochre);
}

/* Authors line (paper 6) */
.rp-authors-line {
  font-size: 0.97rem;
  color: rgba(245,241,232,0.72);
  font-style: italic;
  margin-top: 10px;
  margin-bottom: 0;
}

/* Section labels inside detail content */
.rp-section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--forest);
  margin: 0 0 16px;
  display: block;
  font-weight: 600;
}
.rp-article > * + .rp-section-label {
  margin-top: 44px;
}

/* Full abstract text */
.rp-full-abstract {
  margin: 0 0 40px;
}
.rp-full-abstract p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  margin: 0 0 20px;
}
.rp-full-abstract p:last-child { margin-bottom: 0; }

/* Divider between abstract sections */
.rp-rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 40px 0;
}

/* Keywords row */
.rp-keywords-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 48px;
}
.rp-keyword-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--forest);
  background: rgba(15,58,46,0.07);
  border: 1px solid rgba(15,58,46,0.18);
  padding: 6px 16px;
  border-radius: 100px;
}

/* CTA row at bottom of detail page */
.rp-cta-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 8px;
}

/* Truncated snippet shown in ecube-projects pub-card */
.pub-snippet {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0;
  max-width: 68ch;
}

@media (max-width: 768px) {
  .rp-article { max-width: 100%; }
  .rp-cta-row { flex-direction: column; align-items: flex-start; }
  .rp-full-abstract p { font-size: 0.95rem; }
  .rp-section-label { font-size: 11px; }
  .rp-article > * + .rp-section-label { margin-top: 36px; }
  .inner-hero:has(.rp-back-hero) .inner-hero-title {
    font-size: clamp(1.35rem, 5vw, 1.75rem);
  }
}
