:root {
  /* LIGHT MODE COLORS */
  --bg-color: #f4f4f4;
  --text-color: #222;
  --navbar-bg: #fff;
  --hero-bg: linear-gradient(to right, #1e3c72, #2a5298);
  --about-bg: #fff;
  --contact-bg: #eef2f7;
  --service-card-bg: #ffffff;
  --service-card-shadow: rgba(0, 0, 0, 0.1);
  --btn-bg: #fff;
  --btn-text: #333;

  /* Technologies Section Light Mode */
  --tech-bg: #f7f9fc;
  --tech-card-bg: #ffffff;
  --tech-card-shadow: rgba(0, 0, 0, 0.08);
}

body.dark-mode {
  /* DARK MODE COLORS */
  --bg-color: #0d1117;
  --text-color: #e6e6e6;
  --navbar-bg: #161b22;
  --hero-bg: linear-gradient(to right, #0d1117, #1f2937);
  --about-bg: #161b22;
  --contact-bg: #11161d;
  --service-card-bg: #11161d;
  --service-card-shadow: rgba(0, 0, 0, 0.25);
  --btn-bg: #58a6ff;
  --btn-text: #0d1117;

  /* Technologies Section Dark Mode */
  --tech-bg-dark: #1a1a1a;
  --tech-card-bg-dark: #222;
  --tech-card-shadow-dark: rgba(0, 0, 0, 0.4);
}

/* GENERAL STYLES */
body {
  background: var(--bg-color);
  color: var(--text-color);
}

html {
  scroll-behavior: smooth;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

/* NAVBAR */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: var(--navbar-bg);
  position: fixed;
  width: 100%;
  height: 5rem;
  top: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  z-index: 1000;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: bold;
  color: var(--text-color);
  margin-right: auto;
}

.logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.logo-img {
  height: 60px;
  width: auto;
  transition: transform 0.3s ease;
}

.logo-img:hover {
  transform: scale(1.1) rotate(5deg);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 25px;
  align-items: center;
  margin-left: auto;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: bold;
  transition: 0.3s;
}

.nav-links a:hover {
  color: #58a6ff;
}

.menu-btn {
  display: none;
  font-size: 26px;
  cursor: pointer;
  color: var(--text-color);
}

/* Theme toggles */
.theme-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 22px;
  transition: transform 0.3s;
  color: var(--text-color);
}

.theme-btn:hover {
  transform: scale(1.2);
}

.desktop-theme-btn {
  display: inline-block;
  margin-left: 20px;
}

/* Mobile dropdown text theme button */
.mobile-theme-btn {
  display: none;
}

.mobile-theme-link {
  display: block;
  width: 100%;
  text-decoration: none;
  color: var(--text-color);
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  transition: color 0.3s;
}

.mobile-theme-link:hover {
  color: #58a6ff;
}

/* HERO */
.hero {
  height: 100vh;
  background: var(--hero-bg);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  text-align: center;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 20px;
}

.hero p {
  font-size: 20px;
  margin-bottom: 30px;
}

/* BUTTON */
.btn {
  padding: 12px 25px;
  background: var(--btn-bg);
  color: var(--btn-text);
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn:hover {
  transform: translateY(-3px) scale(1.05);
  background: #79c0ff;
  color: #000;
}

section {
  scroll-margin-top: 5rem;
  /* offset for fixed navbar */
}


/* FADE-IN ANIMATIONS */
.section-fade {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.section-fade.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Enhanced Section Headers */
section h2 {
  font-size: 2.5rem;
  /* consistent size */
  margin-bottom: 20px;
  text-align: center;
  font-weight: 700;
  /* slightly bolder */
  letter-spacing: 1px;
  /* subtle spacing */

  /* Gradient text */
  background: linear-gradient(90deg, #4b8df8, #58a6ff);

  /* Fallback for older browsers */
  color: #4b8df8;

  /* Text clipping */
  -webkit-background-clip: text;
  /* Safari/Chrome */
  -webkit-text-fill-color: transparent;
  /* Safari/Chrome */
  background-clip: text;
  /* standard property */
  color: transparent;
  /* fallback for standard */
  position: relative;
}

/* SERVICES */
.services {
  padding: 80px 20px;
  text-align: center;
  background: var(--bg-color);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.service-card {
  background: var(--service-card-bg);
  padding: 25px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 25px var(--service-card-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 35px var(--service-card-shadow);
}

.service-card:nth-child(1) {
  border-top: 5px solid #4b8df8;
}

.service-card:nth-child(2) {
  border-top: 5px solid #8e56f7;
}

.service-card:nth-child(3) {
  border-top: 5px solid #f78d4b;
}

.service-card:nth-child(4) {
  border-top: 5px solid #50c878;
}

/* ABOUT */

/* About Section Container */
.about-container {
  max-width: 1000px;
  /* constrain width for desktop readability */
  margin: 0 auto;
  /* center container */
  padding: 60px 20px;
  /* spacing */
  text-align: left;
}

/* About Section Header */
.about h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 40px;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #4b8df8, #58a6ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  position: relative;
}

/* About Section Content */
.about-content {
  line-height: 1.7;
  /* slightly taller for readability */
  font-size: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* CONTACT */
.contact {
  padding: 80px 20px;
  text-align: center;
  background: var(--contact-bg);
}

.contact form {
  max-width: 450px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

input,
textarea {
  padding: 12px;
  border-radius: 6px;
  background: var(--contact-bg);
  color: var(--text-color);
  border: 1px solid #ccc;
  width: 100%;
}

input::placeholder,
textarea::placeholder {
  color: #888;
}

/* TECHNOLOGIES SECTION */
.tech {
  padding: 60px 20px;
  background: var(--tech-bg);
  text-align: center;
}

.tech-grid {
  display: flex;
  margin-top: 40px;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
}

.tech-card {
  background: var(--tech-card-bg);
  padding: 20px;
  border-radius: 12px;
  width: 250px;
  box-shadow: 0 4px 12px var(--tech-card-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform .2s ease, box-shadow .2s ease;
}

.tech-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.tech-card img {
  height: 130px;
  margin-bottom: 10px;
}

.tech-card span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
}

/* Dark Mode for Technologies */
.dark-mode .tech {
  background: var(--tech-bg-dark);
}

.dark-mode .tech-card {
  background: var(--tech-card-bg-dark);
  box-shadow: 0 4px 12px var(--tech-card-shadow-dark);
}

.dark-mode .tech-card span {
  color: #ececec;
}

/* FOOTER */
footer {
  padding: 20px;
  text-align: center;
  border-top: 1px solid #ccc;
}

/* RESPONSIVE RULES */
@media (max-width: 768px) {
  .desktop-theme-btn {
    display: none;
  }

  .mobile-theme-btn {
    display: block;
  }

  .nav-links {
    position: absolute;
    right: 20px;
    top: 70px;
    background: var(--navbar-bg);
    flex-direction: column;
    width: 200px;
    display: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 6px;
    margin-left: 0;
  }

  .nav-links li {
    margin-bottom: 10px;
  }

  .menu-btn {
    display: block;
  }
}

@media (min-width: 769px) {
  .nav-links {
    display: flex;
    gap: 25px;
  }
}

/* Desktop: two-column layout */
@media (min-width: 992px) {
  .about-content {
    flex-direction: row;
    gap: 40px;
  }

  .about-content p {
    flex: 1;
    /* each paragraph takes half width */
  }
}