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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

/* Header */
header {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
}

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

header p {
    font-size: 1.15em;
    opacity: 0.95;
    margin-bottom: 25px;
}

.header-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.header-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.header-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Navigation */
nav {
    background-color: #333;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-toggle {
    display: none;
}

nav a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 15px 25px;
    transition: background-color 0.3s;
    font-weight: 600;
}

nav a:first-child i {
    margin-right: 6px;
}

nav a:hover {
    background-color: #e74c3c;
}

.dark-mode-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1em;
    cursor: pointer;
    padding: 15px 25px;
    transition: background-color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    line-height: 1.6;
}

.dark-mode-btn:hover {
    background-color: #e74c3c;
}

.mode-label {
    font-size: 0.95em;
    font-weight: 500;
}

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

/* Sections */
section {
    background: white;
    margin-bottom: 40px;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body.dark-mode section {
    background: #1e1e1e;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

section h2 {
    color: #e74c3c;
    font-size: 2em;
    margin-bottom: 25px;
    border-bottom: 3px solid #e74c3c;
    padding-bottom: 10px;
}

body.dark-mode section h2 {
    color: #ff6b5a;
}

section h3 {
    color: #e74c3c;
    margin-bottom: 15px;
    margin-top: 20px;
}

body.dark-mode section h3 {
    color: #ff6b5a;
}

section p {
    margin-bottom: 15px;
    line-height: 1.8;
}

section ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

section ul li {
    margin-bottom: 8px;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature-card {
    padding: 25px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-top: 4px solid #e74c3c;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.15);
}

body.dark-mode .feature-card {
    background-color: #2a2a2a;
    border-top-color: #ff6b5a;
}

.feature-card i {
    font-size: 2.5em;
    color: #e74c3c;
    margin-bottom: 10px;
}

body.dark-mode .feature-card i {
    color: #ff6b5a;
}

.feature-card h3 {
    margin-top: 10px;
    color: #333;
}

body.dark-mode .feature-card h3 {
    color: #e0e0e0;
}

.feature-card p {
    color: #666;
    font-size: 0.95em;
    margin: 0;
}

body.dark-mode .feature-card p {
    color: #b0b0b0;
}

/* Info Boxes */
.specs-box,
.physiology-box,
.architecture-box,
.validation-box {
    padding: 25px;
    background-color: #f0f7ff;
    border-left: 4px solid #e74c3c;
    border-radius: 6px;
    margin: 25px 0;
}

body.dark-mode .specs-box,
body.dark-mode .physiology-box,
body.dark-mode .architecture-box,
body.dark-mode .validation-box {
    background-color: #1a3a4a;
    border-left-color: #ff6b5a;
}

.specs-box h3,
.physiology-box h3,
.architecture-box h3,
.validation-box h3 {
    margin-top: 0;
    color: #e74c3c;
}

body.dark-mode .specs-box h3,
body.dark-mode .physiology-box h3,
body.dark-mode .architecture-box h3,
body.dark-mode .validation-box h3 {
    color: #ff6b5a;
}

.specs-box ul,
.physiology-box ul,
.architecture-box ul,
.validation-box ul {
    list-style: none;
    margin-left: 0;
}

.specs-box ul li,
.physiology-box ul li,
.architecture-box ul li,
.validation-box ul li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
}

.specs-box ul li:before,
.physiology-box ul li:before,
.architecture-box ul li:before,
.validation-box ul li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #e74c3c;
    font-weight: bold;
}

body.dark-mode .specs-box ul li:before,
body.dark-mode .physiology-box ul li:before,
body.dark-mode .architecture-box ul li:before,
body.dark-mode .validation-box ul li:before {
    color: #ff6b5a;
}

/* Parameter Table */
.param-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.param-row {
    background-color: white;
    padding: 15px;
    border-radius: 6px;
    border-left: 3px solid #e74c3c;
}

body.dark-mode .param-row {
    background-color: #2a2a2a;
    border-left-color: #ff6b5a;
}

.param-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

body.dark-mode .param-label {
    color: #e0e0e0;
}

.param-value {
    font-size: 1.3em;
    color: #e74c3c;
    font-weight: bold;
}

body.dark-mode .param-value {
    color: #ff6b5a;
}

/* Clinical Grid */
.clinical-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.clinical-card {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e74c3c;
}

body.dark-mode .clinical-card {
    background-color: #2a2a2a;
    border-color: #ff6b5a;
}

.clinical-card h3 {
    margin-top: 0;
    color: #e74c3c;
}

body.dark-mode .clinical-card h3 {
    color: #ff6b5a;
}

.clinical-card p {
    color: #555;
    margin: 0;
}

body.dark-mode .clinical-card p {
    color: #b0b0b0;
}

/* Stage Cards */
.stage-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.stage-card {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 6px;
    text-align: center;
    position: relative;
}

body.dark-mode .stage-card {
    background-color: #2a2a2a;
}

.stage-number {
    font-size: 3em;
    font-weight: bold;
    color: #e74c3c;
    opacity: 0.2;
    position: absolute;
    top: 10px;
    right: 15px;
}

body.dark-mode .stage-number {
    color: #ff6b5a;
}

.stage-card h4 {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 1.1em;
}

body.dark-mode .stage-card h4 {
    color: #e0e0e0;
}

.stage-card p {
    color: #666;
    font-size: 0.95em;
    margin: 0;
}

body.dark-mode .stage-card p {
    color: #b0b0b0;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.result-card {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #e74c3c;
}

body.dark-mode .result-card {
    background-color: #2a2a2a;
    border-left-color: #ff6b5a;
}

.result-card h3 {
    margin-top: 0;
    color: #e74c3c;
    font-size: 1.2em;
}

body.dark-mode .result-card h3 {
    color: #ff6b5a;
}

.result-card p {
    color: #555;
    margin: 0;
    font-size: 0.95em;
}

body.dark-mode .result-card p {
    color: #b0b0b0;
}

/* Features List */
.features-list {
    margin: 25px 0;
}

.feature-group {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

body.dark-mode .feature-group {
    background-color: #2a2a2a;
}

.feature-group h3 {
    margin-top: 0;
    color: #e74c3c;
}

body.dark-mode .feature-group h3 {
    color: #ff6b5a;
}

.feature-group ul {
    list-style: none;
    margin-left: 0;
}

.feature-group ul li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
}

.feature-group ul li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #e74c3c;
    font-weight: bold;
}

body.dark-mode .feature-group ul li:before {
    color: #ff6b5a;
}

/* Feature GUI preview */
.feature-figure {
    margin-top: 10px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

body.dark-mode .feature-figure {
    background: #1f1f1f;
    border-color: #333;
}

.feature-figure img {
    width: 100%;
    height: auto;
    display: block;
}

/* GUI image in Interactive Features - Larger display */
.feature-figure img {
    max-height: 720px;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.feature-figure img:hover {
    transform: scale(1.02);
    filter: brightness(1.05);
}

.feature-figure figcaption {
    padding: 12px;
    font-size: 0.9em;
    color: #666;
    text-align: center;
}

body.dark-mode .feature-figure figcaption {
    color: #aaa;
}

/* Click-to-view modal for section images */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.modal-media {
    width: 100%;
    max-width: 90vw;
    max-height: 75vh;
    object-fit: contain;
    display: block;
}

.modal-title {
    color: white;
    text-align: center;
    padding: 12px;
    font-size: 1em;
    background: rgba(0, 0, 0, 0.6);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 1001;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 1001;
}

.modal-nav:hover {
    background: rgba(255, 255, 255, 0.35);
}

.modal-nav.prev { left: 12px; }
.modal-nav.next { right: 12px; }

.modal-counter {
    color: white;
    font-size: 0.9em;
    margin-top: 12px;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 16px;
    border-radius: 4px;
}

.feature-figure figcaption {
    padding: 10px 12px;
    font-size: 0.95em;
    color: #555;
}

body.dark-mode .feature-figure figcaption {
    color: #cfcfcf;
}

/* Team Grid */
.team-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin: 25px 0;
}

.team-box {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #ddd;
}

body.dark-mode .team-box {
    background-color: #2a2a2a;
    border-color: #444;
}

.team-box h3 {
    margin-top: 0;
    color: #e74c3c;
}

body.dark-mode .team-box h3 {
    color: #ff6b5a;
}

.team-box ul {
    list-style: none;
    margin-left: 0;
    margin-bottom: 0;
}

.team-box ul li {
    padding: 5px 0;
    color: #555;
}

body.dark-mode .team-box ul li {
    color: #b0b0b0;
}

/* Awards Box */
.awards-box {
    padding: 25px;
    background-color: #fffef0;
    border-left: 4px solid #f39c12;
    border-radius: 6px;
    margin-top: 30px;
}

body.dark-mode .awards-box {
    background-color: #3a3a2a;
    border-left-color: #f1c40f;
}

.awards-box h3 {
    color: #f39c12;
    margin-top: 0;
}

body.dark-mode .awards-box h3 {
    color: #f1c40f;
}

.award-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.award-item {
    background-color: white;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
}

body.dark-mode .award-item {
    background-color: #2a2a2a;
}

.award-badge {
    display: inline-block;
    background-color: #f39c12;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95em;
}

.award-item p {
    color: #555;
    margin: 8px 0 0 0;
}

body.dark-mode .award-item p {
    color: #b0b0b0;
}

/* Publication Card */
.pub-card {
    padding: 30px;
    background-color: #f0f7ff;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
}

body.dark-mode .pub-card {
    background-color: #1a3a4a;
    border-left-color: #ff6b5a;
}

.pub-card h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.3em;
}

body.dark-mode .pub-card h3 {
    color: #e0e0e0;
}

.pub-authors {
    color: #555;
    font-style: italic;
    margin: 10px 0;
}

body.dark-mode .pub-authors {
    color: #b0b0b0;
}

.pub-journal {
    color: #666;
    margin: 10px 0;
}

body.dark-mode .pub-journal {
    color: #999;
}

.pub-date {
    color: #999;
    font-size: 0.95em;
    margin: 10px 0 15px 0;
}

body.dark-mode .pub-date {
    color: #777;
}

.pub-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.pub-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #e74c3c;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.pub-link:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

/* Model Figures - Stack vertically */
.model-figures {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin: 25px 0 10px 0;
}

/* Progression Stack - Vertical alignment with image and info side-by-side */
.progression-stack {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin: 30px 0;
}

.progression-item {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    padding: 30px 0;
    border-bottom: 1px solid #e8e8e8;
}

.progression-item:last-child {
    border-bottom: none;
    padding-bottom: 10px;
}

.progression-item:nth-child(even) {
    flex-direction: column;
}

.progression-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 20px;
    max-width: 900px;
    text-align: center;
    margin: 0 auto;
}

body.dark-mode .progression-item {
    border-bottom-color: #2a2a2a;
}

.progression-info h3 {
    margin-top: 0;
    color: #e74c3c;
    font-size: 1.3em;
}

body.dark-mode .progression-info h3 {
    color: #ff6b5a;
}

.progression-info p {
    color: #666;
    line-height: 1.6;
}

body.dark-mode .progression-info p {
    color: #b0b0b0;
}

.progression-figure {
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin: 0 auto;
    max-width: 950px;
    width: 100%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.progression-figure:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

body.dark-mode .progression-figure {
    background: #1f1f1f;
    border-color: #333;
}

.progression-figure img {
    width: 100%;
    height: 500px;
    object-fit: contain;
    display: block;
    background: #f8f9fa;
}

body.dark-mode .progression-figure img {
    background: #1f1f1f;
}

@media (max-width: 768px) {
    .progression-item,
    .progression-item:nth-child(even) {
        grid-template-columns: 1fr;
        direction: ltr;
    }
    
    .progression-item:nth-child(even) > * {
        direction: ltr;
    }
    
    .progression-figure img {
        height: 350px;
        object-fit: contain;
    }
    
    .progression-item {
        padding: 20px 0;
    }
}

/* Results video stack */
.results-video-stack {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 25px;
}

.results-video-figure {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin: 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.results-video-figure:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

body.dark-mode .results-video-figure {
    background: #1f1f1f;
    border-color: #333;
}

.results-video-figure video {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    display: block;
    background: #000;
}

.results-video-figure figcaption {
    padding: 12px 14px;
    font-size: 0.96em;
    color: #555;
    text-align: center;
    line-height: 1.5;
}

body.dark-mode .results-video-figure figcaption {
    color: #cfcfcf;
}
 

.figure-lg {
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.figure-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

body.dark-mode .figure-lg {
    background-color: #1f1f1f;
    border-color: #333;
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

.figure-lg img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
}

.figure-lg figcaption {
    padding: 12px 14px 14px 14px;
    font-size: 0.96em;
    color: #555;
}

body.dark-mode .figure-lg figcaption {
    color: #cfcfcf;
}

/* Media Gallery */
#gallery {
    scroll-margin-top: 80px;
}

.gallery-viewer {
    position: relative;
    background: #0f0f10;
    border-radius: 10px;
    overflow: hidden;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    margin-top: 20px;
    padding: 14px 14px 6px 14px;
}

body.dark-mode .gallery-viewer {
    background: #111820;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

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

.gallery-media video,
.gallery-media img {
    width: 100%;
    max-height: 520px;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #000;
    border-radius: 8px;
    display: none;
}

.gallery-meta {
    padding: 10px 6px 4px 6px;
    color: #e0e0e0;
}

.gallery-meta h4 {
    margin: 0 0 6px 0;
    color: #fff;
    font-size: 1.08em;
}

.gallery-meta p {
    margin: 0;
    color: #c9c9c9;
    font-size: 0.96em;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.55);
    border: none;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
    z-index: 4;
}

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

.gallery-nav.prev { left: 14px; }
.gallery-nav.next { right: 14px; }

.gallery-thumbs {
    margin-top: 14px;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 4px 10px 4px;
    scrollbar-width: thin;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}

.gallery-thumbs::-webkit-scrollbar { height: 8px; }
.gallery-thumbs::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.35); border-radius: 4px; }

.gallery-thumb {
    position: relative;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    cursor: pointer;
    padding: 0;
    flex: 0 0 190px;
    scroll-snap-align: start;
}

body.dark-mode .gallery-thumb {
    background: #1d1f22;
    border-color: #222;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 16 / 9;
}

/* Video thumbnails: show paused frame uniquely per video */
.gallery-thumb video.thumb-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 16 / 9;
    pointer-events: none; /* let button capture clicks */
    background: #000;
}

.gallery-thumb.has-video img {
    display: none;
}

.gallery-thumb.active {
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231,76,60,0.25);
}

body.dark-mode .gallery-thumb.active {
    border-color: #ff6b5a;
    box-shadow: 0 0 0 2px rgba(255,107,90,0.25);
}

.thumb-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 4px 8px;
    font-size: 0.75em;
    border-radius: 999px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.thumb-badge.image {
    background: linear-gradient(135deg, #3498db, #2c80b4);
}

@media (max-width: 768px) {
    .gallery-viewer {
        min-height: 360px;
        padding: 12px 12px 6px 12px;
    }

    .gallery-nav {
        width: 42px;
        height: 42px;
        font-size: 1.05em;
    }
}

/* Validation figures */
.validation-figures {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.validation-figures figure {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.validation-figures figure:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

body.dark-mode .validation-figures figure {
    background: #1f1f1f;
    border-color: #333;
}

.validation-figures img,
.validation-figures video {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.validation-figures figcaption {
    padding: 10px 12px 12px 12px;
    font-size: 0.95em;
    color: #555;
}

body.dark-mode .validation-figures figcaption {
    color: #cfcfcf;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
}

body.dark-mode footer {
    background-color: #1a1a1a;
}

footer p {
    margin: 0;
}

footer a {
    color: #e74c3c;
    text-decoration: none;
    font-weight: 500;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    header p {
        font-size: 1em;
    }

    .header-links {
        flex-direction: column;
        gap: 10px;
    }

    .header-btn {
        width: 100%;
        justify-content: center;
    }

    nav {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }

    nav ul {
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background-color: #333;
        flex-direction: column;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        width: 100%;
    }

    nav ul li { width: 100%; }

    nav ul.active {
        max-height: 500px;
    }

    .nav-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: white;
        font-size: 1.5em;
        cursor: pointer;
        padding: 15px 20px;
        margin-left: auto;
    }

    nav a {
        padding: 12px 25px;
        font-size: 0.95em;
        border-bottom: 1px solid #555;
    }

    .dark-mode-btn {
        padding: 12px 25px;
        order: 3;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        text-align: left;
        border-bottom: 1px solid #555;
    }

    section {
        padding: 25px;
        margin-bottom: 25px;
    }

    section h2 {
        font-size: 1.5em;
    }

    .container {
        padding: 20px;
    }

    .features-grid,
    .clinical-grid,
    .stage-cards,
    .results-grid,
    .team-grid,
    .award-list {
        grid-template-columns: 1fr;
    }

    .param-table {
        grid-template-columns: 1fr;
    }

    .pub-links {
        flex-direction: column;
    }

    .pub-link {
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5em;
    }

    header p {
        font-size: 0.95em;
    }

    section {
        padding: 15px;
    }

    section h2 {
        font-size: 1.3em;
        margin-bottom: 15px;
    }

    .feature-card,
    .clinical-card,
    .stage-card,
    .result-card,
    .team-box {
        padding: 15px;
    }

    nav a,
    .dark-mode-btn {
        padding: 10px 15px;
        font-size: 0.9em;
    }
}
