/* ========== Base Reset ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: linear-gradient(to right, #e3f2fd, #fce4ec);
  color: #333;
  line-height: 1.6;
}

/* ========== Layout Helpers ========== */
.container { width: 90%; max-width: 1200px; margin: 0 auto; }
.container.narrow { max-width: 900px; }
.highlight { color: #0d47a1; }

/* ========== Header / Navbar ========== */
.header {
  background: #0d1b2a;
  color: #fff;
  padding: 0.8rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.header .container {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}

.logo { font-size: 1.6rem; font-weight: 700; color: #fff; text-decoration: none; }

.navbar { position: relative; }
.menu-toggle {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: white;
  background: transparent;
  border: 0;
}

.nav-links {
  list-style: none;
  display: flex; gap: 1.25rem; align-items: center;
  overflow: hidden;
}
.nav-links a {
  color: #fff; text-decoration: none; font-weight: 500;
  padding: 0.5rem 0.8rem; border-radius: 6px; transition: background 0.25s ease;
}
.nav-links a:hover { background: #1b263b; }

/* Mobile nav */
@media (max-width: 992px) {
  .menu-toggle { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
  }

  .nav-links {
    position: absolute; 
    top: 56px; 
    right: 0;
    flex-direction: column; 
    align-items: stretch;
    background: #0d1b2a;
    width: min(80vw, 280px);
    max-height: 0;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    transition: max-height 0.3s ease;
    overflow: hidden; /* Ensure it hides completely */
  }

  .nav-links.active { 
    max-height: 400px; /* Open menu */
  }

  .nav-links li { 
    border-bottom: 1px solid #1b263b; 
  }
  .nav-links li:last-child { border-bottom: 0; }

  .nav-links a { 
    padding: 0.9rem 1rem; 
    text-align: right; 
  }
}

/* ========== Hero ========== */
.hero {
  text-align: center;
  padding: 3rem 1rem;
  background: linear-gradient(135deg, #dbeafe, #fce4ec);
  box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}
.hero-img {
  width: 160px; height: 160px; object-fit: cover; border-radius: 50%;
  margin-bottom: 1rem; border: 4px solid #fff;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.hero h1 { font-size: 2rem; color: #0d1b2a; }
.hero p { color: #555; font-size: 1.1rem; }

/* ========== Sections ========== */
.section {
  padding: 3rem 1rem;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(4px);
  border-radius: 12px;
  margin: 2rem auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.section h2 {
  text-align: center; font-size: 2rem; margin-bottom: 2rem; color: #0d1b2a;
}

/* ========== Skills ========== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}
.skill-card {
  background: #ffffffcc; border-radius: 10px; padding: 1rem; text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1); font-weight: 600;
  transition: transform 0.25s ease, background 0.25s, color 0.25s;
}
.skill-card:hover { transform: translateY(-5px); background: #2196f3; color: #fff; }

/* ========== Projects ========== */
.projects-grid {
  display: grid; gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  max-width: 1000px; margin: 0 auto; padding: 0 0.5rem;
}
.project-card {
  background: #fff; border-radius: 12px; padding: 1rem;
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
  transition: transform 0.25s ease;
  display: flex; flex-direction: column; gap: 0.75rem;
}
.project-card:hover { transform: translateY(-5px); }
.project-card img { width: 100%; height: 180px; object-fit: cover; border-radius: 10px; }
.project-card h3 { font-size: 1.2rem; color: #0d1b2a; }

.project-description { color: #555; font-size: 0.95rem; line-height: 1.4; }
.project-description .full-text { display: none; }

.read-more-btn {
  background: #1976d2; color: #fff; border: 0; padding: 0.5rem 1rem;
  border-radius: 6px; cursor: pointer; transition: background 0.25s ease; align-self: flex-start;
}
.read-more-btn:hover { background: #0d47a1; }

.project-links { margin-top: 0.25rem; }
.project-links a {
  background: #37474f; color: #fff; text-decoration: none; display: inline-block;
  padding: 0.45rem 0.85rem; border-radius: 6px; margin-right: 0.5rem; transition: background 0.25s ease;
}
.project-links a:hover { background: #263238; }

/* ========== Education ========== */
.edu-card {
  max-width: 600px; margin: 1rem auto; background: #fff; padding: 1.3rem 1.2rem;
  border-left: 6px solid #2196f3; border-radius: 10px; box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.edu-card h3 { font-size: 1.1rem; color: #0d1b2a; }
.edu-card p { color: #555; }
.edu-year { display: inline-block; background: #2196f3; color: #fff; padding: 0.25rem 0.7rem; border-radius: 4px; margin-top: 0.5rem; font-size: 0.9rem; }

/* ========== Contact ========== */
.contact-info { text-align: center; margin-top: 0.5rem; }
.email-link { font-weight: 700; color: #1565c0; font-size: 1.05rem; }
.social-links { margin-top: 0.75rem; }
.social-links a { color: #2196f3; font-size: 1.6rem; margin: 0 10px; transition: transform 0.25s ease, color 0.25s; }
.social-links a:hover { color: #0d47a1; transform: scale(1.12); }

/* ========== Footer ========== */
.footer { background: #0d1b2a; color: #fff; text-align: center; padding: 1rem; font-weight: 600; }

/* ========== Responsive Tweaks ========== */
@media (max-width: 600px) {
  .hero h1 { font-size: 1.6rem; }
  .hero p { font-size: 1rem; }
  .project-card img { height: 150px; }
  .read-more-btn, .project-links a { width: 100%; text-align: center; margin-top: 0.4rem; }
}


