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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 20px;
    line-height: 1.7;
    color: #2c3e50;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    min-height: 100vh;
}

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

/* Navigation */
nav.section-tabs {
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    overflow-x: auto;
}

.section-tab-btn {
    padding: 8px 14px;
    background: #ecf0f1;
    border: 1px solid #dfe6e9;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.section-tab-btn:hover {
    background: #dfe6e9;
}

.section-tab-btn.active {
    background: #3498db;
    color: white;
    border-color: #2980b9;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 40px;
    border-radius: 8px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.15);
    display: flex;
    align-items: center;
    gap: 30px;
}

.header-content {
    flex: 1;
}

.header-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid white;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.header h1 {
    font-size: 2.8em;
    margin-bottom: 10px;
    font-weight: 700;
}

.header p {
    font-size: 1.05em;
    opacity: 0.95;
    margin: 5px 0;
}

.header a {
    color: #ecf0f1;
    text-decoration: none;
    border-bottom: 2px solid #3498db;
    transition: all 0.3s ease;
}

.header a:hover {
    color: #3498db;
    border-bottom-color: #ecf0f1;
}

.lang-btn {
    padding: 6px 12px;
    background: #ecf0f1;
    border: 1px solid #dfe6e9;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.85em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.flag-icon {
    width: 14px;
    height: auto;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.lang-btn.active .flag-icon {
    opacity: 0.75;
}

.lang-btn:hover {
    background: #dfe6e9;
}

.lang-btn.active {
    background: #3498db;
    color: white;
    border-color: #2980b9;
}

body.dark-theme .lang-btn {
    background: #1f2633;
    border-color: #2a3140;
    color: #e6e6e6;
}

body.dark-theme .lang-btn:hover {
    background: #2a3140;
}

body.dark-theme .lang-btn.active {
    background: #2c6fb3;
    border-color: #3b82c4;
    color: #ffffff;
}

h2 {
    font-size: 1.8em;
    color: #2c3e50;
    margin: 40px 0 25px 0;
    padding-bottom: 12px;
    border-bottom: 3px solid #3498db;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

h2:hover {
    color: #3498db;
}

.toggle-icon {
    display: inline-block;
    transition: transform 0.3s ease;
    font-size: 0.8em;
}

.toggle-icon.collapsed {
    transform: rotate(-90deg);
}

.section-content {
    max-height: 3000px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.section-content.collapsed {
    max-height: 0;
    opacity: 0;
}

h3 {
    font-size: 1.3em;
    color: #2c3e50;
    margin: 20px 0 15px 0;
    font-weight: 600;
}

.summary-list {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 30px;
}

.summary-list li {
    margin-bottom: 12px;
    padding-left: 0;
}

.summary-list li strong {
    color: #3498db;
    font-weight: 600;
}

ul {
    list-style-type: none;
    padding-left: 0;
}

li {
    margin-bottom: 16px;
    padding-left: 0;
}

.nested-list {
    margin-top: 10px;
    padding-left: 24px;
    border-left: 2px solid #ecf0f1;
    padding-left: 20px;
}

.nested-list li {
    margin-bottom: 8px;
    font-size: 0.95em;
}

.award {
    background: #f0f8ff;
    border-left: 4px solid #3498db;
    padding: 12px 16px;
    margin: 8px 0 8px 0;
    border-radius: 4px;
    font-size: 0.95em;
}

.award-photo {
    width: 120px;
    height: auto;
    margin-top: 12px;
    margin-bottom: 8px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: block;
}

.award-caption {
    font-size: 0.85em;
    color: #7f8c8d;
    margin-top: 6px;
    font-style: italic;
}

a {
    color: #3498db;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

a:hover {
    color: #2980b9;
    border-bottom-color: #3498db;
}

a.loco-corp-learn:empty {
    display: none;
}

a.loco-corp-learn {
    margin-left: 6px;
}

.award a {
    display: inline;
    padding: 0;
    background: none;
    color: #3498db;
    border-radius: 0;
    margin-top: 0;
    border-bottom: 1px solid #3498db;
    font-weight: 600;
}

.award a:hover {
    color: #2980b9;
    border-bottom-color: #2980b9;
}

.header-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #ecf0f1;
    border-radius: 4px;
    text-decoration: none;
    color: #3498db;
    font-weight: 500;
    border-bottom: none;
    transition: all 0.3s ease;
}

.header-btn:hover {
    background: #3498db;
    color: #ffffff;
}

/* Language Switcher */
.lang-btn {
    padding: 6px 12px;
    background: #ecf0f1;
    border: 1px solid #dfe6e9;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: #dfe6e9;
}

.lang-btn.active {
    background: #3498db;
    color: white;
    border-color: #2980b9;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

body.dark-theme .lang-btn {
    background: #1f2633;
    border-color: #2a3140;
    color: #e6e6e6;
}

body.dark-theme .lang-btn:hover {
    background: #2a3140;
}

body.dark-theme .lang-btn.active {
    background: #2c6fb3;
    border-color: #3b82c4;
    color: #ffffff;
}
    font-style: italic;
    color: #7f8c8d;
    font-size: 0.9em;
    margin-top: 5px;
}

.pub-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    align-items: center;
}

.icon-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #2c3e50;
    color: #ffffff !important;
    border-radius: 20px;
    font-size: 0.88em;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    border-bottom: none !important;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.icon-link:hover {
    background: #3498db;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.35);
}

.icon-link:hover a {
    color: white;
    border-bottom-color: transparent;
}

.icon-link.page-link {
    background: #3498db;
}

.icon-link.page-link:hover {
    background: #2980b9;
    box-shadow: 0 4px 12px rgba(41, 128, 185, 0.4);
}

.icon-link svg.link-icon {
    width: 14px;
    height: 14px;
    fill: currentColor;
    flex-shrink: 0;
    vertical-align: middle;
}

.github-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    vertical-align: middle;
    filter: brightness(0) invert(1);
    object-fit: contain;
}

.video-container {
    margin-top: 15px;
    margin-bottom: 20px;
}

.video-container iframe {
    width: 100%;
    max-width: 560px;
    height: 315px;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.news-highlight {
    background: #f0f6ff;
    border-left: 4px solid #3498db;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 10px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.news-highlight .news-text {
    flex: 1;
}

.news-highlight .news-meta {
    font-size: 0.9em;
    color: #7f8c8d;
    margin-top: 6px;
}

.research-intro {
    background: #f8f9fa;
    border-left: 4px solid #27ae60;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.research-intro p {
    margin-bottom: 8px;
}

.demo-intro {
    background: #151c28;
    border-left: 4px solid #2c6fb3;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 16px 0 12px 0;
}

.demo-intro h3 {
    margin: 0 0 6px 0;
}

.demo-intro p {
    margin: 0;
    color: #a7b3c2;
    font-size: 0.95em;
}

strong {
    color: #2c3e50;
    font-weight: 600;
}

.publication-item {
    background: white;
    padding: 18px;
    margin-bottom: 16px;
    border-radius: 6px;
    border-left: 3px solid #3498db;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.publication-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateX(2px);
}

.bib-list {
    list-style: none;
    padding-left: 0;
}

.bib-list li {
    background: white;
    padding: 12px 14px;
    margin-bottom: 10px;
    border-radius: 6px;
    border-left: 3px solid #3498db;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    font-size: 0.98em;
}

.bib-label {
    display: inline-block;
    min-width: 38px;
    font-weight: 700;
    color: #3498db;
}

.cv-section {
    background: white;
    padding: 18px 20px;
    margin-bottom: 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #3498db;
}

.cv-section h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.2em;
    color: #2c3e50;
}

.cv-section ul li {
    margin-bottom: 10px;
}

.always-visible {
    border-bottom: none !important;
}

.always-visible h2 {
    cursor: default;
}

.always-visible h2:hover {
    color: #2c3e50;
}

.demo-iframe {
    width: 100%;
    height: 700px;
    border: none;
    border-radius: 8px;
    background: white;
}

.demo-tabs {
    display: flex;
    gap: 8px;
    margin: 12px 0 16px 0;
    flex-wrap: wrap;
}

.demo-tab-btn {
    padding: 8px 12px;
    background: #ecf0f1;
    border: 1px solid #dfe6e9;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.demo-tab-btn:hover {
    background: #dfe6e9;
}

.demo-tab-btn.active {
    background: #3498db;
    color: white;
    border-color: #2980b9;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.demo-panel {
    display: none;
}

.demo-panel.active {
    display: block;
}

/* Dissemination Accordion Items */
.dissemination-item {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #dfe6e9;
    background: #fafbfc;
    transition: all 0.3s ease;
}

.dissemination-intro {
    margin: 0 0 18px 0;
    color: #555;
    font-size: 0.98em;
}

.dissemination-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dissemination-header {
    width: 100%;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #f8f9fa 100%);
    border: none;
    border-bottom: 1px solid #e0e6ed;
    cursor: pointer;
    font-size: 1.05em;
    font-weight: 600;
    text-align: left;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dissemination-header:hover {
    background: linear-gradient(135deg, #eff2f7 0%, #f3f5fa 100%);
}

.dissemination-header h3 {
    font-size: 1.1em;
    margin: 0 !important;
    font-weight: 600;
}

.dissemination-toggle {
    display: inline-block;
    transition: transform 0.3s ease;
    font-size: 0.9em;
    min-width: 16px;
}

.dissemination-item.expanded .dissemination-toggle {
    transform: rotate(90deg);
}

.dissemination-content {
    display: none;
    padding: 0 20px 20px 20px;
    background: white;
}

.dissemination-item.expanded .dissemination-content {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.demo-panel {
    display: none;
}

.demo-panel.active {
    display: block;
}

.section-panel {
    display: none;
}

.section-panel.active {
    display: block;
}

.section-panel h2 .toggle-icon {
    display: none;
}

.section-panel h2 {
    cursor: default;
}

body.dark-theme {
    background: #0f1115;
    color: #e6e6e6;
}

body.dark-theme nav,
body.dark-theme .header,
body.dark-theme .summary-list,
body.dark-theme .cv-section,
body.dark-theme .publication-item,
body.dark-theme .bib-list li,
body.dark-theme .award,
body.dark-theme .demo-callout,
body.dark-theme .demo-panel,
body.dark-theme .demo-iframe,
body.dark-theme .section-content {
    background: #151922 !important;
    color: #e6e6e6 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

body.dark-theme .header {
    background: linear-gradient(135deg, #1b2332 0%, #151922 100%);
}

body.dark-theme .nested-list {
    border-left-color: #2a3140;
}

body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme p,
body.dark-theme li,
body.dark-theme span,
body.dark-theme strong {
    color: #e6e6e6 !important;
}

body.dark-theme a {
    color: #7cc4ff !important;
}

body.dark-theme a:hover {
    color: #9ad4ff !important;
    border-bottom-color: #9ad4ff !important;
}

body.dark-theme nav a {
    color: #9ad4ff !important;
}

body.dark-theme nav a:hover {
    background: #1f2633 !important;
    color: #cfe9ff !important;
}

body.dark-theme nav.section-tabs {
    background: #151922 !important;
}

body.dark-theme .section-tab-btn {
    background: #1f2633;
    border-color: #2a3140;
    color: #e6e6e6;
}

body.dark-theme .loco-corp-section {
    background: linear-gradient(135deg, #27ae601a 0%, #27ae600f 100%) !important;
    border-left-color: #27ae60 !important;
}

body.dark-theme .loco-content-card {
    background: #1a2128 !important;
    border-color: #2a3140 !important;
}

body.dark-theme .triptic-content-card {
    background: #1a2128 !important;
    border-color: #2a3140 !important;
    color: #e6e6e6 !important;
}

body.dark-theme .triptic-content-card p {
    color: #b8d4e6 !important;
}

.triptic-download-btn {
    background: #3498db !important;
    color: #ffffff !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

body.dark-theme .triptic-download-btn {
    background: #2c6fb3 !important;
    color: #ffffff !important;
}

body.dark-theme .triptic-download-btn:hover {
    background: #3b82c4 !important;
}

body.dark-theme .loco-image-box {
    background: #0f1115 !important;
    border-left-color: #27ae60 !important;
}

body.dark-theme .loco-image-label {
    color: #b8d4e6 !important;
}

body.dark-theme .section-tab-btn.active {
    background: #2c6fb3;
    border-color: #3b82c4;
    color: #ffffff;
}

body.dark-theme .award a {
    background: none !important;
    color: #7cc4ff !important;
    border-bottom-color: #7cc4ff !important;
}

body.dark-theme .header-btn {
    background: #1f2633;
    color: #cfe9ff;
}

body.dark-theme .header-btn:hover {
    background: #2c6fb3;
    color: #ffffff;
}

body.dark-theme .icon-link {
    background: #2a3548;
    color: #cfe9ff !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

body.dark-theme .icon-link:hover {
    background: #3b82c4;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(59, 130, 196, 0.4);
}

body.dark-theme .icon-link.page-link {
    background: #2c6fb3;
}

body.dark-theme .icon-link.page-link:hover {
    background: #3b82c4;
}

body.dark-theme .demo-tab-btn {
    background: #1f2633;
    border-color: #2a3140;
    color: #e6e6e6;
}

body.dark-theme .demo-tab-btn.active {
    background: #2c6fb3;
    border-color: #3b82c4;
    color: #ffffff;
}

body.dark-theme .news-highlight {
    background: #1f2633;
    border-left-color: #2c6fb3;
}

body.dark-theme .news-highlight .news-meta {
    color: #a7b3c2;
}

body.dark-theme .research-intro {
    background: #1f2633;
    border-left-color: #2c6fb3;
}

body.dark-theme .demo-intro {
    background: #1f2633;
    border-left-color: #2c6fb3;
}

body.dark-theme .demo-intro h3 {
    color: #e6e6e6;
}

body.dark-theme .demo-intro p {
    color: #a7b3c2;
}

body.dark-theme .dissemination-item {
    background: #1f2633;
    border-color: #2a3140;
}

body.dark-theme .dissemination-header {
    background: linear-gradient(135deg, #1f2633 0%, #1a2128 100%);
    border-bottom-color: #2a3140;
    color: #e6e6e6;
}

body.dark-theme .dissemination-header:hover {
    background: linear-gradient(135deg, #252d38 0%, #202835 100%);
}

body.dark-theme .dissemination-header h3 {
    color: #e6e6e6 !important;
}

.thesis-triptic-title {
    color: #d35400;
}

body.dark-theme .thesis-triptic-title {
    color: #f39c12 !important;
}

body.dark-theme .dissemination-content {
    background: #151922;
}

body.dark-theme .dissemination-content p {
    color: #a7b3c2;
}

body.dark-theme .dissemination-intro {
    color: #a7b3c2;
}

body.dark-theme .demo-callout {
    background: #1f2633 !important;
    border-left-color: #2c6fb3 !important;
}

body.dark-theme .demo-callout h4 {
    color: #e6e6e6 !important;
}

body.dark-theme .demo-callout p {
    color: #a7b3c2 !important;
}

/* Paper button links hover effects */
.demo-callout a:hover {
    opacity: 0.85;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

body.dark-theme .demo-callout a:hover {
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

body.dark-theme .publication-item,
body.dark-theme .bib-list li {
    border-left-color: #2c6fb3;
}

@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .header {
        padding: 25px 20px;
        flex-direction: column;
        text-align: center;
    }

    .header-content > div {
        justify-content: center;
    }

    #language-switcher {
        margin: 0 auto;
    }

    .header h1 {
        font-size: 2em;
    }

    nav.section-tabs {
        flex-wrap: wrap;
        gap: 6px;
        padding: 10px;
    }

    .section-tab-btn {
        width: auto;
        text-align: center;
        white-space: nowrap;
        padding: 8px 10px;
        font-size: 0.85em;
    }

    h2 {
        font-size: 1.5em;
    }

    h3 {
        font-size: 1.1em;
    }

    .section-content {
        max-height: 10000px;
    }

    .news-highlight {
        flex-direction: column;
        gap: 10px;
    }

    .news-highlight img {
        width: 100%;
        max-width: 100%;
        margin: 0 0 10px 0;
    }

    .award-photo {
        width: 100%;
        max-width: 100%;
    }

    .demo-iframe {
        height: 70vh;
        min-height: 520px;
    }
}
