:root {
  --maroon: #4d0000;
  --deep-maroon: #350000;
  --rose: #ff5a5a;
  --charcoal: #2c2f33;
  --ink: #080808;
  --paper: #ffffff;
  --warm: #ffc881;
  --muted-shadow: rgba(0, 0, 0, 0.22);
  --strong-shadow: rgba(0, 0, 0, 0.5);
  --site-width: min(1500px, calc(100vw - 48px));
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --radius-card: 32px;
  --radius-btn: 8px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font-family: "Poppins", Arial, Helvetica, sans-serif;
  font-weight: 300;
  background: linear-gradient(138deg, #ffffff 0%, #ededed 48%, #d5d5d5 100%);
}

button,
input {
  font: inherit;
}

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

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

/* ─── SKIP LINK ───────────────────────────────────── */
.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 1000;
  transform: translateY(-140%);
  padding: 10px 16px;
  color: var(--paper);
  background: var(--deep-maroon);
  border-radius: var(--radius-btn);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  border: 0;
  clip: rect(0, 0, 0, 0);
}

/* ─── HEADER ──────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 100;
  width: min(96vw, 1500px);
  transform: translateX(-50%);
}

.header-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(10px, 2vw, 20px);
  min-height: 70px;
  padding: 10px clamp(16px, 2.5vw, 28px);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 40px;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.06),
    0 12px 36px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  flex: 0 1 auto;
  min-width: 0;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--maroon);
}

/* ─── BRAND ICON (logo image + text fallback) ─────── */
.brand-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  color: var(--paper);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent),
    var(--deep-maroon);
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(53, 0, 0, 0.3);
  overflow: hidden;
}

.brand-logo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
  padding: 4px;
}

.brand-logo-text {
  position: relative;
  z-index: 0;
}

.brand-text {
  font-size: clamp(17px, 2.2vw, 32px);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(10px, 1.8vw, 28px);
  flex: 1 1 auto;
  font-size: clamp(13px, 1.25vw, 19px);
  font-weight: 800;
}

.site-nav a {
  position: relative;
  padding: 4px 0;
  white-space: nowrap;
  line-height: 1.2;
}

.site-nav a::after {
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  content: "";
  background: var(--maroon);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 200ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ─── BUTTONS ──────────────────────────────────────── */
.header-cta,
.project-intro-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 44px;
  padding: 10px 22px;
  color: var(--paper);
  font-weight: 600;
  white-space: nowrap;
  border: none;
  border-radius: var(--radius-btn);
  background: var(--deep-maroon);
  box-shadow: 0 6px 20px rgba(53, 0, 0, 0.24);
  cursor: pointer;
  transition:
    transform 200ms var(--ease-out),
    box-shadow 200ms ease,
    background-color 200ms ease;
}

.header-cta {
  font-size: clamp(13px, 1.2vw, 18px);
}

.header-cta:hover,
.header-cta:focus-visible {
  background: var(--maroon);
  box-shadow: 0 10px 28px rgba(53, 0, 0, 0.3);
  transform: translateY(-1px);
}

/* ─── HAMBURGER ──────────────────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5.5px;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  background: transparent;
  border: none;
  border-radius: 10px;
  transition: background 180ms ease;
}

.nav-toggle:hover {
  background: rgba(77, 0, 0, 0.08);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--maroon);
  border-radius: 2px;
  transform-origin: center;
  transition:
    transform 300ms var(--ease-out),
    opacity 200ms ease,
    width 280ms var(--ease-out);
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
  width: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ─── MOBILE NAV ──────────────────────────────────── */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 98;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 32px 60px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-10px);
  transition:
    opacity 300ms var(--ease-out),
    visibility 300ms,
    transform 300ms var(--ease-out);
}

.mobile-nav.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.mobile-nav nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  max-width: 340px;
}

.mobile-nav nav a {
  display: block;
  padding: 15px 20px;
  color: var(--maroon);
  font-size: clamp(20px, 5vw, 26px);
  font-weight: 800;
  text-align: center;
  border-radius: 12px;
  transition: background 180ms ease;
}

.mobile-nav nav a:hover,
.mobile-nav nav a:focus-visible {
  background: rgba(77, 0, 0, 0.07);
}

.mobile-nav nav .mobile-cta {
  margin-top: 20px;
  color: var(--paper);
  background: var(--deep-maroon);
  box-shadow: 0 10px 26px rgba(53, 0, 0, 0.26);
  font-size: clamp(17px, 4vw, 21px);
}

.mobile-nav nav .mobile-cta:hover,
.mobile-nav nav .mobile-cta:focus-visible {
  background: var(--maroon);
}

/* ─── ABOUT ──────────────────────────────────────── */
.about-section {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: clamp(96px, 12vh, 144px) 24px clamp(48px, 6vh, 80px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(213, 213, 213, 0.65)),
    linear-gradient(135deg, rgba(114, 63, 63, 0.2), rgba(255, 255, 255, 0.72) 48%, rgba(194, 108, 108, 0.2));
}

.about-card {
  display: grid;
  grid-template-columns: minmax(180px, 30%) minmax(0, 1fr);
  align-items: stretch;
  width: var(--site-width);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-card);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.04),
    0 20px 60px rgba(0, 0, 0, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.about-mark-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  padding: clamp(36px, 5vw, 60px) clamp(12px, 2vw, 20px) clamp(36px, 5vw, 60px) clamp(24px, 3vw, 44px);
  background: linear-gradient(155deg, rgba(77, 0, 0, 0.04), rgba(255, 200, 130, 0.07));
}

/* ─── LOGO EMBLEM (hero section — image + text fallback) ─── */
.logo-emblem {
  position: relative;
  display: grid;
  place-items: center;
  width: min(82%, 300px);
  aspect-ratio: 1;
  color: var(--paper);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), transparent 38%),
    radial-gradient(circle at 28% 26%, rgba(255, 200, 129, 0.55), transparent 28%),
    linear-gradient(135deg, var(--maroon), #150000);
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 50%;
  box-shadow:
    0 24px 54px rgba(53, 0, 0, 0.3),
    0 4px 12px rgba(53, 0, 0, 0.15);
  overflow: hidden;
}

.emblem-logo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
  padding: 12%;
}

.emblem-logo-text {
  position: relative;
  z-index: 0;
  font-size: clamp(60px, 10vw, 150px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
}

.about-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(16px, 2.2vw, 28px);
  width: 100%;
  min-width: 0;
  padding: clamp(40px, 5vw, 64px) clamp(28px, 5.5vw, 84px) clamp(40px, 5vw, 64px) clamp(20px, 2.2vw, 32px);
  border-left: 1px solid rgba(77, 0, 0, 0.08);
}

.about-wordmark-text {
  color: var(--maroon);
  font-size: clamp(32px, 4.5vw, 78px);
  font-weight: 800;
  line-height: 0.96;
  white-space: nowrap;
}

.about-text {
  max-width: 640px;
  font-size: clamp(14px, 1.1vw, 17px);
  font-weight: 600;
  line-height: 1.74;
}

.about-text p {
  margin: 0 0 1em;
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* ─── LEADER ──────────────────────────────────────── */
.leader-section {
  min-height: 560px;
  color: var(--paper);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.6)),
    url("images/leader-bg/background.jpg") center / cover no-repeat,
    #404040;
}

.leader-overlay {
  display: flex;
  align-items: flex-end;
  gap: clamp(20px, 3vw, 40px);
  width: 100%;
  min-height: 560px;
  padding: clamp(48px, 7vw, 90px) max(24px, calc((100vw - 1500px) / 2 + 40px));
  background: rgba(60, 50, 50, 0.3);
  box-shadow: inset 0 0 120px 60px rgba(0, 0, 0, 0.48);
}

.leader-portrait-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(160px, 22vw, 340px);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  flex-shrink: 0;
  color: var(--paper);
  background:
    linear-gradient(180deg, rgba(53, 0, 0, 0.24), rgba(0, 0, 0, 0.62)),
    #2f2f2f;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.leader-portrait-wrap::before {
  content: "RN";
  display: grid;
  place-items: center;
  width: 42%;
  aspect-ratio: 1;
  font-size: clamp(44px, 7vw, 76px);
  font-weight: 800;
  line-height: 1;
  background: rgba(53, 0, 0, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  backdrop-filter: blur(4px);
}

.leader-portrait-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leader-copy {
  padding-bottom: 8px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.9);
}

.leader-copy h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 500;
}

.leader-copy p {
  margin: 6px 0 0;
  font-size: clamp(15px, 1.8vw, 20px);
  font-weight: 300;
  opacity: 0.88;
}

/* ─── MISSION ──────────────────────────────────────── */
.mission-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.76fr);
  align-items: center;
  gap: clamp(32px, 5vw, 90px);
  width: var(--site-width);
  margin: 0 auto;
  padding: clamp(64px, 9vh, 108px) 0;
}

.mission-copy h2,
.services-section h2,
.projects-section h2,
.contact-section h2 {
  margin: 0 0 clamp(16px, 2.5vw, 28px);
  font-size: clamp(40px, 5.5vw, 81px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.5px;
}

.mission-copy p {
  max-width: 640px;
  margin: 0;
  font-size: clamp(16px, 1.7vw, 24px);
  font-weight: 200;
  line-height: 1.8;
}

.mission-carousel {
  position: relative;
  width: min(460px, 100%);
  margin-left: auto;
}

.carousel-track {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: clamp(32px, 6vw, 70px);
  background: #d9d9d9;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.08),
    0 20px 52px rgba(0, 0, 0, 0.15);
}

.carousel-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  background: url("images/fallback/construction-fallback.png") var(--fallback-position, center) / cover no-repeat;
  transition: opacity 580ms ease;
}

.carousel-slide:nth-child(1) { --fallback-position: center; }
.carousel-slide:nth-child(2) { --fallback-position: 18% 55%; }
.carousel-slide:nth-child(3) { --fallback-position: 68% 50%; }
.carousel-slide:nth-child(4) { --fallback-position: 32% 82%; }
.carousel-slide:nth-child(5) { --fallback-position: 88% 78%; }

.carousel-slide.is-active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.carousel-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  transition:
    width 300ms var(--ease-out),
    background 280ms ease;
}

.carousel-dots button.is-active {
  width: 28px;
  background: var(--deep-maroon);
}

/* ─── SERVICES ──────────────────────────────────────── */
.services-section {
  color: var(--paper);
  background:
    linear-gradient(180deg, rgba(44, 47, 51, 0.97), rgba(18, 20, 22, 0.98)),
    var(--charcoal);
}

.section-inner {
  width: var(--site-width);
  margin: 0 auto;
  padding: clamp(72px, 10vh, 124px) 0;
}

.services-section h2 {
  color: var(--rose);
}

.services-section ul {
  display: grid;
  gap: clamp(8px, 1vw, 14px);
  max-width: 1100px;
  margin: 0;
  padding-left: 1.3em;
  font-size: clamp(16px, 1.8vw, 30px);
  font-weight: 200;
  line-height: 1.5;
}

.services-section li {
  padding: clamp(3px, 0.4vw, 6px) 0;
}

.services-section li::marker {
  color: var(--rose);
}

/* ─── PROJECTS ──────────────────────────────────────── */
.projects-section {
  padding: clamp(72px, 12vh, 160px) clamp(14px, 2.5vw, 36px) clamp(56px, 8vh, 100px);
  color: var(--paper);
  background:
    radial-gradient(circle at 78% 14%, rgba(180, 73, 73, 0.92) 0%, rgba(89, 33, 33, 0.62) 26%, rgba(30, 30, 30, 1) 58%),
    #1e1e1e;
}

.project-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(1360px, 100%);
  margin: 0 auto;
  padding: clamp(36px, 5.5vw, 84px);
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.5));
  border-radius: clamp(22px, 4vw, 48px);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.project-panel h2,
.project-panel p {
  width: min(100%, 1100px);
}

.project-panel p {
  margin: 0 0 clamp(18px, 2.5vw, 32px);
  font-size: clamp(16px, 1.9vw, 28px);
  font-weight: 200;
  line-height: 1.52;
}

.project-intro-button {
  align-self: flex-start;
  margin: 0 0 clamp(22px, 3vw, 40px);
  color: var(--ink);
  font-size: clamp(15px, 1.4vw, 21px);
  background: var(--paper);
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.1);
}

.project-intro-button:hover,
.project-intro-button:focus-visible {
  color: var(--paper);
  background: var(--rose);
  box-shadow: 0 8px 24px rgba(255, 90, 90, 0.3);
  transform: translateY(-1px);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.4vw, 20px);
  width: min(1100px, 100%);
}

.project-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(190px, 20vw, 320px);
  padding: 0;
  overflow: hidden;
  color: var(--paper);
  font: inherit;
  text-align: left;
  cursor: pointer;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.58)),
    var(--project-image) center / cover no-repeat,
    url("images/fallback/construction-fallback.png") var(--fallback-position, center) / cover no-repeat,
    #303030;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  transition:
    transform 240ms var(--ease-out),
    filter 240ms ease,
    border-color 240ms ease,
    box-shadow 240ms ease;
}

.project-card:nth-child(1) { --fallback-position: center; }
.project-card:nth-child(2) { --fallback-position: 12% 82%; }
.project-card:nth-child(3) { --fallback-position: 86% 40%; }
.project-card:nth-child(4) { --fallback-position: 16% 78%; }
.project-card:nth-child(5) { --fallback-position: 28% 42%; }
.project-card:nth-child(6) { --fallback-position: 88% 78%; }

.project-card:hover,
.project-card:focus-visible {
  border-color: rgba(255, 255, 255, 0.26);
  filter: saturate(1.1) contrast(1.04);
  transform: translateY(-5px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.32);
}

.project-card span {
  margin: 0 0 16px 16px;
  padding: 8px 14px;
  font-size: clamp(14px, 1.4vw, 20px);
  font-weight: 600;
  line-height: 1.3;
  background: rgba(0, 0, 0, 0.58);
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

/* ─── CONTACT ──────────────────────────────────────── */
.contact-section {
  display: flex;
  align-items: center;
  min-height: 580px;
  padding: clamp(60px, 8vh, 96px) 24px;
  background: var(--warm);
}

.contact-copy {
  width: var(--site-width);
  margin: 0 auto;
}

.contact-copy h2 {
  color: var(--ink);
}

.contact-copy address,
.contact-copy p {
  max-width: 900px;
  margin: 0 0 clamp(18px, 2.8vw, 36px);
  color: var(--ink);
  font-size: clamp(16px, 2.2vw, 32px);
  font-style: normal;
  font-weight: 200;
  line-height: 1.52;
}

.contact-copy strong {
  font-weight: 800;
}

.contact-copy a:hover,
.contact-copy a:focus-visible {
  text-decoration: underline;
}

/* ─── FLOATING CONTACT ──────────────────────────────── */
.floating-contact {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 160px;
  padding: 12px 22px;
  color: var(--paper);
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-btn);
  background: var(--deep-maroon);
  box-shadow: 0 8px 28px rgba(53, 0, 0, 0.34);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translateY(14px);
  transition:
    opacity 320ms var(--ease-out),
    visibility 320ms,
    transform 320ms var(--ease-out),
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.floating-contact.is-visible {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateY(0);
}

.floating-contact:hover,
.floating-contact:focus-visible {
  background: var(--maroon);
  box-shadow: 0 12px 32px rgba(53, 0, 0, 0.38);
}

.floating-contact.is-visible:hover,
.floating-contact.is-visible:focus-visible {
  transform: translateY(-2px);
}

img.image-missing {
  display: none;
}

/* ═══════════════════════════════════════════════════════
   GALLERY POPUP
   ═══════════════════════════════════════════════════════ */

.gallery-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: clamp(12px, 2vw, 24px);
  border: none;
  background: transparent;
  overflow: hidden;
}

.gallery-dialog[open] {
  display: flex;
  align-items: stretch;
  animation: gallery-enter 300ms var(--ease-out) forwards;
}

.gallery-dialog::backdrop {
  background: rgba(8, 4, 4, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: gallery-backdrop-enter 300ms ease forwards;
}

@keyframes gallery-enter {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes gallery-backdrop-enter {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.gallery-shell {
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
  background: linear-gradient(165deg, rgba(26, 8, 8, 0.96), rgba(14, 14, 18, 0.98));
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  overflow: hidden;
}

/* ─── Gallery Close ────────────────────────────────── */
.gallery-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 200ms ease, color 200ms ease, transform 200ms var(--ease-out);
}

.gallery-close:hover,
.gallery-close:focus-visible {
  background: rgba(255, 90, 90, 0.25);
  color: var(--paper);
  transform: scale(1.08);
}

/* ─── Gallery Sidebar ──────────────────────────────── */
.gallery-sidebar {
  flex: 0 0 264px;
  display: flex;
  flex-direction: column;
  padding: 24px 14px;
  background: rgba(0, 0, 0, 0.35);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.gallery-sidebar-title {
  margin: 0 0 18px;
  padding: 6px 12px;
  color: var(--rose);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.gallery-categories {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gallery-cat-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 160ms var(--ease-out);
}

.gallery-cat-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
}

.gallery-cat-btn.is-active {
  background: rgba(255, 90, 90, 0.12);
  color: var(--paper);
  font-weight: 600;
}

.gallery-cat-thumb {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: center / cover no-repeat #2a2a2a;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  transition: border-color 200ms ease;
}

.gallery-cat-btn.is-active .gallery-cat-thumb {
  border-color: var(--rose);
  box-shadow: 0 0 12px rgba(255, 90, 90, 0.2);
}

/* ─── Gallery Main Viewer ──────────────────────────── */
.gallery-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-width: 0;
  padding: 40px 60px;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(53, 0, 0, 0.08), transparent 70%);
}

.gallery-viewer {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.gallery-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.2);
  transition: opacity 280ms ease;
}

.gallery-image.is-loading {
  opacity: 0.2;
}

/* ─── Gallery Navigation Arrows ────────────────────── */
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition:
    background 200ms ease,
    color 200ms ease,
    transform 200ms var(--ease-out);
}

.gallery-nav:hover,
.gallery-nav:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  color: var(--paper);
  transform: translateY(-50%) scale(1.1);
}

.gallery-prev { left: 14px; }
.gallery-next { right: 14px; }

/* ─── Gallery Counter Badge ────────────────────────── */
.gallery-counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 18px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ─── BREAKPOINT: 1200px ──────────────────────────── */
@media (max-width: 1200px) {
  .about-wordmark-text {
    white-space: normal;
  }
}

/* ─── BREAKPOINT: 960px ──────────────────────────── */
@media (max-width: 960px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-sidebar {
    flex: 0 0 220px;
  }

  .gallery-main {
    padding: 32px 52px;
  }
}

/* ─── BREAKPOINT: 840px ──────────────────────────── */
@media (max-width: 840px) {
  :root {
    --site-width: min(100% - 32px, 720px);
  }

  .site-header {
    top: 10px;
    width: calc(100vw - 20px);
  }

  .header-shell {
    min-height: 62px;
    padding: 8px 14px;
    border-radius: 22px;
  }

  .brand-icon {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }

  .brand-text {
    font-size: 19px;
  }

  .site-nav,
  .header-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  /* About */
  .about-section {
    padding-top: 88px;
  }

  .about-card {
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

  .about-mark-wrap {
    justify-content: center;
    padding: 38px 32px 12px;
    background: linear-gradient(180deg, rgba(77, 0, 0, 0.04), rgba(255, 200, 130, 0.06));
  }

  .logo-emblem {
    width: min(52%, 220px);
    margin: 0 auto;
  }

  .emblem-logo-text {
    font-size: clamp(64px, 14vw, 110px);
  }

  .about-copy {
    align-items: flex-start;
    padding: 22px 28px 44px;
    border-left: none;
    border-top: 1px solid rgba(77, 0, 0, 0.08);
  }

  .about-wordmark-text {
    font-size: clamp(26px, 8.5vw, 52px);
    white-space: normal;
  }

  .about-text {
    max-width: 100%;
    font-size: clamp(14px, 3.8vw, 17px);
  }

  /* Leader */
  .leader-overlay {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    min-height: 560px;
    padding: 40px 24px;
  }

  .leader-portrait-wrap {
    width: min(240px, 68vw);
  }

  /* Mission */
  .mission-section {
    grid-template-columns: 1fr;
    padding: clamp(56px, 8vh, 80px) 0;
  }

  .mission-carousel {
    margin: 0 auto;
  }

  .carousel-track {
    border-radius: clamp(26px, 7vw, 48px);
  }

  /* Projects */
  .projects-section {
    padding: clamp(64px, 10vh, 100px) 12px clamp(44px, 6vh, 68px);
  }

  .project-panel {
    padding: clamp(24px, 4vw, 44px) clamp(20px, 4.5vw, 40px);
    border-radius: 22px;
  }

  .project-intro-button {
    margin-left: 0;
  }

  /* Keep 2-col grid on tablets */
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  /* Contact */
  .contact-section {
    min-height: auto;
    padding: clamp(52px, 7vh, 80px) 20px;
  }

  .floating-contact {
    display: inline-flex;
  }

  /* Gallery — sidebar becomes horizontal strip */
  .gallery-dialog {
    padding: 0;
  }

  .gallery-shell {
    flex-direction: column;
    border-radius: 0;
  }

  .gallery-sidebar {
    flex: none;
    width: 100%;
    flex-direction: row;
    align-items: center;
    padding: 10px 12px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    overflow-x: auto;
    overflow-y: hidden;
  }

  .gallery-sidebar-title {
    display: none;
  }

  .gallery-categories {
    flex-direction: row;
    gap: 6px;
    width: max-content;
  }

  .gallery-cat-btn {
    flex-shrink: 0;
    padding: 8px 12px;
    white-space: nowrap;
    font-size: 13px;
    gap: 8px;
  }

  .gallery-cat-thumb {
    width: 32px;
    height: 32px;
    border-radius: 6px;
  }

  .gallery-main {
    padding: 16px;
  }

  .gallery-nav {
    width: 40px;
    height: 40px;
  }

  .gallery-prev { left: 6px; }
  .gallery-next { right: 6px; }

  .gallery-close {
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
  }
}

/* ─── BREAKPOINT: 520px ──────────────────────────── */
@media (max-width: 520px) {
  .brand-text {
    font-size: 17px;
  }

  .emblem-logo-text {
    font-size: 72px;
  }

  .about-wordmark-text {
    font-size: clamp(22px, 8vw, 36px);
  }

  .about-text {
    font-size: 14px;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .project-card {
    min-height: 220px;
  }

  /* Gallery — tighter on small screens */
  .gallery-main {
    padding: 10px;
  }

  .gallery-nav {
    width: 36px;
    height: 36px;
  }

  .gallery-nav svg {
    width: 20px;
    height: 20px;
  }

  .gallery-prev { left: 4px; }
  .gallery-next { right: 4px; }

  .gallery-counter {
    bottom: 10px;
    font-size: 12px;
    padding: 4px 14px;
  }
}

/* ─── REDUCED MOTION ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
