/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
  scroll-behavior: smooth;
}

body {
  background: #0b0b0b;
  color: #fff;
  line-height: 1.6;
  transition: 0.4s;
}

/* LIGHT MODE */
.light-mode {
  background: #ffffff;
  color: #000;
}

.light-mode .navbar {
  background: rgba(255,255,255,0.85);
}

.light-mode .card,
.light-mode .about,
.light-mode .portfolio,
.light-mode .services {
  background: #f5f5f5;
  color: #000;
}

/* NAVBAR */
.navbar {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  padding: 15px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(12px);
  z-index: 1000;
  transition: 0.4s;
}

.navbar.scrolled {
  background: #000;
  box-shadow: 0 5px 25px rgba(0,0,0,0.6);
}

.logo img {
  height: 50px;
}

.navbar nav a {
  color: #fff;
  margin-left: 25px;
  text-decoration: none;
  font-size: 14px;
  transition: 0.3s;
}

.navbar nav a:hover {
  color: #007bff;
}

/* THEME TOGGLE */
#themeToggle {
  margin-left: 20px;
  cursor: pointer;
  background: none;
  border: none;
  color: white;
  font-size: 18px;
}

/* BUTTONS */
.btn, .hero-btn, .cta-btn {
  background: #007bff;
  color: #fff !important;
  padding: 12px 25px;
  border-radius: 30px;
  font-weight: bold;
  text-decoration: none;
  transition: 0.3s;
}

.btn:hover, .hero-btn:hover, .cta-btn:hover {
  background: #ff2b2b;
}

/* HERO */
.hero {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-video {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.65);
}

.hero-content {
  position: relative;
  z-index: 2;
  animation: fadeIn 1.5s ease;
}

.hero-content h1 {
  font-size: 3.2rem;
  margin-bottom: 20px;
}

.hero-content p {
  color: #ccc;
  margin-bottom: 30px;
}

/* ABOUT */
.about {
  padding: 100px 60px;
  text-align: center;
  background: #111;
}

/* SERVICES */
.services {
  padding: 100px 60px;
  text-align: center;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px,1fr));
  gap: 30px;
}

.card {
  background: #111;
  padding: 20px;
  border-radius: 15px;
  transition: 0.4s;
}

.card img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 15px;
}

.card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 15px 40px rgba(0,123,255,0.25);
}

/* PORTFOLIO */
.portfolio {
  padding: 100px 60px;
  text-align: center;
  background: #111;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 20px;
}

.portfolio-grid img {
  width: 100%;
  border-radius: 10px;
  transition: 0.4s;
}

.portfolio-grid img:hover {
  transform: scale(1.05);
}

/* WHY */
.why {
  padding: 100px 60px;
  text-align: center;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 30px;
  margin-top: 40px;
}

/* CTA */
.cta {
  padding: 100px 60px;
  text-align: center;
  background: url('images/bgimg.jpg') center/cover no-repeat;
  position: relative;
}

.cta::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.75);
  top: 0;
  left: 0;
}

.cta h2, .cta p, .cta a {
  position: relative;
  z-index: 2;
}

/* FOOTER */
.footer {
  text-align: center;
  padding: 30px;
  background: #000;
}

.socials a {
  color: #fff;
  margin: 10px;
  font-size: 20px;
  transition: 0.3s;
}

.socials a:hover {
  color: #007bff;
}

/* BACK TO TOP */
#topBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #007bff;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  z-index: 999;
}

#topBtn:hover {
  background: #ff2b2b;
}

/* LOADER */
#loader {
  position: fixed;
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #222;
  border-top: 5px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ANIMATIONS */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* CURSOR GLOW */
body::after {
  content: "";
  position: fixed;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0,123,255,0.2), transparent 60%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 1;
}

/* RESPONSIVE */
@media(max-width:768px){
  .navbar {
    padding: 15px 20px;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .about, .services, .portfolio, .why, .cta {
    padding: 60px 20px;
  }
}