* {
  box-sizing: border-box;
}

:root {
  --bg: #0f172a;
  --surface: #f8fafc;
  --text: #0f172a;
  --text-light: #f1f5f9;
  --accent: #f97316;
  --accent-dark: #c2410c;
  --gray: #94a3b8;
  --border: #e2e8f0;
}

body {
  margin: 0;
  font-family: 'Roboto', Arial, sans-serif;
  color: var(--text);
  background-color: var(--surface);
  line-height: 1.6;
  scroll-behavior: smooth;
}

.container {
  width: min(1200px, 100% - 2rem);
  margin: 0 auto;
}

.site-header {
  padding: 1.25rem 0 5rem;
  background: linear-gradient(135deg, #0a1224 0%, #1a2b47 100%);
  color: var(--text-light);
  position: relative;
}

.navbar {
  width: 100%;
}

.nav-holder {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  color: var(--text-light);
  font-weight: 700;
  font-size: 1.35rem;
  text-decoration: none;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
}

.nav-links li a:hover,
.nav-links li a:focus {
  color: var(--accent);
}

#menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  background-color: var(--text-light);
  height: 2px;
  width: 24px;
  border-radius: 2px;
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}

.hamburger::before {
  top: -7px;
}

.hamburger::after {
  top: 7px;
}

.hero {
  text-align: center;
  max-width: 920px;
  margin: 3rem auto 0;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.1rem);
  line-height: 1.1;
}

.hero p {
  margin: 1rem 0 1.8rem;
  color: #dbeafe;
  font-size: 1.1rem;
}

.btn-primary {
  display: inline-block;
  background-color: var(--accent);
  color: #fff;
  text-decoration: none;
  border: 0;
  border-radius: 8px;
  padding: 0.8rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--accent-dark);
}

.py-section {
  padding: 4rem 0;
}

.bg-light {
  background-color: #f6f8fb;
}

h2 {
  margin: 0 0 0.8rem;
  font-size: 2rem;
}

.lead {
  margin: 0 0 2rem;
  color: var(--gray);
  font-size: 1.05rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.card,
.portfolio-card,
.contact-info,
.about-grid > div {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
  padding: 1.25rem;
}

.card h3,
.about-grid h3 {
  margin-top: 0;
}

.portfolio-card img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.portfolio-card figcaption {
  margin-top: 0.6rem;
  font-weight: 600;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 1.25rem;
}

.contact-info p {
  margin: 0.35rem 0;
}

form {
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
  border-radius: 12px;
  padding: 1.2rem;
}

.form-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 500;
}

input,
textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.95rem;
  font-family: inherit;
}

input:focus,
textarea:focus {
  outline: 2px solid #93c5fd;
  border-color: #93c5fd;
}

.error {
  display: none;
  color: #dc2626;
  margin-top: 0.35rem;
  font-size: 0.88rem;
}

.form-message {
  margin-top: 0.8rem;
  font-weight: 600;
}

.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 1.2rem 0;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
}

@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  #menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 66px;
    right: 1rem;
    background: rgba(15, 23, 42, .95);
    border-radius: 12px;
    flex-direction: column;
    align-items: start;
    width: calc(100% - 2rem);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .nav-links.open {
    max-height: 250px;
    padding: 0.75rem 1rem;
  }

  .nav-links li {
    margin-bottom: 0.45rem;
  }

  .nav-links li a {
    color: #fff;
    font-size: 1rem;
  }

  .hero {
    margin-top: 1.8rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .footer-grid {
    flex-direction: column;
    text-align: center;
  }
}

/* Gallery styles */
.gallery-container {
  overflow-x: auto;
  overflow-y: hidden;
  margin-top: 2rem;
  padding-bottom: 0.5rem;
  height: 170px;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.gallery {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: max-content;
  padding: 0 1rem;
  min-height: 150px;
}

.gallery-thumb {
  width: 190px;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.gallery-thumb:hover {
  transform: scale(1.05);
  z-index: 2;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.modal-content img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.close {
  position: absolute;
  top: -40px;
  right: 0;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: #bbb;
}
