/* Base Reset & Variables */
:root {
    /* Color Palette - Modern Formal Tech Vibes */
    --bg-main: #0b1121; /* Dark Slate Blue */
    --bg-surface: rgba(15, 23, 42, 0.85); /* Slate Glass */
    --border-color: rgba(56, 189, 248, 0.2); /* Sky blue glow */

    --primary: #38bdf8; /* Sky Blue */
    --primary-hover: #0284c7;
    --secondary: #10b981; /* Emerald/Teal */
    --secondary-hover: #059669;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Layout */
    --container-width: 1200px;
    --spacing-section: 60px;
    /* Reduced from 100px */

    /* Transitions & Shadows */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    /* Formal Network Grid Background */
    background-image: 
        linear-gradient(rgba(56, 189, 248, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.05) 1px, transparent 1px),
        linear-gradient(rgba(16, 185, 129, 0.03) 2px, transparent 2px),
        linear-gradient(90deg, rgba(16, 185, 129, 0.03) 2px, transparent 2px);
    background-size: 50px 50px, 50px 50px, 250px 250px, 250px 250px;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Custom Modern Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}
::-webkit-scrollbar-thumb {
    background-color: #334155;
    border-radius: 10px;
    border: 2px solid #0f172a;
}
::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary);
}

/* Comic Text Selection */
::selection {
    background-color: var(--secondary);
    color: white;
}

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section-spacing {
    padding: var(--spacing-section) 0;
}

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

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-main);
}

h2 {
    font-size: clamp(1.25rem, 3vw, 2rem);
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    /* Tighter heading spacing */
}

p {
    color: var(--text-muted);
}

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

/* Navigation */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(6, 9, 19, 0.85);
    /* Dark matching the theme */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    transition: var(--transition);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo-green {
    color: #14532d;
    /* Dark Green */
    transition: none;
    /* Force no transition */
}

.logo-choco {
    color: #d2691e;
    /* Chocolate */
    transition: none;
    /* Force no transition */
}

/* Enforce fixed color on hover */
.logo:hover .logo-green {
    color: #14532d !important;
}

.logo:hover .logo-choco {
    color: #d2691e !important;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-right: -1rem;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Mobile Hamburger Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 101;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    transition: var(--transition);
    border-radius: 4px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 6px; /* Modern sleek corners */
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(56, 189, 248, 0.3); /* Soft sleek shadow */
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(56, 189, 248, 0.4);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.btn-secondary:hover {
    background: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 6px;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(56, 189, 248, 0.4);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Base Card Component */
.glass-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.8rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(56, 189, 248, 0.4);
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    padding-bottom: 10vh;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
    clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%); /* Modern angular cut */
    position: relative;
    z-index: 10;
}

.hero-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.hero-content {
    flex: 1;
    min-width: 300px;
}

.hero-image-wrapper {
    flex: 0 0 300px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(230, 36, 41, 0.2);
    border: 4px solid var(--primary);
    /* Spidey red border fits the formal red background perfectly */
    transform: rotate(3deg);
    /* Dynamic Spidey feel */
    transition: var(--transition);
}

.hero-image-wrapper:hover {
    transform: rotate(0deg) scale(1.03);
    box-shadow: 0 15px 40px rgba(0, 71, 187, 0.4);
    /* Shifts to blue shadow on hover */
}

.hero-img {
    width: 100%;
    height: auto;
    display: block;
}

.hero .greeting {
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.hero-desc {
    max-width: 600px;
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* About & Skills */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    /* Tighter layout gap */
}

.about-text p {
    margin-bottom: 1.5rem;
}

.awards-box {
    margin-top: 2.5rem;
    background: #eff6ff;
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    border-radius: 0 12px 12px 0;
}

.awards-box h4 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.awards-box ul li {
    color: var(--text-main);
    font-size: 0.95rem;
}

.awards-box a {
    text-decoration: underline;
    text-underline-offset: 3px;
    color: var(--secondary);
}

.awards-box a:hover {
    color: var(--primary);
}

.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-category h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-main);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag {
    background: rgba(0, 71, 187, 0.15);
    /* Spidey Blue tint */
    border: 1px solid rgba(0, 71, 187, 0.4);
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    color: #bfdbfe;
    /* Highly visible light blue */
    transition: var(--transition);
    font-weight: 600;
    /* Bolder text */
}

.tag:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: #cbd5e1;
}

.timeline-item {
    position: relative;
    margin-left: 2rem;
    margin-bottom: 2rem;
}

.timeline-dot {
    position: absolute;
    left: -2.4rem;
    top: 1.5rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 3px solid var(--primary);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5); /* subtle tech glow */
}

.timeline-content .timeline-date {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: rgba(56, 189, 248, 0.15); /* Sky blue tint */
    color: var(--primary); /* Sky blue text */
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.timeline-role {
    color: var(--text-main);
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.timeline-company {
    display: block;
    color: var(--secondary); /* Emerald accent */
    font-weight: 500;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

/* Projects */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    /* Tighter gaps between cards */
}

.project-card {
    display: flex;
    flex-direction: column;
    padding: 2rem;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(230, 36, 41, 0.15);
    /* Red shadow on hover */
    border-color: var(--primary);
    /* Spidey red border */
}

.project-header {
    margin-bottom: 1rem;
}

.project-label {
    font-size: 0.75rem;
    color: #ff6b6b;
    /* Highly visible red */
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    background: rgba(230, 36, 41, 0.15);
    /* Spidey Red tint */
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
}

.project-header h4 {
    font-size: 1.4rem;
    margin-top: 0.8rem;
}

/* Instagram Style Carousel */
.carousel {
    position: relative;
    width: 100%;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden; /* Hide the slides outside container */
    background: #0f172a; /* Fallback slide bg */
}

.carousel-track {
    display: flex;
    transition: transform 0.4s ease-in-out;
    width: 100%; /* Track will naturally hold all children side-by-side */
}

.carousel-slide {
    flex: 0 0 100%; /* Each slide is precisely 100% of container */
    display: flex;
    justify-content: center;
    align-items: center; /* Center images vertically */
    padding: 0;
}

.carousel-slide img {
    max-width: 100%;
    height: auto;
    object-fit: contain; /* Do not crop, fit entirely inside */
    cursor: zoom-in;
    border-radius: 8px;
}

/* Hover-only Carousel Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.7);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.3s ease, background 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
}

.carousel:hover .carousel-btn {
    opacity: 1; /* Show on hover */
}

.carousel-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

/* Instagram-style Bottom Dots */
.carousel-nav {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 10px 0;
    position: absolute;
    bottom: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
}

.carousel-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.current-slide {
    background: var(--primary);
    transform: scale(1.3);
}

/* Lightbox Styling */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 80px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(6, 9, 19, 0.95);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    border: 2px solid rgba(56, 189, 248, 0.8);
    box-shadow: 0 0 40px rgba(56, 189, 248, 0.4);
    border-radius: 8px;
    animation: zoom 0.3s ease-out;
}

.lightbox .close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: var(--secondary);
    font-size: 45px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.lightbox .close:hover,
.lightbox .close:focus {
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
}

@keyframes zoom {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.project-desc {
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.project-tags span {
    font-size: 0.75rem;
    font-weight: 600;
    color: #bfdbfe;
    /* Highly visible light blue */
    background: rgba(0, 71, 187, 0.15);
    border: 1px solid rgba(0, 71, 187, 0.4);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.project-link:hover span {
    transform: translateX(5px);
}

.project-link span {
    transition: var(--transition);
}

/* Contact CTA */
.cta-banner {
    background: linear-gradient(135deg, rgba(14, 20, 36, 0.9) 0%, rgba(230, 36, 41, 0.15) 100%);
    border: 1px solid rgba(226, 36, 41, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Animations - Softer */
.fade-in {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-up {
    transform: translateY(20px);
}

.zoom-in {
    transform: scale(0.98);
}

.animate {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

/* Responsive */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 75%;
        max-width: 320px;
        background-color: rgba(6, 9, 19, 0.98);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        gap: 2rem;
        transition: right 0.4s ease;
        border-left: 1px solid rgba(226, 36, 41, 0.4);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        right: 0;
    }
}

@media (max-width: 600px) {
    .section-spacing {
        padding: 4rem 0;
    }

    .hero {
        padding-top: 120px;
        min-height: 60vh;
    }

    .hero-layout {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
    }

    .hero-image-wrapper {
        flex: none;
        /* Prevents height locking in column mode */
        width: 200px;
        height: auto;
        margin: 0 auto;
    }

    .hero h1 {
        font-size: 2.2rem;
        line-height: 1.1;
    }

    .hero-desc {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 1.5rem;
    }

    .hero-actions .btn {
        width: 100%;
        text-align: center;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        margin-left: 50px;
    }

    .timeline-dot {
        left: -37.5px;
    }
}