:root {
    --bg-color: #050505;
    --card-bg: rgba(23, 23, 23, 0.6);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;

    /* Vibrant Gradients */
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --gradient-1: #3b82f6;
    --gradient-2: #8b5cf6;
    --gradient-3: #ec4899;

    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --font-main: 'Outfit', sans-serif;
    --border-color: rgba(255, 255, 255, 0.08);
    /* More subtle border */
}

body.light-mode {
    --bg-color: #f3f4f6;
    --card-bg: rgba(255, 255, 255, 0.6);
    --card-border: rgba(0, 0, 0, 0.05);
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --border-color: rgba(0, 0, 0, 0.05);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    z-index: 1;
    /* Content above background */
    position: relative;
    cursor: none;
}

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

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

.blob-1 {
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: var(--gradient-1);
    animation-duration: 25s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: var(--gradient-2);
    animation-duration: 30s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 400px;
    height: 400px;
    background: var(--gradient-3);
    animation-duration: 28s;
    opacity: 0.2;
}

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

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

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-color);
}

.cursor-outline {
    width: 30px;
    height: 30px;
    border: 1px solid var(--accent-color);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

body:hover .cursor-outline {
    width: 30px;
    height: 30px;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 600;
    color: var(--text-primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

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

/* Header & Nav */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(var(--bg-color), 0.7);
    /* Fallback */
    background: transparent;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}



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

.nav-link {
    font-size: 0.95rem;
    color: var(--text-secondary);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    margin-right: 1.5rem;
    /* Space between toggle and hamburger on mobile, or just general spacing */
}

.theme-toggle:hover {
    color: var(--accent-color);
    transform: rotate(15deg);
}

@media (min-width: 769px) {
    .theme-toggle {
        margin-left: 2rem;
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 80px;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.greeting {
    color: var(--accent-color);
    font-weight: 500;
    margin-bottom: 1rem;
    display: block;
}

.name {
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, #a3a3a3 100%);
    background: linear-gradient(to right, var(--text-primary) 20%, var(--gradient-1) 80%, var(--gradient-2) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientText 5s ease infinite;
    letter-spacing: -2px;
}

@keyframes gradientText {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.title {
    font-size: 2rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.bio {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 500px;
}

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

.btn {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    /* Pill shape */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2));
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.code-block {
    background: #1e1e1e;
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid #333;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: rotate(3deg);
    transition: transform 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
}

.code-block:hover {
    transform: rotate(0deg) scale(1.02);
}

.keyword {
    color: #d55fde;
}

/* Magenta */
.variable {
    color: #ef596f;
}

/* Red */
.string {
    color: #89ca78;
}

/* Green */
.property {
    color: #61afef;
}

/* Blue */

/* Sections Standard */
.section {
    padding: 4rem 5%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 60%;
    height: 3px;
    bottom: -10px;
    left: 0;
    background: var(--accent-color);
}

/* About Section */
.about-text {
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 800px;
}

/* Experience Section (Redesigned) */
.experience-section {
    margin-top: 3rem;
}

.section-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    position: relative;
    padding-left: 1rem;
    border-left: 4px solid var(--accent-color);
}

.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.experience-card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 2px;
    /* For gradient border */
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--glass-shadow);
}

.experience-card-inner {
    background: rgba(15, 15, 15, 0.85);
    /* Inner bg */
    border-radius: 22px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: 100%;
    backdrop-filter: blur(20px);
}

body.light-mode .experience-card-inner {
    background: rgba(255, 255, 255, 0.8);
}

.experience-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    z-index: -1;
    transition: opacity 0.3s ease;
}

.experience-card::after {
    /* Gradient Border Shine */
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, var(--accent-color), transparent);
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -2;
}

.experience-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.experience-card:hover::after {
    opacity: 0.3;
    animation: shine 1.5s ease-out infinite;
}

@keyframes shine {
    0% {
        transform: rotate(45deg) translateY(-100%);
    }

    100% {
        transform: rotate(45deg) translateY(100%);
    }
}

.exp-icon {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    background: rgba(var(--bg-color), 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--accent-color);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.experience-card:hover .exp-icon {
    transform: scale(1.1) rotate(5deg);
    color: #fff;
    background: var(--accent-color);
}

.exp-details h4 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.exp-details p {
    margin: 0;
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
}

.exp-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.exp-tags span {
    font-size: 0.75rem;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
    border: 1px solid rgba(59, 130, 246, 0.2);
    font-weight: 500;
}

.exp-date {
    display: block;
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 0.3rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Skills Marquee */
.skills-marquee-container {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 2rem 0;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.skills-marquee {
    display: flex;
    width: max-content;
    animation: scroll 20s linear infinite;
}

.skills-group {
    display: flex;
    gap: 2rem;
    padding-right: 2rem;
    /* Spacing between duplicated groups */
}

.skill-tag {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-size: 1.1rem;
    white-space: nowrap;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.skill-tag:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    background: rgba(59, 130, 246, 0.1);
}

.skill-tag i {
    color: var(--accent-color);
}

@keyframes scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* Typing Effect */
.typing-text {
    position: relative;
    color: var(--accent-color);
}

.typing-text::after {
    content: '|';
    position: absolute;
    right: -4px;
    color: var(--text-primary);
    animation: blink 0.7s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--card-border);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--glass-shadow);
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.project-content {
    padding: 2rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tech-stack span {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.project-card ul {
    margin-left: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.project-links .btn-link {
    color: var(--text-primary);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.project-links .btn-link:hover {
    color: var(--accent-color);
}

/* Contact Section */
.contact {
    text-align: center;
}

.contact-subtitle {
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.contact-item:hover {
    color: var(--accent-color);
}

.big-btn {
    padding: 1rem 3rem;
    font-size: 1.1rem;
}

/* Footer */
.footer {
    padding: 2rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer .fa-heart {
    color: var(--variable-red);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }

    .hamburger {
        display: block;
    }

    .nav-links {
        display: none;
        /* Hide for now, can implement toggle later if needed or simple stack */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-color);
        flex-direction: column;
        padding: 2rem;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-links.active {
        display: flex;
    }

    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 100px;
        justify-content: center;
    }

    .hero-content {
        margin-top: 2rem;
    }

    .hero-btns {
        justify-content: center;
    }

    .hero-visual {
        justify-content: center;
    }

    .name {
        font-size: 2.5rem;
    }

    .cursor-dot,
    .cursor-outline {
        display: none;
    }
}