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

:root {
    /* Green and Cool Light Color Palette */
    --primary-green: #7FB069;        /* Soft sage green */
    --secondary-green: #A4C3A2;      /* Light mint green */
    --accent-green: #52796F;         /* Muted forest green */
    --cool-mint: #E8F5E8;           /* Very light mint */
    --ice-blue: #F0F8FF;           /* Alice blue */
    --soft-gray: #F5F7FA;          /* Cool light gray */
    --cream-white: #FEFEF9;         /* Off-white */
    --warm-gray: #6B705C;           /* Muted gray-green */
    --light-sage: #B7C4A4;         /* Very light sage */
    --deep-green: #3D5A3A;         /* Deep forest for text */
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--deep-green);
    overflow-x: hidden;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(254, 254, 249, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(127, 176, 105, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--deep-green);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-logo a:hover {
    color: var(--primary-green);
}

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

.nav-link {
    color: var(--warm-gray);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
    position: relative;
}

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

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

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

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

.bar {
    width: 25px;
    height: 3px;
    background: var(--warm-gray);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--light-sage) 0%, var(--secondary-green) 50%, var(--primary-green) 100%);
    color: var(--cream-white);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(61, 90, 58, 0.2);
    z-index: 1;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.hero-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-text h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

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

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--primary-green);
    color: var(--cream-white);
    border-color: var(--primary-green);
}

.btn-primary:hover {
    background: transparent;
    border-color: var(--primary-green);
    color: var(--primary-green);
}

.btn-secondary {
    background: transparent;
    color: var(--cream-white);
    border-color: var(--cream-white);
}

.btn-secondary:hover {
    background: var(--cream-white);
    color: var(--deep-green);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(254, 254, 249, 0.15);
    color: var(--cream-white);
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-green);
    transform: translateY(-2px);
}

.hero-image {
    text-align: center;
}

.profile-img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(254, 254, 249, 0.4);
    box-shadow: 0 10px 30px rgba(61, 90, 58, 0.3);
}

/* Section Styles */
section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--deep-green);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-green);
}

/* About Section */
.about {
    background: var(--cool-mint);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

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

.research-interests,
.education {
    margin-top: 3rem;
}

.research-interests h3,
.education h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--deep-green);
}

.research-interests ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.5rem;
}

.research-interests li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.research-interests li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-green);
    font-weight: bold;
}

.edu-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--cream-white);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(127, 176, 105, 0.1);
    border-left: 4px solid var(--secondary-green);
}

.edu-item h4 {
    font-size: 1.2rem;
    color: var(--deep-green);
    margin-bottom: 0.5rem;
}

.edu-item p {
    color: var(--warm-gray);
    margin-bottom: 0.3rem;
}

/* Publications Section */
.publications {
    background: var(--cream-white);
}

.publications-intro {
    text-align: center;
    font-size: 1.1rem;
    color: var(--warm-gray);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.publication-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid var(--primary-green);
    background: transparent;
    color: var(--primary-green);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-green);
    color: var(--cream-white);
}

.publications-list {
    display: grid;
    gap: 2rem;
}

.publication-item {
    background: var(--cream-white);
    border-radius: 12px;
    padding: 1rem;
    border-left: 6px solid var(--primary-green);
    transition: all 0.3s ease;
}

.publication-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(127, 176, 105, 0.15);
}

.publication-item h3 {
    font-size: 1.3rem;
    color: var(--deep-green);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.pub-authors {
    font-weight: 500;
    color: var(--warm-gray);
    margin-bottom: 1rem;
}

.pub-authors em {
    color: var(--accent-green);
    font-weight: 600;
    font-style: italic;
}

.pub-venue {
    display: none; /* Hide separate venue line */
}

.pub-abstract {
    color: var(--warm-gray);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.pub-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.pub-link {
    color: var(--primary-green);
    text-decoration: underline;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    background: none;
    padding: 0;
    border-radius: 0;
}

.pub-link:hover {
    color: var(--accent-green);
    transform: none;
}

/* CV Section */
.cv-section {
    background: var(--soft-gray);
}

.cv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.cv-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--cream-white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(127, 176, 105, 0.1);
}

.cv-personal-info {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--light-sage);
}

.cv-personal-info h3 {
    font-size: 2rem;
    color: var(--deep-green);
    margin-bottom: 0.5rem;
}

.cv-section-item {
    margin-bottom: 3rem;
}

.cv-section-item h3 {
    font-size: 1.5rem;
    color: var(--deep-green);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-green);
}

.cv-item {
    margin-bottom: 2rem;
    padding-left: 1rem;
    border-left: 3px solid var(--light-sage);
}

.cv-item h4 {
    font-size: 1.2rem;
    color: var(--deep-green);
    margin-bottom: 0.5rem;
}

.cv-item p {
    color: var(--warm-gray);
    margin-bottom: 0.3rem;
}

.cv-item ul {
    margin-top: 0.5rem;
    padding-left: 1.5rem;
}

.cv-item li {
    color: var(--warm-gray);
    margin-bottom: 0.3rem;
}

/* PDF Viewer Styles */
.cv-pdf-container {
    background: var(--cream-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(127, 176, 105, 0.1);
    border: 1px solid var(--light-sage);
}

.pdf-viewer-wrapper {
    position: relative;
    width: 100%;
    min-height: 800px;
    background: var(--cream-white);
}

.cv-pdf-viewer {
    width: 100%;
    height: 800px;
    border: none;
    background: white;
    display: block;
}

.pdf-fallback {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--cream-white);
    z-index: 10;
}

.pdf-fallback-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 2rem;
}

.pdf-fallback-content i {
    font-size: 4rem;
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.pdf-fallback-content h3 {
    color: var(--deep-green);
    margin-bottom: 1rem;
}

.pdf-fallback-content p {
    color: var(--warm-gray);
    margin-bottom: 2rem;
    max-width: 400px;
}

/* Contact Section */
.contact {
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--primary-green) 50%, var(--secondary-green) 100%);
    color: var(--cream-white);
}

.contact .section-title {
    color: var(--cream-white);
}

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

.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-content p {
    font-size: 1.1rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

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

.contact-item {
    text-align: center;
    padding: 2rem;
    background: rgba(254, 254, 249, 0.15);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(254, 254, 249, 0.2);
}

.contact-item i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--cream-white);
}

.contact-item h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.contact-item p {
    opacity: 0.9;
    line-height: 1.5;
}

/* Footer */
.footer {
    background: var(--deep-green);
    color: var(--cream-white);
    text-align: center;
    padding: 2rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--cream-white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(127, 176, 105, 0.1);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

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

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

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

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .profile-img {
        width: 250px;
        height: 250px;
    }

    .publication-filters {
        justify-content: center;
    }

    .cv-header {
        text-align: center;
        flex-direction: column;
    }

    .cv-content {
        padding: 2rem;
    }

    .cv-pdf-viewer {
        height: 600px;
    }

    .pdf-viewer-wrapper {
        min-height: 600px;
    }

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

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-text h2 {
        font-size: 1.2rem;
    }

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

    .cv-content {
        padding: 1.5rem;
    }

    .cv-pdf-viewer {
        height: 500px;
    }

    .pdf-viewer-wrapper {
        min-height: 500px;
    }

    .profile-img {
        width: 200px;
        height: 200px;
    }
}

/* Print styles for CV */
@media print {
    .navbar,
    .hero,
    .about,
    .publications,
    .contact,
    .footer,
    .cv-header .btn {
        display: none !important;
    }

    .cv-section {
        background: white !important;
        padding: 0 !important;
    }

    .cv-content {
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        max-width: none !important;
    }

    body {
        font-size: 12px;
        line-height: 1.4;
    }

    .cv-personal-info h3 {
        font-size: 1.5rem;
    }

    .cv-section-item h3 {
        font-size: 1.2rem;
    }

    .cv-item h4 {
        font-size: 1rem;
    }
}

/* Animation classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

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

/* Hidden class for publication filtering */
.publication-item.hidden {
    display: none;
}

/* Scroll to top button green theme styling */
.scroll-to-top {
    background: var(--primary-green) !important;
}

.scroll-to-top:hover {
    background: var(--accent-green) !important;
}

/* QR Code Modal Styles */
.qr-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.qr-modal-content {
    background-color: var(--cream-white);
    margin: 10% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--primary-green);
}

.qr-close {
    color: var(--warm-gray);
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 10px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.qr-close:hover {
    color: var(--accent-green);
}

.qr-modal-content h3 {
    color: var(--deep-green);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

#qr-code-container {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

#linkedin-qr {
    border: 2px solid var(--light-sage);
    border-radius: 8px;
    padding: 10px;
    background: white;
}

.qr-modal-content p {
    color: var(--warm-gray);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.qr-modal-buttons {
    margin-top: 1rem;
}

.qr-modal-buttons .btn {
    font-size: 0.9rem;
    padding: 10px 20px;
}
