/* =============================================
   MEPES LLC Theme
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: #ffffff;
  color: #111111;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

/* =============================================
   SCROLL REVEAL ANIMATIONS
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

.reveal-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

.reveal-scale {
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal-scale.visible { opacity: 1; transform: scale(1); }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
ul, ol { list-style: none; }

/* ---- Container ---- */
.wrap {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =============================================
   HEADER / NAV
   ============================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  height: 56px;
  transition: box-shadow 0.3s ease;
}
.site-header.scrolled {
  box-shadow: 0 2px 16px rgba(17,17,17,0.06);
  border-bottom-color: transparent;
}
.site-header .wrap {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.site-logo .logo-main {
  color: #111;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.15em;
}
.site-logo .logo-sub {
  color: #999;
  font-size: 11px;
  letter-spacing: 0.15em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.main-nav a {
  font-size: 13px;
  letter-spacing: 0.03em;
  color: #999;
  transition: color 0.2s;
  text-decoration: none;
}
.main-nav a:hover,
.main-nav a.current-menu-item,
.main-nav a[aria-current="page"] { color: #111; }

.nav-quote {
  display: inline-flex;
  align-items: center;
  border: 1px solid #111;
  color: #111;
  font-size: 12px;
  letter-spacing: 0.12em;
  padding: 8px 20px;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.nav-quote:hover { background: #111; color: #fff; }

/* Nav dropdown */
.nav-has-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}
.nav-caret {
  width: 10px;
  height: 10px;
  margin-left: 3px;
  vertical-align: middle;
  transition: transform 0.2s ease;
  display: inline-block;
}
.nav-has-dropdown:hover .nav-caret { transform: rotate(180deg); }
.nav-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #e8e8e8;
  min-width: 140px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(17,17,17,0.07);
}
.nav-has-dropdown:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown a {
  display: block;
  padding: 11px 18px;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: #999;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.nav-dropdown a:hover,
.nav-dropdown a.current-menu-item { color: #111; background: #fafaf8; }

/* Mobile sub-link */
.mobile-sub-link {
  display: block;
  padding: 12px 24px 12px 40px;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: #bbb;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
  transition: color 0.2s;
}
.mobile-sub-link:hover,
.mobile-sub-link.current-menu-item { color: #111; }

.hamburger {
  display: none;
  background: none;
  border: none;
  color: #111;
  padding: 4px;
}

/* Mobile menu */
.mobile-nav {
  display: none;
  background: #fff;
  border-top: 1px solid #e8e8e8;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block;
  padding: 14px 24px;
  font-size: 13px;
  letter-spacing: 0.03em;
  color: #999;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
}
.mobile-nav a:hover,
.mobile-nav a.current-menu-item { color: #111; }

/* Page offset for fixed header */
.page-wrap { padding-top: 56px; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  border-top: 1px solid #e8e8e8;
  background: #fff;
}
.site-footer .wrap {
  padding-top: 40px;
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
@media (min-width: 768px) {
  .site-footer .wrap {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}
.footer-brand-name {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.15em;
  color: #111;
  margin-bottom: 4px;
}
.footer-brand-sub {
  color: #999;
  font-size: 12px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-nav a {
  color: #999;
  font-size: 12px;
  letter-spacing: 0.03em;
  transition: color 0.2s;
  text-decoration: none;
}
.footer-nav a:hover { color: #111; }
.footer-copy { color: #bbb; font-size: 12px; }
.footer-contact-line { font-size: 12px; color: #999; margin-top: 4px; }

/* =============================================
   PAGE HEADER (About / Services / Projects / Contact)
   ============================================= */
.page-header {
  border-bottom: 1px solid #e8e8e8;
  padding: 64px 0;
}
.page-header .eyebrow {
  color: #999;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.page-header-grid {
  display: grid;
  gap: 40px;
}
@media (min-width: 768px) {
  .page-header-grid { grid-template-columns: 1fr 1fr; }
}
.page-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 300;
  line-height: 1.15;
  color: #111;
}
.page-header p {
  font-size: 15px;
  color: #444;
  line-height: 1.75;
  align-self: end;
}

/* =============================================
   HOME — HERO
   ============================================= */
.hero {
  position: relative;
  height: 90vh;
  min-height: 560px;
  overflow: hidden;
}

/* KEY FIX: .wrap must fill the full hero height so .hero-content can flex to the bottom */
.hero > .wrap {
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.50);
}
.hero-content {
  position: relative;          /* sits above the absolute bg + overlay */
  margin-top: auto;            /* pushes content to the bottom */
  padding-bottom: 64px;
}
.hero-eyebrow {
  color: rgba(255,255,255,0.60);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  line-height: 1.1;
  max-width: 800px;
  margin-bottom: 24px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #111;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 12px 24px;
  transition: background 0.2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-hero-primary:hover { background: rgba(255,255,255,.88); }
.btn-hero-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.50);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 12px 24px;
  transition: border-color 0.2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-hero-outline:hover { border-color: #fff; }

/* Arrow icon inline */
.arrow-icon { width: 12px; height: 12px; flex-shrink: 0; }

/* =============================================
   HOME — STATS STRIP
   ============================================= */
.stats-strip { border-bottom: 1px solid #e8e8e8; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}
.stat-cell {
  padding: 32px 24px;
  text-align: center;
  border-right: 1px solid #e8e8e8;
}
.stat-cell:last-child { border-right: none; }
.stat-cell:nth-child(2) { border-right: none; }
@media (min-width: 768px) {
  .stat-cell:nth-child(2) { border-right: 1px solid #e8e8e8; }
}
.stat-value {
  font-size: 2rem;
  font-weight: 300;
  color: #111;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  color: #999;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* 3-column stats variant */
.stats-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}
.stats-grid--3 .stat-cell:nth-child(2) { border-right: 1px solid #e8e8e8; }
@media (max-width: 767px) {
  .stats-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .stats-grid--3 .stat-cell:nth-child(2) { border-right: 1px solid #e8e8e8; }
  .stats-grid--3 .stat-cell { border-right: 1px solid #e8e8e8; }
  .stats-grid--3 .stat-cell:last-child { border-right: none; }
}

/* =============================================
   HOME — INTRO / ABOUT
   ============================================= */
.intro-section {
  padding: 80px 0;
}
.intro-grid {
  display: grid;
  gap: 64px;
}
@media (min-width: 768px) {
  .intro-grid { grid-template-columns: 1fr 1fr; }
}
.intro-eyebrow {
  color: #999;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.intro-heading {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 300;
  line-height: 1.3;
  color: #111;
}
.intro-body p {
  font-size: 15px;
  color: #444;
  line-height: 1.8;
  margin-bottom: 16px;
}
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #111;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: gap 0.2s;
  margin-top: 16px;
  text-decoration: none;
}
.link-arrow:hover { gap: 12px; }

/* =============================================
   HOME — SERVICES STRIP
   ============================================= */
.services-section {
  padding: 64px 0;
  background: #fafaf8;
  border-top: 1px solid #e8e8e8;
  border-bottom: 1px solid #e8e8e8;
}
.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 48px;
}
.section-eyebrow {
  color: #999;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-heading {
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  font-weight: 400;
  color: #111;
}
.link-muted {
  display: none;
  align-items: center;
  gap: 8px;
  color: #999;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s;
  text-decoration: none;
}
.link-muted:hover { color: #111; }
@media (min-width: 768px) { .link-muted { display: inline-flex; } }

.services-grid {
  display: grid;
  gap: 1px;
  background: #e8e8e8;
}
@media (min-width: 640px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(4, 1fr); } }

.service-card {
  background: #fafaf8;
  padding: 40px 36px;
  transition: background 0.25s;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.service-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: #111;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}
.service-card:hover { background: #fff; }
.service-card:hover::after { transform: scaleX(1); }

.service-num {
  color: #e0e0e0;
  font-size: 11px;
  letter-spacing: 0.18em;
  margin-bottom: 40px;
  transition: color 0.25s;
}
.service-card:hover .service-num { color: #bbb; }

.service-title {
  font-weight: 400;
  font-size: 16px;
  color: #111;
  margin-bottom: 14px;
  line-height: 1.3;
}

.service-desc {
  color: #999;
  font-size: 13px;
  line-height: 1.75;
  flex: 1;
}

.service-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(17,17,17,0);
  margin-top: 28px;
  transition: color 0.25s, gap 0.2s;
  text-transform: uppercase;
}
.service-card:hover .service-card-link { color: #111; gap: 10px; }

/* =============================================
   HOME — CORE CAPABILITIES LIST
   (replaces the card-grid style)
   ============================================= */
.capabilities-list { width: 100%; }

.capability-row {
  display: grid;
  grid-template-columns: 52px 220px 1fr 28px;
  gap: 0 40px;
  padding: 28px 0;
  border-bottom: 1px solid #e8e8e8;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s, padding 0.2s;
  position: relative;
}
.capability-row:first-child { border-top: 1px solid #e8e8e8; }
.capability-row:hover { background: #fafaf8; padding-left: 12px; }

.capability-num {
  font-size: 11px;
  color: #ddd;
  letter-spacing: 0.18em;
  font-weight: 500;
  transition: color 0.25s;
  align-self: start;
  padding-top: 3px;
}
.capability-row:hover .capability-num { color: #aaa; }

.capability-title {
  font-size: 16px;
  font-weight: 500;
  color: #111;
  line-height: 1.3;
}

.capability-desc {
  font-size: 13px;
  color: #666;
  line-height: 1.65;
}

.capability-arrow {
  color: transparent;
  font-size: 18px;
  line-height: 1;
  justify-self: end;
  transition: color 0.2s, transform 0.25s;
}
.capability-row:hover .capability-arrow { color: #111; transform: translateX(5px); }

@media (max-width: 767px) {
  .capability-row {
    grid-template-columns: 40px 1fr;
    grid-template-rows: auto auto;
    gap: 4px 16px;
    padding: 22px 0;
  }
  .capability-desc { grid-column: 2; margin-top: 4px; }
  .capability-arrow { display: none; }
  .capability-row:hover { padding-left: 8px; }
}

/* =============================================
   HOME — PROJECTS SLIDER
   ============================================= */
.projects-section {
  padding: 80px 0 0;
  overflow: hidden; /* clips the horizontal scroll peek */
}

/* Equal grid for related projects on detail page */
.projects-grid {
  display: grid;
  gap: 2px;
  background: #e8e8e8;
}
@media (min-width: 768px) { .projects-grid { grid-template-columns: repeat(3, 1fr); } }

/* Slider track — aligns left edge with .wrap content */
.projects-slider {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* left padding mirrors .wrap centering; right gives peek room */
  padding-left:  max(24px, calc((100vw - 1152px) / 2 + 24px));
  padding-right: max(120px, calc((100vw - 1152px) / 2 + 120px));
  padding-bottom: 4px; /* prevent box-shadow clip */
}
.projects-slider::-webkit-scrollbar { display: none; }

/* Individual slide card */
.slider-card {
  flex-shrink: 0;
  width: min(680px, 82vw);
  height: 460px;
  scroll-snap-align: start;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  background: #111;
  display: block;
  transition: opacity 0.3s ease;
}
@media (max-width: 767px) { .slider-card { height: 360px; width: min(680px, 88vw); } }

.slider-card-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.75s ease, opacity 0.45s ease;
}
.slider-card:hover .slider-card-img { transform: scale(1.05); opacity: 0.75; }

.slider-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17,17,17,0.85) 0%, rgba(17,17,17,0.12) 50%, transparent 72%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
  pointer-events: none;
  transition: background 0.4s ease;
}
.slider-card:hover .slider-card-overlay {
  background: linear-gradient(to top, rgba(17,17,17,0.92) 0%, rgba(17,17,17,0.28) 55%, transparent 78%);
}

.slider-card-cat {
  position: absolute;
  top: 22px; left: 22px;
  color: rgba(255,255,255,0.85);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 5px 12px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(6px);
}

.slider-card-title {
  color: #fff;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 8px;
}

.slider-card-loc {
  color: rgba(255,255,255,0.6);
  font-size: 13px;
}

.slider-card-cta {
  color: rgba(255,255,255,0);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  transition: color 0.3s ease;
}
.slider-card:hover .slider-card-cta { color: rgba(255,255,255,0.88); }

/* Controls row */
.slider-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 64px;
}

.slider-dots {
  display: flex;
  gap: 10px;
  align-items: center;
}
.slider-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #ddd;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s;
}
.slider-dot.active { background: #111; transform: scale(1.5); }

.slider-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.slider-btn {
  width: 44px; height: 44px;
  border: 1px solid #e8e8e8;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  color: #111;
  font-family: inherit;
  font-size: 16px;
  line-height: 1;
}
.slider-btn:hover { background: #111; color: #fff; border-color: #111; }
.slider-btn:disabled { opacity: 0.28; cursor: default; }
.slider-btn:disabled:hover { background: #fff; color: #111; border-color: #e8e8e8; }

/* ---- Base project card (image-overlay style) ---- */
.project-card {
  display: block;
  text-decoration: none;
  background: #111;
  position: relative;
  overflow: hidden;
}

.project-img-wrap {
  overflow: hidden;
  position: relative;
  height: 300px;
}
@media (min-width: 768px) { .project-img-wrap { height: 320px; } }

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease, opacity 0.4s ease;
  display: block;
}
.project-card:hover .project-img { transform: scale(1.06); opacity: 0.75; }

/* Gradient overlay — always visible, darkens on hover */
.project-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17,17,17,0.82) 0%, rgba(17,17,17,0.15) 50%, transparent 75%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px 20px 18px;
  pointer-events: none;
  transition: background 0.4s ease;
}
.project-card:hover .project-img-overlay {
  background: linear-gradient(to top, rgba(17,17,17,0.9) 0%, rgba(17,17,17,0.35) 55%, transparent 80%);
}

/* Category badge — top-left */
.project-cat-badge {
  position: absolute;
  top: 16px; left: 16px;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  pointer-events: none;
}

/* Title and location on overlay */
.project-card-title {
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 5px;
  line-height: 1.3;
}
.project-card-loc {
  color: rgba(255,255,255,0.6);
  font-size: 12px;
}

/* "View Project" cta — fades in on hover */
.project-img-overlay-cta {
  color: rgba(255,255,255,0);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  transition: color 0.3s ease;
}
.project-card:hover .project-img-overlay-cta { color: rgba(255,255,255,0.9); }

/* ---- Featured card (spans 2 rows on desktop) ---- */
.project-card--featured {
  background: #111;
  overflow: hidden;
}
@media (min-width: 768px) { .project-card--featured { grid-row: span 2; } }

.project-card--featured .project-img-wrap {
  height: 380px;
}
@media (min-width: 768px) { .project-card--featured .project-img-wrap { height: 100%; min-height: 520px; } }

.project-card--featured .project-card-title { font-size: clamp(1rem, 2vw, 1.3rem); }

/* ---- Secondary card ---- */
.project-card--secondary .project-img-wrap { height: 220px; }
@media (min-width: 768px) { .project-card--secondary .project-img-wrap { height: 100%; min-height: 200px; } }

/* Legacy (meta below image — unused but kept) */
.project-card-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 0 0;
  border-top: 1px solid #f0f0f0;
  margin-top: 14px;
}
.project-card-cat {
  color: #888;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* =============================================
   HOME — CTA DARK
   ============================================= */
.cta-dark {
  background: #111;
  padding: 80px 0;
  text-align: center;
}
.cta-dark .eyebrow {
  color: rgba(255,255,255,.40);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.cta-dark h2 {
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 300;
  margin-bottom: 32px;
}
.btn-cta-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.30);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 14px 32px;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.btn-cta-outline:hover { background: #fff; color: #111; }

/* =============================================
   ABOUT PAGE
   ============================================= */
.about-hero-img {
  width: 100%;
  height: 288px;
  object-fit: cover;
}
@media (min-width: 768px) { .about-hero-img { height: 384px; } }
.about-img-wrap { padding: 40px 0; }

/* Values */
.values-section {
  padding: 64px 0;
  background: #fafaf8;
  border-top: 1px solid #e8e8e8;
  border-bottom: 1px solid #e8e8e8;
}
.values-grid {
  display: grid;
  gap: 40px;
}
@media (min-width: 640px) { .values-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .values-grid { grid-template-columns: repeat(4, 1fr); } }
.value-num {
  color: #ddd;
  font-size: 12px;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}
.value-title {
  font-weight: 400;
  font-size: 16px;
  color: #111;
  margin-bottom: 12px;
}
.value-desc { color: #999; font-size: 12px; line-height: 1.7; }

/* Timeline */
.timeline-section { padding: 80px 0; }
.timeline-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 32px;
  padding: 24px 0;
  border-bottom: 1px solid #e8e8e8;
}
.timeline-row:hover .timeline-year { color: #111; }
.timeline-year {
  color: #999;
  font-size: 12px;
  letter-spacing: 0.12em;
  padding-top: 2px;
  transition: color 0.2s;
}
.timeline-event { font-size: 14px; color: #444; line-height: 1.7; }

/* Leadership */
.team-section {
  padding: 64px 0;
  background: #fafaf8;
  border-top: 1px solid #e8e8e8;
  border-bottom: 1px solid #e8e8e8;
}
.team-grid {
  display: grid;
  gap: 32px;
}
@media (min-width: 640px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .team-grid { grid-template-columns: repeat(4, 1fr); } }
.team-img {
  width: 100%;
  height: 208px;
  object-fit: cover;
  object-position: top;
  margin-bottom: 16px;
  filter: grayscale(100%);
  transition: filter 0.3s;
  display: block;
}
.team-img:hover { filter: grayscale(0%); }
.team-img-placeholder {
  width: 100%;
  height: 208px;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 48px;
  color: #ccc;
}
.team-name { font-size: 14px; color: #111; margin-bottom: 4px; }
.team-role { font-size: 12px; color: #999; }

/* =============================================
   ABOUT — MD MESSAGE SECTION
   ============================================= */
.md-section {
  padding: 80px 0;
  border-top: 1px solid #e8e8e8;
}
.md-grid {
  display: grid;
  gap: 64px;
}
@media (min-width: 768px) {
  .md-grid { grid-template-columns: 340px 1fr; align-items: start; }
}

.md-photo-col { display: flex; flex-direction: column; }
.md-photo {
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: top;
  display: block;
  filter: grayscale(20%);
  margin-bottom: 20px;
}
.md-photo-placeholder {
  width: 100%;
  height: 420px;
  background: #f4f4f4;
  border: 1px dashed #ddd;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}
.md-photo-placeholder svg { width: 80px; height: 80px; }
.md-photo-hint { font-size: 11px; color: #bbb; text-align: center; line-height: 1.6; letter-spacing: 0.03em; }

.md-id { border-top: 1px solid #e8e8e8; padding-top: 16px; }
.md-name-label { font-size: 14px; color: #111; margin-bottom: 4px; }
.md-company-label { font-size: 12px; color: #999; }

.md-text-col {}
.md-message p {
  font-size: 15px;
  color: #444;
  line-height: 1.9;
  margin-bottom: 22px;
}
.md-quote {
  border-left: 2px solid #111;
  padding-left: 20px;
  margin-top: 32px;
  font-size: 15px;
  color: #111;
  font-style: italic;
  line-height: 1.6;
}

/* =============================================
   ABOUT — VISION & MISSION
   ============================================= */
.vm-section {
  padding: 80px 0;
  background: #fafaf8;
  border-top: 1px solid #e8e8e8;
  border-bottom: 1px solid #e8e8e8;
}
.vm-grid {
  display: grid;
  gap: 0;
}
.vm-block {
  padding: 48px 0;
  border-bottom: 1px solid #e8e8e8;
}
.vm-block:last-child { border-bottom: none; }
.vm-text {
  font-size: 15px;
  color: #444;
  line-height: 1.85;
}

/* =============================================
   ABOUT — CERTIFICATIONS (premium minimal)
   ============================================= */
.certs-section {
  padding: 80px 0;
  border-top: 1px solid #e8e8e8;
}
.certs-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px)  { .certs-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .certs-grid { grid-template-columns: repeat(5, 1fr); } }

.cert-card {
  padding: 28px 24px;
  border: 1px solid #e8e8e8;
  display: flex;
  flex-direction: column;
  background: #fff;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
  cursor: default;
}
.cert-card:hover {
  border-color: #111;
  box-shadow: 0 8px 28px rgba(17,17,17,0.07);
  transform: translateY(-2px);
}

.cert-icon {
  width: 18px;
  height: 18px;
  color: #ccc;
  margin-bottom: 22px;
  flex-shrink: 0;
  transition: color 0.22s;
}
.cert-icon svg { width: 18px; height: 18px; display: block; }
.cert-card:hover .cert-icon { color: #888; }

.cert-abbr {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: #bbb;
  text-transform: uppercase;
  margin-bottom: 10px;
  transition: color 0.22s;
}
.cert-card:hover .cert-abbr { color: #888; }

.cert-card-name {
  font-size: 13px;
  font-weight: 500;
  color: #111;
  line-height: 1.35;
  margin-bottom: 8px;
}
.cert-card-type {
  font-size: 11px;
  color: #999;
  line-height: 1.7;
  flex: 1;
}
.cert-card-foot {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 20px;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ccc;
  transition: color 0.22s;
}
.cert-card:hover .cert-card-foot { color: #888; }
.cert-card-foot svg { width: 9px; height: 9px; flex-shrink: 0; }

/* Legacy badge (kept for compatibility) */
.certs-row { display: flex; flex-wrap: wrap; gap: 16px; }
.cert-badge {
  border: 1px solid #e8e8e8;
  color: #666;
  font-size: 12px;
  letter-spacing: 0.05em;
  padding: 10px 20px;
}

/* About CTA */
.about-cta {
  border-top: 1px solid #e8e8e8;
  padding: 64px 0;
}
.about-cta-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
@media (min-width: 640px) {
  .about-cta-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.cta-text-title { font-size: 16px; color: #111; margin-bottom: 4px; }
.cta-text-sub { font-size: 14px; color: #999; }
.btn-dark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #111;
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 12px 24px;
  transition: background 0.2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-dark:hover { background: #333; }

/* =============================================
   SERVICES PAGE
   ============================================= */
.services-list { padding: 24px 0; }
.service-item {
  display: grid;
  gap: 48px;
  padding: 64px 0;
  border-bottom: 1px solid #e8e8e8;
  align-items: start;
}
@media (min-width: 768px) { .service-item { grid-template-columns: 1fr 1fr; } }
.service-item.reverse .service-item-text { order: 2; }
.service-item.reverse .service-item-img { order: 1; }
@media (max-width: 767px) {
  .service-item.reverse .service-item-text { order: unset; }
  .service-item.reverse .service-item-img { order: unset; }
}
.service-item-num {
  color: #ddd;
  font-size: 12px;
  letter-spacing: 0.12em;
  margin-bottom: 20px;
}
.service-item-title {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 300;
  color: #111;
  margin-bottom: 20px;
}
.service-item-desc {
  font-size: 15px;
  color: #444;
  line-height: 1.8;
  margin-bottom: 32px;
}
.service-scope { display: flex; flex-direction: column; gap: 8px; }
.scope-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #777;
}
.scope-dash {
  width: 16px;
  height: 1px;
  background: #ccc;
  flex-shrink: 0;
}
.service-item-img {
  width: 100%;
  height: 288px;
  object-fit: cover;
  display: block;
}
.services-cta {
  padding: 64px 0;
  background: #fafaf8;
  border-top: 1px solid #e8e8e8;
}
.cta-row {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
@media (min-width: 640px) {
  .cta-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* =============================================
   PROJECTS PAGE
   ============================================= */
.projects-filters {
  padding: 32px 0;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-btn {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 16px;
  border: 1px solid #e8e8e8;
  background: #fff;
  color: #999;
  transition: all 0.2s;
}
.filter-btn:hover { border-color: #999; }
.filter-btn.active {
  border-color: #111;
  background: #111;
  color: #fff;
}

.projects-archive { padding: 48px 0; }
.projects-archive-grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 640px) { .projects-archive-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .projects-archive-grid { grid-template-columns: repeat(3, 1fr); } }

/* Image-overlay card (same pattern as homepage project cards) */
.archive-project-card {
  display: block;
  text-decoration: none;
  background: #111;
  position: relative;
  overflow: hidden;
}

.archive-img-wrap {
  overflow: hidden;
  position: relative;
  height: 260px;
}

.archive-project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease, opacity 0.4s ease;
  display: block;
}
.archive-project-card:hover .archive-project-img { transform: scale(1.06); opacity: 0.75; }

.archive-project-img-placeholder {
  width: 100%;
  height: 100%;
  background: #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
}

.archive-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17,17,17,0.88) 0%, rgba(17,17,17,0.2) 50%, transparent 75%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  pointer-events: none;
  transition: background 0.4s ease;
}
.archive-project-card:hover .archive-card-overlay {
  background: linear-gradient(to top, rgba(17,17,17,0.93) 0%, rgba(17,17,17,0.35) 55%, transparent 80%);
}

.archive-card-cat-badge {
  position: absolute;
  top: 14px; left: 14px;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.18);
}

.archive-card-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 4px;
}
.archive-card-title { font-size: 14px; font-weight: 500; color: #fff; line-height: 1.3; }
.archive-card-year {
  color: rgba(255,255,255,0.4);
  font-size: 10px;
  letter-spacing: 0.12em;
  flex-shrink: 0;
  margin-left: 8px;
  margin-bottom: 1px;
}
.archive-card-loc { color: rgba(255,255,255,0.55); font-size: 12px; margin-bottom: 0; }

.archive-card-view {
  color: rgba(255,255,255,0);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  transition: color 0.3s ease;
}
.archive-project-card:hover .archive-card-view { color: rgba(255,255,255,0.85); }

/* Legacy (not rendered in new template — kept for safety) */
.archive-card-desc { display: none; }
.archive-card-bottom { display: none; }
.archive-card-body { display: none; }
.archive-card-value { display: none; }

.projects-page-cta {
  border-top: 1px solid #e8e8e8;
  padding: 64px 0;
  background: #fafaf8;
}

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  padding: 80px 0;
  text-align: center;
  color: #999;
}
.empty-state p { font-size: 14px; margin-bottom: 24px; }

/* =============================================
   CONTACT PAGE
   ============================================= */
.contact-body { padding: 64px 0; }
.contact-grid {
  display: grid;
  gap: 64px;
}
@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: 2fr 3fr;
  }
}
.contact-info-items { display: flex; flex-direction: column; gap: 40px; }
.contact-info-item { display: flex; gap: 20px; }
.contact-info-icon { margin-top: 2px; flex-shrink: 0; }
.contact-info-icon svg { width: 14px; height: 14px; color: #999; }
.contact-info-label {
  color: #999;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.contact-info-line { font-size: 14px; color: #444; line-height: 1.7; }

.contact-social {
  padding-top: 16px;
  border-top: 1px solid #e8e8e8;
  margin-top: 40px;
}
.contact-social-label {
  color: #999;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.social-links { display: flex; gap: 16px; }
.social-link {
  color: #999;
  font-size: 12px;
  transition: color 0.2s;
  text-decoration: none;
}
.social-link:hover { color: #111; }

/* Contact form */
.contact-form { display: flex; flex-direction: column; gap: 32px; }
.form-row {
  display: grid;
  gap: 32px;
}
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-field { display: flex; flex-direction: column; }
.form-label {
  color: #999;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.form-input {
  width: 100%;
  border: none;
  border-bottom: 1px solid #e8e8e8;
  outline: none;
  padding: 12px 0;
  font-size: 14px;
  color: #111;
  background: transparent;
  font-family: inherit;
  transition: border-color 0.2s;
}
.form-input:focus { border-bottom-color: #111; }
.form-input::placeholder { color: #bbb; }
.form-textarea {
  resize: none;
  min-height: 120px;
}
.btn-submit {
  background: #111;
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 14px 40px;
  border: none;
  transition: background 0.2s;
  font-family: inherit;
  align-self: flex-start;
}
.btn-submit:hover { background: #333; }

.form-success {
  padding: 64px 0;
  text-align: center;
}
.form-success-title { font-size: 16px; color: #111; margin-bottom: 8px; }
.form-success-sub { font-size: 14px; color: #999; margin-bottom: 32px; }
.btn-reset {
  background: none;
  border: none;
  color: #999;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s;
  font-family: inherit;
}
.btn-reset:hover { color: #111; }

.contact-map-img {
  width: 100%;
  height: 192px;
  object-fit: cover;
  object-position: center 60%;
  opacity: 0.60;
  display: block;
  vertical-align: bottom; /* removes inline-block gap that can appear below img */
}
.contact-map-border {
  border-top: 1px solid #e8e8e8;
  line-height: 0; /* prevents whitespace gap below the image */
  font-size: 0;
}

/* =============================================
   CAREERS PAGE
   ============================================= */

/* Why MEPES */
.careers-why {
  padding: 80px 0;
  background: #fafaf8;
  border-top: 1px solid #e8e8e8;
  border-bottom: 1px solid #e8e8e8;
}
.careers-why-grid {
  display: grid;
  gap: 48px;
}
@media (min-width: 640px)  { .careers-why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .careers-why-grid { grid-template-columns: repeat(4, 1fr); } }

.why-num {
  font-size: 2.75rem;
  font-weight: 200;
  color: #d4d4d4;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.why-title {
  font-size: 15px;
  font-weight: 500;
  color: #111;
  margin-bottom: 12px;
}
.why-desc {
  font-size: 13px;
  color: #888;
  line-height: 1.8;
}

/* Open Positions */
.careers-positions { padding: 80px 0; }

.careers-positions-header {
  margin-bottom: 40px;
}
.careers-positions-sub {
  font-size: 13px;
  color: #888;
  line-height: 1.7;
  max-width: 540px;
}

.positions-list { width: 100%; }

.position-row {
  display: grid;
  grid-template-columns: 1fr 160px 72px 72px;
  gap: 0 32px;
  padding: 20px 0;
  border-bottom: 1px solid #e8e8e8;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: background 0.18s ease, padding-left 0.2s ease;
}
.position-row:first-child { border-top: 1px solid #e8e8e8; }
.position-row:hover { background: #fafaf8; padding-left: 14px; }

.position-title {
  font-size: 14px;
  font-weight: 500;
  color: #111;
  line-height: 1.3;
}
.position-dept {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #aaa;
}
.position-exp {
  font-size: 11px;
  color: #bbb;
  white-space: nowrap;
}
.position-apply {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: transparent;
  white-space: nowrap;
  transition: color 0.18s ease;
}
.position-apply svg { width: 11px; height: 11px; flex-shrink: 0; }
.position-row:hover .position-apply { color: #111; }

@media (max-width: 767px) {
  .position-row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    row-gap: 5px;
    column-gap: 16px;
  }
  .position-dept {
    grid-column: 1;
    grid-row: 2;
    font-size: 9px;
  }
  .position-exp { display: none; }
  .position-apply {
    grid-column: 2;
    grid-row: 1 / span 2;
    color: #ccc;
  }
  .position-row:hover .position-apply { color: #111; }
}

/* Apply CTA — dark */
.careers-apply {
  background: #111;
  padding: 96px 0;
}
.careers-apply-inner { max-width: 580px; }

.careers-apply-eyebrow {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.30);
  margin-bottom: 24px;
}
.careers-apply-heading {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 300;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 18px;
}
.careers-apply-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.45);
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 480px;
}
.careers-apply-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 16px;
  font-weight: 400;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.18);
  padding-bottom: 5px;
  transition: border-color 0.22s ease;
}
.careers-apply-email:hover { border-color: rgba(255,255,255,0.55); }
.careers-apply-email svg {
  width: 16px;
  height: 16px;
  opacity: 0.45;
  flex-shrink: 0;
}
.careers-apply-note {
  margin-top: 18px;
  font-size: 11px;
  color: rgba(255,255,255,0.20);
  letter-spacing: 0.06em;
}

/* =============================================
   SINGLE PROJECT — FULL-WIDTH HERO
   ============================================= */
.project-hero-wrap {
  width: 100%;
  height: 440px;
  overflow: hidden;
  position: relative;
}
@media (min-width: 768px) { .project-hero-wrap { height: 560px; } }

.project-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* =============================================
   SINGLE PROJECT
   ============================================= */
.single-project-wrap { padding: 64px 0; }
.single-project-inner {
  display: grid;
  gap: 60px;
}
@media (min-width: 1024px) { .single-project-inner { grid-template-columns: 1fr 300px; } }
.project-main-content {}
.project-featured-img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  margin-bottom: 40px;
  display: block;
}
.project-content h2 { font-size: 22px; font-weight: 300; margin: 32px 0 12px; color: #111; }
.project-content h3 { font-size: 18px; font-weight: 400; margin: 24px 0 10px; color: #111; }
.project-content p { font-size: 14px; color: #666; line-height: 1.8; margin-bottom: 16px; }
.project-content ul { padding-left: 20px; list-style: disc; margin-bottom: 16px; }
.project-content li { font-size: 14px; color: #666; line-height: 1.7; margin-bottom: 6px; }

.project-sidebar { border-top: 1px solid #e8e8e8; padding-top: 24px; }
@media (min-width: 1024px) { .project-sidebar { border-top: none; padding-top: 0; border-left: 1px solid #e8e8e8; padding-left: 40px; } }
.sidebar-section { margin-bottom: 32px; padding-bottom: 32px; border-bottom: 1px solid #e8e8e8; }
.sidebar-section:last-child { border-bottom: none; margin-bottom: 0; }
.sidebar-label {
  color: #999;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.sidebar-value { font-size: 14px; color: #444; }
.sidebar-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.sidebar-tag {
  border: 1px solid #e8e8e8;
  color: #666;
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 6px 12px;
}
.sidebar-btn {
  display: block;
  text-align: center;
  border: 1px solid #111;
  color: #111;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 12px;
  transition: background 0.2s, color 0.2s;
  margin-bottom: 10px;
  text-decoration: none;
}
.sidebar-btn:hover { background: #111; color: #fff; }
.sidebar-btn.dark { background: #111; color: #fff; }
.sidebar-btn.dark:hover { background: #333; }

.project-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 32px 0;
}
.project-gallery-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}
.project-gallery-grid img:hover { opacity: .85; }

/* Related projects */
.related-projects { padding: 64px 0; border-top: 1px solid #e8e8e8; }

/* =============================================
   404 PAGE
   ============================================= */
.error-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
}
.error-404-num {
  font-size: 120px;
  font-weight: 200;
  color: #e8e8e8;
  line-height: 1;
  margin-bottom: 16px;
}
.error-404-title { font-size: 20px; font-weight: 300; color: #111; margin-bottom: 8px; }
.error-404-sub { font-size: 14px; color: #999; margin-bottom: 32px; }
.error-404-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* =============================================
   PAGINATION
   ============================================= */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 64px;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid #e8e8e8;
  font-size: 13px;
  color: #999;
  transition: all 0.2s;
  text-decoration: none;
}
.pagination a:hover { border-color: #999; color: #111; }
.pagination .current { background: #111; border-color: #111; color: #fff; }

/* =============================================
   RESPONSIVE
   ============================================= */

/* ---- Tablet & below (< 1024px) ---- */
@media (max-width: 1023px) {
  .service-item.reverse .service-item-text { order: unset; }
  .service-item.reverse .service-item-img  { order: unset; }
  .single-project-inner { grid-template-columns: 1fr; }
  .project-sidebar { border-top: 1px solid #e8e8e8; padding-top: 32px; border-left: none; padding-left: 0; }
}

/* ---- Mobile nav breakpoint (< 768px) ---- */
@media (max-width: 767px) {
  /* Nav */
  .main-nav, .nav-quote { display: none; }
  .hamburger { display: flex; align-items: center; justify-content: center; }

  /* Logo sub text on very small */
  .site-logo .logo-sub { display: none; }

  /* Hero */
  .hero { height: 85vh; min-height: 480px; }
  .hero-content { padding-bottom: 48px; }
  .hero h1 { font-size: clamp(1.8rem, 6vw, 2.5rem); }

  /* Stats — 2 column */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  /* Remove right border on 2nd cell (end of first row) on mobile */
  .stat-cell:nth-child(2) { border-right: none; }
  /* Restore border on 3rd cell (start of second row on mobile) */
  .stat-cell:nth-child(3) { border-right: 1px solid #e8e8e8; }

  /* Section header row stacks */
  .section-header-row { flex-direction: column; align-items: flex-start; gap: 12px; }

  /* Services grid: 1-col on mobile */
  .services-grid { grid-template-columns: 1fr; }

  /* Projects grid: 1-col on mobile */
  .projects-grid      { grid-template-columns: 1fr; }
  .projects-archive-grid { grid-template-columns: 1fr; }

  /* Page header: single col */
  .page-header-grid { grid-template-columns: 1fr; }
  .page-header      { padding: 48px 0; }

  /* Intro/About */
  .intro-grid  { grid-template-columns: 1fr; gap: 32px; }
  .about-inner { grid-template-columns: 1fr; }

  /* Contact grid: single col */
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }

  /* Timeline */
  .timeline-row { grid-template-columns: 60px 1fr; gap: 16px; }

  /* Service items: single col, no alternating */
  .service-item { grid-template-columns: 1fr; gap: 32px; }

  /* CTA rows */
  .cta-row        { flex-direction: column; align-items: flex-start; }
  .about-cta-inner{ flex-direction: column; align-items: flex-start; }

  /* MD section */
  .md-grid { grid-template-columns: 1fr; gap: 40px; }
  .md-photo, .md-photo-placeholder { height: 300px; }

  /* VM section — already single-col, adjust block padding on mobile */
  .vm-block { padding: 32px 0; }

  /* Stats 3-col on mobile: keep single row */
  .stats-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .stats-grid--3 .stat-cell { padding: 24px 12px; }

  /* General spacing */
  .intro-section   { padding: 56px 0; }
  .services-section{ padding: 48px 0; }
  .projects-section{ padding: 56px 0; }
  .cta-dark        { padding: 56px 0; }
  .contact-body    { padding: 48px 0; }
  .certs-section   { padding: 48px 0; }
  .timeline-section{ padding: 56px 0; }
  .values-section  { padding: 48px 0; }
  .team-section    { padding: 48px 0; }
  .about-cta       { padding: 48px 0; }
  .services-list   { padding: 0; }
  .projects-archive{ padding: 32px 0; }

  /* Filters wrap */
  .projects-filters { padding: 24px 0; }
}

/* ---- Small mobile (< 480px) ---- */
@media (max-width: 479px) {
  .wrap { padding: 0 16px; }

  /* Hero buttons stack */
  .hero-actions { flex-direction: column; align-items: flex-start; gap: 12px; }
  .btn-hero-primary,
  .btn-hero-outline { width: 100%; justify-content: center; }

  /* Stats: still 2-col but smaller padding */
  .stat-cell { padding: 24px 12px; }
  .stat-value { font-size: 1.6rem; }

  /* Project gallery: 2-col */
  .project-gallery-grid { grid-template-columns: repeat(2, 1fr); }

  /* Values grid: 1-col */
  .values-grid { grid-template-columns: 1fr; }

  /* Team grid: 1-col */
  .team-grid { grid-template-columns: 1fr; }

  /* Form rows stack */
  .form-row { grid-template-columns: 1fr; gap: 24px; }

  /* CTA dark buttons */
  .cta-dark h2 { font-size: 1.4rem; }
}
