:root {
    --primary: #00f2ea;
    --primary-dark: #00c2bb;
    --secondary: #ff0055;
    --bg: #050505;
    --card-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
    --text: #ffffff;
    --text-muted: #9ca3af;
    --font-main: 'Inter', 'Segoe UI', Roboto, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
    font-family: var(--font-main);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* --- Background Animations --- */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s infinite alternate;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: var(--secondary);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: purple;
    top: 40%;
    left: 60%;
    animation-delay: -10s;
    opacity: 0.2;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, 50px) scale(1.1);
    }
}

/* --- Typography --- */
h1,
h2,
h3 {
    font-weight: 800;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    display: table;
    margin-left: auto;
    margin-right: auto;
    background: linear-gradient(to right, #fff, #a5a5a5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    margin: 15px auto 0;
    border-radius: 2px;
}

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

/* --- Glassmorphism --- */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
}

/* --- Navigation --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.2rem 5%;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(20px);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.accent-dot {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

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

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* --- Hero Section (UPDATED) --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    position: relative;

    /* NEW BACKGROUND: Radial Gradient (Dark Grey -> Darker Black) */
    background: radial-gradient(circle at center, #1a1f29 0%, rgba(5, 5, 5, 0.0) 80%);

    overflow: hidden;
    /* Contain the globe */
}

/* Interactive Globe Styles */
.skill-globe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    opacity: 0.8;
    cursor: grab;
}

.skill-globe:active {
    cursor: grabbing;
}

/* TagCloud Text Color Override (Target generated classes) */
.tagcloud {
    font-size: 1.1rem;
    font-weight: 600;
}

.tagcloud--item {
    color: var(--text-muted);
    transition: 0.3s;
}

.tagcloud--item:hover {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary);
}

.hero-overlay {
    /* Faint overlay to ensure text readability over moving globe */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(5, 5, 5, 0.4) 0%, rgba(5, 5, 5, 0.5) 100%);
    z-index: 0;
    pointer-events: none;
    /* Let mouse reach globe */
}

.hero-content {
    max-width: 900px;
    z-index: 1;
    pointer-events: none;
}

/* Re-enable pointer events for buttons */
.cta-container {
    pointer-events: auto;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    padding-bottom: 10px;
    background: linear-gradient(to right, #fff 20%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInDown 1s ease;
}

.hero-role {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.subtitle {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    color: var(--text-muted);
}

.btn {
    display: inline-block;
    padding: 14px 35px;
    font-weight: 600;
    border-radius: 50px;
    margin: 0 10px;
    transition: var(--transition);
}

.btn-glow {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 242, 234, 0.4);
}

.btn-glow:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(0, 242, 234, 0.6);
}

.btn-outline {
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

/* --- Sections --- */
section {
    padding: 8rem 8%;
}

/* --- Education --- */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.edu-card {
    padding: 2.5rem;
    transition: var(--transition);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.edu-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

.icon-box {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.primary-box {
    background: rgba(0, 242, 234, 0.1);
    color: var(--primary);
}

.secondary-box {
    background: rgba(255, 0, 85, 0.1);
    color: var(--secondary);
}

.highlight {
    color: var(--primary);
    font-weight: 600;
}

/* --- Experience --- */
.section-note {
    text-align: center;
    width: 100%;
    display: block;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

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

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 24px;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    opacity: 0.3;
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
    padding-left: 60px;
    cursor: pointer;
}

.timeline-dot {
    position: absolute;
    left: 15px;
    top: 25px;
    width: 20px;
    height: 20px;
    background: var(--bg);
    border: 2px solid var(--primary);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 10px rgba(0, 242, 234, 0.3);
    transition: var(--transition);
}

.timeline-item:hover .timeline-dot {
    background: var(--primary);
    transform: scale(1.2);
}

.job-card {
    padding: 1.5rem 2rem;
    border-left: 3px solid transparent;
    transition: var(--transition);
}

.job-card:hover {
    border-left-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.job-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.job-company {
    color: var(--primary);
    font-weight: 600;
    margin-top: 4px;
}

.job-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    opacity: 0;
}

.timeline-item.active .job-details {
    max-height: 500px;
    opacity: 1;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.job-details ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-left: 10px;
}

.job-details li {
    margin-bottom: 0.5rem;
    color: #ccc;
}

.chevron {
    transition: transform 0.3s ease;
    opacity: 0.5;
}

.timeline-item.active .chevron {
    transform: rotate(180deg);
    opacity: 1;
    color: var(--primary);
}

/* --- CAROUSEL (Projects) --- */
/* --- CAROUSEL (Projects) --- */
.carousel-container {
    position: relative;
    width: 100%;
    /* REMOVED fixed height: 500px; - Let content dictate height */
    padding: 2rem 0;
    /* Add padding for shadows */
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-track-container {
    width: 100%;
    /* Use overflow-y visible if you want shadows to pop out, 
       but strictly hidden is needed for the carousel strip effect. 
       Usually keep hidden for the track container. */
    overflow: hidden;
    position: relative;
    padding: 20px 0;
    /* Extra space for hover transform */
}

.carousel-track {
    display: flex;
    padding: 0;
    margin: 0;
    list-style: none;
    /* Key Change: align-items: stretch forces equal height */
    align-items: stretch;
    transition: transform 0.5s ease-in-out;
    gap: 2rem;
}

.project-card {
    flex: 0 0 42%;
    min-width: 300px;
    position: relative;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0.5;
    transform: scale(0.9);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;

    /* Key Changes for Equal Height Content */
    display: flex;
    flex-direction: column;
    height: auto;
    /* Allow it to grow with content */
}

/* Active card styling */
.carousel-track .project-card {
    opacity: 1;
    transform: scale(1);
}

.project-img-container {
    width: 100%;
    height: 220px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    /* Prevent image from shrinking */
}

.project-info {
    padding: 1.5rem;
    /* Key Change: Make info section fill remaining space */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 10px 0;
    /* Push tags to bottom if desired */
    margin-bottom: auto;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.5rem;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    border: 1px solid rgba(0, 242, 234, 0.1);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--primary);
    color: var(--primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.carousel-nav:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 15px var(--primary);
}

.prev-btn {
    left: -20px;
}

.next-btn {
    right: -20px;
}

/* --- Community Grid --- */
.community-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.community-card {
    padding: 2.5rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.community-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--secondary);
}

.community-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.community-sub {
    font-size: 1.1rem;
    color: var(--secondary);
    font-weight: 600;
    display: block;
}

.community-date {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: block;
}

.community-desc {
    color: #ddd;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.community-tags {
    margin-top: auto;
}

.secondary-tag {
    background: rgba(255, 0, 85, 0.1);
    color: var(--secondary);
    border: 1px solid rgba(255, 0, 85, 0.2);
}

/* --- Contact --- */
.contact-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    transition: var(--transition);
    border: 1px solid transparent;
}

.social-btn:hover {
    background: var(--primary);
    color: #000;
    transform: translateY(-5px) rotate(10deg);
    box-shadow: 0 0 20px rgba(0, 242, 234, 0.4);
}

/* --- Animations --- */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Mobile Responsive --- */
@media (max-width: 768px) {

    /* On mobile, reduce globe size slightly */
    .hero {
        overflow: visible;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .community-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        flex: 0 0 85%;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        height: 100vh;
        width: 70%;
        background: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        transition: 0.4s ease;
        gap: 2rem;
        box-shadow: -10px 0 20px rgba(0, 0, 0, 0.5);
    }

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

    .hamburger {
        display: block;
    }

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

    .timeline-item {
        padding-left: 50px;
        width: 100%;
        margin-left: 0 !important;
        text-align: left !important;
        padding-right: 0 !important;
    }

    .timeline-dot {
        left: 11px;
    }

    .job-card {
        text-align: left !important;
        border-left: 3px solid transparent !important;
        border-right: none !important;
    }

    .job-header {
        flex-direction: row !important;
    }
}

@media (min-width: 769px) {
    .timeline::before {
        left: 50%;
        transform: translateX(-50%);
    }

    .timeline-item {
        width: 50%;
        padding-left: 0;
        padding-right: 50px;
    }

    .timeline-item:nth-child(even) {
        margin-left: 50%;
        padding-right: 0;
        padding-left: 50px;
    }

    .timeline-item:nth-child(odd) .timeline-dot {
        left: auto;
        right: -11px;
    }

    .timeline-item:nth-child(even) .timeline-dot {
        left: -11px;
    }

    .timeline-item:nth-child(odd) .job-card {
        text-align: right;
        border-right: 3px solid transparent;
        border-left: none;
    }

    .timeline-item:nth-child(odd) .job-card:hover {
        border-right-color: var(--primary);
    }

    .timeline-item:nth-child(odd) .job-header {
        flex-direction: row-reverse;
    }

    .timeline-item:nth-child(odd) .job-details ul {
        direction: rtl;
        margin-right: 20px;
    }

    .timeline-item:nth-child(odd) .job-details li {
        text-align: right;
        direction: ltr;
    }
}