/* Reset & base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: #f4f6f9;
  color: #333;
  line-height: 1.6;
}

/* Header */
header {
  background: linear-gradient(to right, #0e639c, #1e90ff);
  color: white;
  text-align: center;
  padding: 60px 20px;
}
.profile-img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 15px;
  border: 4px solid white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
header h1 {
  font-size: 2.5rem;
}
header p {
  font-size: 1.2rem;
  margin-top: 5px;
}

/* Navigation */
nav {
  background: #1a1a1a;
  position: sticky;
  top: 0;
  z-index: 999;
}
nav ul {
  display: flex;
  justify-content: center;
  padding: 15px 0;
  list-style: none;
}
nav ul li {
  margin: 0 20px;
}
nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.3s;
}
nav ul li a:hover {
  color: #1e90ff;
}

/* Main Layout */
main {
  max-width: 960px;
  margin: auto;
  padding: 30px 20px;
}
section {
  background: white;
  margin-bottom: 30px;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
h2 {
  font-size: 1.6rem;
  margin-bottom: 15px;
  color: #0e639c;
}
ul {
  padding-left: 20px;
}
ul li {
  margin-bottom: 12px;
  font-size: 1rem;
}

/* About Me Section with Image */
.about-content {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
}
.about-img {
  width: 250px;
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}
.about-content p {
  flex: 1;
  min-width: 250px;
  text-align: justify;
}

/* Project Images */
.project-images {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}
.project-images img {
  width: 100%;
  max-width: 48%;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}
.project-images img:hover {
  transform: scale(1.05);
}

/* Skills */
.skill {
  margin-bottom: 20px;
}
.skill p {
  margin-bottom: 5px;
  font-weight: 500;
}
.skill-bar {
  background: #e0e0e0;
  border-radius: 20px;
  height: 14px;
  overflow: hidden;
  position: relative;
}
.skill-bar div {
  background: linear-gradient(to right, #1e90ff, #0e639c);
  height: 100%;
  width: 0;
  transition: width 2s ease;
  border-radius: 20px;
}

/* Contact Section */
#contact p {
  margin-bottom: 8px;
}
#contact a {
  color: #1e90ff;
  text-decoration: none;
}
#contact a:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  background: #0e639c;
  color: white;
  text-align: center;
  padding: 20px;
  font-size: 0.95rem;
}
.social-links {
  margin-top: 10px;
}
.social-links a {
  margin: 0 10px;
  display: inline-block;
  transition: transform 0.3s ease;
}
.social-links img {
  width: 28px;
  height: 28px;
  filter: brightness(0) invert(1);
}
.social-links a:hover {
  transform: scale(1.2);
}

/* Responsive Design */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    align-items: center;
  }
  .about-content {
    flex-direction: column;
    align-items: center;
  }
  .project-images img {
    max-width: 100%;
  }
}
.project-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 25px;
}

.project-card {
  background: #f1f9ff;
  padding: 15px 20px;
  border-left: 4px solid #1e90ff;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.project-card:hover {
  background: #e2f0ff;
}

.project-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.project-desc {
  display: none;
  font-size: 0.95rem;
  color: #444;
  margin-top: 5px;
  line-height: 1.5;
}

.project-card.active .project-desc {
  display: block;
}

/* Image grid stays unchanged */
.project-images {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.project-images img {
  width: 48%;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.project-images img:hover {
  transform: scale(1.03);
}
#education ul {
  list-style: none;
  padding-left: 0;
}

#education ul li {
  background: #f0f4ff;
  padding: 15px 20px;
  margin-bottom: 12px;
  border-left: 4px solid #0e639c;
  border-radius: 6px;
  transition: background 0.3s ease;
}

#education ul li:hover {
  background: #e0edff;
}

#education ul li strong {
  display: block;
  color: #0e639c;
  margin-bottom: 4px;
}
.skill {
  margin-bottom: 20px;
}

.skill p {
  display: flex;
  justify-content: space-between;
  font-weight: 500;
  margin-bottom: 6px;
}

.skill-bar {
  background: #eee;
  height: 14px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.skill-bar div {
  height: 100%;
  width: 0;
  background: linear-gradient(to right, #1e90ff, #0e639c);
  transition: width 2s ease;
  border-radius: 10px;
}

.skill-bar[data-level]:hover::after {
  content: attr(data-level);
  position: absolute;
  top: -25px;
  right: 10px;
  background: #1e90ff;
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
}

/* Base Styles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f0f8ff;
  color: #333;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* Section Headings */
section h2 {
  text-align: center;
  font-size: 2.5rem;
  color: #00509d;
  margin-bottom: 1rem;
  position: relative;
}

section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background-color: #00a8e8;
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

/* Education Section */
#education ul {
  list-style: none;
  padding: 0;
  max-width: 800px;
  margin: 2rem auto;
}

#education li {
  background: linear-gradient(135deg, #e0f7fa, #ffffff);
  border-left: 5px solid #00a8e8;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  transition: transform 0.3s, box-shadow 0.3s;
}

#education li:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 20px rgba(0, 168, 232, 0.2);
}

/* Projects Section */
#projects ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 0;
  list-style: none;
  max-width: 1000px;
  margin: 2rem auto;
}

#projects li {
  background-color: #ffffff;
  border: 1px solid #d0e7ff;
  border-radius: 10px;
  padding: 1rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

#projects li:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 15px rgba(0, 80, 157, 0.1);
}

#projects li strong {
  color: #00509d;
  display: block;
  margin-bottom: 0.5rem;
}

/* Project Images */
.project-images {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.project-images img {
  width: 220px;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.project-images img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 80, 157, 0.2);
}

/* Skills Section */
#skills .skill {
  max-width: 600px;
  margin: 1rem auto;
}

#skills .skill p {
  margin: 0 0 0.5rem;
  font-weight: 600;
  color: #00509d;
}

.skill-bar {
  background-color: #e0f0ff;
  border-radius: 20px;
  overflow: hidden;
  height: 20px;
  position: relative;
}

.skill-bar div {
  height: 100%;
  background: linear-gradient(90deg, #00a8e8, #00509d);
  width: 0;
  border-radius: 20px;
  transition: width 1.5s ease-in-out;
}

/* Animate Skill Bars on Scroll */
@keyframes fillBar {
  from { width: 0; }
  to { width: var(--skill-level); }
}

.skill-bar.animated div {
  animation: fillBar 2s forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
  #projects ul {
    grid-template-columns: 1fr;
  }

  .project-images {
    flex-direction: column;
    align-items: center;
  }

  .project-images img {
    width: 90%;
    height: auto;
  }
}

/* Section Titles */
section h2 {
  text-align: center;
  font-size: 2.2rem;
  color: #00509d;
  margin-bottom: 1rem;
  position: relative;
}

section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background-color: #00a8e8;
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

/* ===== Education ===== */
#education ul {
  list-style: none;
  padding-left: 0;
  max-width: 800px;
  margin: 2rem auto;
}
#education li {
  background: linear-gradient(135deg, #e6f2ff, #ffffff);
  border-left: 5px solid #00a8e8;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  border-radius: 6px;
  transition: 0.3s ease;
}
#education li:hover {
  background: #d9efff;
}
#education li strong {
  color: #003f88;
  display: block;
  font-size: 1.1rem;
}

/* ===== Projects ===== */
.project-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 25px;
}
.project-card {
  background: #f1f9ff;
  padding: 15px 20px;
  border-left: 4px solid #1e90ff;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}
.project-card:hover {
  background: #dceeff;
}
.project-card h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
  color: #00509d;
}
.project-desc {
  display: none;
  font-size: 0.95rem;
  color: #444;
}
.project-card.active .project-desc {
  display: block;
}
.project-images {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 1rem;
}
.project-images img {
  width: 48%;
  border-radius: 8px;
  transition: transform 0.3s ease;
}
.project-images img:hover {
  transform: scale(1.03);
}

/* ===== Skills ===== */
.skill {
  margin-bottom: 20px;
}
.skill p {
  display: flex;
  justify-content: space-between;
  font-weight: 500;
  color: #003f88;
}
.skill-bar {
  background: #e0e0e0;
  height: 14px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}
.skill-bar div {
  height: 100%;
  width: 0;
  background: linear-gradient(to right, #00a8e8, #00509d);
  transition: width 2s ease;
  border-radius: 10px;
}
.skill-bar[data-level]:hover::after {
  content: attr(data-level);
  position: absolute;
  top: -25px;
  right: 10px;
  background: #1e90ff;
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
}

section {
  scroll-margin-top: 100px; /* Adjust based on your nav height */
}
/* Fix overlapping header issue */
section {
  scroll-margin-top: 100px;
}
