* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: #f4f7ff;
  color: #1f1f1f;
  line-height: 1.6;
  transition: 0.3s;
}

body.dark {
  background: #111827;
  color: #f3f4f6;
}

a {
  color: #4f46e5;
  text-decoration: none;
}

#loader {
  position: fixed;
  background: #fff;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 5px solid #4f46e5;
  border-top: 5px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hidden {
  display: none;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 20px;
}

.hero {
  text-align: center;
  margin-bottom: 60px;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.hero .highlight {
  color: #4f46e5;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.btn {
  display: inline-block;
  background: #4f46e5;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  transition: 0.3s ease;
}

.btn:hover {
  background: #3730a3;
  transform: scale(1.05);
}

section {
  margin-bottom: 60px;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 16px;
  color: #3730a3;
  text-align: center;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card .btn {
  margin-top: 10px;
}

body.dark .card {
  background: #1e293b;
  color: #f8fafc;
}

footer {
  text-align: center;
  font-size: 0.9rem;
  color: #555;
  margin-top: 60px;
}

body.dark footer {
  color: #ccc;
}

/* Dark mode toggle */
.dark-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
}

.dark-toggle i {
  font-size: 1.6rem;
  cursor: pointer;
  color: #4f46e5;
}
