/* ===== Theme 01 — Modern One Page (Enhanced) ===== */
:root {
  --bg-dark: #0d1117;
  --bg-card: #161b22;
  --bg-card-hover: #21262d;
  --text-primary: #f0f6fc;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --border: #30363d;
  --radius: 12px;
  --transition: 0.25s ease;
  --shadow-glow: 0 0 40px rgba(88, 166, 255, 0.15);
  --bs-secondary-color: rgb(76 81 85 / 75%);
}

* {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  /* Keep hero and scroll indicator animating at normal speed */
  .hero-shape {
    animation-duration: 12s !important;
    animation-name: hero-shape-morph !important;
  }
  .scroll-indicator span::before {
    animation-duration: 2.2s !important;
    animation-name: scrollBounce !important;
  }
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
}

/* ----- Navbar ----- */
.navbar {
  background: rgba(13, 17, 23, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: rgba(13, 17, 23, 0.95);
  border-color: var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.navbar-brand {
  font-size: 1.35rem;
  color: var(--text-primary) !important;
  transition: opacity var(--transition);
}

.navbar-brand:hover {
  opacity: 0.9;
}

.navbar-brand .text-accent {
  color: var(--accent) !important;
}

.nav-link {
  color: var(--text-muted) !important;
  font-weight: 500;
  padding: 0.5rem 0.75rem !important;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0.25rem;
  left: 0.75rem;
  right: 0.75rem;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--transition);
  border-radius: 1px;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent) !important;
}

.nav-link.active {
  background: rgba(88, 166, 255, 0.08);
}

.navbar-toggler {
  color: var(--text-primary);
}

.navbar-toggler-icon {
  filter: invert(1);
}

.navbar-toggler:focus-visible {
  box-shadow: 0 0 0 2px var(--accent);
}

/* ----- Utilities ----- */
.text-accent {
  color: var(--accent) !important;
}

.letter-spacing {
  letter-spacing: 0.2em;
}

/* ----- Buttons ----- */
.btn-accent {
  background: var(--accent);
  border: none;
  color: #fff;
  font-weight: 600;
  transition: background var(--transition), transform 0.15s ease, box-shadow var(--transition);
}

.btn-accent:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-accent:active {
  transform: translateY(0);
}

.btn-accent:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-outline-light {
  border-color: var(--border);
  color: var(--text-muted);
}

.btn-outline-light:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(88, 166, 255, 0.08);
}

/* ----- Hero ----- */
#hero {
  background: var(--bg-dark);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 70% 40%, rgba(88, 166, 255, 0.14) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 20% 80%, rgba(88, 166, 255, 0.07) 0%, transparent 50%);
  pointer-events: none;
}

.hero-noise {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Hero text: light color for contrast on dark background */
#hero .lead,
.hero-lead {
  color: rgba(240, 246, 252, 0.88);
}

/* Hero reveal animation */
.hero-reveal {
  opacity: 0;
  transform: translateY(24px);
  animation: heroReveal 0.7s ease forwards;
}

.hero-reveal-delay-1 { animation-delay: 0.1s; }
.hero-reveal-delay-2 { animation-delay: 0.25s; }
.hero-reveal-delay-3 { animation-delay: 0.4s; }

@keyframes heroReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-shape {
  width: 320px;
  height: 320px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(88, 166, 255, 0.35) 0%, rgba(88, 166, 255, 0.08) 50%, rgba(88, 166, 255, 0.02) 100%);
  border: 1px solid rgba(88, 166, 255, 0.2);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation: hero-shape-morph 12s ease-in-out infinite;
  box-shadow: 0 0 60px rgba(88, 166, 255, 0.2);
  will-change: border-radius;
}

/* Blob morph – shape changes organically */
@keyframes hero-shape-morph {
  0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
  25% { border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%; }
  50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; }
  75% { border-radius: 42% 58% 25% 75% / 46% 76% 24% 54%; }
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-indicator span {
  display: block;
  width: 24px;
  height: 40px;
  border: 2px solid var(--border);
  border-radius: 12px;
  position: relative;
}

.scroll-indicator span::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 10px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollBounce 2.2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0% { opacity: 1; transform: translateX(-50%) translateY(0) scaleY(1); }
  45% { opacity: 0.6; transform: translateX(-50%) translateY(6px) scaleY(0.9); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scaleY(1); }
}

/* ----- Stats strip ----- */
.stats-strip {
  background: var(--bg-card);
  border-color: var(--border) !important;
}

.stat-item {
  opacity: 0;
  transform: translateY(16px);
}

.stat-item.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.stat-number {
  font-variant-numeric: tabular-nums;
}

/* ----- About ----- */
#about {
  background: var(--bg-dark);
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), background var(--transition), transform var(--transition), box-shadow var(--transition);
  opacity: 0;
  transform: translateY(24px);
}

.about-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease, border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

#about .row.g-4 > *:nth-child(1) .about-card.visible { transition-delay: 0.1s; }
#about .row.g-4 > *:nth-child(2) .about-card.visible { transition-delay: 0.2s; }
#about .row.g-4 > *:nth-child(3) .about-card.visible { transition-delay: 0.3s; }

.about-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.about-icon {
  color: var(--accent);
  font-size: 1.75rem;
}

#about .text-muted {
  color: var(--text-muted) !important;
}

/* ----- Gallery ----- */
.bg-dark-subtle {
  background: var(--bg-dark);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* Dark text so heading & intro are readable on white (or light) gallery background */
#gallery .gallery-heading,
#gallery .gallery-heading.display-5 {
  color: #0d1117 !important;
}

#gallery .gallery-intro,
#gallery p.gallery-intro {
  color: #424a53 !important;
}

.gallery-filters .btn-outline-secondary {
  border-color: var(--border);
  color: var(--text-muted);
}

.gallery-filters .btn-outline-secondary:hover,
.gallery-filters .btn-check:checked + .btn-outline-secondary {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(88, 166, 255, 0.1);
}

/* Gallery grid: multi-column so short items let the next move up (no fixed row height) */
.gallery-grid {
  column-count: 1;
  column-gap: 1rem;
}

.gallery-col {
  break-inside: avoid;
  margin-bottom: 1rem;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.gallery-col:last-child {
  margin-bottom: 0;
}

@media (min-width: 576px) {
  .gallery-grid {
    column-count: 2;
  }
}

@media (min-width: 992px) {
  .gallery-grid {
    column-count: 3;
  }
}

.gallery-col.hidden {
  display: none !important;
}

.gallery-item {
  cursor: pointer;
  display: block;
  width: 100%;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
  transition: transform 0.5s ease-out;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13, 17, 23, 0.92) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-caption {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.1rem;
}

.gallery-icon {
  font-size: 1.5rem;
  color: var(--accent);
  opacity: 0.9;
}

/* Gallery modal */
.gallery-modal-content .modal-body {
  background: transparent;
}

#galleryModal .btn-close {
  filter: invert(1);
}

#galleryModal .btn-close:hover {
  opacity: 0.8;
}

/* ----- Contact ----- */
.contact-section {
  background: var(--bg-dark);
  position: relative;
}

.contact-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  opacity: 0.6;
}

/* Contact info card (left column on desktop) */
.contact-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.contact-info-card:hover {
  border-color: rgba(88, 166, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.contact-info-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(88, 166, 255, 0.12);
  color: var(--accent);
  border-radius: var(--radius);
  font-size: 1.5rem;
}

.contact-detail-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark);
  color: var(--accent);
  border-radius: 8px;
  font-size: 1rem;
}

.contact-details a:hover {
  color: var(--accent) !important;
}

/* Form card */
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  border-left: 3px solid var(--accent);
}

.contact-form:focus-within {
  border-color: rgba(88, 166, 255, 0.4);
  box-shadow: 0 0 0 1px rgba(88, 166, 255, 0.15), 0 12px 40px rgba(0, 0, 0, 0.15);
}

.contact-form .form-label {
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 0.35rem;
}

/* Input with icon */
.contact-form .input-wrapper {
  position: relative;
}

.contact-form .input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
  pointer-events: none;
  z-index: 1;
  transition: color var(--transition);
}

.contact-form .input-wrapper:focus-within .input-icon {
  color: var(--accent);
}

.contact-form .input-icon-textarea {
  top: 1.25rem;
  transform: none;
}

.contact-form .input-wrapper-textarea .input-icon {
  top: 1.25rem;
  transform: none;
}

.contact-form .input-wrapper .form-control {
  padding-left: 2.75rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 8px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.contact-form .input-wrapper-textarea .form-control {
  padding-top: 0.75rem;
  padding-left: 2.75rem;
  min-height: 120px;
  resize: vertical;
}

.contact-form .form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.contact-form .form-control:focus {
  background: var(--bg-dark);
  border-color: var(--accent);
  color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
}

.contact-form .form-control.is-valid {
  border-color: #3fb950;
}

.contact-form .form-control.is-invalid {
  border-color: #f85149;
}

.contact-form .form-control.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(248, 81, 73, 0.2);
}

/* Form message (success/error) */
.contact-form-message.alert-success {
  background: rgba(63, 185, 80, 0.12);
  border: 1px solid rgba(63, 185, 80, 0.35);
  color: #3fb950;
  border-radius: 8px;
}

.contact-form-message.alert-danger {
  background: rgba(248, 81, 73, 0.12);
  border: 1px solid rgba(248, 81, 73, 0.35);
  color: #f85149;
  border-radius: 8px;
}

/* ----- Footer ----- */
footer {
  background: var(--bg-dark);
  border-color: var(--border) !important;
}

footer .text-muted {
  color: var(--text-muted) !important;
}

footer .navbar-brand {
  color: var(--text-primary) !important;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

@media (min-width: 768px) {
  .footer-social {
    justify-content: flex-end;
  }
}

.footer-social-link {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: color var(--transition), border-color var(--transition), background var(--transition), transform 0.2s ease;
}

.footer-social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(88, 166, 255, 0.1);
  transform: translateY(-2px);
}

/* ----- Scroll-triggered animations ----- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(28px);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Bootstrap overrides */
.display-3,
.display-5,
h1, h2, h5 {
  color: var(--text-primary);
}

.border-secondary {
  border-color: var(--border) !important;
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Responsive */
@media (max-width: 991.98px) {
  #hero h1 {
    font-size: 2.25rem;
  }

  .hero-shape {
    width: 220px;
    height: 220px;
  }

  .gallery-filters .btn {
    font-size: 0.875rem;
    padding: 0.35rem 0.75rem;
  }
}

/* ----- SimpleGallery lightbox (Lumen) ----- */
.sg-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
}
.sg-modal.open {
  display: flex;
}
.sg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
  cursor: pointer;
  touch-action: manipulation;
}
.sg-content {
  position: relative;
  z-index: 2;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 1rem;
}
.sg-progress-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent, #58a6ff), #79b8ff);
  overflow: hidden;
  z-index: 10000;
}
.sg-progress-bar {
  height: 100%;
  width: 100%;
  background: #000;
  transform-origin: right;
}
.sg-progress-bar.sg-progress-active {
  animation: sg-progress-shrink linear forwards;
}
@keyframes sg-progress-shrink {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}
.sg-inner {
  display: flex;
  justify-content: center;
  align-items: center;
}
.sg-inner .sg-image,
.sg-inner .sg-video {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius, 12px);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}
.sg-inner .sg-video {
  display: block;
  background: #000;
}
.sg-close,
.sg-prev,
.sg-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 3;
  padding: 12px;
  touch-action: manipulation;
  transition: opacity 0.2s ease;
}
.sg-close:hover,
.sg-prev:hover,
.sg-next:hover {
  opacity: 0.9;
}
.sg-close {
  top: max(1.5rem, env(safe-area-inset-top));
  right: max(1.5rem, env(safe-area-inset-right));
  transform: none;
}
.sg-prev {
  left: max(1rem, env(safe-area-inset-left));
}
.sg-next {
  right: max(1rem, env(safe-area-inset-right));
}
@media (max-width: 768px) {
  .sg-close { top: max(1rem, env(safe-area-inset-top)); right: max(1rem, env(safe-area-inset-right)); }
  .sg-close svg, .sg-prev svg, .sg-next svg { width: 40px; height: 40px; }
  .sg-prev { left: 0.5rem; }
  .sg-next { right: 0.5rem; }
  .sg-inner .sg-image, .sg-inner .sg-video { max-height: 80vh; }
}

/* Dynamic Lumen gallery: .single-gallery structure + filter hide */
.lumen-gallery-container .single-gallery .content {
  position: relative;
  display: block;
}
.gallery-col.hidden {
  display: none !important;
}
