:root{
  --bg:#fbfbfd;
  --text:#111827;
  --muted:#6b7280;
  --accent:#2563eb;
  --card:#ffffff;
}
body.dark-mode{
  --bg:#0f172a;
  --text:#e2e8f0;
  --muted:#94a3b8;
  --accent:#60a5fa;
  --card:#1e293b;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  transition:background 0.3s ease, color 0.3s ease;
}
.container{max-width:1000px;margin:0 auto;padding:1rem}
.site-header{background:transparent;padding:1rem 0}
.brand{margin:0;display:inline-block;font-weight:700}
.nav{float:right;display:flex;align-items:center;gap:1rem}
.nav a{color:var(--text);text-decoration:none;margin-left:0;transition:color 0.2s ease}
.nav a:hover{color:var(--accent)}
.theme-toggle{
  background:none;
  border:1px solid var(--muted);
  color:var(--text);
  padding:0.4rem 0.6rem;
  border-radius:4px;
  cursor:pointer;
  transition:all 0.2s ease;
  font-size:1rem;
}
.theme-toggle:hover{
  background:var(--accent);
  color:white;
  border-color:var(--accent);
}
.hero{padding:4rem 0;text-align:center}
.hero h2{margin:0 0 .5rem;font-size:2rem}
.hero p{color:var(--muted);margin:0 0 1rem}
.btn{
  display:inline-block;
  background:var(--accent);
  color:white;
  padding:.6rem 1rem;
  border-radius:6px;
  text-decoration:none;
  transition:opacity 0.2s ease, transform 0.2s ease;
  border:none;
  cursor:pointer;
}
.btn:hover{opacity:0.9;transform:translateY(-2px)}
.features{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem;padding:2rem 0}
.features article{
  background:var(--card);
  border-radius:8px;
  padding:1rem;
  box-shadow:0 1px 2px rgba(16,24,40,0.04);
  transition:transform 0.3s ease, box-shadow 0.3s ease;
  animation:slideUp 0.6s ease-out forwards;
  opacity:0;
}
.features article:nth-child(1){animation-delay:0.1s}
.features article:nth-child(2){animation-delay:0.2s}
.features article:nth-child(3){animation-delay:0.3s}
.features article:hover{transform:translateY(-4px);box-shadow:0 4px 8px rgba(16,24,40,0.1)}
.contact{padding:2rem 0}
label{display:block;margin-top:.5rem;color:var(--muted);font-size:.9rem}
input,textarea{
  width:100%;
  padding:.6rem;
  border:1px solid #e6e9ef;
  border-radius:6px;
  margin-top:.25rem;
  background:var(--card);
  color:var(--text);
  transition:border-color 0.2s ease, box-shadow 0.2s ease;
}
body.dark-mode input,body.dark-mode textarea{border-color:#334155}
input:focus,textarea:focus{
  outline:none;
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(37,99,235,0.1);
}
.site-footer{padding:1rem 0;color:var(--muted);text-align:center;border-top:1px solid rgba(16,24,40,0.04);margin-top:2rem;transition:border-color 0.3s ease}

/* Gallery */
.gallery-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:1rem;
  margin-bottom:2rem;
}
.gallery-item{
  position:relative;
  overflow:hidden;
  border-radius:8px;
  aspect-ratio:1;
  cursor:pointer;
  animation:fadeIn 0.6s ease-out forwards;
  opacity:0;
}
.gallery-item:nth-child(1){animation-delay:0.1s}
.gallery-item:nth-child(2){animation-delay:0.2s}
.gallery-item:nth-child(3){animation-delay:0.3s}
.gallery-item:nth-child(4){animation-delay:0.4s}
.gallery-item:nth-child(5){animation-delay:0.5s}
.gallery-item:nth-child(6){animation-delay:0.6s}
.gallery-item img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform 0.4s cubic-bezier(0.25,0.46,0.45,0.94);
}
.gallery-overlay{
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:rgba(37,99,235,0.8);
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  transition:opacity 0.3s ease;
}
.gallery-overlay p{
  color:white;
  font-size:1.1rem;
  font-weight:600;
  margin:0;
}
.gallery-item:hover img{transform:scale(1.1)}
.gallery-item:hover .gallery-overlay{opacity:1}

/* Lightbox */
.lightbox{
  display:none;
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:rgba(0,0,0,0.9);
  z-index:1000;
  align-items:center;
  justify-content:center;
  animation:fadeIn 0.3s ease;
}
.lightbox.active{
  display:flex;
}
.lightbox-image{
  max-width:90%;
  max-height:80%;
  object-fit:contain;
  animation:zoomIn 0.4s ease;
}
.lightbox-caption{
  position:absolute;
  bottom:2rem;
  color:white;
  font-size:1.2rem;
  font-weight:600;
  margin:0;
  animation:slideUp 0.4s ease 0.1s both;
}
.lightbox-close{
  position:absolute;
  top:1rem;
  right:1.5rem;
  font-size:3rem;
  color:white;
  cursor:pointer;
  transition:opacity 0.2s ease;
}
.lightbox-close:hover{opacity:0.7}
.lightbox-btn{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  background:rgba(255,255,255,0.3);
  color:white;
  border:none;
  padding:1rem;
  font-size:2rem;
  cursor:pointer;
  border-radius:4px;
  transition:background 0.2s ease;
}
.lightbox-btn:hover{background:rgba(255,255,255,0.5)}
.lightbox-prev{left:1rem}
.lightbox-next{right:1rem}

@keyframes fadeIn{
  from{opacity:0}
  to{opacity:1}
}

@keyframes zoomIn{
  from{opacity:0;transform:scale(0.8)}
  to{opacity:1;transform:scale(1)}
}

@keyframes slideUp{
  from{opacity:0;transform:translateY(20px)}
  to{opacity:1;transform:translateY(0)}
}

@media (max-width:1024px){
  .gallery-grid{grid-template-columns:repeat(3,1fr)}
}

@media (max-width:768px){
  .gallery-grid{grid-template-columns:repeat(2,1fr)}
  .gallery-item[style*="grid-column: span 2"]{grid-column:span 1}
  .lightbox-image{max-width:95%;max-height:70%}
  .lightbox-btn{padding:0.6rem}
}

@media (max-width:640px){
  .nav{float:none;text-align:right;margin-top:.5rem}
  .hero h2{font-size:1.5rem}
  .gallery-grid{grid-template-columns:repeat(1,1fr)}
}
