/* Panda Project Page - Components */

/* Top Navigation */
.top-nav {
    position: fixed;
    top: 20px;
    left: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.top-nav.hidden {
    opacity: 0;
}

.top-nav > * {
    pointer-events: auto;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--lavender-darker);
    border-bottom-color: var(--lavender);
}

.nav-spacer {
    flex: 1;
}

.nav-sep {
    color: var(--text-muted);
    font-size: 0.7rem;
    opacity: 0.5;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-btn {
    background: none;
    border: none;
    padding: 0;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.nav-dropdown-btn:hover {
    color: var(--lavender-darker);
    border-bottom-color: var(--lavender);
}

.nav-dropdown-btn i {
    font-size: 0.7rem;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s;
}

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

.nav-dropdown-menu a {
    display: block;
    padding: 10px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.15s;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.nav-dropdown-menu a:first-child {
    border-radius: 8px 8px 0 0;
}

.nav-dropdown-menu a:last-child {
    border-radius: 0 0 8px 8px;
}

.nav-dropdown-menu a:hover {
    background: var(--lavender-light);
    color: var(--lavender-darker);
}

.theme-toggle {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.theme-toggle:hover {
    color: var(--lavender-darker);
    background: var(--lavender-light);
}

.theme-toggle i {
    transition: transform 0.3s ease;
}

.theme-toggle:hover i {
    transform: rotate(20deg);
}

/* Hero Section */
.hero {
    background: var(--bg-white);
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--text-primary);
    margin-bottom: 12px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
}

.hero h1 .highlight {
    color: var(--text-primary);
}

.hero h1 .hero-subtitle-line {
    font-size: clamp(1.4rem, 3.5vw, 2.1rem);
}

.subtitle {
    font-size: 1.0rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

/* Authors */
.authors {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 32px;
    margin-bottom: 16px;
}

.author {
    text-align: center;
}

.author-name {
    font-size: 1.0rem;
    font-weight: 600;
    color: var(--text-primary);
}

.author-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.author-name a:hover {
    color: var(--lavender-darker);
}

/* .author-name sup {
    font-size: 1.0rem;
    color: var(--lavender-darker);
    font-weight: 600;
    margin-left: 2px;
} */

.affiliations {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
    font-size: 1.0rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

/* Action Buttons */
.hero-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: #1a1a1a;
    color: white;
    border-color: #1a1a1a;
}

.btn-primary:hover {
    background: #2a2a2a;
    border-color: #2a2a2a;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: #1a1a1a;
    color: white;
    border-color: #1a1a1a;
}

.btn-secondary:hover {
    background: #2a2a2a;
    border-color: #2a2a2a;
    transform: translateY(-2px);
}

.btn i {
    font-size: 1.1rem;
}

/* Teaser Section */
.teaser {
    background: var(--bg-white);
    padding: 48px 0;
}

.teaser-image {
    max-width: 100%;
    border-radius: 42px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.teaser-caption {
    text-align: center;
    margin-top: 20px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.teaser-caption strong {
    color: var(--text-primary);
}

/* Abstract Section */
.abstract {
    background: var(--bg-white);
}

.abstract-text {
    font-size: 1.05rem;
    color: var(--text-secondary);
    text-align: justify;
    hyphens: auto;
}

.abstract-text p {
    margin-bottom: 16px;
}

.abstract-text p:last-child {
    margin-bottom: 0;
}

/* Key Results */
.key-results-simple {
    background: var(--bg-section);
}

.key-results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 24px;
}

@media (max-width: 768px) {
    .key-results-grid {
        grid-template-columns: 1fr;
    }
}

.key-result-card {
    background: var(--bg-white);
    border-radius: 10px;
    padding: 20px 24px;
    border: 1px solid var(--border-light);
}

.key-result-card h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--lavender-darker);
    margin-bottom: 12px;
    font-weight: 600;
}

.key-result-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.key-result-card strong {
    color: var(--text-primary);
    font-weight: 600;
}

.key-result-card .stat {
    color: var(--lavender-darker);
    font-weight: 700;
}

/* Method Section */
.method {
    background: var(--bg-light);
}

.method .container {
    max-width: 1000px;
}

.method-content {
    display: grid;
    grid-template-columns: 476px 1fr;
    gap: 48px;
    align-items: start;
}

.method-figure-left {
    position: sticky;
    top: 24px;
}

.method-figure-left img {
    width: 100%;
    border-radius: 12px;
    /* box-shadow: var(--shadow-md); */
}

.method-figure-left figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 12px;
}

@media (max-width: 900px) {
    .method-content {
        grid-template-columns: 1fr;
    }
    .method-figure-left {
        position: static;
        max-width: 400px;
        margin: 0 auto;
    }
}

.method-text p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.method-link {
    color: var(--lavender-darker);
    text-decoration: none;
    border-bottom: 1px solid var(--lavender);
    transition: all 0.2s ease;
}

.method-link:hover {
    color: var(--lavender-dark);
    border-bottom-color: var(--lavender-dark);
}

/* Visualization */
.visualization {
    background: var(--border-white);
}

.vis-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: center;
}

@media (max-width: 768px) {
    .vis-container {
        grid-template-columns: 1fr;
    }
}

.vis-figure {
    margin: 0;
}

.vis-image {
    width: 100%;
    border-radius: 12px;
    /* box-shadow: var(--shadow-lg); */
    border: 8px solid white;
    outline: 1px solid var(--border-white);
}

.vis-figure figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 12px;
}

.vis-text h3 {
    font-size: 1.3rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.vis-text p {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* Paper Preview */
.paper-preview {
    background: var(--bg-section);
}

.paper-figure {
    margin: 0;
}

.paper-figure img {
    width: 100%;
    border-radius: 8px;
    border: 12px solid white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* BibTeX Section */
.bibtex {
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
}

.bibtex-container {
    background: var(--bg-section);
    border-radius: 12px;
    padding: 24px;
    position: relative;
    border: 1px solid var(--border-light);
}

.bibtex-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.6;
}

.copy-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--lavender);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--lavender-dark);
}

.copy-btn.copied {
    background: #4CAF50;
    color: white;
}

/* Footer */
footer {
    background: var(--lavender-light);
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border-light);
}

footer p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

footer a {
    color: var(--lavender-darker);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
}

.footer-links a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-weight: 500;
}

