/* Root Variables */
:root {
    --primary-color: #0066cc;
    --secondary-color: #f0f0f0;
    --text-color: #333;
    --light-text: #666;
    --border-color: #e0e0e0;
    --white: #ffffff;
    --dark: #1a1a1a;
    --transition: all 0.3s ease;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--white);
    line-height: 1.6;
}

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

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.logo:hover {
    color: var(--dark);
}

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

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

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

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    border-radius: 3px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: var(--white);
    padding: 100px 20px;
    text-align: center;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
    animation: gradientShift 15s ease infinite;
    pointer-events: none;
}

@keyframes gradientShift {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    animation: fadeInUp 1s ease-out;
}

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

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.95;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.8;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 40px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--white);
    color: #0f3460;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: #f5f5f5;
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: var(--white);
    color: #0f3460;
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
}

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

.social-links a {
    color: var(--white);
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-links a:hover {
    transform: translateY(-5px);
    opacity: 0.8;
}

/* Section Styles */
section {
    padding: 100px 20px;
}

.section-title {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--dark);
    position: relative;
    padding-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 5px;
    background: var(--primary-color);
    border-radius: 3px;
}

/* About Section */
.about {
    background: linear-gradient(to bottom, var(--secondary-color), #ffffff);
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.05;
    z-index: 0;
}

/* Publications Section */
.publications {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    overflow: hidden;
}

.publications::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    50% {
        transform: translateY(20px) translateX(20px);
    }
}

.publications-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    position: relative;
    z-index: 1;
}

.publication-item {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    border-left: 5px solid var(--primary-color);
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.publication-item:hover {
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px) translateX(3px);
}

.publication-item h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--dark);
    font-weight: 600;
}

.pub-authors {
    color: var(--light-text);
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.pub-journal {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
    font-weight: 600;
}

.pub-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
    transition: var(--transition);
    padding: 5px 0;
    border-bottom: 2px solid transparent;
}

.pub-link:hover {
    transform: translateX(3px);
    border-bottom-color: var(--primary-color);
}

/* Teaching Section */
.teaching {
    background: linear-gradient(to bottom, var(--secondary-color) 0%, #e8f4f8 100%);
    position: relative;
    overflow: hidden;
}

.teaching::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(118, 75, 162, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.opportunities-cards {
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.opportunities-cards h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

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

.opp-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.opp-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 12px 30px rgba(0, 102, 204, 0.2);
    transform: translateY(-8px);
}

.opp-card h4 {
    color: var(--dark);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.opp-card p {
    color: var(--light-text);
    line-height: 1.6;
    font-size: 0.95rem;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--light-text);
    margin-bottom: 1.5rem;
    line-height: 1.9;
}

.skills h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.skill-tag {
    background: var(--white);
    padding: 12px 18px;
    border-radius: 25px;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    font-size: 0.95rem;
}

.skill-tag:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 102, 204, 0.25);
}

/* Projects Section */
.projects {
    background: linear-gradient(to bottom, #ffffff, #f8f9fa);
    position: relative;
}

.projects::before {
    content: '';
    position: absolute;
    top: 100px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    position: relative;
    z-index: 1;
}

.project-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    max-width: 1060px;
    margin: 0 auto;
}

.project-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.project-image {
    margin-bottom: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.project-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.25s ease, filter 0.25s ease;
    display: block;
}

.project-card:hover .project-image img {
    transform: scale(1.03);
    filter: drop-shadow(0 8px 18px rgba(0,0,0,0.12));
}

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

.project-title {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--dark);
    font-weight: 700;
}

.project-description {
    color: var(--light-text);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.05) 100%);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
    font-weight: 600;
    transition: var(--transition);
}

.tech-tag:hover {
    background: var(--primary-color);
    color: var(--white);
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    display: inline-block;
    margin-top: auto;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
}

.project-link:hover {
    transform: translateX(5px);
    border-bottom-color: var(--primary-color);
}

/* Contact Section */
.contact {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 30%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(118, 75, 162, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.contact .section-title {
    color: var(--white);
    position: relative;
    z-index: 1;
}

.contact .section-title::after {
    background: var(--white);
}

.contact-subtitle {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    opacity: 0.95;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    position: relative;
    z-index: 1;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.contact-item i {
    font-size: 1.8rem;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.8);
}

.contact-item h4 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.contact-item p {
    opacity: 0.95;
    margin: 0;
}

.contact-item a {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}

.contact-item a:hover {
    color: rgba(255, 255, 255, 0.8);
    border-bottom-color: var(--primary-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 1);
}

.contact-form .btn {
    margin-top: 1rem;
}

/* Footer */
.footer {
    background: linear-gradient(to right, #0f0f1e, #1a1a2e);
    color: var(--white);
    padding: 3rem 20px;
    text-align: center;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-social {
    display: flex;
    gap: 1.5rem;
}

.footer-social a {
    color: var(--white);
    font-size: 1.3rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.footer-social a:hover {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        right: 20px;
        flex-direction: column;
        gap: 1rem;
        background: var(--white);
        padding: 1.5rem 2rem;
        border-radius: 10px;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
        z-index: 99;
    }

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

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

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

    .contact-content {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2rem;
    }

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

    .footer .container {
        flex-direction: column;
    }

    .nav-link::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

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

    .social-links {
        gap: 1rem;
    }

    .social-links a {
        font-size: 1.3rem;
    }
}
