/* --- Global Styles & Responsive Core --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #0a192f;
    color: #ccd6f6;
    line-height: 1.6;
    overflow-x: hidden; /* Prevents horizontal scroll jumping on zoom */
}

/* --- Navigation --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    background-color: rgba(10, 25, 47, 0.95);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px); /* Premium frosted glass effect */
}

.logo {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: bold;
    color: #64ffda;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: #ccd6f6;
    text-decoration: none;
    transition: color 0.3s;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.nav-links a:hover {
    color: #64ffda;
}

/* --- Hero Section --- */
header {
    /* min-height ensures it grows if you zoom in, rather than cutting off */
    min-height: 100vh; 
    display: flex;
    align-items: center;
    padding: 120px 8% 50px 8%; /* Top padding prevents nav bar overlap */
}

.center-hero .header-content {
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Fluid Typography: Automatically scales between min and max sizes based on screen width */
.header-content h1 {
    font-size: clamp(2.5rem, 6vw, 4rem); 
    color: #e6f1ff;
    margin-bottom: 10px;
}

.header-content p {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    color: #8892b0;
    margin-bottom: 20px;
}

.header-content .bio {
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    max-width: 700px;
    margin: 0 auto 40px auto; 
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    border: 1px solid #64ffda;
    color: #64ffda;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn:hover {
    background-color: rgba(100, 255, 218, 0.1);
}

.profile-img-container {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

.profile-img {
    /* Responsive image sizing */
    width: clamp(140px, 20vw, 200px);
    height: clamp(140px, 20vw, 200px);
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #64ffda;
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.3);
    transition: transform 0.3s ease;
}

.profile-img:hover {
    transform: scale(1.05);
}

/* --- Experience Timeline Section --- */
#experience {
    padding: 100px 8%;
    background-color: #0a192f; 
}

.experience-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 30px;
    border-left: 2px solid #233554;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-dot {
    position: absolute;
    left: -39px; 
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #64ffda;
    border: 4px solid #0a192f;
}

.timeline-content {
    background-color: #112240;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid rgba(100, 255, 218, 0.1);
    transition: transform 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
}

.timeline-date {
    color: #64ffda;
    font-family: 'Courier New', Courier, monospace;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    margin-bottom: 10px;
}

.timeline-content h3 {
    color: #e6f1ff;
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    margin-bottom: 5px;
}

.timeline-content h4 {
    color: #8892b0;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    font-weight: 500;
    margin-bottom: 15px;
}

.timeline-content p {
    color: #8892b0;
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
}

/* --- Portfolio Section --- */
#portfolio {
    padding: 100px 8%;
    background-color: #112240;
}

#portfolio h2 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    margin-bottom: 40px;
    text-align: center;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid #64ffda;
    color: #ccd6f6;
    cursor: pointer;
    border-radius: 20px;
    transition: 0.3s;
    font-size: clamp(0.8rem, 2vw, 0.95rem);
}

.filter-btn.active, .filter-btn:hover {
    background: #64ffda;
    color: #0a192f;
}

/* --- Horizontal Carousel Layout --- */
.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 900px; 
    margin: 0 auto;
}

.project-grid {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory; 
    gap: 30px;
    width: 100%;
    padding-bottom: 20px;
    -ms-overflow-style: none; /* Hide scrollbar IE */
    scrollbar-width: none;    /* Hide scrollbar Firefox */
}

.project-grid::-webkit-scrollbar {
    display: none; /* Hide scrollbar Chrome/Safari */
}

.project-card {
    flex: 0 0 100%;
    scroll-snap-align: center;
    background-color: #0a192f;
    border-radius: 10px;
    overflow: hidden;
}

.project-card.flagship {
    border: 1px solid rgba(100, 255, 218, 0.4);
    box-shadow: 0 4px 20px rgba(100, 255, 218, 0.05);
}

.project-image {
    width: 100%;
    overflow: hidden;
}

/* Dynamic Image heights based on screen size */
.project-image img, .flagship .project-image img {
    width: 100%;
    height: clamp(200px, 40vw, 350px);
    object-fit: cover;
    display: block;
    border-bottom: 1px solid rgba(100, 255, 218, 0.2);
}

.project-info {
    padding: clamp(15px, 4vw, 25px);
}

.project-info h3 {
    color: #e6f1ff;
    margin-bottom: 10px;
    font-size: clamp(1.1rem, 3vw, 1.4rem);
}

.project-info p {
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
}

/* --- Tech Stack Badges --- */
.tech-stack {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-stack span {
    background-color: rgba(100, 255, 218, 0.1);
    color: #64ffda;
    padding: 5px 10px;
    font-size: clamp(0.75rem, 2vw, 0.85rem);
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    border: 1px solid rgba(100, 255, 218, 0.3);
}

.project-links {
    margin-top: 20px;
}

.project-links a {
    color: #ccd6f6;
    text-decoration: none;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.project-links a:hover {
    color: #64ffda;
}

/* --- Carousel Buttons --- */
.carousel-btn {
    background: rgba(10, 25, 47, 0.9);
    border: 1px solid #64ffda;
    color: #64ffda;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    z-index: 10;
    transition: all 0.3s ease;
    /* Aligns button with the image area so it NEVER blocks text */
    top: 25%; 
    transform: translateY(-50%);
}

.carousel-btn:hover {
    background: #64ffda;
    color: #0a192f;
    transform: translateY(-50%) scale(1.1);
}

.prev-btn { left: -70px; }
.next-btn { right: -70px; }

/* --- Contact Section --- */
#contact {
    padding: 100px 8%;
    text-align: center;
}

.social-links {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: clamp(15px, 4vw, 30px);
    flex-wrap: wrap;
}

.social-links a {
    color: #ccd6f6;
    text-decoration: none;
    font-size: clamp(1rem, 3vw, 1.2rem);
    transition: color 0.3s;
}

.social-links a:hover {
    color: #64ffda;
}

/* --- Scroll Reveal Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}


/* ==========================================================================
   MOBILE & TABLET RESPONSIVE OVERRIDES
   ========================================================================== */

/* Tablets and Small Laptops */
@media (max-width: 1050px) {
    .carousel-container { 
        width: 95%; 
    }
    .prev-btn { left: 10px; }
    .next-btn { right: 10px; }
}

/* Mobile Phones */
@media (max-width: 768px) {
    /* Stack navigation elegantly */
    nav { 
        flex-direction: column; 
        padding: 15px 5%; 
        gap: 15px; 
    }
    .nav-links { 
        gap: 15px; 
        flex-wrap: wrap; 
        justify-content: center; 
    }

    /* Adjust Experience Timeline for small screens */
    .experience-timeline { 
        padding-left: 20px; 
    }
    .timeline-dot { 
        left: -29px; 
        width: 14px; 
        height: 14px; 
    }
    .timeline-content { 
        padding: 15px; 
    }

    /* Hide buttons on mobile -> User natively swipes left/right */
    .carousel-btn { 
        display: none; 
    }
}