:root {
    --primary-color: #6B4EFF;
    /* Elegant Purple (80%) */
    --accent-color: #F2C94C;
    /* Soft Yellow (20%) */
    --bg-color: #0E0E11;
    /* Deep Black/Charcoal */
    --surface-color: #121212;
    /* Charcoal */
    --text-color: #FFFFFF;
    --text-dark: #000000;
    /* Gradient: Purple dominant to Soft Yellow */
    --main-gradient: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
    --hover-gradient: linear-gradient(90deg, var(--accent-color) 0%, var(--primary-color) 100%);
    /* Reversed for hover */
    --bg-gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    /* Purple to Yellow like name */
    --transition-speed: 0.4s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    font-weight: 800;
    text-transform: uppercase;
}

a {
    text-decoration: none;
    transition: var(--transition-speed);
}

ul {
    list-style: none;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 2;
}

/* Navbar */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(14, 14, 17, 0.9);
    /* #0E0E11 with opacity */
    backdrop-filter: blur(15px);
    z-index: 1000;
    padding: 20px 0;
}

#navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: 900;
    background: var(--main-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

#navbar ul {
    display: flex;
    gap: 40px;
}

#navbar a {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    position: relative;
}

#navbar a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -5px;
    left: 0;
    background: var(--main-gradient);
    transition: var(--transition-speed);
}

#navbar a:hover::after {
    width: 100%;
}

/* Hero Section */
#hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg-shape {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 120%;
    background: var(--bg-gradient);
    border-radius: 50% 0 0 50%;
    transform: skewX(-10deg);
    z-index: 0;
    clip-path: ellipse(80% 100% at 100% 50%);
    opacity: 0.9;
}

.hero-content {
    z-index: 2;
    width: 100%;
    /* Now takes full width of container to hold both items */
    position: relative;
    /* Anchor for absolute video */
    display: flex;
    /* Allow flex column for logic */
    flex-direction: column;
    align-items: flex-start;
    /* Default left align */
}

/* Adjust text wrapper to maintain split layout */
.hero-content>h1,
.hero-content>h2,
.hero-content>p,
.hero-content>.cta-buttons {
    width: 50%;
    /* Restrict text width as before */
    padding-right: 50px;
}

/* Adjust text wrapper if needed, or target children */
/* Restored Text Styles */
.hero-content h1 {
    font-size: 5rem;
    line-height: 0.9;
    margin-bottom: 20px;
}

.hero-content h1 span {
    background: var(--main-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    transition: var(--transition-speed);
    cursor: default;
}

.hero-content h1 span:hover {
    background: var(--hover-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content h2 {
    font-size: 1.8rem;
    font-weight: 400;
    color: #ccc;
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.hero-content p {
    font-size: 1.2rem;
    color: #aaa;
    margin-bottom: 40px;
    max-width: 500px;
}

.video-container {
    position: absolute;
    right: 0;
    /* Align to right of hero-content */
    top: 50%;
    transform: translateY(-50%);
    width: 40%;
    height: 60%;
    z-index: 2;
    border-radius: 20px;
    padding: 3px;
    background: var(--main-gradient);
    box-shadow: -20px 20px 0px rgba(255, 255, 255, 0.05);
    /* Reset margins for desktop */
    margin: 0;
}

.video-placeholder {
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    /* White text for contrast */
    font-weight: bold;
    border-radius: 17px;
    /* Inner radius */
}

/* Buttons */
.cta-buttons {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: var(--main-gradient);
    color: var(--text-dark);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: #fff;
    z-index: -1;
    transition: var(--transition-speed);
}

.btn-primary:hover::before {
    width: 100%;
}

.btn-secondary {
    background: transparent;
    border: 2px solid;
    border-image: var(--main-gradient) 1;
    color: #fff;
    /* Border-radius and border-image don't play well together naturally, using a workaround or simple border for now */
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: #000;
}

/* Sections */
.section {
    padding: 120px 0;
    position: relative;
}

.section-title {
    font-size: 4rem;
    margin-bottom: 80px;
    color: #fff;
    position: relative;
    z-index: 2;
    transition: var(--transition-speed);
    cursor: default;
}

.section-title:hover {
    background: var(--hover-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 15px;
    background: var(--main-gradient);
    bottom: 10px;
    left: 0;
    z-index: -1;
}

/* About */
#about {
    background: var(--surface-color);
    clip-path: polygon(0 0, 100% 5%, 100% 100%, 0 100%);
    margin-top: -50px;
    padding-top: 150px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.stat-card {
    background: var(--bg-color);
    padding: 40px;
    /* Gradient Left Border */
    border-left: 5px solid transparent;
    border-image: var(--bg-gradient) 1;
    margin-bottom: 20px;
    transition: var(--transition-speed);
}

.stat-card:hover {
    transform: translateX(10px);
    background: #1a1a1a;
}

.stat-card:hover h3,
.stat-card:hover p {
    color: #fff;
}

.stat-card h3 {
    font-size: 3rem;
    background: var(--main-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

/* Skills */
#skills {
    background: var(--bg-color);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.skill-category {
    background: var(--surface-color);
    padding: 40px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-speed);
}

.skill-category::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 0 0 0 50px;
}

.skill-category:hover {
    transform: translateY(-10px);
}

.skill-category h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.skill-category ul li {
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
    color: #ccc;
}

/* Experience */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline-item {
    display: flex;
    justify-content: flex-end;
    padding-right: 30px;
    margin-bottom: 60px;
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(even) {
    align-self: flex-end;
    justify-content: flex-start;
    padding-left: 30px;
    padding-right: 0;
    margin-left: 50%;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    top: 20px;
    background: var(--bg-color);
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    z-index: 10;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
    right: auto;
}

.timeline-content {
    background: var(--surface-color);
    padding: 30px;
    border-radius: 10px;
    position: relative;
    width: 100%;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

/* Timeline Card Specifics */
.timeline-card .role {
    font-size: 1.6rem;
    color: #fff;
    /* White for prominence */
    margin-bottom: 8px;
    font-weight: 800;
    /* Extra bold */
    text-transform: uppercase;
    /* Match reference */
    letter-spacing: 1px;
}

.timeline-card .meta {
    font-family: 'Inter', sans-serif;
    /* Clean font */
    font-size: 1rem;
    color: #eee;
    /* Brighter grey */
    margin-bottom: 25px;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 15px;
    font-style: normal;
    /* Removed italic */
}

.timeline-card .impact {
    list-style: none;
    padding-left: 10px;
}

.timeline-card .impact li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    color: #ddd;
    font-size: 1rem;
    line-height: 1.6;
}

.timeline-card .impact li::before {
    content: '•';
    /* Solid dot */
    position: absolute;
    left: 0;
    color: var(--accent-color);
    /* Yellow accent */
    font-size: 1.5rem;
    /* Larger dot */
    line-height: 1.6rem;
    /* Align with text */
    top: -2px;
}

.timeline-card .impact strong {
    color: #fff;
    font-weight: 700;
}

/* Projects */
#projects {
    background: var(--bg-gradient);
    /* Gradient Background */
    color: var(--text-color);
    clip-path: polygon(0 10%, 100% 0, 100% 90%, 0 100%);
    padding: 150px 0;
}

#projects .section-title {
    color: var(--text-color);
}

#projects .section-title::before {
    background: var(--accent-color);
}

/* Projects Carousel - Infinite Style */
.carousel-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    /* container clips the long track */
    padding: 50px 0;
    /* Removed black bg/shadow to blend with section gradient */
    background: transparent;
    box-shadow: none;
}

.carousel-track-container {
    width: 100%;
    overflow: visible;
    /* Let slides peek */
    display: flex;
    justify-content: center;
}

.carousel-track {
    display: flex;
    flex-wrap: nowrap;
    /* Force row */
    gap: 30px;
    transition: transform 0.5s ease-in-out;
    width: max-content;
    margin: 0 auto;
    padding: 40px 0;
    /* Space for shadow/scale */
    list-style: none;
    /* Ensure no bullets */
}

.carousel-slide {
    flex: 0 0 320px;
    /* Fixed width, no shrink */
    opacity: 0.4;
    transform: scale(0.85);
    /* Slightly larger */
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: grayscale(100%);
    position: relative;
    z-index: 1;
}

.carousel-slide.active-slide {
    opacity: 1;
    transform: scale(1.15);
    /* Pop out more */
    filter: grayscale(0%);
    z-index: 10;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.video-card {
    height: 400px;
    /* Taller portrait-like format per reference */
    background: #1a1a1a;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 2px solid transparent;
}

.carousel-slide.active-slide .video-card {
    border-image: var(--main-gradient) 1;
    border: 2px solid var(--primary-color);
    /* fallback */
    border-image-slice: 1;
}

.video-placeholder-sm {
    flex: 2;
    /* more space for video */
    background: #000;
}

.project-info {
    flex: 1;
    padding: 20px;
    background: var(--surface-color);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 215, 0, 0.2);
    /* Soft yellow transparent */
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: 0.3s;
}

.carousel-btn:hover {
    background: var(--accent-color);
    color: #000;
}

.prev-btn {
    left: 5%;
}

.next-btn {
    right: 5%;
}

/* Hide default indicators for infinite scroll feel */
.carousel-nav {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .carousel-slide {
        flex: 0 0 260px;
    }

    .video-card {
        height: 350px;
    }
}

.project-info h3 {
    color: var(--primary-color);
}

.project-info p {
    color: #ccc;
}

/* Contact Redesign (No 3D) */
#contact {
    background: var(--bg-color);
    overflow: hidden;
    /* Removed perspective */
}

.contact-split-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: center;
    position: relative;
    padding: 50px 0;
    /* Removed transform-style and transition */
}

/* Left Side: Giant Typography */
.contact-left {
    position: relative;
    /* Removed translateZ */
}

.giant-text {
    display: flex;
    flex-direction: column;
    font-family: 'Inter', sans-serif;
    color: #fff;
    line-height: 0.8;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
}

.giant-text span {
    display: block;
}

.giant-text .line-1 {
    font-size: 8rem;
    font-weight: 300;
    letter-spacing: -2px;
}

.giant-text .line-2 {
    font-size: 8rem;
    font-weight: 500;
    letter-spacing: -2px;
    margin-left: 20px;
}

.giant-text .line-3 {
    font-size: 8rem;
    font-weight: 800;
    letter-spacing: -2px;
}

/* Geometric Decoration */
.geometric-shape {
    position: absolute;
    top: -40px;
    right: 20px;
    width: 150px;
    height: 150px;
    z-index: 1;
    pointer-events: none;
}

.circle-part {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--main-gradient);
    /* Updated to main gradient */
    opacity: 1;
    filter: blur(20px);
    /* Soften it to look like a glow/gradient orb */
}

/* Right Side: Minimal Form */
.contact-right {
    position: relative;
    padding-top: 20px;
    /* Removed translateZ */
}

.minimal-form {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.form-row {
    display: flex;
    gap: 30px;
}

.form-group {
    position: relative;
    width: 100%;
}

.form-group.half {
    width: 50%;
}

.minimal-form label {
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 25px;
    /* More space between label and input */
    display: block;
    font-weight: 600;
}

.minimal-form input,
.minimal-form textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid #444;
    /* Slightly lighter border */
    padding: 15px 0;
    /* More padding for easier clicking */
    color: #fff;
    font-family: 'Roboto', sans-serif;
    font-size: 1.1rem;
    /* Larger font size */
    transition: all 0.3s ease;
    border-radius: 0;
}

.minimal-form textarea {
    resize: none;
    overflow: hidden;
    /* Auto-expand effect later via JS or usually just hidden */
    min-height: 40px;
}

.minimal-form input:focus,
.minimal-form textarea:focus {
    outline: none;
    border-bottom: 2px solid var(--primary-color);
    /* Highlight color on focus */
    padding-left: 10px;
    /* Slight movement to indicate active */
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), transparent);
    /* Subtle active background */
}

/* Required Asterisk logic (optional, keeping it clean for now) */

/* Footer & Button */
.form-footer {
    margin-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.footer-details {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.5;
    text-transform: uppercase;
}

.footer-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #444;
}

.footer-small {
    margin-top: 5px;
    color: #888;
}

.submit-arrow-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.submit-arrow-btn:hover {
    color: var(--accent-color);
    transform: translateX(10px);
}

/* Timeline Toggle */
.timeline-toggle-container {
    text-align: center;
    margin: 40px 0;
    position: relative;
    z-index: 5;
}

.btn-timeline-toggle {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #aaa;
    padding: 12px 30px;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-timeline-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.timeline-hidden {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.timeline-hidden.visible {
    display: block;
    opacity: 1;
    animation: fadeInTimeline 0.5s ease-in-out;
}

@keyframes fadeInTimeline {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Comprehensive Mobile Responsiveness */
@media (max-width: 900px) {

    /* Global Section Padding */
    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2.5rem;
        margin-bottom: 40px;
    }

    /* Navbar */
    #navbar .container {
        flex-direction: column;
        padding-bottom: 20px;
    }

    #navbar ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        margin-top: 20px;
    }

    /* Hero */
    .hero-content {
        width: 100%;
        text-align: center;
        padding-right: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        /* Center children horizontally */
        padding-top: 100px;
        /* Force space from top to clear navbar */
    }

    .hero-content h1 {
        font-size: 3rem;
        order: 1;
        /* Name first */
        margin-bottom: 30px;
        width: 100%;
        /* Reset desktop width */
        padding: 0;
        /* Reset desktop padding */
    }

    /* Video now comes second */
    .video-container {
        position: relative;
        width: 100%;
        height: 300px;
        right: auto;
        top: auto;
        transform: none;
        margin-top: 20px;
        margin-bottom: 40px;
        order: 2;
    }

    /* Order the rest of the elements after the video */
    .hero-content h2 {
        order: 3;
        width: 100%;
        /* Reset desktop width */
        padding: 0;
        /* Reset desktop padding */
    }

    .hero-content p {
        order: 4;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
        /* Reset desktop width */
        text-align: center !important;
        padding: 0;
        /* Reset desktop padding */
    }

    .hero-content .cta-buttons {
        order: 5;
        justify-content: center;
        margin-top: 20px;
        width: 100%;
        /* Reset desktop width */
        padding: 0;
        /* Reset desktop padding */
    }

    .cta-buttons .btn {
        text-align: center;
        display: inline-flex;
        justify-content: center;
        align-items: center;
        /* Optional: slightly reduce side padding if text is wrapping too much */
        padding: 15px 30px;
    }

    .hero-bg-shape {
        width: 100%;
        height: 50%;
        top: 0;
        right: 0;
        border-radius: 0;
        clip-path: none;
        transform: skewY(-10deg);
        z-index: -1;
    }

    /* About & Stats */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .stat-card {
        padding: 30px;
    }

    /* Timeline - Stacked Left */
    .timeline {
        padding-left: 20px;
        margin: 0;
    }

    .timeline::after {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 45px;
        padding-right: 0;
        margin-left: 0;
        margin-bottom: 40px;
        justify-content: flex-start;
    }

    .timeline-item:nth-child(even) {
        margin-left: 0;
        padding-left: 45px;
        justify-content: flex-start;
    }

    .timeline-dot {
        left: 11px !important;
        right: auto;
    }

    .timeline-item:nth-child(even) .timeline-dot {
        left: 11px !important;
    }

    .timeline-content {
        width: 100%;
    }

    /* Skills - Centered Card */
    .skills-centered .skill-category {
        width: 100% !important;
    }

    /* Contact Section */
    .contact-split-layout {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .contact-left {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .giant-text .line-1,
    .giant-text .line-2,
    .giant-text .line-3 {
        font-size: 3.5rem;
        /* Resize for mobile */
        letter-spacing: -1px;
    }

    .geometric-shape {
        left: 50%;
        transform: translateX(-50%);
        right: auto;
    }

    .contact-right {
        padding-top: 0;
    }

    .form-row {
        flex-direction: column;
        gap: 30px;
    }

    .form-group.half {
        width: 100%;
    }

    /* Carousel Fixes */
    .carousel-container {
        padding-bottom: 80px;
        /* Space for buttons */
    }

    .carousel-track-container {
        display: flex;
        justify-content: center;
        /* Force center the wide track so Item 2 (Active) is in view */
        width: 100%;
        overflow: visible;
    }

    .carousel-track {
        margin: 0;
        /* Let flex parent handle alignment */
    }

    .carousel-btn {
        top: auto;
        bottom: 10px;
        transform: none;
        width: 40px;
        height: 40px;
    }

    .prev-btn {
        left: 35%;
    }

    .next-btn {
        right: 35%;
    }

    .carousel-slide {
        /* Ensure card fits well */
        flex: 0 0 280px;
    }
}

/* Extra Small Screens */
@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .giant-text .line-1,
    .giant-text .line-2,
    .giant-text .line-3 {
        font-size: 2.5rem;
    }

    .prev-btn {
        left: 30%;
    }

    .next-btn {
        right: 30%;
    }

    .carousel-slide {
        flex: 0 0 260px;
    }
}
