:root {
    /* Light Theme Variants */
    --bg-color: #ffffff;
    --text-color: #2c3e50;
    --text-muted: #546e7a;
    --primary-color: #0277bd; /* Academic blue */
    --secondary-bg: #f5f7fa;
    --border-color: #e0e0e0;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
    /* Dark Theme Variants */
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --text-muted: #a0a0a0;
    --primary-color: #64b5f6; /* Lighter blue for dark mode */
    --secondary-bg: #1e1e1e;
    --border-color: #333333;
    --nav-bg: rgba(18, 18, 18, 0.95);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    text-decoration: underline;
}

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

/* Typography */
h1, h2, h3, h4 {
    color: var(--text-color);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
    font-weight: 500;
}

/* Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--nav-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

nav {
    width: 100%;
    margin: 0 auto;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 22px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
    font-size: 18px;
    margin-left: 22px;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.2s;
}

#theme-toggle:hover {
    background-color: var(--secondary-bg);
}

#mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

#mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

/* Main Content Styles */
main {
    padding-top: 80px; /* Account for fixed header */
}

/* Background Theming */
.bg-secondary {
    background-color: var(--secondary-bg);
}

.section {
    padding: 5rem 0;
}

/* Scroll Fade-In Animation */
.section-fade {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, transform;
}

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

/* Hero Section */
.hero {
    position: relative;
    overflow: hidden;
    padding: 6rem 20px;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    display: flex;
    gap: 4rem;
    align-items: center;
}

.scene-nebula {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.5s ease;
    /* Deep space base */
    background-color: var(--secondary-bg);
    /* Layered radial gradients for nebula effect */
    background-image: 
        radial-gradient(ellipse at 80% 20%, rgba(150, 150, 150, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 80%, rgba(150, 150, 150, 0.12) 0%, transparent 60%),
        radial-gradient(circle at 50% 50%, rgba(150, 150, 150, 0.1) 0%, transparent 70%);
}

/* Subtle glowing dust/stars using box-shadows */
.scene-nebula::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background: transparent;
    border-radius: 50%;
    box-shadow: 
        15vw 20vh 1px 1px rgba(255,255,255,0.8),
        85vw 15vh 1px 0px rgba(230,240,255,0.7),
        70vw 80vh 2px 1px rgba(255,220,220,0.6),
        30vw 60vh 1px 0px rgba(200,220,255,0.9),
        50vw 30vh 1px 1px rgba(255,255,255,0.5),
        10vw 85vh 2px 0px rgba(220,230,255,0.4),
        90vw 5vh 1px 1px rgba(255,255,255,0.7),
        40vw 90vh 1px 0px rgba(255,240,220,0.6);
}

html[data-theme="light"] .scene-nebula {
    opacity: 0.3;
    /* In light mode, replace with a clean, subtle gradient */
    background-image: 
        radial-gradient(ellipse at 80% 20%, rgba(200, 210, 240, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 80%, rgba(220, 200, 230, 0.4) 0%, transparent 60%);
}

html[data-theme="light"] .scene-nebula::after {
    display: none;
}

.profile-image-placeholder {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background-color: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    flex-shrink: 0;
    overflow: hidden;
    border: 4px solid var(--bg-color);
    box-shadow: var(--shadow);
}

.hero-text h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
}

.hero-text h2 {
    font-size: 1.4rem;
    color: var(--text-muted);
    border: none;
    padding: 0;
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.institution {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.bio {
    font-size: 1.1rem;
    line-height: 1.7;
}

.hero-tagline {
    font-size: 1rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 1rem;
    margin-top: 1.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Social Icons */
.social-icon {
    width: 26px;
    height: 26px;
    object-fit: contain;
    margin: 8px;
    transition: transform 0.2s ease;
}

.social-icon:hover {
    transform: scale(1.2);
}

/* Ensure SVGs do not expand */
.social-icon svg {
    width: 100%;
    height: 100%;
}

/* Dark mode icon fix */
[data-theme="dark"] .social-icon[alt="GitHub"],
[data-theme="dark"] .social-icon[alt="X"] {
    filter: invert(1);
}

@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .social-icon[alt="GitHub"],
    html:not([data-theme="light"]) .social-icon[alt="X"] {
        filter: invert(1);
    }
}

/* Research & Outreach Cards */
.research-grid, .outreach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.research-card, .outreach-card {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.research-card:hover, .outreach-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* Software Card Retrofit */
.software-card {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}
.software-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}
.software-header {
    display: flex;
    align-items: flex-start;
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--secondary-bg);
}
.software-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    min-width: 60px;
    margin-right: 1.5rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.15), rgba(124, 58, 237, 0.15)); /* Indigo/Purple tint */
    color: #6366f1;
}
.software-title-area {
    text-align: left;
}
.software-title-area h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}
.software-title-area p {
    color: var(--text-color);
    margin-top: 0;
    margin-bottom: 1rem;
    line-height: 1.5;
}
.software-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.calc-tag {
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}
.software-body {
    padding: 2rem;
    text-align: left;
}
.software-body-heading {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 1.25rem;
}
.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}
.calc-tile {
    display: flex;
    align-items: center;
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-color);
}
.calc-icon {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

/* Projects Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}
@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
    }
}
.project-card {
    display: flex;
    align-items: flex-start;
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.project-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}
.project-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    margin-right: 1.25rem;
    border-radius: 10px;
}
.project-icon.emerald-tint {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
}
.project-info {
    display: flex;
    flex-direction: column;
}
.project-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
}
.project-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Publications */
.pub-card {
    display: flex;
    align-items: center;
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    margin-bottom: 1.5rem;
}
.pub-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}
.pub-icon-wrapper {
    font-size: 2.2rem;
    margin-right: 1.5rem;
    padding: 1rem;
    background-color: rgba(255, 193, 7, 0.15); /* Amber tint */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pub-content {
    display: flex;
    flex-direction: column;
}
.pub-title {
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 0.4rem;
    font-family: Georgia, serif;
}
.pub-authors {
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}
.pub-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.pub-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}
.badge-warning {
    background-color: rgba(255, 193, 7, 0.15);
    color: #e6a700;
}
.badge-neutral {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* CV */
.cv-section {
    margin-top: 2rem;
    margin-bottom: 3rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
    margin-top: 1.5rem;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--border-color);
}
.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}
.timeline-item::last-child {
    margin-bottom: 0;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.35rem; /* Center over the line */
    top: 0.2rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 3px solid var(--bg-color);
}
.timeline-date {
    font-family: monospace;
    color: var(--primary-color);
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
}
.timeline-content h4 {
    font-size: 1.15rem;
    margin-bottom: 0.3rem;
}
.timeline-content p {
    margin: 0.2rem 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}
.timeline-content .cv-advisor {
    font-size: 0.85rem;
    font-style: italic;
    margin-top: 0.4rem;
}

/* Research Tiles */
.research-tiles {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.research-tile {
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.research-tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}
.research-tile h4 {
    font-size: 1.15rem;
    margin-bottom: 0.4rem;
}
.research-inst {
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 1rem !important;
}
.research-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Technical Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.skill-tile {
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.skill-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.skill-name {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
}
.skill-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Interests Grid */
.interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.interest-tile {
    display: flex;
    align-items: center;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.2rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.interest-tile:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
}
.interest-emoji {
    font-size: 2rem;
    margin-right: 1.2rem;
}
.interest-info {
    display: flex;
    flex-direction: column;
}
.interest-title {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}
.interest-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}
.interest-title a:hover {
    color: var(--primary-color);
}
.interest-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.interest-tile.flex-stretch {
    grid-column: 1 / -1;
}

/* Contact Section Refresh */
.contact-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 900px;
    margin: 3rem auto 0 auto;
}

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

.contact-detail-card {
    display: flex;
    align-items: center;
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.contact-detail-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.clickable-card {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.contact-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-right: 1.5rem;
    border-radius: 12px;
}
.contact-icon-wrapper.blue-tint {
    background-color: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}
.contact-icon-wrapper.green-tint {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.contact-icon {
    font-size: 1.8rem;
    margin-right: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-text {
    display: flex;
    flex-direction: column;
}

.contact-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.contact-value {
    font-weight: 500;
    font-size: 1.05rem;
    color: var(--text-color);
    line-height: 1.4;
}

.contact-value a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-value a:hover {
    color: var(--primary-color);
}

.contact-social-column {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Footer */
footer {
    background-color: var(--secondary-bg);
    padding: 2.5rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--nav-bg);
        flex-direction: column;
        padding: 1.5rem 0;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    #mobile-menu-toggle {
        display: flex;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 2.5rem;
    }
    
    .hero {
        padding: 4rem 20px;
    }
    
    .cv-entry {
        flex-direction: column;
        margin-bottom: 12px;
    }
    
    .cv-date {
        margin-bottom: 4px;
        flex: auto;
    }
    
    .cv-section {
        padding: 20px 0;
        margin-top: 1rem;
        column-gap: 2rem;
    }

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

    .section {
        padding: 3rem 0;
    }
}

/* Gallery Section */
.gallery-section {
    background-color: #0b0f19; /* Dark astronomy theme */
    padding: 6rem 0 7rem 0;
    position: relative;
    border-top: 1px solid #1a2333;
}

.gallery-section h2 {
    color: #e0e0e0;
    text-align: center;
    border-bottom: none;
    margin-bottom: 2.5rem;
    font-size: 2rem;
    font-weight: 500;
}

.gallery-wrapper {
    position: relative;
    width: 100%;
}

.gallery-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 15px 0;
}

.gallery-container::before,
.gallery-container::after {
    content: "";
    position: absolute;
    top: 0;
    width: 15vw;
    max-width: 150px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.gallery-container::before {
    left: 0;
    background: linear-gradient(to right, #0b0f19 0%, transparent 100%);
}

.gallery-container::after {
    right: 0;
    background: linear-gradient(to left, #0b0f19 0%, transparent 100%);
}

.gallery-track {
    display: flex;
    gap: 20px;
    padding-right: 20px;
    width: max-content;
    will-change: transform;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 48px;
    height: 64px;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.gallery-nav:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.05);
}

.gallery-nav.prev {
    left: 0;
    border-radius: 0 6px 6px 0;
}

.gallery-nav.next {
    right: 0;
    border-radius: 6px 0 0 6px;
}

.gallery-img {
    height: 220px;
    width: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    object-fit: cover;
}

.gallery-img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(0,0,0,0.6);
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Dark semi-transparent black overlay */
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.lightbox.active .lightbox-content {
    transform: scale(1); /* Smooth intro scale */
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #fff;
    font-size: 44px;
    font-weight: 300;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s ease, transform 0.3s ease;
    line-height: 1;
}

.lightbox-close:hover {
    color: #ddd;
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: none;
    width: 60px;
    height: 100px;
    font-size: 60px;
    font-weight: 300;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.lightbox-nav:hover {
    color: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
    left: 20px;
}

.lightbox-nav.next {
    right: 20px;
}
