:root {
  color-scheme: dark;
}

body {
  background-color: #020617;
}

.grain-overlay::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  mix-blend-mode: soft-light;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="160" height="160" viewBox="0 0 160 160"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="1.2" numOctaves="3" stitchTiles="noStitch"/></filter><rect width="100%" height="100%" filter="url(%23n)" opacity="0.6"/></svg>');
  z-index: -1;
}

.particles {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.particle {
  position: absolute;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(148, 163, 184, 0.85), transparent 60%);
  opacity: 0.14;
  animation: float 26s linear infinite;
}

.particle:nth-child(2) {
  animation-duration: 32s;
  animation-delay: -8s;
}

.particle:nth-child(3) {
  animation-duration: 38s;
  animation-delay: -14s;
}

.particle:nth-child(4) {
  animation-duration: 44s;
  animation-delay: -20s;
}

@keyframes float {
  0% {
    transform: translate3d(-10%, 10%, 0) scale(1);
  }
  50% {
    transform: translate3d(30%, -20%, 0) scale(1.3);
  }
  100% {
    transform: translate3d(90%, 30%, 0) scale(1);
  }
}

html {
  scroll-behavior: smooth;
}

body:not(.dark-mode) .footer-bottom p {
    color: #666;
}


@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap:2rem;
        text-align:center;
    }

    .footer-bottom {
        flex-direction:column;
        text-align:center;
    }

    .social-links {
        align-items: center;
    }

    .footer-skills {
        justify-content: center;
    }
}

@media (max-width:480px) {
    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-section {
        text-align: center;
    }
}

.about-content {
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap:3rem;
    align-items: start;
}

.intro-text {
    font-size:1.2rem;
}

.description {
    margin-top:1rem;
    color:#666;
}

/* Projects grid + modal styles */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 1.25rem;
}

.project-card {
  border-radius: 0.75rem;
  overflow: hidden;
  position: relative;
}

.project-meta {
  background: linear-gradient(180deg, rgba(2,6,23,0) 0%, rgba(2,6,23,0.85) 70%);
}

/* Modal (lightbox) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
}

.modal-backdrop.open {
  display: flex;
}

.modal-content {
  max-width: 920px;
  width: 96%;
  background: #0b1220;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(2,6,23,0.6);
  overflow: hidden;
}

.modal-body img {
  width: 100%;
  height: auto;
  display: block;
}

.filter-bar { gap: 0.5rem; display:flex; flex-wrap:wrap }

@media (max-width: 768px) {
  .projects-grid { grid-template-columns: 1fr; }
}

/* Primary CTA subtle pulse + hover lift */
@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(168,85,247,0); }
  50% { box-shadow: 0 18px 50px rgba(168,85,247,0.12); }
  100% { box-shadow: 0 0 0 0 rgba(168,85,247,0); }
}
.cta-animate {
  animation: pulse-glow 4s ease-in-out infinite;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.cta-animate:hover {
  transform: translateY(-3px) scale(1.02);
}

.trust-row { display:flex; gap:0.75rem; align-items:center; margin-top:0.5rem; flex-wrap:wrap }
.trust-pill { display:inline-flex; align-items:center; gap:0.5rem; padding:0.35rem 0.75rem; border-radius:9999px; background:rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.04); color:#cbd5e1; font-size:13px }
.trust-dot { width:8px; height:8px; border-radius:9999px; background:#a855f7; box-shadow:0 6px 18px rgba(168,85,247,0.12) }

/* Mobile / responsive tweaks */
@media (max-width: 640px) {
  #hero-heading { font-size: 1.9rem; line-height: 1.05; }
  .cta-animate { padding-left: 0.9rem; padding-right: 0.9rem; padding-top: 0.6rem; padding-bottom: 0.6rem; }
  .filter-bar button { padding: 0.45rem 0.6rem; font-size: 13px; }
  .trust-row { justify-content: center; gap: 0.5rem; }
  .project-card { border-radius: 12px; }
}

/* Modal responsive */
.modal-backdrop { padding: 1rem; }
.modal-content { max-width: 920px; width: 100%; max-height: 90vh; overflow: hidden; }
.modal-body { max-height: 60vh; overflow: hidden; }
.modal-body img { width:100%; height:100%; object-fit:cover; display:block; }
@media (max-width: 640px) {
  .modal-content { border-radius: 10px; max-height: 95vh; }
  .modal-body { max-height: 55vh; }
}

/* Nav CTA (prominent) */
.nav-cta {
  padding: 0.55rem 0.95rem;
  border-radius: 9999px;
  font-weight: 700;
  background-image: linear-gradient(45deg, #a855f7 0%, #8b5cf6 50%, #6366f1 100%);
  color: white !important;
  box-shadow: 0 10px 30px rgba(99,102,241,0.12);
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 180ms ease;
}
.nav-cta:hover { transform: translateY(-2px) scale(1.02); }

/* Sticky/floating CTA when scrolled */
.nav-cta.sticky {
  position: fixed !important;
  right: 18px;
  top: 12px;
  z-index: 60;
  opacity: 0.98;
}

/* Nav link underline animation */
header nav a { position: relative; padding-bottom: 6px; }
header nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, #a855f7, #8b5cf6, #6366f1);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 260ms cubic-bezier(.2,.8,.2,1);
  border-radius: 3px;
  opacity: 0.95;
}
header nav a:hover::after, header nav a:focus::after { transform: scaleX(1); }

/* Header shrink-on-scroll */
header { transition: padding 220ms ease, background-color 220ms ease; }
.site-logo svg { transition: transform 220ms ease; transform-origin: center; }
.site-logo span { transition: transform 220ms ease, opacity 220ms ease; display:inline-block; }
header.scrolled { padding-top: 6px; padding-bottom: 6px; }
header.scrolled .site-logo svg { transform: scale(0.82); }
header.scrolled .site-logo span { transform: translateY(-1px) scale(0.92); opacity:0.95; }

/* Frosted header background when scrolled for contrast */
header.scrolled {
  background: rgba(2,6,23,0.78);
  backdrop-filter: blur(6px) saturate(120%);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

/* Mobile menu backdrop and animation */
.mobile-backdrop { display: none; }
.mobile-open .mobile-backdrop { display: block; position: fixed; inset: 0; background: rgba(2,6,23,0.6); z-index: 45; }
#mobile-menu { transition: transform 260ms cubic-bezier(.2,.8,.2,1), opacity 220ms ease; transform-origin: top center; }
.mobile-open #mobile-menu { transform: translateY(0); opacity: 1; }
#mobile-menu.hidden { transform: translateY(-8px); opacity: 0; }

/* Hide logo text on small screens to save space */
@media (max-width: 640px) {
  .site-logo span { display: none; }
}

/* Compact form inputs */
.form-input {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  color: #e6eef8;
  transition: box-shadow 160ms ease, transform 120ms ease, border-color 160ms ease;
}
.form-input::placeholder { color: #94a3b8; }
.form-input:focus {
  outline: none;
  box-shadow: 0 8px 30px rgba(99,102,241,0.08);
  border-color: rgba(168,85,247,0.9);
  transform: translateY(-1px);
}

.form-compact { gap: 0.5rem; }
.form-compact .form-row { display: flex; gap:0.5rem; }
.form-compact label.sr-only { position: absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* Smaller submit micro-interaction */
.submit-cta { transition: transform 180ms cubic-bezier(.2,.8,.2,1), box-shadow 160ms ease; }
.submit-cta:active { transform: translateY(1px) scale(0.995); }

body.dark-mode .description {
    color:#ccc;
}

#typewriter {
    color:#667eea;
    font-weight:bold;
    border-right:2px solid #667eea;
    animation:blink 1s infinite;
}

@keyframes blink {
    0%, 100% {
        border-color:#667eea;
    }

    50% {
        border-color:transparent;
    }
}

/* Booking modal tweaks */
#booking-modal .modal-content {
  max-width: 720px;
  width: 92%;
  background: linear-gradient(180deg, rgba(11,18,32,0.96), rgba(6,8,14,0.96));
  border-radius: 12px;
  overflow: hidden;
  transform: translateY(10px);
  opacity: 0;
  transition: transform 220ms cubic-bezier(.2,.8,.2,1), opacity 200ms ease;
}
#booking-modal.open .modal-content { transform: translateY(0); opacity: 1; }

#booking-modal .modal-body { padding: 1rem; max-height: 68vh; overflow: auto; }
#booking-modal .modal-body input,
#booking-modal .modal-body textarea {
  background: rgba(15,23,42,0.6);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  color: #e6eef8;
  width: 100%;
  box-sizing: border-box;
}
#booking-modal .modal-body .hidden { display: none !important; }

/* More prominent floating CTA visuals */
.nav-cta.sticky {
  position: fixed !important;
  right: 18px;
  top: 12px;
  z-index: 70;
  opacity: 0.98;
  transform: translateY(0) scale(1.02);
  box-shadow: 0 18px 40px rgba(99,102,241,0.18), 0 6px 18px rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
}

/* Hide the floating CTA on very small screens to avoid overlap with mobile UI */
@media (max-width: 520px) {
  .nav-cta.sticky { display: none !important; }
}
