@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: #1a1a20;
    background-image: linear-gradient(rgba(30, 30, 36, 0.90), rgba(30, 30, 36, 0.92)), url("../asset/pexels.jpg");
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    overflow-x: hidden;
    position: relative;
}

/* Background Ambient Glow Accents */
body::before {
    content: '';
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.25) 0%, rgba(6, 182, 212, 0) 70%);
    top: -200px;
    right: -100px;
    z-index: -1;
    animation: floatingGlow 8s infinite alternate ease-in-out;
}

body::after {
    content: '';
    position: fixed;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.2) 0%, rgba(168, 85, 247, 0) 70%);
    bottom: -100px;
    left: -100px;
    z-index: -1;
    animation: floatingGlow 12s infinite alternate-reverse ease-in-out;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 8%;
    position: fixed;
    width: 100%;
    top: 0;
    backdrop-filter: blur(12px);
    background: #020F1A;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 999;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
}

.navbar ul {
    display: flex;
    list-style: none;
    gap: 35px;
    align-items: center;
}

.navbar a {
    text-decoration: none;
    color: #cbd5e1;
    transition: .3s;
}

.navbar a:hover {
    color: #22d3ee;
}

.btn {
    padding: 12px 24px;
    background: #06b6d4;
    border-radius: 12px;
    color: white !important;
    text-decoration: none;
    transition: .3s;
    display: inline-block;
    font-weight: 500;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #22d3ee;
    transform: translateY(-2px);
}

.burger {
    display: none;
    cursor: pointer;
    z-index: 1001;
}

.burger div {
    width: 25px;
    height: 2px;
    background-color: #cbd5e1;
    margin: 5px;
    transition: all 0.3s ease;
}

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(4px);
    z-index: 997;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.nav-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 140px 8% 80px 8%;
    gap: 50px;
}

.badge {
    display: inline-block;
    padding: 10px 18px;
    border: 1px solid #06b6d4;
    border-radius: 999px;
    color: #22d3ee;
    margin-bottom: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(6, 182, 212, 0.05);
}

.badge i {
    margin-right: 6px;
}

.hero h1 {
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 25px;
}

.hero h1 span {
    color: #22d3ee;
}

.hero p {
    color: #94a3b8;
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-top: 40px;
}

.primary-btn,
.secondary-btn {
    padding: 14px 28px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 600;
    transition: .3s;
}

.primary-btn {
    background: #06b6d4;
    color: white;
}

.primary-btn:hover {
    background: #22d3ee;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(6, 182, 212, 0.2);
}

.secondary-btn {
    border: 1px solid rgba(255, 255, 255, .15);
    color: white;
    background: rgba(255, 255, 255, .02);
}

.secondary-btn:hover {
    border-color: #06b6d4;
    background: rgba(6, 182, 212, .05);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    width: 100%;
    max-width: 450px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, .1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}

/* ==========================================================================
   HORIZONTAL HIGHLIGHTS SNAPSHOT (INFINITE AUTO-SCROLL)
   ========================================================================== */
.highlights-section {
    padding: 60px 0 100px 0;
    overflow: hidden;
    position: relative;
}

.highlights-header {
    padding: 0 8%;
    margin-bottom: 40px;
}

.highlights-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-align: left !important;
}

/* Container limits viewport and acts as mask */
.highlights-marquee-container {
    overflow: hidden;
    width: 100vw;
    display: flex;
    position: relative;
    /* Smooth gradient mask to fade items at screen edges */
    mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}

/* Flex track executing continuous animation */
.highlights-track {
    display: flex;
    gap: 30px;
    width: max-content;
    animation: autoScrollMarquee 30s linear infinite;
    padding: 15px 0;
}

/* Elegant Pause-on-Hover mechanic for readability */
.highlights-track:hover {
    animation-play-state: paused;
}

.highlight-card {
    flex: 0 0 360px;
    background: rgba(30, 30, 36, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.highlight-card:hover {
    transform: translateY(-8px);
    border-color: #06b6d4;
    box-shadow: 0 15px 30px rgba(6, 182, 212, 0.15);
}

.card-icon {
    font-size: 2rem;
    color: #22d3ee;
    margin-bottom: 20px;
}

.highlight-card h3 {
    font-size: 1.3rem;
    color: white;
    margin-bottom: 12px;
    font-weight: 600;
}

.highlight-card p {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.highlight-card p strong {
    color: #22d3ee;
}

.card-footer-tag {
    align-self: flex-start;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    font-weight: 700;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
}

.core-stack-card {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.08) 0%, rgba(30, 30, 36, 0.75) 100%);
    border-color: rgba(6, 182, 212, 0.2);
}

/* ==========================================================================
   AUTO SCROLL KEYFRAME DEFINITION
   ========================================================================== */
@keyframes autoScrollMarquee {
    0% {
        transform: translateX(0);
    }
    100% {
        /* Translates exactly half of the total combined element track size */
        transform: translateX(calc(-50% - 15px)); 
    }
}

/* ==========================================================================
   GLOBAL SECTION SETTINGS
   ========================================================================== */
.stack, .projects, .about, .experience, .contact {
    padding: 120px 8%;
}

.stack h2, .projects h2, .about h2, .experience h2, .contact h2 {
    font-size: 3rem;
    margin-bottom: 50px;
    text-align: center;
}

/* ==========================================================================
   ABOUT ME
   ========================================================================== */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
}

.about p {
    color: #94a3b8;
    line-height: 1.8;
    font-size: 1.1rem;
    text-align: left;
}

.about p strong {
    color: #22d3ee;
    font-weight: 600;
}

/* ==========================================================================
   TECH STACK
   ========================================================================== */
.stack-category-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.stack-category-block {
    background: rgba(30, 30, 36, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.stack-category-block h3 {
    font-size: 1.2rem;
    color: #94a3b8;
    margin-bottom: 20px;
    font-weight: 500;
    border-left: 3px solid #06b6d4;
    padding-left: 12px;
}

.tech-icon-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tech-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 12px 20px;
    border-radius: 14px;
    transition: all 0.3s ease;
}

.tech-badge:hover {
    background: rgba(6, 182, 212, 0.06);
    border-color: rgba(6, 182, 212, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(6, 182, 212, 0.05);
}

.tech-badge i {
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.tech-badge:hover i { 
    transform: scale(1.15); 
}

.tech-badge span { 
    font-size: 0.95rem; 
    font-weight: 500; 
    color: #cbd5e1; 
}

/* ==========================================================================
   EXPERIENCE TIMELINE
   ========================================================================== */
.timeline {
    max-width: 850px;
    margin: 0 auto;
    position: relative;
    padding-left: 30px;
    border-left: 2px solid rgba(255, 255, 255, 0.08);
}

.timeline-item { 
    position: relative; 
    margin-bottom: 50px; 
}

.timeline-item:last-child { 
    margin-bottom: 0; 
}

.timeline-dot {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #06b6d4;
    left: -38px;
    top: 6px;
    box-shadow: 0 0 10px #06b6d4;
}

.timeline-date {
    font-size: 0.9rem;
    color: #22d3ee;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline-content {
    background: rgba(30, 30, 36, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 25px;
    border-radius: 18px;
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: .3s;
}

.timeline-content:hover {
    border-color: rgba(6, 182, 212, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

.timeline-content h3 { 
    font-size: 1.25rem; 
    margin-bottom: 10px; 
    color: white; 
}

.timeline-content p { 
    color: #94a3b8; 
    font-size: 0.95rem; 
    line-height: 1.6; 
}

/* ==========================================================================
   PROJECT CAROUSEL SLIDER
   ========================================================================== */
.scroll-hint {
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.scroll-hint i {
    animation: pulseX 1.5s infinite ease-in-out;
    color: #06b6d4;
}

.project-slider-container {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 10px 8%;
    overflow: hidden;
}

.project-slider {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    padding-bottom: 15px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.project-slider::-webkit-scrollbar {
    display: none;
    width: 0 !important;
    height: 0 !important;
    background: transparent;
}

.project-card {
    flex: 0 0 400px;
    background: rgba(30, 30, 36, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: .4s ease;
    display: flex;
    flex-direction: column;
    cursor: grab;
    user-select: none;
}

.project-slider.dragging .project-card {
    cursor: grabbing;
    transform: none;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: #06b6d4;
    box-shadow: 0 20px 40px rgba(6, 182, 212, 0.15);
}

.project-card img, 
.project-img-placeholder {
    width: 100%;
    height: 230px;
    object-fit: cover;
    border-radius: 24px 24px 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.project-img-placeholder {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(59, 130, 246, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-img-placeholder i { 
    font-size: 3.5rem; 
    color: #22d3ee; 
    opacity: 0.8; 
}

.project-content { 
    padding: 25px; 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
}

.project-content h3 { 
    font-size: 1.4rem; 
    margin-bottom: 10px; 
    color: white; 
}

.project-content p { 
    color: #94a3b8; 
    font-size: 0.95rem; 
    line-height: 1.6; 
    margin-bottom: 20px; 
}

.tags { 
    display: flex; 
    gap: 10px; 
    flex-wrap: wrap; 
    margin-top: auto; 
}

.tags span { 
    padding: 8px 14px; 
    background: rgba(6, 182, 212, 0.15); 
    color: #22d3ee; 
    border-radius: 999px; 
    font-size: .85rem; 
    font-weight: 500; 
}

/* ==========================================================================
   CONTACT & FOOTER
   ========================================================================== */
.contact p { 
    max-width: 600px; 
    margin: auto; 
    text-align: center; 
    color: #94a3b8; 
    line-height: 1.8; 
    font-size: 1.1rem; 
}

.social-links { 
    display: flex; 
    justify-content: center; 
    gap: 25px; 
    margin-top: 40px; 
}

.social-links a {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .05);
    font-size: 1.3rem;
    color: white;
    transition: .3s;
    text-decoration: none;
}

.social-links a:hover { 
    background: #06b6d4; 
    transform: translateY(-5px); 
    box-shadow: 0 10px 20px rgba(6, 182, 212, 0.3); 
}

#scrollTopBtn {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: #06b6d4;
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    font-size: 1.2rem;
    width: 50px;
    height: 50px;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4);
    transition: all 0.3s ease;
}

#scrollTopBtn:hover {
    background-color: #22d3ee;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.6);
}

footer { 
    padding: 40px 30px; 
    text-align: center; 
    border-top: 1px solid rgba(255, 255, 255, .08); 
    color: #64748b; 
    font-size: 0.95rem; 
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes pulseX { 
    0%, 100% { transform: translateX(0); opacity: 0.6; } 
    50% { transform: translateX(6px); opacity: 1; }
}

@keyframes floatingGlow {
    0% { transform: translate(0px, 0px) scale(1); }
    100% { transform: translate(40px, 30px) scale(1.15); }
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */

/* --- TIER 1: LAPTOPS & SMALL DESKTOPS (Max-width: 1200px) --- */
@media (max-width: 1200px) {
    .navbar {
        padding: 20px 5%;
    }
    .hero {
        padding: 140px 5% 60px 5%;
        gap: 30px;
    }
    .hero h1 {
        font-size: 4rem;
    }
    .stack, .projects, .about, .experience, .contact {
        padding: 100px 5%;
    }

    .highlights-header { padding: 0 5%; }
    .highlights-slider-container { padding: 15px 5%; }
}

/* --- TIER 2: TABLETS & VERTICAL SCREENS (Max-width: 900px) --- */
@media (max-width: 900px) {
    body {
        background-position: 35% center; 
    }

    /* Stack grid elements vertically */
    .hero { 
        grid-template-columns: 1fr; 
        text-align: center; 
        padding-top: 140px; 
        gap: 40px; 
    }
    .hero-image { 
        grid-row: 1; /* Elevates visual content above the fold */
    }
    .hero h1 { 
        font-size: 3.2rem; 
    }
    .hero p {
        margin: 0 auto;
    }
    .hero-buttons { 
        justify-content: center; 
    }

    .about-container { 
        grid-template-columns: 1fr; 
        gap: 25px; 
    }
    .about p { 
        text-align: center; 
    }

    .tech-icon-grid { 
        justify-content: center; 
    }

    /* Toggle visibility for desktop vs. mobile components */
    .desktop-cv { 
        display: none; 
    }
    .mobile-cv { 
        display: block; 
        width: 100%; 
        margin-top: 20px; 
    }
    .burger { 
        display: block; 
    }

    /* Drawer Box Menu Navigation Drawer */
    .nav-links {
        position: fixed;
        right: 0;
        top: 0;
        height: 100vh;
        background-color: rgba(2, 15, 26, 0.98);
        border-left: 1px solid rgba(255, 255, 255, 0.08);
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 120px 40px;
        width: 290px;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1000;
    }
    .nav-links li { 
        margin: 15px 0; 
        width: 100%; 
    }
    .nav-links a { 
        font-size: 1.1rem; 
        font-weight: 500; 
        display: block; 
        width: 100%; 
    }
    .nav-links.show { 
        transform: translateX(0%); 
    }

    /* Menu Toggle Cross Morphing Shapes */
    .toggle .line1 { 
        transform: rotate(-45deg) translate(-5px, 6px); 
    }
    .toggle .line2 { 
        opacity: 0; 
    }
    .toggle .line3 { 
        transform: rotate(45deg) translate(-5px, -6px); 
    }

    .highlights-section { padding: 40px 0 60px 0; }
    .highlights-header h2 { font-size: 2.2rem; text-align: center !important; }
    .highlights-track { gap: 20px; animation-duration: 25s; } /* slightly faster on mobile tracks */
    .highlight-card { flex: 0 0 300px; }
    @keyframes autoScrollMarquee {
        0% { transform: translateX(0); }
        100% { transform: translateX(calc(-50% - 10px)); }
    }
}

/* --- TIER 3: LARGE SMARTPHONES (Max-width: 600px) --- */
@media (max-width: 600px) {
    .navbar {
        padding: 15px 5%;
    }
    .hero {
        padding-top: 110px;
        padding-left: 5%;
        padding-right: 5%;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero-image img {
        max-width: 280px;
    }
    .stack h2, .projects h2, .about h2, .experience h2, .contact h2 {
        font-size: 2.2rem;
        margin-bottom: 35px;
    }
    .stack, .projects, .about, .experience, .contact {
        padding: 80px 5%;
    }
    
    /* Project Carousel Adjustments */
    .project-card { 
        flex: 0 0 290px; 
    } 
    .project-card img, 
    .project-img-placeholder { 
        height: 180px; 
    }
    .project-slider-container {
        padding: 10px 5%;
    }

    /* Condensed Timeline Track Layout */
    .timeline {
        padding-left: 20px;
    }
    .timeline-dot {
        left: -28px;
    }
    .timeline-content {
        padding: 20px;
    }
    
    /* Buttons stack systematically on small devices */
    .hero-buttons {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        max-width: 320px;
        margin: 30px auto 0 auto;
    }
    .primary-btn, .secondary-btn {
        text-align: center;
        width: 100%;
    }

    .highlights-header h2 { font-size: 1.8rem; }
    .highlight-card { flex: 0 0 270px; padding: 25px; }
    .highlights-slider { gap: 15px; }
}

/* --- TIER 4: ULTRA-NARROW DEVICE VIEWPORTS (Max-width: 400px) --- */
@media (max-width: 400px) {
    .hero h1 {
        font-size: 2.1rem;
    }
    .tech-badge { 
        width: 100%; 
        justify-content: flex-start; 
    }
    .social-links {
        gap: 15px;
    }
    .social-links a {
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
    }
}