/* Artistic AI Researcher Website */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: #faf8f6;
    color: #3a2e2e;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    font-weight: 400;
}

/* Typography */
h1, h2, h3, h4, h5 {
    font-family: 'Inter', sans-serif;
    color: #3a2e2e;
    font-weight: 600;
    margin: 0;
}

h1 {
    font-size: 2.8rem;
    color: #3a2e2e;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem 0;
    position: relative;
    padding-bottom: 0.5rem;
    color: #3a2e2e;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: #D4A9A5;
    border-radius: 1px;
}

/* Header */
.header {
    background: #ffffff;
    padding: 2rem 0;
    box-shadow: 0 4px 20px rgba(176, 123, 165, 0.08);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px;
    pointer-events: none;
}

.header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(176, 123, 165, 0.03), rgba(212, 169, 165, 0.03));
    pointer-events: none;
}

.header .content {
    position: relative;
    z-index: 1;
    margin-top: 0;
}

.header-profile-picture {
    width: 180px;
    height: 180px;
    border-radius: 12px;
    background-image: url(files/me.jpeg);
    background-position: center;
    background-size: cover;
    border: 4px solid #ffffff;
    box-shadow: 
        0 20px 40px rgba(166, 117, 161, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-profile-picture:hover {
    transform: scale(1.05);
    box-shadow: 
        0 25px 50px rgba(166, 117, 161, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.9);
}

.header-text {
    margin-left: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 180px;
}

.header-subtitle {
    font-size: 1rem;
    color: #B07BA5;
    margin-bottom: 0.15rem;
    font-weight: 500;
    line-height: 1.3;
}

.header-email {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.4rem;
}

.header-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    font-size: 0.9rem;
}

.header-links a {
    color: #B07BA5;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    border: 1px solid rgba(166, 117, 161, 0.2);
    background: rgba(166, 117, 161, 0.05);
}

.header-links a:hover {
    color: #B07BA5;
    text-decoration: none;
    background: rgba(166, 117, 161, 0.15);
    border-color: rgba(166, 117, 161, 0.3);
    transform: translateY(-1px);
}

.header-links a svg {
    flex-shrink: 0;
}

/* Content Layout */
.content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
    margin-top: 2rem;
}

/* Links and Buttons */
a {
    color: #B07BA5;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 6px;
    font-weight: 500;
}

a:hover {
    color: #D4A9A5;
    text-decoration: underline;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.6rem;
    background: transparent;
    color: #D4A9A5;
    border: 2px solid #D4A9A5;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(206, 162, 172, 0.2);
    text-decoration: none;
    background: #D4A9A5;
    color: white;
}

.btn-red {
    background: transparent;
    border: 2px solid #C4956A;
    color: #C4956A;
    box-shadow: none;
}

.btn-red:hover {
    box-shadow: 0 4px 12px rgba(255, 102, 99, 0.2);
    background: #C4956A;
    color: white;
}

.btn-dark {
    background: transparent;
    border: 2px solid #9a8a85;
    color: #9a8a85;
    box-shadow: none;
}

.btn-dark:hover {
    box-shadow: 0 4px 12px rgba(130, 112, 129, 0.2);
    background: #9a8a85;
    color: white;
}

/* Compact Publication Cards */
.publication {
    background: #ffffff;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 8px rgba(166, 117, 161, 0.08);
    border: 1px solid rgba(166, 117, 161, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.publication:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(166, 117, 161, 0.15);
}

.publication.highlight {
    background: #fef3ff;
    border: 1px solid rgba(166, 117, 161, 0.2);
}

.row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.row-media {
    flex-shrink: 0;
    width: 200px;
    height: 120px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.row-media-link {
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Removed hover effect for publication figures */

.row-text {
    flex: 1;
    min-width: 0;
}

.publication-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #5a4e4e;
    line-height: 1.4;
    margin-bottom: 0.3rem;
    display: block;
}

.publication-title:hover {
    color: #B07BA5;
}

.publication-authors {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 0.3rem;
    line-height: 1.4;
}

.publication-venue {
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #B07BA5;
}

.publication-links {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Experience Section */
.row-logo {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    border-radius: 8px;
    background-color: #faf8f6;
    border: 1px solid rgba(166, 117, 161, 0.1);
}

/* News Section with Expand/Collapse */
.news-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(166, 117, 161, 0.08);
    border: 1px solid rgba(166, 117, 161, 0.08);
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
}

.news-header h2 {
    margin: 0;
    font-size: 1.3rem;
}

.news-toggle {
    background: #D4A9A5;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(206, 162, 172, 0.2);
}

.news-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(206, 162, 172, 0.3);
    background: #B07BA5;
}

.news-content {
    max-height: 140px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.news-content.expanded {
    max-height: 1000px;
}

.news-item {
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(166, 117, 161, 0.1);
    font-size: 0.9rem;
    line-height: 1.5;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item strong {
    color: #B07BA5;
    font-weight: 600;
}

/* Star Button */
.star-btn {
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #9a8a85;
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    margin-left: 0.3rem;
    transition: all 0.3s ease;
}

.star-btn:hover {
    color: #B07BA5;
}

/* Footer */
.footer {
    margin-top: 3rem;
    text-align: center;
    padding: 0 2rem;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem 2rem;
    font-size: 0.8rem;
    color: #9a8a99;
    border-top: 1px solid rgba(166, 117, 161, 0.15);
}

.footer-content a {
    color: #D4A9A5;
    text-decoration: underline;
}

.footer-content a:hover {
    color: #fbbf24;
}

/* About section styling */
.about-block {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #B07BA5;
    box-shadow: 0 2px 8px rgba(166, 117, 161, 0.08);
    margin-bottom: 1rem;
}

.about-block h2 {
    margin: 0 0 0.75rem 0;
    font-size: 1.3rem;
    padding-bottom: 0.5rem;
    position: relative;
}

.about-block h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: #D4A9A5;
    border-radius: 1px;
}

.about-block p {
    margin: 0;
    line-height: 1.6;
    color: #3a2e2e;
}

/* Experience section styling */
.experience-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(166, 117, 161, 0.1);
    font-size: 0.9rem;
    line-height: 1.5;
}

.experience-item:last-child {
    border-bottom: none;
}

.experience-logo {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    border-radius: 8px;
    background-color: #faf8f6;
    border: 1px solid rgba(166, 117, 161, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.experience-content {
    flex: 1;
    min-width: 0;
}

.experience-item strong {
    color: #B07BA5;
    font-weight: 600;
}

.experience-item a {
    color: #B07BA5;
    text-decoration: none;
    transition: all 0.3s ease;
}

.experience-item a:hover {
    color: #D4A9A5;
    text-decoration: underline;
}

.experience-detail {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 0.15rem;
}

/* Section Cards (Experience, Services, Misc) */
.section-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(166, 117, 161, 0.08);
    border: 1px solid rgba(166, 117, 161, 0.08);
}

.section-card h2 {
    margin: 0 0 1rem 0;
    font-size: 1.3rem;
    padding-bottom: 0.5rem;
    position: relative;
}

.section-card h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: #D4A9A5;
    border-radius: 1px;
}

.section-content {
    padding: 0;
}

.section-content p {
    margin: 0;
    line-height: 1.6;
    color: #3a2e2e;
}

/* Responsive Design */
@media only screen and (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .nav-content {
        padding: 0 1rem;
        gap: 1.5rem;
        justify-content: flex-start;
    }
    
    .nav-link {
        font-size: 0.85rem;
        padding: 0.8rem 0.3rem;
    }
    
    h1 {
        font-size: 2.2rem;
        margin-bottom: 0.3rem;
    }
    
    h2 {
        font-size: 1.3rem;
        margin: 1.5rem 0 0.75rem 0;
    }
    
    .header {
        padding: 1.5rem 0;
    }
    
    .header .row {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }
    
    .header-profile-picture {
        width: 120px;
        height: 120px;
        margin: 0 auto;
    }
    
    .header-text {
        margin-left: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        min-height: auto;
    }
    
    .header-subtitle {
        font-size: 0.9rem;
        margin-bottom: 0.15rem;
        line-height: 1.3;
    }
    
    .header-email {
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
    }
    
    .header-links {
        gap: 0.6rem;
        font-size: 0.85rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .header-links a {
        padding: 0.3rem 0.6rem;
        min-height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 6px;
        background-color: rgba(166, 117, 161, 0.1);
        border: 1px solid rgba(166, 117, 161, 0.2);
        transition: all 0.3s ease;
    }
    
    .header-links a:hover {
        background-color: rgba(166, 117, 161, 0.2);
        border-color: rgba(166, 117, 161, 0.3);
    }
    
    .content {
        padding: 0 1rem;
        margin-top: 1.5rem;
    }
    
    .row {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .row-media {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        margin: 0 auto;
    }

    .row-logo {
        width: 35px;
        height: 35px;
    }

    .footer {
        margin-top: 2rem;
        padding: 1rem 0;
    }

    .footer-content {
        padding: 0 1rem;
        font-size: 0.8rem;
    }
    
    .btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
        min-height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .publication-links {
        justify-content: flex-start;
        gap: 0.4rem;
        flex-wrap: wrap;
    }
    
    .publication-title {
        font-size: 0.8rem;
    }
    
    .publication-authors {
        font-size: 0.7rem;
    }
    
    .publication-venue {
        font-size: 0.7rem;
    }
    
    .section-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .section-content {
        padding: 0.5rem 0;
    }
    
    .news-content {
        max-height: 100px;
    }
}

@media only screen and (max-width: 480px) {
    body {
        font-size: 13px;
    }
    
    .nav-content {
        padding: 0 0.8rem;
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 0.8rem;
        padding: 0.7rem 0.2rem;
    }
    
    h1 {
        font-size: 1.8rem;
        margin-bottom: 0.2rem;
    }
    
    h2 {
        font-size: 1.1rem;
        margin: 1.2rem 0 0.6rem 0;
    }
    
    .header {
        padding: 1rem 0;
    }
    
    .header .row {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.8rem;
    }
    
    .header-profile-picture {
        width: 100px;
        height: 100px;
        margin: 0 auto;
    }
    
    .header-text {
        margin-left: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        min-height: auto;
    }
    
    .header-subtitle {
        font-size: 0.85rem;
        margin-bottom: 0.1rem;
        line-height: 1.2;
    }
    
    .header-email {
        font-size: 0.75rem;
        margin-bottom: 0.3rem;
    }
    
    .header-links {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.3rem;
        font-size: 0.8rem;
        justify-content: center;
    }
    
    .header-links a {
        padding: 0.25rem 0.5rem;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 6px;
        background-color: rgba(166, 117, 161, 0.1);
        border: 1px solid rgba(166, 117, 161, 0.2);
        transition: all 0.3s ease;
    }
    
    .header-links a:hover {
        background-color: rgba(166, 117, 161, 0.2);
        border-color: rgba(166, 117, 161, 0.3);
    }
    
    .content {
        padding: 0 0.8rem;
        margin-top: 1rem;
    }
    
    .row {
        flex-direction: column;
        gap: 0.6rem;
    }
    
    .row-media {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        margin: 0 auto;
    }

    .row-logo {
        width: 30px;
        height: 30px;
    }
    
    .btn {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .publication-links {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.3rem;
        justify-content: flex-start;
    }
    
    .publication-links .btn {
        justify-content: center;
        flex-shrink: 0;
    }
    
    .publication-title {
        font-size: 0.75rem;
    }
    
    .publication-authors {
        font-size: 0.65rem;
    }
    
    .publication-venue {
        font-size: 0.65rem;
    }
    
    .section-card {
        padding: 0.8rem;
        margin-bottom: 0.8rem;
    }
    
    .section-content {
        padding: 0.4rem 0;
    }
    
    .news-content {
        max-height: 80px;
    }
    
    .news-toggle {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Scroll fade-in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
}

.fade-in.visible {
    animation: fadeInUp 0.6s ease forwards;
}

/* Utility Classes */
.bold {
    font-weight: 600;
}

.italic {
    font-style: italic;
}

.noselect {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

/* Mobile-specific improvements */
@media (hover: none) and (pointer: coarse) {
    /* Touch device optimizations */
    .btn {
        min-height: 36px; /* Reduced from 44px for better mobile experience */
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .news-toggle {
        min-height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .header-links a {
        min-height: 36px;
        display: flex;
        align-items: center;
    }
}

/* Extra small screens */
@media only screen and (max-width: 360px) {
    body {
        font-size: 12px;
    }
    
    .nav-content {
        padding: 0 0.6rem;
        gap: 0.8rem;
    }
    
    .nav-link {
        font-size: 0.75rem;
        padding: 0.6rem 0.15rem;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    h2 {
        font-size: 1rem;
    }
    
    .header .row {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.6rem;
    }
    
    .header-profile-picture {
        width: 80px;
        height: 80px;
        margin: 0 auto;
    }
    
    .header-text {
        margin-left: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        min-height: auto;
    }
    
    .header-subtitle {
        font-size: 0.8rem;
        margin-bottom: 0.1rem;
        line-height: 1.2;
    }
    
    .header-email {
        font-size: 0.7rem;
        margin-bottom: 0.25rem;
    }
    
    .content {
        padding: 0 0.6rem;
    }
    
    .row-media {
        height: auto;
        aspect-ratio: 16 / 9;
    }
    
    .header-links {
        gap: 0.2rem;
        font-size: 0.75rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .header-links a {
        padding: 0.2rem 0.4rem;
        min-height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 4px;
        background-color: rgba(166, 117, 161, 0.1);
        border: 1px solid rgba(166, 117, 161, 0.2);
        transition: all 0.3s ease;
        font-size: 0.7rem;
    }
    
    .header-links a:hover {
        background-color: rgba(166, 117, 161, 0.2);
        border-color: rgba(166, 117, 161, 0.3);
    }
    
    .btn {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
        min-height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .publication-title {
        font-size: 0.7rem;
    }
    
    .publication-authors {
        font-size: 0.6rem;
    }
    
    .publication-venue {
        font-size: 0.6rem;
    }
}

/* Landscape orientation on mobile */
@media only screen and (max-height: 500px) and (orientation: landscape) {
    .header {
        padding: 0.8rem 0;
    }
    
    .header-profile-picture {
        width: 80px;
        height: 80px;
    }
    
    .content {
        margin-top: 0.8rem;
    }
    
    .news-content {
        max-height: 60px;
    }
}

/* Navigation */
.navigation {
    background: #faf8f6;
    border-bottom: 1px solid rgba(166, 117, 161, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(166, 117, 161, 0.03);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    position: relative;
}

.nav-indicator {
    position: absolute;
    bottom: 0;
    height: 2px;
    background: #B07BA5;
    border-radius: 1px;
    transition: left 0.3s ease, width 0.3s ease;
}

.nav-content::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.nav-link {
    color: #9a8a85;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 1rem 0.5rem;
    transition: color 0.3s ease;
    white-space: nowrap;
    position: relative;
}

.nav-link:hover {
    color: #B07BA5;
    text-decoration: none;
}

.nav-link:active {
    color: #D4A9A5;
}

.nav-link.active {
    color: #B07BA5;
    text-decoration: none;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    pointer-events: none;
    transition: background 0.3s ease;
}

.lightbox.active {
    background: rgba(0, 0, 0, 0.8);
    pointer-events: auto;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    background: #ffffff;
    transform: scale(0.8);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.lightbox.active img {
    transform: scale(1);
    opacity: 1;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #B07BA5;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(166, 117, 161, 0.3);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
    pointer-events: none;
    z-index: 99;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    background: #8a5b87;
    transform: translateY(-2px);
}

/* Section dividers */
.section-divider {
    width: 100%;
    max-width: 1000px;
    margin: 0.5rem auto;
    height: 30px;
    overflow: hidden;
    line-height: 0;
    padding: 0 2rem;
    opacity: 0.4;
}

.section-divider svg {
    width: 100%;
    height: 100%;
    display: block;
}

.section-divider svg path {
    fill: #D4A9A5;
}

/* Dark mode toggle */
.dark-mode-toggle {
    background: transparent;
    border: 1px solid rgba(166, 117, 161, 0.2);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    color: #9a8a85;
    flex-shrink: 0;
    margin-left: 0.5rem;
    align-self: center;
}

.dark-mode-toggle:hover {
    background: rgba(166, 117, 161, 0.1);
    border-color: #B07BA5;
    color: #B07BA5;
}

/* Dark mode styles */
body.dark-mode {
    background: #1a1a2e;
    color: #e0e0e0;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5 {
    color: #f0e6f0;
}

body.dark-mode .header {
    background: #1e1e32;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body.dark-mode .header::before {
    opacity: 0.06;
}

body.dark-mode .header::after {
    background: linear-gradient(135deg, rgba(176, 123, 165, 0.05), rgba(212, 169, 165, 0.05));
}

body.dark-mode .navigation {
    background: #1a1a2e;
    border-bottom-color: rgba(166, 117, 161, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark-mode .nav-link {
    color: #9a8a99;
}

body.dark-mode .nav-link:hover,
body.dark-mode .nav-link.active {
    color: #D4A9A5;
}

body.dark-mode .publication,
body.dark-mode .news-section,
body.dark-mode .section-card,
body.dark-mode .about-block {
    background: #242440;
    border-color: rgba(166, 117, 161, 0.12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark-mode .publication:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

body.dark-mode .about-block {
    border-left-color: #B07BA5;
}

body.dark-mode .publication-title {
    color: #d0c8cf;
}

body.dark-mode .publication-title:hover {
    color: #D4A9A5;
}

body.dark-mode .publication-authors,
body.dark-mode .header-email {
    color: #9a8a99;
}

body.dark-mode .about-block p,
body.dark-mode .section-content p {
    color: #d0c8cf;
}

body.dark-mode .experience-logo {
    background-color: #2a2a48;
    border-color: rgba(166, 117, 161, 0.15);
}

body.dark-mode .experience-detail {
    color: #7a6a79;
}

body.dark-mode .experience-item {
    border-bottom-color: rgba(166, 117, 161, 0.12);
}

body.dark-mode .news-item {
    border-bottom-color: rgba(166, 117, 161, 0.12);
}

body.dark-mode .header-profile-picture {
    border-color: #242440;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

body.dark-mode .footer-content {
    color: #7a6a79;
    border-top-color: rgba(166, 117, 161, 0.12);
}

body.dark-mode .btn-dark {
    border-color: #9a8a99;
    color: #9a8a99;
}

body.dark-mode .btn-dark:hover {
    background: #9a8a99;
    color: #1a1a2e;
}

body.dark-mode .dark-mode-toggle {
    color: #D4A9A5;
    border-color: rgba(206, 162, 172, 0.3);
}

body.dark-mode .section-divider svg path {
    fill: #9a6a98;
}

body.dark-mode .row-media {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .back-to-top {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* GitHub star badge */
.github-stars {
    font-size: inherit;
    color: inherit;
    margin-left: 0.2rem;
}

/* Smooth scrolling for the whole page */
html {
    scroll-behavior: smooth;
}