:root {
  --navy: #102a43;
  --navy-soft: #1e4976;
  --ink: #1c2b3a;
  --bg: #ffffff;
  --bg-soft: #f6f8fa;
  --border: #dde3ea;
  --max-w: 1120px;
  --radius: 14px;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

section[id],
header[id] {
  scroll-margin-top: 64px;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  padding-top: 64px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  text-align: justify;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--navy);
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--navy);
}

.nav-toggle {
  display: none;
}

/* Hero */
.hero {
  padding: 88px 0 72px;
  position: relative;
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero .wrap > * {
  min-width: 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy-soft);
  margin: 0 0 14px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.08;
  margin: 0 0 20px;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.hero p.lead {
  font-size: 1.15rem;
  color: #45596b;
  max-width: 46ch;
  margin: 0 0 30px;
}

.hero .cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--navy);
  color: #fff;
}

.btn-primary:hover {
  box-shadow: 0 8px 20px rgba(16, 42, 67, 0.25);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--navy);
}

.hero-media {
  position: relative;
}

.hero-media img {
  border-radius: var(--radius);
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  box-shadow: 0 20px 50px rgba(16, 42, 67, 0.18);
}

.hero-media .dot {
  position: absolute;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: var(--navy);
  z-index: -1;
}

.hero-media .dot.a {
  top: -30px;
  right: -30px;
  opacity: 0.9;
}

.hero-media .dot.b {
  bottom: -34px;
  left: -34px;
  width: 90px;
  height: 90px;
  border: 10px solid var(--navy);
  background: transparent;
  opacity: 0.5;
}

/* Section headings */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-soft);
}

.section-head {
  max-width: 640px;
  margin: 0 auto 44px;
  text-align: center;
}

.section-head .eyebrow {
  text-align: center;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  color: var(--navy);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.section-head p {
  color: #4c5e6f;
  margin: 0;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.about-grid > * {
  min-width: 0;
}

.about-copy p {
  color: #3c4f60;
  font-size: 1.02rem;
}

.badges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.badge {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px;
  background: #fff;
}

.badge svg {
  width: 26px;
  height: 26px;
  color: var(--navy);
  margin-bottom: 12px;
}

.badge strong {
  display: block;
  color: var(--navy);
  font-size: 0.96rem;
  line-height: 1.35;
}

/* Projects */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.project-card {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(16, 42, 67, 0.1);
}

.project-thumb {
  position: relative;
  height: 220px;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-body {
  padding: 22px 24px 26px;
}

.project-body h3 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.project-body p.blurb {
  margin: 0 0 14px;
  color: #4c5e6f;
  font-size: 0.96rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.tag {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--navy-soft);
  background: #eef2f7;
  border-radius: 999px;
  padding: 4px 12px;
}

.view-details {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
}

.view-details svg {
  width: 14px;
  height: 14px;
  transition: transform 0.15s ease;
}

.project-card:hover .view-details svg {
  transform: translateX(3px);
}

/* Gallery */
.gallery-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gallery-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.gallery-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  cursor: pointer;
  list-style: none;
}

.gallery-section > summary::-webkit-details-marker {
  display: none;
}

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

.gallery-section-title h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.gallery-section-chevron {
  width: 20px;
  height: 20px;
  color: var(--navy);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.gallery-section[open] .gallery-section-chevron {
  transform: rotate(180deg);
}

.gallery-section-body {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: start;
  gap: 20px;
  border-top: 1px solid var(--border);
  padding: 20px 24px 24px;
}

.gallery-img-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  overflow: hidden;
  border-radius: 10px;
}

.gallery-img-btn img,
.gallery-img-btn video {
  transition: transform 0.3s ease;
}

.gallery-img-btn:hover img,
.gallery-img-btn:hover video {
  transform: scale(1.04);
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 10px;
}

.gallery-item h4 {
  margin: 0 0 2px;
  font-size: 0.95rem;
  color: var(--navy);
}

.gallery-item p {
  margin: 0;
  font-size: 0.85rem;
  color: #64758a;
}

/* Project modal */
dialog.project-modal {
  border: none;
  padding: 0;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(16, 42, 67, 0.35);
  background: #fff;
  color: var(--ink);
  width: min(92vw, 760px);
  max-width: 92vw;
  max-height: 88vh;
  margin: auto;
  overflow: hidden;
  display: none;
  flex-direction: column;
}

dialog.project-modal[open] {
  display: flex;
}

dialog.project-modal::backdrop {
  background: rgba(9, 20, 33, 0.72);
  backdrop-filter: blur(2px);
}

dialog[open] {
  animation: modal-in 0.18s ease;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.modal-close:hover {
  background: #fff;
}

.modal-close svg {
  width: 18px;
  height: 18px;
}

.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 24px 28px 28px;
  overflow-y: auto;
}

.modal-body h3 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}

.modal-body .tag-row {
  margin-bottom: 20px;
}

/* Slider (inside the project modal) */
.modal-slider {
  position: relative;
  background: #0d1f33;
  flex-shrink: 0;
  overflow: hidden;
}

.slider-track {
  display: flex;
  transition: transform 0.3s ease;
}

.slider-slide {
  flex: 0 0 100%;
  border: none;
  padding: 0;
  margin: 0;
  background: none;
  cursor: zoom-in;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-slide img {
  width: 100%;
  height: 360px;
  object-fit: contain;
  display: block;
}

.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.slider-nav:hover {
  background: #fff;
}

.slider-nav.prev {
  left: 12px;
}

.slider-nav.next {
  right: 12px;
}

.slider-dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.slider-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  padding: 0;
  cursor: pointer;
}

.slider-dot.active {
  background: #fff;
}

.slider-caption {
  flex-shrink: 0;
  padding: 10px 28px;
  font-size: 0.85rem;
  color: #64758a;
  background: #fff;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

/* Lightbox (single-image expand) */
dialog.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  display: none;
}

dialog.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

dialog.lightbox::backdrop {
  background: rgba(6, 14, 24, 0.9);
}

.lightbox-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 90vw;
  margin: 0;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 78vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-video {
  display: none;
  max-width: 90vw;
  max-height: 78vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-video.active {
  display: block;
}

.lightbox-caption {
  color: #dbe4ee;
  font-size: 0.95rem;
  text-align: center;
  max-width: 70ch;
  padding: 0 16px;
}

.lightbox-close,
.lightbox-nav {
  position: fixed;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.28);
}

.lightbox-close {
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
}

.lightbox-close svg {
  width: 18px;
  height: 18px;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  font-size: 1.4rem;
}

.lightbox-nav.prev {
  left: 24px;
}

.lightbox-nav.next {
  right: 24px;
}

dialog.lightbox.single-image .lightbox-nav {
  display: none;
}

.modal-slider.single-slide .slider-nav,
.modal-slider.single-slide .slider-dots {
  display: none;
}

.detail-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 22px;
}

.detail-cols h4 {
  margin: 0 0 10px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--navy-soft);
}

.detail-cols ul {
  margin: 0;
  padding-left: 18px;
  color: #3c4f60;
  font-size: 0.94rem;
}

.detail-cols li {
  margin-bottom: 6px;
}

/* Contact */
.contact {
  position: relative;
  color: #fff;
  background: var(--navy);
  overflow: hidden;
}

.contact .bg-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.contact .bg-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
}

.contact .wrap {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 96px 24px;
}

.contact h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.contact p {
  color: #cdd8e3;
  max-width: 50ch;
  margin: 0 auto 32px;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.contact .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.contact .btn-ghost:hover {
  border-color: #fff;
}

.contact .btn-primary {
  background: #fff;
  color: var(--navy);
}

/* Footer */
.site-footer {
  padding: 28px 0;
  text-align: center;
  color: #6b7c8c;
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 860px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }

  .hero-media {
    order: -1;
    max-width: 320px;
    margin: 0 auto;
  }

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

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

  .detail-cols {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .slider-slide img {
    height: 240px;
  }
}

@media (max-width: 640px) {
  .nav-links {
    position: fixed;
    inset: 64px 0 0 0;
    background: #fff;
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    transform: translateX(100%);
    transition: transform 0.25s ease;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: none;
    cursor: pointer;
  }

  .nav-toggle svg {
    width: 20px;
    height: 20px;
    color: var(--navy);
  }

  body.nav-open .nav-links {
    transform: translateX(0);
  }

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

  .gallery-section > summary {
    padding: 16px 18px;
  }

  .gallery-section-body {
    grid-template-columns: 1fr;
    padding: 16px 18px 20px;
  }

  dialog.project-modal {
    width: 94vw;
    max-height: 92vh;
  }

  .modal-body {
    padding: 20px 18px 24px;
  }

  .slider-slide img {
    height: 200px;
  }

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

  .lightbox-nav.prev {
    left: 10px;
  }

  .lightbox-nav.next {
    right: 10px;
  }
}
