/* Font Variables */
:root {
    --font-primary: 'Inter', sans-serif;
    --font-bengali: 'Hind Siliguri', sans-serif;

    /* Colors */
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --secondary: #ec4899;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.85);

    /* Spacing */
    --container-width: 1200px;
    --nav-height: 80px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background: linear-gradient(135deg, #f0f9ff 0%, #e0e7ff 100%);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Mesh Animation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 20%);
    z-index: -1;
    pointer-events: none;
}

body.font-cn {
    font-family: var(--font-bengali);
}

.hidden {
    display: none !important;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

.btn,
.btn-primary,
.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 9999px;
    cursor: pointer;
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-weight: 600;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 3rem;
}

.divider {
    width: 80px;
    height: 6px;
    background: var(--primary);
    margin: 0 auto 3rem;
    border-radius: 10px;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-right {
    animation: fadeInRight 1s ease-out forwards;
}

.fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.nav-content {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.highlight {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    color: var(--text-light);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: var(--primary);
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-only {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

/* Hero */
#hero {
    padding-top: calc(var(--nav-height) + 3rem);
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #eef2ff;
    color: var(--primary);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.hero-desc {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.stats {
    display: flex;
    gap: 3rem;
}

.stat-item h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
}

.stat-item p {
    font-size: 0.9rem;
    color: var(--text-light);
}

.hero-img-container {
    position: relative;
    display: flex;
    justify-content: center;
}

.profile-img {
    width: 400px;
    height: 400px;
    object-fit: cover;
    border-radius: 50%;
    border: 8px solid var(--white);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    position: relative;
    z-index: 10;
    transition: transform 0.3s;
}

.profile-img:hover {
    transform: scale(1.02);
}

.blob {
    position: absolute;
    width: 120%;
    height: 120%;
    background: linear-gradient(to right, #4f46e5, #ec4899);
    filter: blur(60px);
    opacity: 0.2;
    z-index: 0;
    top: -10%;
    left: -10%;
    border-radius: 50%;
    animation: blob-bounce 5s infinite alternate;
}

@keyframes blob-bounce {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

/* Grids */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* Cards */
.card {
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

/* Skills */
.skill-card {
    text-align: center;
}

.skill-icon {
    margin-bottom: 1rem;
    color: var(--primary);
}

.skill-card h3 {
    margin-bottom: 1rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.tag {
    background: #f1f5f9;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-light);
}

/* Projects */
.project-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-img {
    height: 180px;
    background: linear-gradient(135deg, #e0e7ff, #f3e8ff);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.project-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.project-desc {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    flex: 1;
}

.project-link {
    display: block;
    width: 100%;
    padding: 0.75rem;
    text-align: center;
    background: var(--white);
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 0.5rem;
    font-weight: 600;
    margin-top: 1rem;
    transition: 0.3s
}

.project-link:hover {
    background: var(--primary);
    color: var(--white);
}

.filter-btns {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    border: none;
    background: #e2e8f0;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-light);
    transition: 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary);
    color: var(--white);
    transform: scale(1.05);
}

/* Teaching */
#teaching {
    background: #1e1b4b;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.teaching-text h2 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.teaching-text p {
    color: #c3dafe;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.feature-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 0.75rem;
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s;
}

.feature-box:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.teaching-stat {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 2rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: 0.3s;
}

.teaching-stat:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.teaching-stat h3 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.teaching-stat p {
    color: #ddd;
}

/* Contact Cards Redesign */
.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    background: var(--white);
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    transition: 0.3s;
    cursor: pointer;
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(79, 70, 229, 0.15);
    border-color: var(--primary);
}

.contact-icon-wrapper {
    width: 80px;
    height: 80px;
    background: #eef2ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
    transition: 0.3s;
}

.contact-card:hover .contact-icon-wrapper {
    background: var(--primary);
    color: var(--white);
    transform: scale(1.1);
}

.contact-label {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.contact-value {
    font-size: 0.95rem;
    color: var(--text-light);
    word-break: break-all;
}


/* Footer */
footer {
    background: var(--white);
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

.footer-text {
    color: var(--text-light);
}

/* Mobile */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: 1fr 1fr;
    }

    .grid-3 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-only {
        display: block;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-btns,
    .stats {
        justify-content: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .profile-img {
        width: 280px;
        height: 280px;
        margin: 0 auto;
    }

    .mobile-menu {
        background: var(--white);
        padding: 1rem;
        border-bottom: 1px solid #eee;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .mobile-menu.hidden {
        display: none;
    }

    .mobile-link {
        padding: 0.5rem;
        display: block;
        font-weight: 500;
        color: var(--text-dark);
    }
}