/* ------------------------ */
/* 🌐 Top Navigation Bar */
/* ------------------------ */
.topnav {
    background-color: white;
    overflow: hidden;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #ccc;
    padding: 10px 0;
}

.topnav a {
    color: #000;
    padding: 14px 20px;
    text-decoration: none;
    font-weight: bold;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.topnav a:hover {
    background-color: #ddd;
    border-radius: 4px;
}

/* ------------------------ */
/* 📄 Page Layout */
/* ------------------------ */
body {
    margin: 0;
    font-family: Arial, sans-serif;
}

.content {
    padding-top: 70px; /* To push below navbar */
}

/* ------------------------ */
/* 🎞️ Slideshow Container */
/* ------------------------ */
.slideshow-container {
    position: relative;
    width: 100%;
    height: 100vh;            /* or your preferred height/aspect */
    overflow: hidden;
    background: #000;         /* avoids any flash during image decode */
}

/* Hide all slides by default */
.mySlides {
    position: absolute;
    inset: 0;
    display: block;
    opacity: 0;               /* hidden by default (no flash) */
    z-index: 0;
    will-change: transform, opacity;
}
  
/* The slide that is currently shown (no animation) */
.mySlides.is-current {
    opacity: 1;
    z-index: 1;
}

/* Incoming slide sits above outgoing during the transition */
.mySlides.is-entering {
    opacity: 1;
    z-index: 2;
}

/* Slide image */
.slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ------------------------ */
/* ✨ Fade Animation */
/* ------------------------ */
/* ------------------------ */
/* ⬅️➡️ Slide Animation */
/* ------------------------ */
@keyframes slideInFromRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes slideOutToLeft   { from { transform: translateX(0); }    to { transform: translateX(-100%); } }

@keyframes slideInFromLeft  { from { transform: translateX(-100%);} to { transform: translateX(0); } }
@keyframes slideOutToRight  { from { transform: translateX(0); }    to { transform: translateX(100%); } }


/* apply the keyframes */
.slide-enter-from-right { animation: slideInFromRight 700ms ease both; }
.slide-exit-to-left     { animation: slideOutToLeft   700ms ease both; }

.slide-enter-from-left  { animation: slideInFromLeft  700ms ease both; }
.slide-exit-to-right    { animation: slideOutToRight  700ms ease both; }

/* ------------------------ */
/* 📝 Caption Text */
/* ------------------------ */
.caption-text {
    position: absolute;
    bottom: 25%;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 2.5rem;
    font-family: 'Georgia', serif;
    font-weight: bold;
    text-align: center;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    z-index: 10;
}

/* ------------------------ */
/* ◀️▶️ Navigation Arrows */
/* ------------------------ */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    padding: 12px;
    color: white;
    font-weight: bold;
    font-size: 28px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    user-select: none;
    z-index: 10;
    transform: translateY(-50%);
}

.prev:hover,
.next:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

.prev {
    left: 30px;
}

.next {
    right: 30px;
}

/* ------------------------ */
/* 📱 Responsive Tweak */
/* ------------------------ */
@media screen and (max-width: 768px) {
    .caption-text {
        font-size: 1.5rem;
        padding: 0 20px;
    }

    .prev,
    .next {
        font-size: 20px;
        padding: 10px;
    }
}

/* ------------------------ */
/* Dots (indicators) */
/* ------------------------ */
.dot-container {
    text-align: center;
    position: absolute;
    bottom: 30px;
    width: 100%;
    z-index: 10;
}

.dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 5px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: white;
}

/* Section: Projects */
.projects-section {
    text-align: center;
    padding: 40px 20px 60px; /* reduced top padding */
    background-color: white;
}

.section-title {
    font-size: 3.5rem;
    font-weight: 700;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin-bottom: 0.5rem;
}

.underline {
    width: 600px;
    height: 3px;
    background-color: blue;
    margin: 0 auto;
    border-radius: 2px;
}

/* Projects Wildcards */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}
  
/* Base state: off-screen a bit, subtle shadow */
.project-card {
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    text-align: left;
  
    opacity: 0;
    transform: translateY(30px);
  
    /* Use transitions, not keyframes, so hover can take over transform */
    transition:
      transform 0.25s ease,
      box-shadow 0.25s ease,
      opacity 0.6s ease;
}
  
  /* When IntersectionObserver adds .visible */
.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}
  
  /* Hover: lift up a little + stronger shadow */
.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
  
  /* Optional: staggered reveal using transition delays */
.project-card:nth-child(1).visible { transition-delay: 0s; }
.project-card:nth-child(2).visible { transition-delay: 0.1s; }
.project-card:nth-child(3).visible { transition-delay: 0.2s; }
.project-card:nth-child(4).visible { transition-delay: 0.3s; }
.project-card:nth-child(5).visible { transition-delay: 0.4s; }
.project-card:nth-child(6).visible { transition-delay: 0.5s; }
  
  /* Media assets + text */
.project-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
  
.project-card h3 {
    font-size: 1.25rem;
    margin: 16px 16px 8px;
}
  
.project-card p {
    font-size: 0.95rem;
    color: #555;
    margin: 0 16px 16px;
}
  
  /* Accessibility: reduce motion if user prefers */
@media (prefers-reduced-motion: reduce) {
.project-card,
.project-card.visible,
.project-card:hover {
    transition: none;
    transform: none;
    opacity: 1;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }
}  

/* Section: About me */
.about-section {
    text-align: center;
    padding: 40px 20px 60px; /* reduced top padding */
    background-color: white;
}

.section-title {
    font-size: 3.5rem;
    font-weight: 700;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin-bottom: 0.5rem;
}

.underline {
    width: 600px;
    height: 3px;
    background-color: blue;
    margin: 0 auto;
    border-radius: 2px;
}

.about-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 40px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.about-image img {
    width: 240px;
    height: 240px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.about-text {
    flex: 1;
    min-width: 280px;
    max-width: 600px;
    text-align: left;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Responsive tweak */
@media screen and (max-width: 768px) {
    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .about-text {
        text-align: center;
    }
}



/* 🔥 About Section Animation */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out;
}

.fade-in-up.show {
    opacity: 1;
    transform: translateY(0);
}

/* 🔥 Certificate  Section */
.certificates-section {
    text-align: center;
    padding: 60px 20px;
    background-color: #f8f8f8;
}

.carousel-wrapper {
    overflow: hidden;
    max-width: 1200px;
    margin: 40px auto 0;
}

.carousel-track {
    display: flex;
    transition: transform 0.8s ease-in-out;
    padding: 0 0px; 
    box-sizing: border-box;
    width: 100%;
}

.carousel-container {
    overflow: hidden;
}
.certificate-card {
    flex: 0 0 calc(25% - 20px); 
    margin: 0 10px;
    padding: 20px;
    box-sizing: border-box;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
    transition: transform 0.3s ease;
    display: block;
}

.certificate-card:hover {
    transform: translateY(-5px);
}

.certificate-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.certificate-card p {
    font-size: 1rem;
    margin: 0;
}

.certificate-card a p {
    color: inherit;
    text-decoration: none;
}

.certificate-card a {
    color: inherit;
    text-decoration: none;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .certificate-card {
        flex: 0 0 50%;
    }
}

.project-card-link {
    text-decoration: none;
    color: inherit;
}

/* 🔥 Million Songs  Section */
.project-detail-section {
    max-width: 900px;
    margin: 60px auto;
    padding: 0 20px;
    font-family: 'Segoe UI', sans-serif;
}

.project-detail-section ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.project-detail-section h2 {
    margin-top: 30px;
    font-size: 1.5rem;
    color: #333;
}

.project-link {
    color: inherit;             /* Use the default text color */
    text-decoration: none;     /* Remove underline */
    font-weight: bold;         /* Optional: keep it bold */
}

.project-link:hover {
    text-decoration: underline; /* Optional: underline on hover */
    color: inherit;             /* Prevent hover color change */
}


/* 🔥 Million Songs Table Section */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
    margin-bottom: 40px;
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Segoe UI', sans-serif;
    font-size: 0.95rem;
}

.styled-table thead tr {
    background-color: #004466;
    color: #ffffff;
    text-align: left;
}

.styled-table th,
.styled-table td {
    padding: 10px 12px;
    border: 1px solid #dddddd;
}

.styled-table tbody tr:nth-child(even) {
    background-color: #f2f9fc;
}

.styled-table tbody tr:hover {
    background-color: #e1f3f8;
}

.styled-table em {
    font-style: italic;
}

.styled-table strong {
    font-weight: bold;
}


/* 🔥 Million Songs Correlation Map Section */
.image-container {
    text-align: center;
    margin: 30px 0;
}

.image-container .caption {
    font-style: italic;
    color: #555;
    margin-top: 8px;
}

/* 🔥 Million Songs Author Section */
.author-info {
    text-align: right;
    font-size: 0.95em;
    color: #555;
    margin-bottom: 20px;
  }

/* 🔥 Haversine Formula & Equations for Precipitation Project */
.haversine-flex {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  margin-top: 20px;
}

.haversine-img img {
  width: 300px;
  border-radius: 10px;
}

.haversine-text {
  max-width: 400px;
}

.formula-box {
  border: 1px solid black;
  padding: 15px;
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.caption {
  text-align: center;
  margin-top: 10px;
}


/* 🔥 CSS style for the rainfall descriptive table */
.rainfall-stats-table {
    width: 40%;
    margin: 0 auto; /* This centers the table */
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    font-size: 14px;
    margin-top: 20px;
  }
  
  .rainfall-stats-table caption {
    caption-side: top;
    text-align: center;
    font-weight: bold;
    margin-bottom: 8px;
    white-space: nowrap;
  }
  
  .rainfall-stats-table th,
  .rainfall-stats-table td {
    border: 1px solid #333;
    padding: 6px 10px;
    text-align: center;
  }
  
  .rainfall-stats-table thead {
    background-color: #cce6f6;
  }



/* 🔥 CSS style for the Extracurricular Activities Section */
.activities-section {
    padding: 60px 20px;
    background-color: #fefefe;
    text-align: center;
}

.activity-card {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 1100px;
    margin: 40px auto;
    gap: 30px;
}

.activity-card.reverse {
    flex-direction: row-reverse;
}

.activity-image {
    flex: 1 1 40%;
    max-width: 400px;
    padding: 10px;
}

.activity-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.activity-text {
    flex: 1 1 50%;
    padding: 20px;
    text-align: left;
}

.activity-text h3 {
    margin-bottom: 10px;
    font-size: 1.4rem;
    color: #333;
}

.activity-text p {
    margin: 0;
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
}


/* 🔥 CSS style for the Background Extracurricular Activities Section */
.activities-section {
    position: relative;
    padding: 60px 20px;
    background-image: url('/static/image/activities_section/background2.jpg');
    background-size: cover;
    background-position: center;
    z-index: 1;
    color: #000; /* optional: ensures text visibility */
}

.activities-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8); /* White overlay with 80% opacity */
    z-index: -1; /* Put the overlay behind the content */
}

.activity-card {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.activity-card.show {
    opacity: 1;
    transform: translateY(0);
}

/* 🔥 CSS style for the Background Courses & Certificate Section */
.certificates-section {
    position: relative;
    padding: 60px 20px;
    background: url('/static/image/certificate_section/background.jpg') center/cover no-repeat;
    z-index: 1;
}

.certificates-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8); /* White overlay with 80% opacity */
    z-index: -1; /* Put the overlay behind the content */
}


.certificate-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
    padding: 10px;
    transition: transform 0.3s ease;
}

.certificate-card:hover {
    transform: translateY(-5px);
}



/* 🔥 CSS style for the Background About Me Section */
.about-section {
    background-image: url('/static/image/about_section/background.jpg'); /* Replace with your image path */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Optional: makes the background stay fixed while scrolling */
    padding: 60px 20px;
    position: relative;
}

.about-section .about-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.about-section .about-image img {
    width: 280px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Underline for sub title */
h4 {
    text-decoration: underline;
    text-underline-offset: 4px; 
    color: #1f2d3d;            
    margin-bottom: 10px;     
}



