/* ================================= */
/*          COLOR VARIABLES          */
/* ================================= */
:root {
    /* Primary set from the "new" snippet */
    --color-primary: #3498db;          /* Nice blue */
    --color-primary-dark: #2c81c0;     /* Darker blue */
    --color-secondary: #f1f1f1;        /* Light grey for contrast */
    --color-background: #1c1e22;       /* Dark background */
    --color-card-background: #2c2f36;  /* Card background for contrast */
    --color-text-light: #ffffff;       /* Light text */
    --color-text-muted: #cccccc;       /* Muted text */
    --color-shadow: rgba(0, 0, 0, 0.2); /* Soft shadows */
    --color-highlight: #61dafb;        /* Highlight color */

    /* Extras from the old snippet (useful for extended dark themes) */
    --color-background-dark: #1d1f21;  /* Dark charcoal (if needed) */
    --color-foreground: #2c3e50;       /* Dark blue-grey (if needed) */
    --color-foreground-dark: #bdc3c7;  /* Lighter grey for text in dark mode */
    --color-card-background-dark: #2d2d2d; /* Another dark grey variant */
    --color-shadow-dark: rgba(0, 0, 0, 0.3); /* Slightly heavier shadow */
}

/* ================================= */
/*           BASE STYLES             */
/* ================================= */
* {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    background: var(--color-background);
    color: var(--color-text-light);
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
    color: var(--color-highlight);
}

a:hover {
    text-decoration: underline;
}

/* ================================= */
/*             LOADER                */
/* ================================= */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-card-background);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    border: 8px solid var(--color-background);
    border-radius: 50%;
    border-top: 8px solid var(--color-primary);
    width: 60px;
    height: 60px;
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none;
}

/* ——— MODERN NAVIGATION ——— */
.modern-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, rgba(28, 30, 34, 0.95), rgba(44, 47, 54, 0.95));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1001;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  position: relative;
}

.nav-brand h1 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, #61dafb, #3498db);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  display: block;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
  margin-top: -2px;
}

.brand-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.3s ease;
}

.brand-link:hover {
  transform: scale(1.02);
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.nav-link:hover::before {
  left: 100%;
}

.nav-link:hover {
  color: #61dafb;
  background: rgba(97, 218, 251, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(97, 218, 251, 0.2);
}

.nav-link i {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.nav-link:hover i {
  transform: scale(1.1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: #61dafb;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.nav-toggle:hover span {
  background: #3498db;
}

/* SCROLL EFFECTS */
.modern-nav.scrolled {
  background: linear-gradient(135deg, rgba(28, 30, 34, 0.98), rgba(44, 47, 54, 0.98));
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
}

/* MOBILE STYLES */
@media (max-width: 768px) {
  .nav-container {
    padding: 0 1rem;
    height: 70px;
  }
  .nav-brand h1 {
    font-size: 1.5rem;
  }
  .brand-subtitle {
    font-size: 0.75rem;
  }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(28, 30, 34, 0.98), rgba(44, 47, 54, 0.98));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 2rem;
    gap: 1rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 998;
    margin-top: 1px;
  }
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    z-index: 1000;
  }
  .nav-link {
    width: 100%;
    justify-content: center;
    padding: 1rem;
    font-size: 1.1rem;
  }
  .nav-toggle {
    display: flex;
  }
  
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }
  
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
}

/* ================================= */
/*           MAIN CONTENT            */
/* ================================= */
main {
    padding: 40px 20px;
    max-width: 1200px;
    margin: auto;
    margin-top: 100px; /* Account for fixed modern nav */
    transition: margin-top 0.3s ease;
}

section {
    background-color: var(--color-card-background);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px var(--color-shadow);
    margin-bottom: 40px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section h2 {
    margin-top: 0;
    font-size: 2.2em;
    color: var(--color-highlight);
    text-align: center;
}

/* ================================= */
/*         PROFILE PICTURE           */
/* ================================= */
.profile-pic {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    display: block;
    margin: 20px auto;
    box-shadow: 0 4px 10px var(--color-shadow);
    border: 4px solid var(--color-primary);
}

/* ================================= */
/*        EXPERIENCE SECTION         */
/* ================================= */
.experience-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 10px;
    margin-right: 20px;
    box-shadow: 0 4px 8px var(--color-shadow);
    background: var(--color-card-background);
}

.experience-item {
    margin-bottom: 40px;
    padding: 20px;
    background-color: var(--color-card-background);
    border-radius: 10px;
    box-shadow: 0 4px 8px var(--color-shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.experience-item:hover {
    transform: translateY(-5px);
}

.experience-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.experience-title h3 {
    margin: 0;
    font-size: 1.5em;
    color: var(--color-primary);
}

.experience-title p {
    margin: 2px 0;
    font-size: 1em;
    color: var(--color-text-muted);
}

.experience-content {
    margin-bottom: 10px;
    flex: 1;
}

.experience-content ul {
    padding-left: 20px;
}

.gis-container, .video-container {
    margin-top: 10px;
}


#viewDiv {
    width: 100%;
    height: 400px;
    border-radius: 10px;
    overflow: hidden !important;
    box-shadow: 0 4px 8px var(--color-shadow);
    margin-top: 10px;
}

#viewDiv > * {
    max-height: 100%;
    overflow: hidden;
}

#conditionSelector {
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 0.9em;
    max-width: 200px;
    width: 100%;
}

.promptantics-video {
    width: 100%;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0 4px 8px var(--color-shadow);
    margin-top: 20px;
}

/* ================================= */
/*          GALLERY STYLING          */
/* ================================= */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.gallery img {
    width: 100%;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.gallery img:hover {
    transform: scale(1.05);
}

/* ================================= */
/*           FOOTER STYLING          */
/* ================================= */
footer {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    text-align: center;
    padding: 20px 10px;
    position: relative;
    bottom: 0;
    width: 100%;
}

footer p {
    margin: 0;
    font-size: 0.9em;
}

.social-media a {
    color: var(--color-text-light);
    font-size: 1.4em;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.social-media a:hover {
    color: var(--color-highlight);
}

/* ================================= */
/*          MODE TOGGLE (OPT)        */
/* ================================= */
/* If you decide to allow toggling between dark/light modes */
.mode-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--color-primary);
    color: var(--color-foreground-dark);
    border: none;
    padding: 10px 15px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 2px 5px var(--color-shadow-dark);
    transition: background-color 0.3s ease;
}

.mode-toggle:hover {
    background-color: var(--color-primary-dark);
}

/* ================================= */
/*       RESPONSIVE ADJUSTMENTS      */
/* ================================= */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.2em;
    }
    nav ul {
        flex-direction: column;
        gap: 10px;
    }
    section {
        padding: 20px;
    }
    #viewDiv {
        height: 300px;
    }
    .experience-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .experience-logo {
        margin-bottom: 15px;
    }
    .experience-item {
        flex-direction: column;
    }
}

/* Mobile Landscape Orientation Fixes */
@media (max-width: 768px) and (orientation: landscape) {
    body {
        font-size: 14px; /* Reduce base font size */
    }
    
    main {
        padding: 20px 15px;
        margin-top: 80px; /* Reduce top margin */
    }
    
    section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    section h2 {
        font-size: 1.8em; /* Smaller headings */
    }
    
    .portfolio-section h2 {
        font-size: 2em;
    }
    
    .portfolio-title {
        font-size: 1.6rem;
    }
    
    .portfolio-description {
        font-size: 1rem;
    }
    
    .project-details {
        font-size: 0.9rem;
        padding-left: 2em;
    }
    
    .effortlo-entry h2, .gantt-entry h2, .tiktok-entry h2, .gis-entry h2, .promptantics-entry h2 {
        font-size: 1.6rem;
    }
    
    .effortlo-entry p, .gantt-entry p, .tiktok-entry p, .gis-entry p, .promptantics-entry p {
        font-size: 0.95rem;
    }
    
    .effortlo-entry ul, .gantt-entry ul, .tiktok-entry ul, .gis-entry ul, .promptantics-entry ul {
        font-size: 0.9rem;
    }
    
    .nav-container {
        height: 60px; /* Smaller nav height */
    }
    
    .nav-brand h1 {
        font-size: 1.3rem;
    }
    
    .brand-subtitle {
        font-size: 0.7rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
    
    /* Gantt chart specific landscape adjustments */
    .gantt-title {
        font-size: 1.2rem;
    }
    
    .gantt-description {
        font-size: 0.9rem;
    }
    
    .phase-legend {
        gap: 15px;
        padding: 8px;
    }
    
    .phase-item {
        font-size: 0.85rem;
    }
    
    .chart-features {
        gap: 20px;
    }
    
    .feature-text {
        font-size: 0.8rem;
    }
    
    /* Demo grid landscape adjustments */
    .demo-grid {
        gap: 15px;
    }
    
    .demo-item {
        padding: 15px;
    }
    
    .demo-link {
        font-size: 1rem;
    }
    
    .demo-description {
        font-size: 0.85rem;
    }
}

/* ================================= */
/*          CAROUSEL STYLES          */
/* ================================= */
.carousel-container {
    position: relative;
    max-width: 100%;
    overflow: hidden;
    margin: 0 auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px var(--color-shadow);
}

.carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-item {
    min-width: 25%; /* Show 4 items at a time */
    box-sizing: border-box;
    padding: 10px;
}

.carousel-item img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 8px var(--color-shadow);
}

/* Navigation Arrows */
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 1000;
    font-size: 18px;
    border-radius: 50%;
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

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

/* ================================= */
/*        PORTFOLIO SECTION          */
/* ================================= */
.portfolio-section {
    background-color: var(--color-card-background);
    color: var(--color-text-light);
    padding: 40px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px var(--color-shadow);
    transition: all 0.3s ease-in-out;
    margin-bottom: 40px;
}

.portfolio-section h2 {
    font-size: 2.5em;
    color: var(--color-highlight);
    margin-bottom: 20px;
    font-weight: bold;
    transition: color 0.3s ease-in-out;
}

.portfolio-section h3 {
    font-size: 1.8em;
    color: var(--color-text-muted);
    margin-top: 30px;
    transition: color 0.3s ease-in-out;
}

.portfolio-section p {
    color: var(--color-text-muted);
    line-height: 1.6;
    transition: color 0.3s ease-in-out;
}

.portfolio-section a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

.portfolio-section a:hover {
    text-decoration: underline;
    color: var(--color-primary-dark);
}

/* Portfolio Card */
.portfolio-card {
    background: linear-gradient(145deg, #1f2227, #2a2d34);
    border-radius: 16px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin: 10px 0;
    padding: 2.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.portfolio-card h3, .portfolio-card h2 {
    margin-top: 0;
    color: #61dafb;
}

.portfolio-card p {
    color: #ccc;
}

/* GIS and Video Container */
.gis-video-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 20px;
}

.gis-container {
    flex: 1;
    margin-right: 20px;
}

.video-container {
    flex: 1;
}

.tonka-video, .promptantics-video {
    width: 100%;
    height: auto;
}

/* ================================= */
/*         CUSTOM LEGEND BOX         */
/* ================================= */
.custom-legend {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #333; /* Dark background by default for dark styling */
    color: white;    
    padding: 8px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    font-size: 0.9em;
}

.custom-legend h4 {
    color: white;
    margin: 0;
    padding-bottom: 4px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 2px;
}

.legend-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

/* Ensure text in legend is white in dark mode */
.custom-legend span {
    color: white;
}

/* ================================= */
/*          SLIDESHOW STYLES         */
/* ================================= */
/* If you still want the full-screen slideshow background from the old snippet */
/* Slideshow container */
/* Carousel Container */
/* Carousel Container */
/* Outer container for the entire slideshow */
/* Outer container: fixed height, overflow hidden */
/* Outer container: fixed height, hides overflow */
/* Slideshow Container */
.slideshow-container {
    position: relative;
    width: 80%;           /* or 100%, your choice */
    height: 400px;        /* fixed height for consistent viewing */
    margin: 40px auto;    /* center horizontally & add top/bottom spacing */
    overflow: hidden;
    border-radius: 10px;
    background: #000;     /* optional black background behind images */
  }
  
  /* Slideshow "strip": 
     - We have 8 images total (4 original + 4 duplicates).
     - Animate from 0% to -50% so that after the first half, 
       the second set is exactly at the front.
  */
  .slideshow {
    display: flex;
    height: 100%;
    width: calc(100% * 2.8);  /* for 12 images */
    animation: scroll 20s linear infinite;
  }
  
  
  /* Each image: 
     - Let it fill container's height (no cropping) 
     - "contain" ensures entire image is visible 
     - margin or background behind letterboxing if aspect ratio differs
  */
  .slideshow img {
    height: 100%;
    width: auto;
    flex-shrink: 0;
    object-fit: contain; 
    background-color: #000; /* behind letterboxing if needed */
  }
  
  /* Keyframe to smoothly slide from 0% to -50%:
     - 8 images wide, but we only need to shift halfway (-50%) 
       to seamlessly show the second set in place of the first.
  */
  @keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-30%); } /* Scroll past 10 images (10/12) */
  }  
  
  .slideshow-container:hover .slideshow {
    animation-play-state: paused;
  }

  
  



/* If you want a semi-transparent header over the slideshow:
   (Already using var(--color-primary); you can adapt as needed)
header {
    background-color: rgba(52, 152, 219, 0.8);
    ...
}
*/

/* ================================= */
/*    END OF "ULTIMATE DARK" CSS     */
/* ================================= */

/* Container for GIS and video */
.gis-video-container {
    display: flex;
    justify-content: space-between; /* Space between the two elements */
    align-items: flex-start; /* Align items at the start */
    margin-top: 20px; /* Space above the container */
}

/* GIS container */
.gis-container {
    flex: 1; /* Take up available space */
    margin-right: 20px; /* Space between GIS and video */
}

/* Video container */
.video-container {
    flex: 1; /* Take up available space */
}

.tonka-video {
    width: 100%; /* Make video responsive */
    height: auto; /* Maintain aspect ratio */
}

/* Portfolio Container */
.portfolio-container {
    display: flex;
    flex-direction: column; /* Stack cards vertically */
    margin-top: 20px; /* Space above the container */
}

.portfolio-card:hover {
    transform: translateY(-5px); /* Slightly lift on hover */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3); /* Darker shadow on hover */
}

.portfolio-card h3 {
    margin-top: 0; /* Remove top margin */
    color: #3498db; /* Primary color for titles */
}

.portfolio-card p {
    color: #555; /* Darker text for descriptions */
}

/* GIS and Video Container */
.gis-video-container {
    display: flex;
    justify-content: space-between; /* Space between the two elements */
    align-items: flex-start; /* Align items at the start */
    margin-top: 10px; /* Space above the container */
}

.gis-container {
    flex: 1; /* Take up available space */
    margin-right: 10px; /* Space between GIS and video */
}

.video-container {
    flex: 1; /* Take up available space */
}

.tonka-video {
    width: 100%; /* Make video responsive */
    height: auto; /* Maintain aspect ratio */
}

/* Responsive Design */
@media (max-width: 768px) {
    .gis-video-container {
        flex-direction: column; /* Stack GIS and video vertically */
    }

    .gis-container, .video-container {
        margin-right: 0; /* Remove right margin */
        margin-bottom: 10px; /* Add bottom margin */
    }
}

/* New Text Classes */
.project-details {
    color: #444; /* Darker color for project details */
}

.gis-description {
    color: #444; /* Darker color for GIS description */
}


.filter-label {
    color: #444; /* Darker color for filter label */
}

.gis-container .gis-title {
    color: #333; /* Darker color for GIS titles */
}

.video-container .video-title {
    color: #333; /* Darker color for video titles */
}


.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease-in-out;
}

.btn i {
    font-size: 18px;
}

/* Button Colors & Effects */
.btn-linkedin {
    background-color: #0077B5;
    color: white;
}

.btn-email {
    background-color: #EA4335;
    color: white;
}

.btn-instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: white;
}

.btn-portfolio {
    background-color: #1D4ED8;
    color: white;
}

.btn-experience {
    background-color: #6B7280;
    color: white;
}

.btn-github {
    background-color: #181717;
    color: #fff;
    border: 1.5px solid #333;
    box-shadow: 0 2px 8px rgba(24,23,23,0.12);
}

.btn-github:hover {
    background-color: #333;
    color: #61dafb;
    border-color: #61dafb;
}

.btn:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}

.profile-pic {
    display: block;
    width: 200px; /* Adjust size as needed */
    height: 200px;
    margin: 0 auto;
    border-radius: 50%;
    transition: transform 0.6s ease-in-out, box-shadow 0.3s ease-in-out;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
}

/* Hover Effect */
.profile-pic:hover {
    transform: translateY(-10px);
    box-shadow: 0px 8px 30px rgba(0, 0, 0, 0.5); /* Enhanced shadow */
}

/************************************************************/
/*                        CAROUSEL                          */
/************************************************************/
/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Darker overlay for better contrast */
    z-index: 9998;
    transition: opacity 0.3s ease; /* Smooth transition */
    pointer-events: none; /* Ensures no hover effects */
    backdrop-filter: blur(10px);
}

/* Carousel Container Overflow Fix */
.timeline-carousel {
    overflow: hidden; /* Prevent spillover */
    position: relative;
    display: flex; /* Ensure items are displayed in a row */
}


/* Show overlay when active */
.modal-overlay.active {
    display: block;
    opacity: 1; /* Fully opaque when active */
}

/* Modal Styling */
.timeline-modal {
    display: none;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90%;
    max-width: 800px; /* Limit max width for larger screens */
    height: auto; /* Allow height to adjust based on content */
    background: #1c1c1c; /* Darker background for the modal */
    color: #fff;
    border-radius: 10px;
    z-index: 9999;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    transition: transform 0.3s ease, opacity 0.3s ease; /* Smooth transitions */
}

/* Show modal when active */
.timeline-modal.active {
    display: block;
    opacity: 1; /* Fully opaque when active */
}

/* Media in Modal */
.modal-content-container {
    display: flex;
    flex-direction: column; /* Stack title, media, and caption vertically */
    justify-content: center;
    align-items: center;
    width: 100%;
    height: auto; /* Allow height to adjust based on content */
    padding: 20px; /* Add padding for better spacing */
    overflow: hidden; /* Prevent overflow */
}

/* Media styling */
.modal-media {
    max-width: 100%; /* Ensure the media fits within the modal */
    max-height: 70vh; /* Limit height to 70% of the viewport height */
    height: auto; /* Maintain aspect ratio */
    border-radius: 10px; /* Rounded corners for the video */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add shadow for depth */
}

/* Specific styling for iframe in modal */
#modalIframe {
    width: 100%;
    height: 70vh;
    border-radius: 10px;
    border: none;
}

/* Modal Caption Styling */
.modal-caption {
    font-size: 1.2em; /* Slightly larger font for the caption */
    color: var(--color-text-light); /* Use light color for better visibility */
    margin-top: 10px; /* Space between media and caption */
    text-align: center; /* Center the caption */
    padding: 0 20px; /* Add horizontal padding */
}

/* Modal Title Styling */
.modal-title {
    font-size: 1.5em; /* Title size */
    font-weight: bold; /* Bold title */
    color: var(--color-text-light); /* Light color for title */
    margin-bottom: 10px; /* Space below the title */
    text-align: center; /* Center the title */
}

/* Close Button */
.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 0, 0, 0.7); /* Semi-transparent background */
    color: #fff;
    border: none;
    border-radius: 50%; /* Circular shape */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.modal-close:hover {
    background-color: rgba(150, 0, 0, 0.5); /* Brighten on hover */
    transform: scale(1.1); /* Slightly enlarge */
}

/* Navigation Arrows */
.modal-prev,
.modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: #16486a; /* Darker background for arrows */
    border: 2px solid rgba(255, 255, 255, 0.541);
    color: #fff;
    border-radius: 50%;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease; /* Smooth background transition */
}

.modal-prev:hover,
.modal-next:hover {
    background-color: #216ea1b1; /* Darker on hover */
}

.modal-prev {
    left: 10px;
}

.modal-next {
    right: 10px;
}

/* Carousel Synchronization */
.timeline-track {
    display: flex; /* Keep items in a row */
    transition: transform 0.5s ease; /* Smooth sliding */
}


/* Carousel Navigation Buttons */
.timeline-arrow {
    position: absolute;
    top: 50%;
    width: 40px;
    height: 40px;
    background-color: #16486a; /* Dark semi-transparent background */
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.541);
    border-radius: 50%; /* Circular shape */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    font-size: 1.5rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.timeline-arrow:hover {
    background-color: #216ea1b1; /* Darker background on hover */
    transform: scale(1.1); /* Slightly enlarge */
}

.timeline-arrow.arrow-left {
    left: 0px;
}

.timeline-arrow.arrow-right {
    right: 0px;
}

/* Carousel Items Alignment */
.timeline-track {
    display: flex;
    transition: transform 0.5s ease; /* Smooth sliding */
}

.timeline-card {
    flex: 0 0 auto; /* Prevent shrinking and allow items to maintain their width */
    width: 270px; /* Set a fixed width for each card */
    margin: 0 10px; /* Space between cards */
    background: var(--color-card-background);
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease; /* Smooth transition */
}

.timeline-card:hover {
    transform: translateY(10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); /* Add shadow on hover */
    cursor: pointer; /* Change cursor to pointer */
}

.timeline-card img,
.timeline-card iframe {
    width: 100%;
    border-radius: 5px;
    height: 180px;
    object-fit: cover;
}

.timeline-card p {
    color: #cecece; /* Set text color to white */
}

/* Code Preview Styling */
.code-preview summary {
    cursor: pointer;
    font-weight: 600;
    color: #01BF15;
    margin-top: 8px;
  }
  .code-preview pre {
    background: #2c2f36;
    padding: 16px;
    border-radius: 8px;
    font-size: 13px;
    overflow-x: auto;
  }

/* Adjust carousel for mobile */
@media (max-width: 768px) {
    /* Ensure the carousel container is centered and has no extra padding/margins */
    .timeline-carousel {
        display: flex;
        justify-content: center; /* Center the entire carousel */
        align-items: center;
        padding: 0; /* Remove any padding that might offset the cards */
        margin: 0 auto; /* Ensure the carousel itself is centered */
        width: 100%; /* Take up full width to center properly */
        overflow: visible; /* Allow cards to stack naturally */
    }

    /* Center the timeline track and remove any offsets */
    .timeline-track {
        display: flex;
        flex-direction: column; /* Stack cards vertically */
        align-items: center; /* Center cards horizontally */
        justify-content: center; /* Ensure vertical centering if needed */
        gap: 20px; /* Maintain spacing between cards */
        width: 100%; /* Ensure the track takes full width for centering */
        padding: 0; /* Remove any padding that might offset the cards */
        margin: 0; /* Remove any margins that might offset the cards */
    }

    /* Center each card and ensure consistent width */
    .timeline-card {
        width: 90%; /* Take up most of the screen width */
        max-width: 300px; /* Limit the max width for readability */
        margin: 0 auto; /* Explicitly center the card horizontally */
        padding: 10px; /* Add some padding inside the card for aesthetics */
        box-sizing: border-box; /* Ensure padding doesn't affect the width */
        text-align: center; /* Center the text inside the card */
    }

    /* Hide the arrows on mobile (already implemented) */
    .timeline-arrow {
        display: none;
    }
}

/* --- Effortlo Card Styling --- */
.effortlo-card {
    background: linear-gradient(145deg, #1f2227, #2a2d34);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.06);
  }
  
  .effortlo-card h2.portfolio-title {
    color: #61dafb;
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  .effortlo-card .portfolio-description {
    color: #ccc;
    font-size: 1.05rem;
    margin-bottom: 1.2rem;
  }
  
  .project-details {
    margin-bottom: 1rem;
    padding-left: 1.25rem;
    color: #505050;
  }
  
  .project-details li {
    margin-bottom: 0.5rem;
    list-style: disc;
  }
  
  .tech-stack {
    color: #aaa;
    font-size: 0.95rem;
    margin-top: 1rem;
    font-weight: 500;
    font-style: italic;
  }
  
  /* --- Sample Logs --- */
  .effortlo-preview {
    background: #111;
    border: 1px solid #333;
    border-radius: 10px;
    margin-top: 1.5rem;
    overflow: hidden;
  }
  
  .effortlo-preview summary {
    background: #000;
    padding: 12px 18px;
    font-size: 1rem;
    font-weight: 600;
    color: #61dafb;
    border-bottom: 1px solid #222;
    cursor: pointer;
  }
  
  .effortlo-preview pre {
    background: #000;
    color: #33fbc1;
    font-family: 'Courier New', monospace;
    padding: 16px;
    font-size: 13px;
    line-height: 1.5;
    overflow-x: auto;
  }
  
  /* --- Automation Flow Section --- */
  .effortlo-flow {
    margin-top: 2.5rem;
  }
  
  .flow-title {
    color: #3498db;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  
  .flow-steps {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }
  
  .flow-step {
    background: linear-gradient(135deg, #0b3d2c, #104534);
    color: #01bf15;
    padding: 8px 14px;
    font-size: 0.95rem;
    border-radius: 6px;
    font-weight: 500;
    box-shadow: 0 0 8px rgba(1, 191, 21, 0.3);
    border: 1px solid #01bf15;
    white-space: nowrap;
    transition: transform 0.2s ease;
  }
  
  .flow-step:hover {
    transform: scale(1.05);
  }
  
  .flow-arrow {
    color: #61dafb;
    font-size: 1.2rem;
  }
  
