:root {
  --bg: #0f1115;
  --text: #e6e9ef;
  --accent: #0a58ca; /* dark blue */
}

body {
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* --- Navbar --- */
.navbar {
  background: rgba(15, 17, 21, 0.8);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.navbar-brand span {
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--text);
}

.nav-link {
  color: var(--text);
  margin-left: 1.2rem;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--accent);
}

/* --- Hero --- */
#hero {
  height: 100vh;
  background: url('assets/hero-bg.jpg') center/cover no-repeat;
  position: relative;
  color: var(--text);
  padding: 0 2rem;
}

#hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.hero-text {
  position: relative;
  z-index: 2;
  max-width: 550px;
}

/* --- Button --- */
.btn-outline-custom {
  border: 2px solid var(--accent);
  color: var(--accent);
  font-weight: 500;
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.btn-outline-custom:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* --- About Section --- */
#about {
  background: #12141a;
  color: var(--text);
}

#about h2 {
  color: var(--accent);
}

#about p {
  color: #d0d3db;
  line-height: 1.7;
}

/* --- Services Section Interactive --- */
#services {
  background: #0f1115;
  color: var(--text);
  overflow: hidden;
}

#services h2 {
  color: var(--accent);
}

.text-accent {
  color: var(--accent);
}

/* --- Container Layout --- */
#services .row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: stretch;
  gap: 1rem;
  transition: all 0.4s ease;
}

/* --- Service Card Styling --- */
.service-card {
  background: #171a21;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  transition: all 0.5s ease;
  flex: 1; /* base size */
  min-width: 250px;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: center;
}

.service-card .icon i {
  transition: all 0.3s ease;
}

.service-card h5 {
  color: var(--accent);
  margin-bottom: 0.75rem;
  transition: all 0.3s ease;
}

.service-card p {
  color: #d0d3db;
  font-size: 0.95rem;
  line-height: 1.6;
  transition: all 0.3s ease;
}

/* --- Hover Effect --- */
#services .row:hover .service-card {
  flex: 0.8; /* slightly shrink all */
  opacity: 0.6;
  filter: blur(1px);
}

#services .row .service-card:hover {
  flex: 1.6; /* expand hovered one */
  opacity: 1;
  filter: none;
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.3);
  z-index: 2;
}

/* Enhance hovered icon and title */
#services .row .service-card:hover .icon i {
  color: var(--accent);
  transform: scale(1.1);
}

#services .row .service-card:hover h5 {
  color: #fff;
}

#services .row .service-card:hover p {
  color: #f2f3f7;
}

/* --- Projects Section --- */
#projects {
  background: #12141a;
  color: var(--text);
}

#projects h2 {
  color: var(--accent);
}

.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #171a21;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
  transition: all 0.4s ease;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
  filter: brightness(0.9);
}

.project-card:hover img {
  transform: scale(1.1);
  filter: brightness(0.5);
}

.project-card .overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 17, 21, 0.85);
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.4s ease;
}

.project-card:hover .overlay {
  opacity: 1;
}

.project-card h5 {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.project-card p {
  color: #cfd2d8;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

/* --- Contact Section --- */
#contact {
  background: #0f1115;
  color: var(--text);
  position: relative;
}

#contact h2 {
  color: var(--accent);
}

.contact-form {
  background: #171a21;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.contact-form:hover {
  border-color: var(--accent);
  box-shadow: 0 0 25px rgba(124, 58, 237, 0.25);
}

/* Input fields */
.contact-form .form-control {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.contact-form .form-control::placeholder {
  color: #a0a6b3;
}

.contact-form .form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.2rem rgba(124, 58, 237, 0.25);
  background: rgba(255, 255, 255, 0.05);
}

/* Social links */
.social-links a {
  color: var(--text);
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: var(--accent);
}

/* --- Footer --- */
#footer {
  background: #12141a;
  color: var(--text);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#footer a {
  color: var(--text);
  transition: color 0.3s ease;
  text-decoration: none;
}

#footer a:hover {
  color: var(--accent);
}

.footer-link {
  font-size: 0.95rem;
}

#footer .social-links a {
  color: var(--text);
  transition: all 0.3s ease;
}

#footer .social-links a:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

#footer .small {
  color: #a0a6b3;
}

@media (max-width: 768px) {
  #footer {
    text-align: center;
  }
  #footer ul {
    justify-content: center;
  }
}


/* Responsive */
@media (max-width: 768px) {
  #contact .lead {
    font-size: 1rem;
    padding: 0 1rem;
  }
}


/* Responsive adjustments */
@media (max-width: 768px) {
  #projects p.lead {
    font-size: 1rem;
    padding: 0 1rem;
  }
  .project-card img {
    height: 220px;
  }
}


/* --- Responsive Reset --- */
@media (max-width: 992px) {
  #services .row {
    flex-wrap: wrap;
  }

  #services .row:hover .service-card,
  #services .row .service-card:hover {
    flex: 1;
    opacity: 1;
    filter: none;
    transform: none;
  }
}


/* Responsive adjustment */
@media (max-width: 768px) {
  #about {
    text-align: center;
  }
  .about-img {
    margin-bottom: 1.5rem;
  }
}



/* 📱 Responsive adjustment for mobile screens */
@media (max-width: 768px) {
  #hero {
    background-position: center;
    padding: 0 1.5rem;
  }

  .hero-text {
    text-align: center !important;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text p {
    font-size: 1rem;
  }

  .btn-outline-custom {
    display: inline-block;
    margin-top: 1rem;
  }
}



/* ==========  Universal Fade Animations  ========== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes fadeLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === Classes you can apply anywhere === */
.fade-in {
  animation: fadeIn 1.2s ease-out forwards;
}

.fade-out {
  animation: fadeOut 1s ease-in forwards;
}

.fade-up {
  animation: fadeUp 1.2s ease-out forwards;
}

.fade-down {
  animation: fadeDown 1.2s ease-out forwards;
}

.fade-left {
  animation: fadeLeft 1.2s ease-out forwards;
}

.fade-right {
  animation: fadeRight 1.2s ease-out forwards;
}


/* Optional delay helper classes */
.delay-1 { animation-delay: 0.5s; }
.delay-2 { animation-delay: 1s; }
.delay-3 { animation-delay: 1.5s; }
