body {
  font-family: Arial, sans-serif;
  background-color: #0A1A2F; /* dark blue */
  color: white;
  overflow-y: auto;                 /* make body the scroller */
  scroll-snap-type: y mandatory;    /* enable vertical snap */
  scroll-behavior: smooth;          /* optional: smooth snapping */
  -webkit-overflow-scrolling: touch;/* smooth scrolling on iOS */
  margin: 0px;
}


html, body {
    scroll-snap-type: y mandatory; /* Enable vertical snap */
    scroll-behavior: smooth; /* Smooth scrolling */
}

section {
  height: 100vh;
  scroll-snap-align: start;
  display: block;
}

/* Hero Layout */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 50px;
    gap: 50px;
    height: 100vh;
    box-sizing: border-box;  /* Padding is included inside the height */
    scroll-snap-align: start;
}
/* Left - Intro */
.intro {
    flex: 1;
    text-align: left;
}

.small-text {
    font-size: 1.2rem;
    margin: 0;
    color: white;
}
.intro h1 {
    font-size: 3rem;
    color: #4DA8FF; /* lighter blue */
    margin: 5px 0;
}

.roles {
    font-size: 1rem;
    color: #C0D6E4;
    margin-bottom: 5px;
}
/* Add this to your existing .email-text styles */
.email-text {
    font-size: 1rem;
    margin: 0;
    color: white;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    border-radius: 8px;
    display: inline-block;
    position: relative;
}

/* Hover effect for email */
.email-text:hover {
    background-color: rgba(77, 168, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(77, 168, 255, 0.2);
}

/* Highlight effect class (existing) */
.email-text.email-highlight {
    background-color: #4DA8FF;
    color: #0A1A2F;
    font-weight: bold;
    box-shadow: 0 0 20px rgba(77, 168, 255, 0.6);
    animation: emailPulse 3s ease-in-out;
}

/* Optional: Pulse animation (existing) */
@keyframes emailPulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(77, 168, 255, 0.6);
    }
    50% { 
        box-shadow: 0 0 30px rgba(77, 168, 255, 0.8);
        transform: scale(1.08);
    }
}

/* Tooltip animation improvements */
.copy-tooltip {
    animation: tooltipFadeIn 0.3s ease-out;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.profile-pic {
    width: 420px;
    height: auto;
    transition: transform 0.4s ease;
    cursor: pointer;
    display: block;
}

.profile-pic:hover {
    transform: scale(1.05);
}

/* Right - Tech Stack */
.tech-stack {
    flex: 2;
}

.tech-stack h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #ffffff;
}

.stack-category {
    margin-bottom: 25px;
}

.stack-category h3 {
    font-size: 1.2rem;
    color: #4DA8FF;
    margin-bottom: 10px;
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 15px;
}

.stack-item {
    text-align: center;
    transition: transform 0.3s ease;
}

.stack-item img {
    width: 50px;
    height: 50px;
    transition: transform 0.3s ease;
}

.stack-item p {
    font-size: 0.8rem;
    margin-top: 5px;
    transition: transform 0.3s ease;
}

.stack-item:hover {
    transform: scale(1.1);
}
/* Two-column Databases + Tools layout */
.stack-category-2 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-top: 30px;
}

/* Left column - Databases */
.db-column {
    display: flex;
    flex-direction: column;
    justify-content: center; /* vertical center */
    align-items: center;
    text-align: center;
}

.db-column h3 {
    color: #4DA8FF;
    margin-bottom: 15px;
}

.db-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin: 0 auto;
}

/* Right column - Tools & Platforms */
.tools-column h3 {
    color: #4DA8FF;
    margin-bottom: 15px;
    text-align: center;
}

.tools-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* centers all rows */
    gap: 20px;
    max-width: 500px; /* wider so they don't cram */
    margin: 0 auto;
}

/* Hover effect same as before */
.stack-item {
    text-align: center;
    transition: transform 0.3s ease;
}

.stack-item img {
    width: 50px;
    height: 50px;
    transition: transform 0.3s ease;
}

.stack-item p {
    font-size: 0.8rem;
    margin-top: 5px;
    transition: transform 0.3s ease;
}

.stack-item:hover {
    transform: scale(1.1);
}

.stack-item-text {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    min-height: 50px;
    padding: 0 4px;
}

.stack-item-text p {
    font-size: 0.7rem;
    line-height: 1.2;
    margin-top: 0;
}
.tech-summary {
    text-align: center;
    margin-top: 50px;
    color: #fff; /* White text for dark background */
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.tech-summary h3 {
    font-size: 40px;
    font-style: italic;
    color: #66aaff; /* Lighter blue for emphasis */
    margin-bottom: 10px;
    font-weight: 700;
}

.tech-summary p {
    font-size: 20px;
    color: #d0d0d0; /* Slightly muted white for readability */
    line-height: 1.5;
}
@media screen and (max-width: 1300px) {
  .hero {
    height: auto;
    min-height: 100vh; /* ensures it’s at least full height but can grow */
    flex-wrap: wrap;   /* allow left and right to stack if needed */
  }
}
@media screen and (max-width: 768px) {
    /* Disable scroll snap on mobile for better scrolling */
    html, body {
        scroll-snap-type: none;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden; /* prevent horizontal scroll and overflow */
        margin: 0px;
    }
    
    section {
        height: auto;
        min-height: 100vh;
        scroll-snap-align: none;
        padding: 20px 0;
    }

    /* Hero Section - Mobile */
    .hero {
        flex-direction: column;
        padding: 20px;
        gap: 30px;
        height: auto;
        min-height: 100vh;
        justify-content: flex-start;
        align-items: center;
    }

    .intro {
        text-align: center;
        order: 1;
    }

    .intro h1 {
        font-size: 2.5rem;
    }

    .roles {
        font-size: 1.1rem;
    }

    /* Profile picture centered */
    .profile-pic {
        width: 280px;
        max-width: 90vw;
        display: block;
        margin: 0 auto;
    }

    /* Tech Summary */
    .tech-summary {
        order: 2;
        margin-top: 20px;
        margin-bottom: 30px;
        text-align: center;
    }

    .tech-summary h3 {
        font-size: 28px;
    }

    .tech-summary p {
        font-size: 16px;
        padding: 0 10px;
    }

    /* Tech Stack */
    .tech-stack {
        order: 3;
        width: 100%;
    }

    .tech-stack h2 {
        text-align: center;
        font-size: 1.6rem;
    }

    .stack-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 15px;
    }

    .stack-item {
        text-align: center;
        transition: transform 0.3s ease;
    }

    .stack-item img {
        width: 50px;
        height: 50px;
        transition: transform 0.3s ease;
    }

    .stack-item p {
        font-size: 0.8rem;
        margin-top: 5px;
        transition: transform 0.3s ease;
    }

    .stack-item:hover {
        transform: scale(1.1);
    }

    /* Make stack-category-2 follow stack-category style */
    .stack-category-2 {
        display: block; /* kill the grid */
        margin-top: 30px;
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        
    }

    .stack-category-2 h3 {
        color: #4DA8FF;
        margin-bottom: 10px;
        text-align: left;
    }
    /* Remove vertical centering from desktop */
    .db-column, .tools-column {
        display: block;
        width: 100%;
    }
    .db-logos, .tools-logos {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)) !important;
        gap: 15px !important; 
        justify-items: center;
        width: 100%; /* ensure same available width as stack-grid */
        max-width: none; /* remove desktop's max-width from tools */
        margin: 0 auto;
        flex-wrap: block;
        grid-template-columns: repeat(3, 1fr) !important;
    }
    .db-stack-item .tools-stack-item{
        text-align: center;
        transition: transform 0.3s ease;
    }
    .db-logos img, .tools-logos img {
        width: 50px;
        height: 50px;
    }
}
        /* Section 2 Layout */
        .second-section {
            background-color: #154273;
            height: 100vh;
            scroll-snap-align: start;
            display: flex;
            align-items: stretch;
            font-family: Arial, sans-serif;
            color: white;
            width: 100%;
        }

        .second-container {
            display: grid;
            grid-template-columns: 1.5fr 1fr;
            width: 100%;
            padding: 30px;
            gap: 20px;
        }

        .left-column {
            display: flex;
            flex-direction: column;
            overflow-y: auto;
            padding-right: 15px;
        }

        .school-logo {
            width: 100px;
            height: auto;
            margin-right: 10px;
        }
        .education{
            margin-top: 0px;
            padding-top: 0px;
        }
        .edu-item {
            display: flex;
            align-items: center;
        }

        .edu-text p {
            margin: 3px 0;
            font-size: 0.9rem;
            color: #d0d0d0;
        }

        /* Skills */
        .skills {
            margin-top: 0px;
        }

        .skill-category h4 {
            color: #4DA8FF;
            margin-bottom: 5px;
        }

        .skill-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 5px;
        }

        .skill-tag {
            background-color: #1e518c;
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 0.85rem;
            transition: background-color 0.3s ease;
        }

        .skill-tag:hover {
            background-color: #163a63;
        }

        /* Affiliations Section */
        .affiliations {
            margin-top: 0px;
        }
        .affiliations-slider {
            position: relative;
            overflow: hidden;
            border-radius: 10px;
        }
        .affiliations-container {
            display: flex;
            transition: transform 0.3s ease;
            flex-shrink: 0;
            width: 300%;
        }
        .affiliation-card {
            box-sizing: border-box;
            min-width: 100%;
            background-color: #3f83c4; /* Lighter color as requested */
            padding: 15px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            transition: background-color 0.3s ease;
            gap: 15px;
            text-decoration: none;
        }
        .affiliation-card:hover{
            background-color: #4f9de6;
        }
        .affiliation-logo {
            width: 60px;
            height: 60px;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }
        .affiliation-logo img {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }
        .affiliation-details h4 {
            margin: 0 0 5px 0;
            font-size: 1rem;
            color: #ffffff;
            text-decoration: none;
        }
        .affiliation-position {
            font-size: 0.9rem;
            color: #d5e4f8;
            margin-bottom: 3px;
            text-decoration: none;
        }
        .affiliation-date {
            font-size: 0.8rem;
            color: #cdcdcd;
            text-decoration: none;
        }

        /* Slider Navigation */
        .slider-nav {
            display: flex;
            justify-content: center;
            gap: 8px;
            margin-top: 10px;
        }

        .slider-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background-color: #1e518c;
            cursor: pointer;
            transition: background-color 0.3s ease;
        }

        .slider-dot.active {
            background-color: #4DA8FF;
        }

        /* Buttons */
        .action-buttons {
            margin-top: 20px;
            display: flex;
            gap: 10px;
        }

        .btn {
            padding: 10px 16px;
            background-color: #3f83c4;
            border: none;
            color: white;
            cursor: pointer;
            border-radius: 8px;
            font-size: 0.9rem;
            transition: background-color 0.3s ease;
            text-decoration: none;
            text-align: center;
        }

        .btn:hover {
            background-color: #275d8f;
        }

        .btn[hidden] {
            display: none !important;
        }

        .right-column {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            overflow-y: auto;
        }

        .experience-list {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .experience-card {
            background-color: #1e518c;
            padding: 12px;
            border-radius: 10px;
            display: flex;
            gap: 12px;
            align-items: center;
            transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease;
        }

        .experience-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
            background-color: #2563a8;
        }

        .exp-logo {
            flex-shrink: 0;
            width: 120px;
            height: 120px;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }

        .exp-logo img {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        .exp-details {
            display: flex;
            flex-direction: column;
            gap: 0.3rem;
        }

        .exp-details h4 {
            font-size: 1rem;
            margin-bottom: 0.2rem;
        }

        .role {
            font-size: 1rem;
            font-weight: bold;
            color: #ffffff;
        }

        .time-period {
            font-size: 0.9rem;
            color: #b0c4de;
            margin-bottom: 0.4rem;
        }

        .description {
            font-size: 0.95rem;
            line-height: 1.5;
            color: #d0d0d0;
        }

        .left-column::-webkit-scrollbar,
        .right-column::-webkit-scrollbar {
            width: 6px;
        }

        .left-column::-webkit-scrollbar-thumb,
        .right-column::-webkit-scrollbar-thumb {
            background: #3578b8;
            border-radius: 3px;
        }

        h2{
            color: #ffffff;
            margin-bottom: 5px;
            font-size: 22px;
        }
@media screen and (max-width: 768px) {
    .second-section {
        height: auto;
        min-height: 100vh;
        box-sizing: border-box;
        width: 100vw;
        margin: 0;   
        padding: 0;        
    }

    .second-container {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 30px;
    }

    .left-column, .right-column {
        overflow-x: hidden;     /* 🚫 Stop horizontal scrolling */
        overflow-y: visible;
        max-height: none;
        width: 100%;
        box-sizing: border-box; /* Include padding in width */
        padding: 0px;
    }
    .experience-card {
        flex-direction: column;
        text-align: center;
        padding: 15px;
        width: 100%;          /* Take full width */
        box-sizing: border-box; /* Include padding in width */
    }

    .exp-logo {
        width: 80px;
        height: 80px;
        margin-bottom: 10px;
    }

    .exp-details h4 {
        font-size: 1.1rem;
    }

    .description {
        font-size: 0.9rem;
        text-align: left;
    }

    .school-logo {
        width: 60px;
    }

    .edu-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .affiliations-container {
        width: 100%;
    }

    .affiliation-card {
        min-width: 100%;
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        padding: 12px 20px;
        font-size: 1rem;
    }
}

        /* Section styling */
        .third-section {
            background-color: #0A1A2F;
            padding: 0;
            color: white;
            position: relative;
            overflow: hidden;
            height: 100vh;
            display: flex;
            flex-direction: column;
        }

        .third-section[hidden] {
            display: none !important;
        }

        .projects-header {
            text-align: center;
            height: 20vh;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0;
        }

        .projects-header h2 {
            font-size: 2.5rem;
            font-weight: bold;
            color: white;
            margin: 0;
        }

        /* Carousel Layout */
        .carousel-container {
            position: relative;
            max-width: 1400px;
            margin: 0 auto;
            height: 80vh;
            display: flex;
            align-items: center;
            width: 100%;
        }

        .carousel {
            overflow: hidden;
            position: relative;
            width: 100%;
            height: 100%;
        }

        .carousel-track {
            display: flex;
            gap: 30px;
            transition: transform 0.6s ease;
            height: 100%;
            align-items: center;
        }

        .carousel-card {
            flex: 0 0 800px;
            height: 500px;
            border-radius: 15px;
            box-shadow: 0 8px 30px rgba(0,0,0,0.6);
            transition: transform 0.4s ease, filter 0.4s ease;
            overflow: hidden;
            background-color: #1a1a1a;
            position: relative;
            transition: 0.5s;
        }
        .carousel-card:hover{
            scale: 1.05;
        }
        .carousel-card img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        /* Center card emphasis */
        .carousel-card.center {
            transform: scale(1.1);
            z-index: 2;
            filter: brightness(1);
        }

        .carousel-card:not(.center) {
            filter: brightness(0.6);
            transform: scale(0.85);
        }

        /* Navigation Arrows */
        .carousel-btn {
            border: none;
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            cursor: pointer;
            padding: 15px;
            z-index: 10;
            opacity: 0.7;
            transition: all 0.3s ease;
        }

        .carousel-btn:hover {
            opacity: 1;
            transform: translateY(-50%) scale(1.3);
        }

        .carousel-btn img {
            width: 50px;
            height: 50px;
            filter: invert(1);
            filter: brightness(-4);
        }

        .prev { 
            left: 20px; 
        }
        
        .next { 
            right: 20px; 
        }

        /* Gradient hover effects */
        .carousel-gradient {
            position: absolute;
            top: 0;
            bottom: 0;
            width: 150px;
            pointer-events: none;
            transition: opacity 0.3s ease;
            z-index: 5;
            opacity: 0;
        }

        .carousel-gradient.left {
            left: 0;
            background: linear-gradient(to right, rgba(10, 26, 47, 0.8), transparent);
        }

        .carousel-gradient.right {
            right: 0;
            background: linear-gradient(to left, rgba(10, 26, 47, 0.8), transparent);
        }

        .carousel-container:hover .carousel-gradient {
            opacity: 1;
        }

        /* Responsive Adjustments */
        @media (max-width: 1024px) {
            .carousel-card {
                flex: 0 0 600px;
                height: 375px;
            }
        }
/* Third Section (Projects) - Mobile view: make Section 3 projects vertical like Section 2 */
@media (max-width: 768px) {
    /* Third Section (Projects) - Mobile: Vertical Cards Layout */
    .third-section {
        height: auto !important;
        min-height: auto !important;
        padding: 20px 0 40px 0;
    }

    .projects-header {
        height: auto !important;
        padding: 20px;
        margin-bottom: 20px;
    }

    .projects-header h2 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .carousel-container {
        height: auto !important;
        max-height: none !important;
        overflow: visible;
        position: static;
        max-width: none;
        padding: 0 15px; /* Reduced and balanced padding */
        margin: 0; /* Reset any margin */
        width: 100%; /* Ensure full width */
        box-sizing: border-box; /* Include padding in width calculation */
    }

    .carousel {
        overflow: visible;
        position: static;
        height: auto !important;
        width: 100%;
    }

    .carousel-track {
        display: flex;
        flex-direction: column;
        gap: 20px;
        transform: none !important;
        transition: none;
        height: auto !important;
        align-items: stretch;
        width: 100%;
        margin: 0; /* Reset any margin */
        padding: 0; /* Reset any padding */
    }

    .carousel-card {
        flex: none;
        width: 100%;
        height: auto;
        transform: none !important;
        filter: none !important;
        background-color: #0A1A2F;
        border-radius: 12px;
        overflow: hidden;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        position: relative;
        box-sizing: border-box; /* Include any borders/padding in width */
        aspect-ratio: 3 / 2 !important;
        overflow: hidden; /* Hide any overflow */
    }
    .carousel-card:hover {
        transform: translateY(-5px) !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.4);
        scale: none;
    }

    .carousel-card.center {
        transform: none !important;
        z-index: auto;
        filter: none !important;
    }

    .carousel-card img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        display: block;
        margin: auto; /* center if smaller */
    }

    /* Hide desktop carousel controls */
    .carousel-btn,
    .carousel-gradient {
        display: none !important;
    }
}
@media (max-width: 480px) {
    /* Third Section (Projects) - Mobile: Vertical Cards Layout */
    .third-section {
        height: auto !important;
        min-height: auto !important;
        padding: 20px 0 40px 0;
    }

    .projects-header {
        height: auto !important;
        padding: 20px;
        margin-bottom: 20px;
    }

    .projects-header h2 {
        font-size: 1.8rem; /* Slightly smaller for very small screens */
        line-height: 1.2;
    }

    .carousel-container {
        height: auto !important;
        max-height: none !important;
        overflow: visible;
        position: static;
        max-width: none;
        padding: 0 10px; /* Reduced padding for smaller screens */
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .carousel {
        overflow: visible;
        position: static;
        height: auto !important;
        width: 100%;
    }

    .carousel-track {
        display: flex;
        flex-direction: column;
        gap: 15px; /* Reduced gap for smaller screens */
        transform: none !important;
        transition: none;
        height: auto !important;
        align-items: stretch;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .carousel-card {
        flex: none;
        width: 100%;
        height: auto;
        transform: none !important;
        filter: none !important;
        background-color: #0A1A2F;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 6px 20px rgba(0,0,0,0.3);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        position: relative;
        box-sizing: border-box;
    }
    
    .carousel-card:hover {
        transform: translateY(-3px) !important; /* Reduced hover effect */
        box-shadow: 0 8px 25px rgba(0,0,0,0.4);
        scale: none;
    }

    .carousel-card.center {
        transform: none !important;
        z-index: auto;
        filter: none !important;
    }

    .carousel-card img {
        width: 100%;
        height: auto; /* Let height be determined by image aspect ratio */
        object-fit: contain;
        display: block;
        border-radius: 12px; /* Match card border radius */
    }

    /* Hide desktop carousel controls */
    .carousel-btn,
    .carousel-gradient {
        display: none !important;
    }
}
        /* Fourth Section Styling */
        .fourth-section {
            background-color: #154273;
            height: 100vh;
            display: grid;
            grid-template-columns: 60% 40%;
            padding: 0;
            overflow: hidden;
        }

        /* Left Column - Values & Image Slider */
        .left-column-fourth {
            background-color: #1a4d7a;
            padding: 40px 35px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            height: 100vh;
            box-sizing: border-box;
        }

        .values-section {
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .values-header {
            margin-bottom: 25px;
            flex-shrink: 0;
        }

        .values-header h2 {
            font-size: 2rem;
            color: white;
            margin-bottom: 10px;
            font-weight: bold;
        }

        .values-header p {
            font-size: 1rem;
            color: #C0D6E4;
            line-height: 1.4;
            margin: 0;
        }

        .values-grid {
            display: flex;
            flex-direction: column;
            gap: 10px;
            flex: 1;
            margin-bottom: 25px;
        }

        .value-item {
            background-color: rgba(255, 255, 255, 0.05);
            padding: 10px;
            border-radius: 12px;
            border-left: 4px solid #4DA8FF;
            transition: all 0.3s ease;
            flex: 1;
        }

        .value-item:hover {
            background-color: rgba(255, 255, 255, 0.08);
            transform: translateX(10px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
        }

        .value-item h3 {
            font-size: 1.3rem;
            color: white;
            margin-bottom: 8px;
            font-weight: bold;
        }

        .value-item p {
            font-size: 0.9rem;
            color: #C0D6E4;
            line-height: 1.4;
            margin: 0;
        }

    /* Image Slider Section */
    .image-slider-section {
        height: 140px;
        flex-shrink: 0;
    }

    .image-slider-container {
        position: relative;
        height: 100%;
        overflow: hidden;
        border-radius: 15px;
    }

    .image-slider-track {
        display: flex;
        gap: 20px;
        height: 100%;
        width: calc((300px + 20px) * 20); /* total 20 images */
        animation: infiniteSlide 40s linear infinite;
    }

    .slider-image {
        flex: 0 0 300px;
        height: 100%;
        border-radius: 10px;
        overflow: hidden;
    }

    .slider-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    @keyframes infiniteSlide {
        0% { transform: translateX(0); }
        100% { transform: translateX(-50%); }
    }


    /* Pause animation on hover */
    .image-slider-container:hover .image-slider-track {
        animation-play-state: paused;
    }
        /* Right Column - Profile & CTA */
        .right-column-fourth {
            background-color: #205080;
            padding: 40px 30px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
            height: 100vh;
            box-sizing: border-box;
        }

        .profile-section {
            margin-bottom: 5px;
            flex-shrink: 0;
        }

        .profile-image {
            width: 350px;
            height: auto;
            margin-bottom: 5px;
            transition: transform 0.3s ease;
        }
        .profile-image:hover {
            transform: scale(1.05);
        }
        .cta-section h2 {
            font-size: 1.8rem;
            color: white;
            margin-bottom: 12px;
            font-weight: bold;
        }

        .cta-section p {
            font-size: 1rem;
            color: #C0D6E4;
            margin-bottom: 25px;
            line-height: 1.4;
        }

    .cta-button {
        background: linear-gradient(135deg, #729fcf, #2563a8);
        color: white;
        padding: 12px 25px;
        border: none;
        border-radius: 50px;
        font-size: 1rem;
        font-weight: bold;
        cursor: pointer;
        transition: all 0.3s ease;
        margin-bottom: 30px;
        flex-shrink: 0;
        
        /* Additional styles for anchor tag */
        text-decoration: none;
        display: inline-block;
        text-align: center;
        min-width: fit-content;
    }

    .cta-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 25px rgba(77, 168, 255, 0.4);
        background: linear-gradient(135deg, #5bb3ff, #3578b8);
        text-decoration: none; /* Ensure no underline on hover */
    }

    .cta-button:focus {
        outline: 2px solid #4DA8FF;
        outline-offset: 2px;
    }

    .cta-button:active {
        transform: translateY(0px);
    }

        .social-links {
            display: flex;
            gap: 25px;
            justify-content: center;
        }

        .social-link {
            width: 50px;
            height: 50px;
            background-color: rgba(255, 255, 255, 0.1);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            text-decoration: none;
        }

        .social-link:hover {
            background-color: #4DA8FF;
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(77, 168, 255, 0.3);
        }

        .social-link img {
            width: 50px;
            height: 50px;
        }

/* Fourth Section - Mobile */
@media screen and (max-width: 768px) {
    .fourth-section {
        display: flex;              /* simpler stacking */
        flex-direction: column;
        height: auto;
        min-height: auto;
    }

    .right-column-fourth {
        width: 100%;
        height: auto;
        padding: 30px 20px;
        display: flex;
        flex-direction: column;
        align-items: center;        /* keep picture & buttons centered */
        text-align: center;
        order: 1;                    /* right column first on mobile */
    }

    .left-column-fourth {
        width: 100%;
        height: auto;
        padding: 30px 20px;
        display: flex;
        flex-direction: column;
        gap: 20px;
        order: 2;                    /* values + slider below */
    }

    .profile-image {
        width: 200px;
        height: auto;
        margin-bottom: 20px;
    }

    .cta-button {
        padding: 15px 30px;
        font-size: 1.1rem;
        margin-bottom: 25px;
    }

    .social-links {
        gap: 20px;
    }

    .image-slider-section {
        height: auto;
    }

    .slider-image {
        flex: 0 0 200px;
    }

    .image-slider-track {
        gap: 12px;
        width: calc((200px + 12px) * 20);
    }
}


/* Very small screens */
@media screen and (max-width: 480px) {
    .hero {
        padding: 15px;
    }

    .intro h1 {
        font-size: 2rem;
    }

    .stack-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .projects-header h2 {
        font-size: 1.6rem;
    }

    .carousel-container {
        height: 50vh;
    }

    .carousel-card {
        flex: 0 0 250px;
        height: 180px;
    }

    .values-header h2 {
        font-size: 1.5rem;
    }

    .value-item h3 {
        font-size: 1.2rem;
    }

    .value-item p {
        font-size: 0.9rem;
    }

    .profile-image {
        width: 150px;
    }

    .cta-section h2 {
        font-size: 1.5rem;
    }

    .cta-button {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

/* Landscape mobile orientation */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 20px;
    }

    .fourth-section {
        height: auto;
        min-height: 100vh;
    }

    .left-column-fourth, .right-column-fourth {
        height: auto;
    }

    .image-slider-section {
        height: 80px;
    }
}
