:root {
  --bg: #f5f5f5;
  --text: #1a1a1a;
  --muted: #666;
  --accent: #06b6d4;
  --card: #ffffff;
  --card-shadow: rgba(0, 0, 0, 0.05);
  --nav-bg: rgba(255, 255, 255, 0.7);
}

body.dark {
  --bg: #1a1a1a;
  --text: #f0f0f0;
  --muted: #aaa;
  --accent: #06b6d4;
  --card: #2b2b2b;
  --card-shadow: rgba(0, 0, 0, 0.4);
  --nav-bg: rgba(30, 30, 30, 0.6);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
  scroll-behavior: smooth;
}

a {
  text-decoration: none;
  color: inherit;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px var(--card-shadow);
}

.nav-left a {
  font-weight: bold;
  font-size: 1.3rem;
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-links a {
  margin-left: 1rem;
  margin-right: 1rem;
  font-size: 1rem;
  color: var(--text);
  opacity: 0.85;
  transition: opacity 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 2px;
  width: 0;
  background-color: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  opacity: 1;
}

.nav-links a:hover::after {
  width: 100%;
}

.theme-toggle {
  margin-left: 2rem;
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.3s;
}

.theme-toggle:hover {
  background: #0891b2;
}

header {
  padding: 4rem 2rem 2rem;
  text-align: center;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

header p {
  font-size: 1.1rem;
  color: var(--muted);
}

.hero {
  padding: 5rem 2rem;
  text-align: center;
  background: linear-gradient(180deg, var(--card), var(--bg));
}

.hero h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 2rem auto;
}

.hero button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.hero button:hover {
  background: #0891b2;
}

.services {
  padding: 4rem 2rem;
  margin: auto;
}

.services h3 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

/* New: style for each service card */
.service-card {
  background: var(--card);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 12px var(--card-shadow);
  transition: transform 0.3s ease;
}

.service-card h4 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.service-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
  color: var(--muted);
  background: var(--card);
  box-shadow: 0 -4px 12px var(--card-shadow);
}

.falling-text {
  display: inline-block;
  white-space: nowrap;
  font-size: 2.5rem;
  letter-spacing: normal; /* or fine-tune with -0.02em if needed */
}

.falling-text span {
  display: inline-block;
  opacity: 0;
  transform: translateY(-100px);
  animation: fallIn 0.6s ease-out forwards;
  animation-delay: calc(0.05s * var(--i));
}

@keyframes fallIn {
  0% {
    opacity: 0;
    transform: translateY(-100px);
  }
  80% {
    opacity: 1;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}


@media (max-width: 768px) {
  nav {
    flex-direction: column;
    align-items: flex-start;
    position: relative;
  }

  .nav-links {
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
    width: 100%;
  }

  .theme-toggle {
    position: absolute;
    top: 1rem;
    right: 2rem;
    margin-left: 0;
  }
}
