:root {
  --bg-color: #f9f9f9;
  --text-color: #222;
  --accent: #0078d7;
  --card-bg: #fff;
}

body.dark {
  --bg-color: #121212;
  --text-color: #eee;
  --accent: #64b5f6;
  --card-bg: #1e1e1e;
}

body {
  font-family: "Poppins", sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  line-height: 1.7;
  scroll-behavior: smooth;
  transition: background 0.3s, color 0.3s;
}

.hero {
  background: linear-gradient(135deg, #0078d7, #004a8d);
  color: white;
  text-align: center;
  padding: 4rem 1rem;
}

nav {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.3s;
}

nav a:hover {
  opacity: 0.8;
}

#theme-toggle {
  background: none;
  border: 1px solid rgba(255,255,255,0.4);
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 8px;
  padding: 0.3rem 0.6rem;
  transition: background 0.3s;
}

#theme-toggle:hover {
  background: rgba(255,255,255,0.1);
}

.section {
  padding: 3rem 1.5rem;
  max-width: 900px;
  margin: auto;
}

h2 {
  color: var(--accent);
  margin-bottom: 1rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
}

.skills-grid li {
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.project-card {
  display: flex;
  align-items: center;
  background: var(--card-bg);
  margin-bottom: 2rem;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
}

.project-card img {
  width: 40%;
  object-fit: cover;
}

.project-card div {
  padding: 1.5rem;
}

.project-card a {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
  margin: 2rem auto;
}

input, textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: inherit;
  background: var(--card-bg);
  color: var(--text-color);
}

button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: opacity 0.3s;
}

button:hover {
  opacity: 0.9;
}

footer {
  text-align: center;
  padding: 2rem;
  background: #0078d7;
  color: white;
}

footer a {
  color: white;
  text-decoration: underline;
}

.small {
  font-size: 0.9rem;
  opacity: 0.9;
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 1s ease forwards;
}

.delay { animation-delay: 0.3s; }
.delay-2 { animation-delay: 0.6s; }

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.about-container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.profile-img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.small-hero {
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #004a8d, #0078d7);
  text-align: center;
  color: white;
}

.project-banner {
  width: 100%;
  max-height: 350px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

.back-btn {
  display: inline-block;
  margin-top: 2rem;
  background: var(--accent);
  color: white;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.3s;
}

.back-btn:hover {
  opacity: 0.9;
}

.project-link {
  display: inline-block;
  margin-top: 1rem;
  background: var(--accent, #0078d7);
  color: #fff;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s, opacity 0.3s;
}

.project-link:hover {
  opacity: 0.9;
  transform: scale(1.03);
}

@media (max-width: 768px) {
  .project-card {
    flex-direction: column;
  }
  .project-card img {
    width: 100%;
  }
    .about-container {
    flex-direction: column;
    text-align: center;
  }
}

