/* === ROOT VARIABLES === */
:root {
  --primary-color: #df84c8;
  --primary-color-dark: #b062c6;
  --secondary-color: #ff6b6b;
  --text-dark: #1f2937;
  --text-light: #4b5563;
  --background-light: #ffffff;
  --background-alt: #fdf2f8;
  --gradient-bg: linear-gradient(135deg, var(--secondary-color), var(--primary-color-dark));
  --gradient-text: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.12);
}

/* === GENERAL STYLES & RESET === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  color: var(--text-light);
  background-color: var(--background-light);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 100px 0;
}

.section-alt {
  background-color: var(--background-alt);
}

.section-title {
  font-size: 2.5rem;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 4rem;
  font-weight: 700;
}

/* === HEADER & NAVIGATION (No Changes) === */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  transition: all 0.3s ease;
}
.header.scrolled {
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.95);
}
.navbar { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 700; text-decoration: none; color: var(--primary-color); }
.nav-menu { display: flex; gap: 2rem; list-style: none; }
.nav-link { text-decoration: none; color: var(--text-dark); font-weight: 500; transition: color 0.3s ease; }
.nav-link:hover { color: var(--primary-color); }

.hamburger {
  display: none; /* Hidden on desktop */
  cursor: pointer;
  padding: 10px; /* Makes it easier to tap */
  z-index: 1001; /* Ensures it's on top */
}

.hamburger svg {
  width: 28px;
  height: 28px;
  color: var(--text-dark);
  transition: transform 0.3s ease;
}

.icon-close {
  display: none;
}

.hamburger.active .icon-menu {
  display: none;
}
.hamburger.active .icon-close {
  display: block;
}

/* === HERO SECTION (No Changes) === */
.hero { display: flex; align-items: center; justify-content: center; height: 100vh; text-align: center; color: white; background: var(--gradient-bg); padding: 0 20px; }
.profile-image { width: 180px; height: 180px; border-radius: 50%; object-fit: cover; border: 5px solid rgba(255, 255, 255, 0.5); margin-bottom: 2rem; box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2); }
.hero h1 { font-size: 3.5rem; font-weight: 700; margin-bottom: 1rem; text-shadow: 2px 2px 10px rgba(0,0,0,0.2); }
.hero-subtitle { font-size: 1.25rem; margin-bottom: 2.5rem; opacity: 0.9; }
.hero-buttons { display: flex; justify-content: center; gap: 1rem; }
.cta-button { display: inline-block; padding: 12px 30px; text-decoration: none; border-radius: 50px; font-weight: 600; transition: all 0.3s ease; border: 2px solid transparent; background: rgba(255, 255, 255, 0.9); color: var(--primary-color-dark); }
.cta-button:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); }
.cta-button.secondary { background: transparent; border-color: rgba(255, 255, 255, 0.8); color: white; }
.cta-button.secondary:hover { background: rgba(255, 255, 255, 0.1); }


.about-content {
  display: grid;
  grid-template-columns: 1fr; 
  gap: 2.5rem;
  max-width: 1000px;
  margin: 0 auto; 
  opacity: 0; 
  transform: translateY(30px); 
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.about-content.animate {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 768px) {
  .about-content {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.about-card {
  background: var(--background-light);
  padding: 2.5rem 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border-top: 5px solid;
  border-image: var(--gradient-text) 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.about-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.about-icon {
  width: 32px;
  height: 32px;
  color: var(--primary-color);
}

.about-card h3 {
  color: var(--text-dark);
  font-size: 1.4rem;
  font-weight: 600;
}

.about-card p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-light);
}

.stat-item {
  background: var(--background-light);
  padding: 2rem 1.5rem;
  border-radius: 12px;
  text-align: center;
  border-top: 4px solid;
  border-image: var(--gradient-text) 1;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  background: var(--gradient-text);
  display: block; 
}

.stat-label {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}


/* === REFINED: SKILLS SECTION (CSS Grid Layout) === */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Creates a 3-column grid */
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

/* This is the key: target the last card and make it span all columns */
.skill-card:last-child {
  grid-column: 1 / -1; /* Spans from the first to the last grid line */
}

.skill-card {
  background: var(--background-light);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0; /* For animation */
  transform: translateY(30px); /* For animation */
}

.skill-card.animate {
  opacity: 1;
  transform: translateY(0);
}

.skill-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.skill-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.skill-card ul {
  list-style: none;
  padding-left: 0;
}

.skill-card li {
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.5rem;
}

.skill-card li::before {
  content: '✓';
  color: var(--primary-color);
  position: absolute;
  left: 0;
}

/* Responsive adjustments for the grid */
@media (max-width: 992px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
  }
  /* On a 2-col layout, the 3rd item is last on its row, make it span */
  .skill-card:nth-child(3):last-child {
      grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .skills-grid {
    grid-template-columns: 1fr; /* 1 column on mobile */
  }
  /* Reset any spanning on mobile since it's a single column */
  .skill-card:last-child, .skill-card:nth-child(3):last-child {
    grid-column: auto;
  }
}


/* === PROJECTS SECTION (No Changes) === */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.project-card { background: var(--background-light); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; }
.project-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-hover); }
.project-image { width: 100%; height: 200px; object-fit: cover; }
.project-content { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.project-content h3 { color: var(--text-dark); margin-bottom: 0.5rem; }
.project-tags { display: flex; gap: 0.5rem; margin-top: auto; padding-top: 1rem; }
.project-tags span { background: var(--background-alt); color: var(--primary-color); padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.8rem; font-weight: 500; }


/* === NEW: AWARDS TIMELINE SECTION === */
.awards-timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}
.awards-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: #e5e7eb;
  transform: translateX(-50%);
}
.timeline-item {
  position: relative;
  width: 50%;
  margin-bottom: 3rem;
}
.timeline-item:nth-child(odd) {
  left: 0;
  padding-right: 2rem;
  text-align: right;
}
.timeline-item:nth-child(even) {
  left: 50%;
  padding-left: 2rem;
}
.timeline-item::after {
  content: '';
  position: absolute;
  top: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: white;
  border: 4px solid var(--primary-color);
  z-index: 1;
}
.timeline-item:nth-child(odd)::after {
  right: -8px;
}
.timeline-item:nth-child(even)::after {
  left: -8px;
}
.timeline-content {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}
.timeline-content h3 {
  color: var(--text-dark);
  font-size: 1.1rem;
}
.timeline-content p {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* === CONTACT, FOOTER, SCROLL-TO-TOP (No Changes) === */
.contact-container { text-align: center; max-width: 700px; }
.contact-subtitle { font-size: 1.1rem; margin-bottom: 2.5rem; }
.contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.contact-button { background: var(--background-alt); color: var(--primary-color); padding: 0.75rem 1.5rem; border-radius: 8px; text-decoration: none; font-weight: 500; transition: all 0.3s ease; }
.contact-button:hover { background: var(--primary-color); color: white; transform: translateY(-5px); box-shadow: 0 8px 20px rgba(217, 70, 239, 0.4); }
.footer { background: var(--text-dark); color: #a0aec0; padding: 2rem 0; text-align: center; }
.scroll-to-top { position: fixed; bottom: 20px; right: 20px; background: var(--primary-color); color: white; border: none; border-radius: 50%; width: 50px; height: 50px; font-size: 1.5rem; cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 100; }
.scroll-to-top.visible { opacity: 1; visibility: visible; }


/* === ANIMATIONS ON SCROLL === */
.section-title, .about-content, .skill-card, .project-card, .timeline-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.section-title.animate, .about-content.animate, .skill-card.animate, .project-card.animate, .timeline-item.animate {
    opacity: 1;
    transform: translateY(0);
}


/* === RESPONSIVE DESIGN (MOBILE-FIRST) === */
@media (max-width: 768px) {
    .nav-menu { position: fixed; left: -100%; top: 4.5rem; flex-direction: column; background-color: white; width: 100%; text-align: center; transition: 0.3s; box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05); border-radius: 0 0 20px 20px; }
    .nav-menu.active { left: 0; }
    .nav-item { margin: 1.5rem 0; }
    .hamburger { display: block; }
    .hero h1 { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1.1rem; }
    .section { padding: 80px 0; }
    .section-title { font-size: 2rem; }
    .about-content, .projects-grid { grid-template-columns: 1fr; }
    .about-stats { margin-top: 2rem; }
    /* Awards Timeline on Mobile */
    .awards-timeline::before { left: 10px; }
    .timeline-item { width: 100%; padding-left: 2.5rem; padding-right: 0; text-align: left !important; }
    .timeline-item:nth-child(even) { left: 0; }
    .timeline-item::after { left: 2px !important; }
}
