/* ===========================
   Global Styles
   =========================== */
:root {
  --primary-color: #1e3a8a;   /* Deep elegant blue */
  --secondary-color: #f59e0b; /* Warm accent (golden yellow) */
  --light-color: #f9fafb;     /* Off-white background */
  --dark-color: #111827;      /* Rich dark text */
  --gray-color: #6b7280;      /* Neutral gray */
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Poppins', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  color: var(--dark-color);
  background-color: var(--light-color);
  line-height: 1.6;
  scroll-behavior: smooth;
  transition: background 0.3s ease, color 0.3s ease;
}

/* ===========================
   Header & Navigation
   =========================== */
header {
  background: var(--primary-color);
  color: #fff;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  transition: all 0.3s ease;
}

.nav-links a {
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  transition: color 0.3s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--secondary-color);
  transform: scale(1.05);
}

/* ===========================
   Hero Section
   =========================== */
.hero {
  text-align: center;
  padding: 6rem 2rem;
  background: linear-gradient(to right, #1e3a8a, #3b82f6);
  color: #fff;
  animation: fadeIn 1s ease forwards;
}

.hero h2 {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  background: var(--secondary-color);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.btn:hover {
  background: #d97706;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

/* ===========================
   Skills Section
   =========================== */
.skills {
  padding: 3rem 2rem;
  text-align: center;
}

.skills h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.skills ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.skills li {
  background: #fff;
  padding: 1rem 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  font-weight: 500;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skills li:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* ===========================
   About Section
   =========================== */
.about {
  max-width: 800px;
  margin: 3rem auto;
  padding: 2rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  animation: fadeIn 1s ease forwards;
}

.about h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.about p {
  margin-bottom: 1rem;
  color: var(--gray-color);
  font-size: 1.05rem;
}

/* ===========================
   Projects Section
   =========================== */
.projects {
  max-width: 1100px;
  margin: 3rem auto;
  padding: 2rem;
  text-align: center;
}

.projects h2 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

/* Project Grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.project-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  padding: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeInUp 0.8s ease forwards;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.project-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.project-card img:hover {
  transform: scale(1.05);
}

.project-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
  font-family: var(--font-heading);
}

.project-card p {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  color: #444;
}

.project-card .btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: var(--primary-color);
  color: #fff;
  border-radius: 6px;
  font-weight: 500;
  transition: background 0.3s ease, transform 0.2s ease;
}

.project-card .btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

/* ===========================
   Contact Section
   =========================== */
.contact {
  max-width: 700px;
  margin: 3rem auto;
  padding: 2rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  animation: fadeIn 1s ease forwards;
}

.contact h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.contact p {
  margin-bottom: 1.5rem;
  color: var(--gray-color);
}

form label {
  display: block;
  margin: 0.5rem 0 0.25rem;
  font-weight: 500;
}

form input,
form textarea {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

form input:focus,
form textarea:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 8px rgba(30,58,138,0.2);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===========================
   Footer
   =========================== */
footer {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--primary-color);
  color: #fff;
  margin-top: 3rem;
}

footer a {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 500;
}

footer a:hover {
  text-decoration: underline;
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
  }

  .hero h2 {
    font-size: 2rem;
  }

  .skills ul {
    flex-direction: column;
    gap: 1rem;
  }

  .project-card img {
    height: 150px;
  }
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #fff;
  cursor: pointer;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
    width: 100%;
  }

  .nav-links.active {
    display: flex;
  }
}

/* ===========================
   Animations
   =========================== */
@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}
