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

/* Reset and Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --academic-color: #0f2d3f;
    --academic-gradient: linear-gradient(135deg, #0b1f2a 0%, #0f4c5c 50%, #1b6d7a 100%);
    --datascience-color: #1e3a8a;
    --datascience-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 45%, #2563eb 100%);
    --text-dark: #0f172a;
    --text-light: #f8fafc;
    --bg-light: #f5f7fb;
}

body {
    font-family: 'Manrope', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    color: var(--text-dark);
    background: #ffffff;
}

/* Homepage Split Screen */
.split-screen {
    display: none;
    height: 100vh;
    width: 100%;
}

.split-screen.active {
    display: flex;
}

.split-half {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: flex 0.7s ease;
}

.split-half:hover {
    flex: 1.2;
}

.academic-side {
    background: var(--academic-gradient);
}

.datascience-side {
    background: var(--datascience-gradient);
}

.split-half::before {
    content: '';
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 1;
}

.academic-side::before {
    background-image: url("Images/academic.png");
}

.datascience-side::before {
    background-image: url("Images/datascience_gem.png");
}

.split-half:hover::before {
    opacity: 0.85;
}

.split-half .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease;
}

.split-half:hover .overlay {
    background: rgba(0, 0, 0, 0.1);
}

.split-half .content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--text-light);
    transform: scale(1);
    transition: transform 0.3s ease;
}

.split-half:hover .content {
    transform: scale(1.05);
}

.split-half .icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

.split-half h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.split-half p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.explore-btn {
    padding: 14px 36px;
    font-size: 1rem;
    letter-spacing: 0.2px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: var(--text-light);
    cursor: pointer;
    border-radius: 999px;
    transition: all 0.3s ease;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.explore-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
    transform: translateY(-3px);
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.25);
}

/* Portfolio Sections */
.portfolio-section {
    display: none;
    min-height: 100vh;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.portfolio-section.active {
    display: block;
}

/* Navbar */
.navbar {
    background: linear-gradient(to right, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.98));
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    height: 70px;
    gap: 16px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--academic-color);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.1);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(15, 23, 42, 0.2);
    color: var(--text-dark);
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 1.1rem;
    cursor: pointer;
}

.nav-menu > li > a {
    text-decoration: none;
    color: var(--text-dark);
    padding: 10px 20px;
    display: block;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu > li > a:hover {
    color: var(--academic-color);
}

.nav-menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--academic-color);
    transition: width 0.3s ease;
}

.nav-menu > li > a:hover::after {
    width: 70%;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    list-style: none;
    min-width: 200px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    padding: 10px 0;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    padding: 12px 25px;
    display: block;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

.dropdown-menu li a:hover {
    background: var(--bg-light);
    padding-left: 30px;
    color: var(--academic-color);
}

/* Switch Button */
.switch-btn {
    padding: 10px 22px;
    background: rgba(15, 76, 92, 0.12);
    color: var(--academic-color);
    border: 1px solid rgba(15, 76, 92, 0.25);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.switch-btn:hover {
    transform: translateY(-2px);
    background: rgba(15, 76, 92, 0.2);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

#datascience-portfolio .switch-btn {
    background: rgba(37, 99, 235, 0.12);
    color: var(--datascience-color);
    border-color: rgba(37, 99, 235, 0.25);
}

/* Content Area */
.content-area {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 40px;
}

.section-content {
    display: none;
    animation: slideIn 0.5s ease;
}

.section-content.active {
    display: block;
}

.hero-section {
    text-align: center;
    padding: 100px 20px;
}

.hero-section h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    background: var(--academic-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#datascience-portfolio .hero-section h1 {
    background: var(--datascience-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-section p {
    font-size: 1.5rem;
    color: #666;
}

.section-content h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: var(--academic-color);
}

.section-content p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #555;
}

.md-content p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 16px;
}

.md-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto 0;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.md-content ul,
.md-content ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

.md-content a {
    color: var(--academic-color);
    text-decoration: none;
    font-weight: 600;
}

#datascience-portfolio .md-content a {
    color: var(--datascience-color);
}

.md-content a:hover {
    text-decoration: underline;
}

/* Academic gallery */
.md-gallery {
    max-width: 1000px;
    margin: 40px auto 0;
    padding: 0 20px 40px;
}

.gallery-item {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin: 30px 0;
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.6s ease;
}

.gallery-item.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.gallery-image {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-caption {
    padding: 20px 24px;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
    background: #fff;
}

@media (max-width: 768px) {
    .md-gallery {
        padding: 0 12px 30px;
    }
}

/* Contact Section */
.contact-section {
    padding: 80px 40px;
    text-align: center;
    background: var(--bg-light);
}

.contact-section a {
    color: var(--academic-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.contact-section a:hover {
    color: var(--datascience-color);
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 1s ease;
}

.fade-in.delay-1 {
    animation-delay: 0.3s;
    opacity: 0;
    animation-fill-mode: forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
    .split-screen {
        flex-direction: column;
        height: auto;
    }
    
    .split-half h1 {
        font-size: 2rem;
    }
    
    .split-half p {
        font-size: 1rem;
    }
    
    .nav-container {
        padding: 10px 16px;
        flex-wrap: wrap;
        height: auto;
        align-items: center;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
        align-items: flex-start;
        gap: 6px;
        padding: 10px 0 16px;
        display: none;
        order: 3;
        background: rgba(255, 255, 255, 0.98);
        border-radius: 12px;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        order: 2;
    }

    .logo {
        order: 1;
    }

    .nav-switch {
        order: 4;
        width: 100%;
        display: flex;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        padding: 0 0 8px;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
    }

    .dropdown.open .dropdown-menu {
        display: block;
    }

    .dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    
    .hero-section h1 {
        font-size: 2.2rem;
    }

    .hero-section {
        padding: 70px 16px 40px;
    }

    .hero-section p {
        font-size: 1.1rem;
    }

    .content-area {
        padding: 40px 16px;
    }

    .section-content h2 {
        font-size: 2rem;
    }

    .switch-btn {
        width: 100%;
        justify-content: center;
    }

    .contact-section {
        padding: 50px 16px;
    }
}

@media (max-width: 480px) {
    .split-half {
        min-height: 60vh;
    }

    .split-half .icon {
        font-size: 3.5rem;
    }

    .explore-btn {
        width: 100%;
    }

    .gallery-item {
        margin: 20px 0;
    }
}
