:root {
  color-scheme: dark;
  font-family: 'Inter', sans-serif;
  background: #111111;
  color: #f4f4f4;
  --bg: #131313;
  --surface: #1d1d1d;
  --muted: #a8a8a8;
  --accent: #c9b35d;
  --border: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(201, 179, 93, 0.08), transparent 28%),
    #0f0f0f;
  color: #f5f5f5;
}

img {
  width: 100%;
  display: block;
}

.container {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(15, 15, 15, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.14em;
  text-decoration: none;
  color: #fff;
}

.nav-links {
  display: flex;
  gap: 1.6rem;
  align-items: center;
}

.nav-links a {
  color: #f4f4f4;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

.menu-toggle {
  display: none;
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
}

.menu-toggle span {
  display: block;
  height: 3px;
  border-radius: 999px;
  background: #f4f4f4;
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero-section,
.project-section,
.thanks-section,
.contact-section {
  padding: 6rem 0;
}

.section-label {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.24em;
  margin-bottom: 1rem;
  display: inline-block;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 3rem;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(3.2rem, 4vw, 5rem);
  line-height: 0.95;
}

.hero-text {
  color: #d4d4d4;
  line-height: 1.9;
  max-width: 44rem;
  margin-top: 1.6rem;
}

.image-card {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-section {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent 70%);
}

.project-grid {
  display: grid;
  grid-template-columns: 0.45fr 1fr;
  gap: 2rem;
  align-items: stretch;
}

.project-title {
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-label {
  font-size: clamp(2.5rem, 4vw, 4rem);
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.project-gallery {
  display: grid;
  gap: 1rem;
}

/* Dynamic grid based on image count */
.project-gallery[data-image-count="1"] {
  grid-template-columns: 1fr;
}

.project-gallery[data-image-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-gallery[data-image-count="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-gallery[data-image-count="4"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-gallery[data-image-count="5"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-gallery[data-image-count="5"] .project-image:nth-child(5) {
  grid-column: 1 / -1;
  max-width: 50%;
}

.project-gallery[data-image-count="6"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Fallback for many images */
.project-gallery[data-image-count="7"],
.project-gallery[data-image-count="8"],
.project-gallery[data-image-count="9"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-gallery[data-image-count="10"],
.project-gallery[data-image-count="11"],
.project-gallery[data-image-count="12"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-image {
  aspect-ratio: 1 / 1.2;
  background-size: cover;
  background-position: center;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.24);
}

.thanks-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.thanks-copy h2 {
  margin: 0;
  font-size: clamp(2.5rem, 4vw, 3.8rem);
}

.thanks-copy p {
  max-width: 42rem;
  color: #d8d8d8;
  line-height: 1.9;
  margin-top: 1.2rem;
}

.thanks-image-card {
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.25);
}

.contact-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 2rem 2.4rem;
}

.contact-box h3 {
  margin: 0 0 0.4rem;
}

.site-info-section {
  padding: 4rem 0;
}

.site-info-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.2fr 0.85fr;
  gap: 1.5rem;
  align-items: stretch;
}

.info-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 2rem;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.15);
}

.owner-card .info-label,
.tools-card .info-label {
  color: var(--accent);
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  margin-bottom: 1rem;
}

.owner-card h3,
.summary-card h3 {
  margin: 0;
  font-size: clamp(2rem, 2.6vw, 2.6rem);
}

.owner-card p,
.tools-card p,
.summary-card p {
  margin: 0.75rem 0 1.5rem;
  color: #d4d4d4;
  line-height: 1.8;
}

.action-button {
  display: inline-block;
  text-decoration: none;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  margin-right: 0.75rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease;
  background: var(--accent);
  color: #101010;
}

.action-button.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #f4f4f4;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.action-button:hover {
  transform: translateY(-1px);
}

.summary-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.summary-stats div {
  min-width: 100px;
}

.summary-stats strong {
  display: block;
  font-size: 1.8rem;
}

.summary-stats span {
  color: var(--muted);
}

.published {
  margin-top: 1.6rem;
  color: var(--muted);
}

.field-chip {
  display: inline-flex;
  padding: 0.8rem 1.2rem;
  background: rgba(201, 179, 93, 0.12);
  border-radius: 999px;
  color: #f4f4f4;
  font-weight: 600;
}

@media (max-width: 980px) {
  .site-info-grid {
    grid-template-columns: 1fr;
  }
}

.contact-box p {
  margin: 0;
  color: var(--muted);
}

.contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.8rem;
  background: var(--accent);
  color: #101010;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

.site-footer {
  padding: 1.8rem 0 3rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.97rem;
}

/* Image Modal Styles */
.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.image-modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  z-index: 101;
  max-width: 90vw;
  max-height: 90vh;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-content img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 48px 120px rgba(0, 0, 0, 0.6);
}

.modal-close {
  position: absolute;
  top: -3rem;
  right: 0;
  width: 3rem;
  height: 3rem;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 2.4rem;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 720px) {
  .modal-close {
    top: 0.5rem;
    right: 0.5rem;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.8rem;
    background: rgba(0, 0, 0, 0.4);
  }
}

@media (max-width: 960px) {
  .hero-grid,
  .project-grid,
  .thanks-grid {
    grid-template-columns: 1fr;
  }

  .project-gallery[data-image-count="2"],
  .project-gallery[data-image-count="3"],
  .project-gallery[data-image-count="4"],
  .project-gallery[data-image-count="5"],
  .project-gallery[data-image-count="6"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-gallery[data-image-count="7"],
  .project-gallery[data-image-count="8"],
  .project-gallery[data-image-count="9"],
  .project-gallery[data-image-count="10"],
  .project-gallery[data-image-count="11"],
  .project-gallery[data-image-count="12"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-gallery[data-image-count="5"] .project-image:nth-child(5) {
    max-width: 100%;
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .nav-links {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    display: none;
    margin-top: 1rem;
  }

  .nav-links.active {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 0.8rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .project-gallery {
    grid-template-columns: 1fr !important;
  }

  .project-gallery[data-image-count="5"] .project-image:nth-child(5) {
    max-width: 100%;
  }

  .contact-box {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
