:root {
    --primary: #4f46e5;
    --secondary: #0ea5e9;
    --accent: #db2777;
    --bg-dark: #fcfdfe;
    --bg-card: rgba(255, 255, 255, 0.6);
    --text-white: #0f172a;
    --text-gray: #4b5563;
    --glass: rgba(255, 255, 255, 0.5);
    --glass-border: rgba(0, 0, 0, 0.08);
    --nav-bg: rgba(255, 255, 255, 0.8);
    /* Light Mesh Colors */
    --mesh-1: rgba(79, 70, 229, 0.08);
    --mesh-2: rgba(14, 165, 233, 0.08);
    --mesh-3: rgba(219, 39, 119, 0.05);
}

.theme-about {
    --mesh-1: rgba(245, 158, 11, 0.1);
    --mesh-2: rgba(239, 68, 68, 0.1);
    --mesh-3: rgba(251, 191, 36, 0.08);
    --secondary: #d97706;
}

.theme-services {
    --mesh-1: rgba(16, 185, 129, 0.1);
    --mesh-2: rgba(14, 165, 233, 0.1);
    --mesh-3: rgba(5, 150, 105, 0.08);
    --secondary: #059669;
}

.theme-projects {
    --mesh-1: rgba(219, 39, 119, 0.1);
    --mesh-2: rgba(79, 70, 229, 0.1);
    --mesh-3: rgba(190, 24, 93, 0.08);
    --secondary: #db2777;
}

.theme-publications {
    --mesh-1: rgba(100, 116, 139, 0.1);
    --mesh-2: rgba(56, 189, 248, 0.1);
    --mesh-3: rgba(71, 85, 105, 0.08);
    --secondary: #0284c7;
}

.theme-books {
    --mesh-1: rgba(120, 53, 15, 0.1);
    --mesh-2: rgba(180, 83, 9, 0.1);
    --mesh-3: rgba(146, 64, 14, 0.08);
    --secondary: #b45309;
}

.theme-experience {
    --mesh-1: rgba(71, 85, 105, 0.1);
    --mesh-2: rgba(148, 163, 184, 0.1);
    --mesh-3: rgba(51, 65, 85, 0.08);
    --secondary: #475569;
}

.theme-media {
    --mesh-1: rgba(220, 38, 38, 0.1);
    --mesh-2: rgba(185, 28, 28, 0.1);
    --mesh-3: rgba(153, 27, 27, 0.08);
    --secondary: #dc2626;
}

.theme-contact {
    --mesh-1: rgba(37, 99, 235, 0.1);
    --mesh-2: rgba(79, 70, 229, 0.1);
    --mesh-3: rgba(29, 78, 216, 0.08);
    --secondary: #2563eb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background: var(--bg-dark);
    background-image:
        radial-gradient(at 0% 0%, var(--mesh-1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, var(--mesh-2) 0px, transparent 50%),
        radial-gradient(at 100% 100%, var(--mesh-3) 0px, transparent 50%),
        radial-gradient(at 0% 100%, var(--mesh-1) 0px, transparent 50%),
        radial-gradient(at 50% 50%, var(--mesh-2) 0px, transparent 50%);
    background-size: 200% 200%;
    background-attachment: fixed;
    animation: meshAnim 20s ease infinite;
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

@keyframes meshAnim {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.animate {
    animation: fadeIn 0.8s ease forwards;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--secondary);
}

/* Hero Section Refinements */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 30% 50%, rgba(59, 130, 246, 0.1), transparent 60%);
}

.hero-container {
    display: flex;
    align-items: center;
    gap: 4rem;
    width: 100%;
    text-align: left;
}

.hero-content-wrapper {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 900px;
}

.bold-name {
    font-size: 4.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    letter-spacing: -2px;
}

.hero-tagline {
    font-size: 1.3rem;
    color: var(--text-gray);
    margin-bottom: 3rem;
    max-width: 700px;
}

/* Stats Row Refinements */
.stats-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.stat-box {
    background: var(--bg-card);
    padding: 1.25rem 1.75rem;
    border-radius: 1.25rem;
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.stat-box i {
    font-size: 1.75rem;
    color: var(--secondary);
}

.stat-box.glow {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
}

.stat-box:hover {
    transform: translateY(-8px) scale(1.03);
    border-color: var(--secondary);
    box-shadow: 0 10px 40px rgba(34, 211, 238, 0.2);
    background: rgba(34, 211, 238, 0.05);
}

.stat-box .number {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
}

.stat-box .label {
    font-size: 0.75rem;
    color: var(--text-gray);
    text-transform: uppercase;
}

/* Forms */
input,
textarea {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    color: var(--text-white);
    font-family: inherit;
    transition: all 0.3s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.1);
}

/* Hero Profile Image: Static & Left Aligned */
.profile-frame {
    width: 220px;
    height: 220px;
    position: relative;
    padding: 8px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
    flex-shrink: 0;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--bg-dark);
}

/* Sections */
section {
    padding: 8rem 0;
}

h2 {
    font-size: 3.2rem;
    margin-bottom: 4rem;
    position: relative;
    background: linear-gradient(to right, var(--text-white), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    letter-spacing: -1px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 80px;
    height: 6px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    border-radius: 3px;
}

.btn-primary {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: transparent;
    color: var(--primary);
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid var(--primary);
    cursor: pointer;
}

.btn-secondary:hover {
    background: rgba(79, 70, 229, 0.05);
    transform: translateY(-2px);
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 2.5rem;
    border-radius: 2rem;
    margin-bottom: 2rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

.card:hover {
    border-color: var(--secondary);
    transform: translateY(-10px) scale(1.02);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.15);
}

.card h3 {
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.card .subtitle {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-category h4 {
    margin-bottom: 1rem;
    color: var(--secondary);
}

.skill-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    margin: 0.25rem;
    font-size: 0.9rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid var(--glass-border);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.7rem;
    top: 0;
    width: 1rem;
    height: 1rem;
    background: var(--primary);
    border-radius: 50%;
    border: 4px solid var(--bg-dark);
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-container {
        gap: 2rem;
    }
    
    .bold-name {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    .nav-content {
        padding: 0.8rem 1.5rem;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
        cursor: pointer;
        z-index: 1001;
    }

    .menu-toggle span {
        display: block;
        height: 3px;
        width: 100%;
        background: var(--primary);
        border-radius: 3px;
        transition: all 0.3s ease;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--nav-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        gap: 2.5rem;
    }

    .nav-links.active {
        right: 0;
    }

    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
        padding-top: 4rem;
    }

    .hero-content-wrapper {
        align-items: center;
    }

    .bold-name {
        font-size: 2.8rem;
        text-align: center;
    }

    .hero-tagline {
        font-size: 1.1rem;
        border-left: none;
        border-top: 3px solid var(--primary);
        padding-left: 0;
        padding-top: 1rem;
        text-align: center;
    }

    .stats-row {
        justify-content: center;
    }

    h2 {
        font-size: 2.4rem;
        text-align: center;
    }

    h2::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    section {
        padding: 4rem 0;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .bold-name {
        font-size: 2.2rem;
    }

    .profile-frame {
        width: 180px;
        height: 180px;
    }

    .stat-box {
        width: 100%;
        justify-content: center;
    }
    
    .nav-links {
        width: 85%;
    }
}