/* Base Theme */
body {
  margin: 0;
  padding: 0;
  font-family: 'Courier New', monospace;
  background: url("images/matrix2.gif") no-repeat center center fixed;
  background-size: cover;
  color: #000;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Main container */
.main-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* Dark mode support */
body.dark-mode .main-container {
  background-color: #000;
  color: #fff;
}

/* Hero */
.hero {
  background: url('images/pexels-pixabay-60504.jpg') center/cover no-repeat;
  text-align: center;
  padding: 100px 20px;
}
.hero h1, .hero p {
  color: #fff;
}

/* Theme Toggle */
.theme-toggle {
  position: absolute;
  top: 20px;
  right: 30px;
  cursor: pointer;
  font-size: 1.5rem;
  color: white;
}

/* Buttons */
.button {
  background: #0047ab;
  color: white;
  padding: 10px 20px;
  border: none;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
}
.button:hover {
  background: #003080;
}

/* Navbar */
.navbar {
  background-color: #333;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 12px 0;
  gap: 20px;
}
.navbar a {
  color: #0047ab;
  font-weight: bold;
  text-decoration: none;
}
.navbar a:hover {
  color: #000;
}

/* Section Titles */
h2 {
  color: #0047ab;
  border-bottom: 2px solid #0047ab;
  padding-bottom: 5px;
}

/* Skills Grid */
.skills-icons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.skills-icons div {
  text-align: center;
  padding: 15px;
  background: #e0e0e0;
  border-radius: 12px;
  transition: transform 0.3s ease;
}
.skills-icons div:hover { transform: scale(1.05); }
.skills-icons img { width: 40px; height: 40px; margin: auto; }
.skills-icons span { display: block; margin-top: 8px; color: #000; }

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.card {
  background: #f0f0f0;
  padding: 20px;
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #ccc;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 4px 20px rgba(0, 71, 171, 0.2); }
.card h3 { color: #0047ab; }
.card a { color: #0047ab; text-decoration: none; font-weight: bold; }

/* Contact Section (Updated for card style) */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 15px;
  background: #e0e0e0;
  padding: 15px 20px;
  border-radius: 12px;
  transition: transform 0.3s ease, background 0.3s ease;
}
.contact-card a {
  color: #0047ab;
  text-decoration: none;
  font-size: 1.05rem;
}
.contact-card i { font-size: 1.8rem; color: #0047ab; }
.contact-card:hover { transform: translateY(-3px); background: #d0d0d0; }
.contact-card a:hover, .contact-card i:hover { color: #003080; }

/* Dark Mode */
body.dark-mode .contact-card {
  background: #222;
}
body.dark-mode .contact-card a,
body.dark-mode .contact-card i { color: #ffffff; }
body.dark-mode .contact-card a:hover,
body.dark-mode .contact-card i:hover { color: #00aaff; }

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  background: #222;
  color: #eee;
  border-radius: 0 0 12px 12px;
}

/* Scroll to top button */
#scrollTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 99;
  background-color: #0047ab;
  color: white;
  border: none;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 18px;
  display: none;
  border-radius: 8px;
}
#scrollTop:hover { background-color: #003080; }

/* Responsive */
@media (max-width: 600px) {
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  .navbar { flex-direction: column; gap: 10px; }
  .contact-grid { grid-template-columns: 1fr; }
}
