/* ================================
   RESET & GLOBAL STYLES
================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #fafafa;
  color: #222;
  line-height: 1.6;
  overflow-x: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  list-style: none;
}

/* Utility classes */
.section-divider {
  padding: 5rem 2rem;
}
.highlight {
  color: #2563eb;
  font-weight: 700;
}
.btn {
  display: inline-block;
  padding: 0.9rem 2rem;
  border-radius: 50px;
  background: #2563eb;
  color: #fff;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(37,99,235,0.4);
  transition: all 0.3s ease;
}
.btn:hover {
  background: #1d4ed8;
  transform: translateY(-3px);
}

/* ================================
   NAVBAR
================================ */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 3rem;
  background: #111;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  animation: fadeDown 1s ease-in-out;
}
.logo {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #fff;
}
.nav-links {
  display: flex;
  gap: 2rem;
}
.nav-links li a {
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: background 0.3s, color 0.3s;
}
.nav-links li a:hover,
.nav-links li a.active {
  background: #2563eb;
  color: #fff;
}

/* ================================
   HERO SECTION
================================ */
.hero {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #f9fafb, #e0e7ff);
  text-align: center;
  position: relative;
  padding: 0 2rem;
  animation: fadeIn 1.2s ease-in;
}
.hero-content {
  max-width: 800px;
  animation: slideUp 1.3s ease forwards;
}
.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}
.hero h1 span {
  color: #2563eb;
  text-shadow: 2px 2px 10px rgba(37,99,235,0.3);
}
.hero p {
  font-size: 1.4rem;
  margin-bottom: 2rem;
  color: #444;
}

/* ================================
   ABOUT
================================ */
.about {
  background: #fff;
}
.about h2 {
  text-align: center;
  font-size: 2.8rem;
  margin-bottom: 3rem;
  color: #2563eb;
  animation: fadeIn 1.2s ease-in;
}
.about-container {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}
.profile-pic {
  width: 280px;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(37,99,235,0.25);
  animation: zoomIn 1.2s ease;
}
.about-text {
  max-width: 600px;
  font-size: 1.15rem;
  color: #333;
  animation: slideLeft 1.5s ease forwards;
}
.about-text a {
  color: #2563eb;
  font-weight: bold;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s;
}
.about-text a:hover {
  border-color: #2563eb;
}

/* ================================
   SKILLS
================================ */
.skills {
  background: #f3f4f6;
  border-radius: 20px;
  margin: 2rem auto;
  max-width: 1100px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  animation: fadeIn 1.4s ease;
}
.skills h2 {
  text-align: center;
  font-size: 2.8rem;
  margin-bottom: 2rem;
  color: #2563eb;
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  padding: 2rem;
}
.skill-card {
  background: white;
  padding: 2rem;
  text-align: center;
  border-radius: 12px;
  font-weight: 600;
  color: #333;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  opacity: 0;
  animation: fadeUp 1s ease forwards;
}
.skill-card:nth-child(odd) {
  animation-delay: 0.3s;
}
.skill-card:nth-child(even) {
  animation-delay: 0.6s;
}
.skill-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(37,99,235,0.3);
}

/* ================================
   PROJECTS
================================ */
.projects h2 {
  text-align: center;
  font-size: 2.8rem;
  margin-bottom: 3rem;
  color: #2563eb;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
}
.project-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
  transition: transform 0.3s, box-shadow 0.3s;
  opacity: 0;
  animation: fadeUp 1.2s ease forwards;
}
.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 30px rgba(37,99,235,0.35);
}
.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.project-card h3 {
  padding: 1rem;
  color: #0b3d91;
  font-weight: bold;
}
.project-card p {
  padding: 0 1rem 1.5rem;
  color: #555;
}
.project-card .btn {
  margin: 0 1rem 1.5rem;
}

/* ================================
   COMPETITIVE PROGRAMMING
================================ */
.competitive {
  background: #eef2ff;
  border-radius: 20px;
  max-width: 1000px;
  margin: 0 auto 4rem;
  padding: 3rem;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  animation: fadeIn 1.6s ease;
}
.competitive h2 {
  font-size: 2.8rem;
  margin-bottom: 1.5rem;
  color: #2563eb;
}
.competitive p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}
.competitive ul li {
  margin: 0.8rem 0;
}
.competitive ul li a {
  color: #2563eb;
  font-weight: bold;
  transition: color 0.3s;
}
.competitive ul li a:hover {
  color: #0b3d91;
}

/* ================================
   ACHIEVEMENTS
================================ */
.achievements h2 {
  text-align: center;
  font-size: 2.8rem;
  margin-bottom: 2rem;
  color: #2563eb;
  animation: fadeIn 1.5s ease;
}
.achievements ul {
  text-align: center;
  font-size: 1.2rem;
}
.achievements li {
  margin: 1rem 0;
  font-weight: 600;
  opacity: 0;
  animation: fadeUp 1s ease forwards;
}
.achievements li:nth-child(1) { animation-delay: 0.2s; }
.achievements li:nth-child(2) { animation-delay: 0.4s; }
.achievements li:nth-child(3) { animation-delay: 0.6s; }
.achievements li:nth-child(4) { animation-delay: 0.8s; }

/* ================================
   CONTACT
================================ */
.contact {
  background: #f9fafb;
  border-radius: 15px;
  max-width: 700px;
  margin: 0 auto 4rem;
  padding: 3rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  animation: fadeIn 1.7s ease;
}
.contact h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: #2563eb;
}
.contact form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.contact input,
.contact textarea {
  padding: 1rem;
  border: 2px solid #2563eb;
  border-radius: 8px;
  font-size: 1rem;
}
.contact input:focus,
.contact textarea:focus {
  outline: none;
  border-color: #0b3d91;
}

/* ================================
   FOOTER
================================ */
footer {
  background: #111;
  color: #eee;
  text-align: center;
  padding: 2rem;
  font-size: 1rem;
  animation: fadeIn 2s ease;
}

/* ================================
   ANIMATIONS
================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(50px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideLeft {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================================
   RESPONSIVE DESIGN
================================ */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  .about-container {
    flex-direction: column;
  }
  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
  .project-grid {
    grid-template-columns: 1fr;
  }
}
/* Add scroll-linked animations */
section {
  view-timeline-name: --section;
  view-timeline-axis: block;
  animation-timeline: --section;
  animation-range: entry 0% cover 50%;
  animation-fill-mode: both;
}

section h2,
section p,
section .skills-grid,
section .project-grid,
section .about-container,
section ul,
section form {
  opacity: 0;
  transform: translateY(50px);
  animation: fadeScroll 1s ease forwards;
}

/* Keyframes for scroll animation */
@keyframes fadeScroll {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Make it smoother */
.about-container,
.skills-grid,
.project-grid,
.contact form {
  animation-delay: 0.2s;
}
/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: #fdfdfd;
  color: #222;
  scroll-behavior: smooth;
  line-height: 1.6;
}

/* Navbar - fixed */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: #111;
  color: white;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  letter-spacing: 1px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links li a {
  color: white;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: background 0.3s;
}

.nav-links li a:hover,
.nav-links li a.active {
  background: #2563eb;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(to right, #eef2ff, #dbeafe);
  padding-top: 80px; /* space for fixed header */
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero .highlight {
  color: #2563eb;
  font-weight: bold;
}

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

.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  background: #2563eb;
  color: white;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s;
}

.btn:hover {
  background: #1d4ed8;
}

/* Section */
section {
  padding: 5rem 2rem;
  margin-top: 2rem;
}

section h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: #2563eb;
  font-size: 2.5rem;
}

/* About */
.about-container {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.profile-pic {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
  border: 5px solid white;
}

.about-text {
  max-width: 600px;
  font-size: 1.15rem;
  background: #f9fafb;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
  line-height: 1.8;
}

/* Skills */
.skills {
  background: #eef2ff;
  border-radius: 12px;
  padding: 4rem 2rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.skill-card {
  background: white;
  padding: 1.5rem;
  text-align: center;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  font-weight: 600;
  transition: transform 0.3s, box-shadow 0.3s;
}

.skill-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.skill-card h3 {
  margin-bottom: 0.7rem;
  color: #2563eb;
}
/* Achievements */
.achievements {
  background: linear-gradient(135deg, #f9fafb, #eef2ff);
  padding: 5rem 2rem;
  border-radius: 20px;
  max-width: 900px;
  margin: 0 auto 5rem auto;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.achievements::before {
  content: "🏆";
  font-size: 8rem;
  color: rgba(37, 99, 235, 0.08);
  position: absolute;
  top: -20px;
  left: -20px;
  transform: rotate(-15deg);
}

.achievements::after {
  content: "⭐";
  font-size: 6rem;
  color: rgba(37, 99, 235, 0.08);
  position: absolute;
  bottom: -10px;
  right: -10px;
  transform: rotate(15deg);
}

.achievements h2 {
  font-size: 3rem;
  color: #2563eb;
  font-weight: 800;
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
}

.achievement-list {
  list-style: none;
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
}

.achievement-list li {
  background: white;
  margin: 1rem 0;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  font-size: 1.2rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.achievement-list li:hover {
  transform: translateX(10px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.achievement-list li::before {
  content: "✅";
  color: #2563eb;
  font-size: 1.5rem;
}
