/* Reset and base styles */
:root {
    --bg: #f4f6fb;
    --text: #222222;
    --surface: #ffffff;
    --card: #f4f6fb;
    --primary: #2575fc;
    --primary-2: #6a11cb;
    --shadow-rgb: 37, 117, 252;
    --border: #cfd8ea;
    --muted: #666666;
}
[data-theme='dark'] {
    --bg: #0f1220;
    --text: #e6e8ef;
    --surface: #14182a;
    --card: #181c31;
    --primary: #6aa2ff;
    --primary-2: #8f6bff;
    --shadow-rgb: 60, 130, 255;
    --border: #2c3555;
    --muted: #aab1c6;
}
html {
    color-scheme: light dark;
    scroll-behavior: smooth;
}
body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: background 0.3s ease, color 0.3s ease;
}
/* Skip link */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.skip-link:focus {
    position: static;
    width: auto; height: auto;
    margin: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--primary);
    color: #fff;
    border-radius: 8px;
}
/* A11y helper */
.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}
/* Top navigation */
.site-nav {
    position: sticky;
    top: 0; z-index: 100;
    backdrop-filter: saturate(180%) blur(10px);
    background: color-mix(in hsl, var(--surface) 82%, transparent);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand {
    text-decoration: none;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--text);
}
.nav-links {
    display: flex; align-items: center; gap: 1rem;
}
.nav-links a {
    color: var(--text);
    text-decoration: none;
    opacity: 0.9;
}
.nav-links a:hover { opacity: 1; color: var(--primary); }
.nav-links button {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    cursor: pointer;
}
@media (max-width: 560px) {
    .nav-links a { display: none; }
}
header.hero {
    background: linear-gradient(120deg, var(--primary-2) 0%, var(--primary) 100%);
    color: #fff;
    text-align: center;
    padding: 4rem 1rem 3rem 1rem;
    position: relative;
    overflow: hidden;
    background-size: 200% 200%;
    animation: gradientMove 8s ease-in-out infinite alternate;
}
header.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../images/hero-bg.svg') center/cover no-repeat;
    opacity: 0.7;
    mix-blend-mode: screen;
    pointer-events: none;
}
@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}
header.hero::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 90%;
    width: 120vw;
    height: 120px;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 80%);
    transform: translateX(-50%);
    pointer-events: none;
}
header.hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}
header.hero p {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}
header.hero button {
    background: #fff;
    color: #2575fc;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
header.hero button:hover {
    background: #2575fc;
    color: #fff;
}
.hero-mission {
    font-size: 1rem;
    opacity: 0.95;
    max-width: 42ch;
    margin-left: auto;
    margin-right: auto;
}
.featured-research-section {
    padding: 2.5rem 1rem;
    max-width: 700px;
    margin: 0 auto;
}
.featured-research-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
    text-align: center;
}
.research-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.research-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.research-list li:last-child { border-bottom: 0; }
.research-list a {
    color: var(--primary);
    text-decoration: none;
}
.research-list a:hover { text-decoration: underline; }
.projects-section {
    padding: 3rem 1rem;
    background: var(--surface);
}
.projects-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.2rem;
    letter-spacing: 1px;
}
.projects-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}
.project-card {
    background: var(--card);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 2rem 1.5rem;
    width: 260px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border 0.2s;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}
.project-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 6px 24px rgba(var(--shadow-rgb),0.15);
    border: 2px solid var(--primary);
    z-index: 2;
}
.project-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; right: 0; bottom: 0;
    background: linear-gradient(120deg, color-mix(in hsl, var(--primary-2) 12%, transparent), color-mix(in hsl, var(--primary) 12%, transparent));
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 1;
}
.project-card:hover::before {
    opacity: 1;
}
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.5rem 0 0.75rem 0;
    position: relative;
    z-index: 2;
}
.project-tag {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: color-mix(in hsl, var(--primary) 18%, var(--surface));
    color: var(--primary);
    border: 1px solid color-mix(in hsl, var(--primary) 35%, transparent);
}
.project-link {
    display: inline-block;
    margin-top: 1rem;
    background: var(--primary);
    color: #fff;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.2s;
    position: relative;
    z-index: 2;
}
.project-link:hover {
    background: var(--primary-2);
}
.project-details-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.project-details-modal.hidden {
    display: none;
}
.modal-content {
    background: var(--surface);
    border-radius: 12px;
    padding: 2rem;
    min-width: 300px;
    max-width: 90vw;
    position: relative;
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: 0 8px 40px rgba(0,0,0,0.25);
}
#closeModal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    background: transparent;
    border: none;
    color: var(--text);
}
.contact-section {
    background: var(--bg);
    padding: 3rem 1rem;
}
.contact-section h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    letter-spacing: 1px;
}
#contactForm {
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
#contactForm input, #contactForm textarea {
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 1rem;
    background: color-mix(in hsl, var(--surface) 90%, var(--bg));
    color: var(--text);
    transition: border 0.2s, box-shadow 0.2s;
}
#contactForm input:focus, #contactForm textarea:focus {
    border: 1.5px solid var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px color-mix(in hsl, var(--primary) 20%, transparent);
}
#contactForm button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.8rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 2px 8px rgba(var(--shadow-rgb),0.18);
}
#contactForm button:hover {
    background: var(--primary-2);
}
#formMessage {
    text-align: center;
    margin-top: 1rem;
    color: var(--primary);
    font-weight: bold;
}
footer {
    background: linear-gradient(90deg, var(--primary-2) 0%, var(--primary) 100%);
    color: #fff;
    text-align: center;
    padding: 1.2rem 0;
    font-size: 1rem;
    margin-top: 2rem;
    letter-spacing: 0.5px;
}
.footer-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.75rem;
}
.footer-social a {
    color: #fff;
    opacity: 0.9;
}
.footer-social a:hover { opacity: 1; }
.footer-social .icon {
    display: inline-block;
    vertical-align: middle;
}
.nav-cv {
    font-weight: 600;
}

/* Scheduler */
.scheduler-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
}
.scheduler-main {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
    margin-bottom: 1rem;
}
.form-grid label {
    display: grid;
    gap: 0.35rem;
    font-size: 0.95rem;
}
.form-grid input, .form-grid select, .share-grid input, .share-grid textarea {
    padding: 0.6rem 0.7rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: color-mix(in hsl, var(--surface) 90%, var(--bg));
    color: var(--text);
}
.btn {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
}
.btn.primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(var(--shadow-rgb),0.18);
}
.actions { display: flex; gap: 0.6rem; }
.tz-row { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }

.dow-picker { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.4rem; }
.dow-picker button {
    padding: 0.45rem 0.3rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    cursor: pointer;
}
.dow-picker button.on { background: color-mix(in hsl, var(--primary) 25%, var(--card)); color: var(--text); border-color: var(--primary); }

.share-grid, .quick-grid { display: grid; grid-template-columns: 1fr; gap: 0.6rem; margin-bottom: 1rem; }

.availability-grid { display: grid; gap: 4px; }
.grid-row { display: grid; grid-template-columns: 140px; gap: 4px; }
.header-row { position: sticky; top: 0; background: var(--surface); z-index: 2; }
.time-col { position: sticky; left: 0; background: var(--surface); z-index: 1; padding: 0.5rem; font-weight: 600; font-size: 0.95rem; border: 1px solid var(--border); border-radius: 8px; }
.day-col.head { padding: 0.5rem; font-weight: 700; font-size: 0.95rem; border: 1px solid var(--border); border-radius: 8px; text-align: center; }
.grid-title { font-weight: 700; font-size: 1.1rem; }
.grid-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.6rem; }
.legend-swatch { display: inline-block; width: 16px; height: 10px; border-radius: 2px; margin: 0 4px 0 10px; vertical-align: middle; }
.swatch-0 { background: #e7ebf7; }
.swatch-1 { background: #c8d6fb; }
.swatch-2 { background: #a6c2ff; }
.swatch-3 { background: #86a7ff; }
.legend-label { font-size: 0.85rem; color: var(--muted); margin-right: 6px; }
.slot { height: 28px; border-radius: 6px; border: 1px solid var(--border); cursor: pointer; min-width: 70px; }
.slot[data-count="0"], .slot:not([data-count]) { background: #f6f7fb; }
.slot[data-count="1"] { background: #e3ecff; }
.slot[data-count="2"] { background: #cbdcff; }
.slot[data-count="3"], .slot[data-count="4"], .slot[data-count="5"], .slot[data-count="6"], .slot[data-count="7"], .slot[data-count="8"], .slot[data-count="9"], .slot[data-count="10"] { background: #b3caff; }
.slot.me { outline: 2px solid var(--primary); outline-offset: -2px; }

.best-times { margin-top: 1rem; }
.best-times ol { margin: 0.5rem 0 0 1rem; }

/* Responsive columns based on number of days */
.availability-grid .grid-row { grid-auto-flow: column; }

/* Calendar */
.calendar { border: 1px solid var(--border); border-radius: 12px; padding: 0.6rem; background: var(--surface); }
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.cal-title { font-weight: 700; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-label { font-size: 0.8rem; color: var(--muted); text-align: center; }
.cal-cell { padding: 0.5rem; text-align: center; border-radius: 8px; border: 1px solid var(--border); cursor: pointer; }
.cal-cell.out { opacity: 0.4; cursor: default; }
.cal-cell.in-range { background: color-mix(in hsl, var(--primary) 12%, var(--card)); border-color: color-mix(in hsl, var(--primary) 40%, var(--border)); }
.cal-cell.selected { outline: 2px solid var(--primary); outline-offset: -2px; font-weight: 700; }

/* Status Display */
.status-display { padding: 2rem; background: var(--card); border-radius: 12px; text-align: center; font-weight: 600; margin-bottom: 1rem; }
.status-display.error { background: #f8d7da; color: #721c24; }

/* Participants + Live */
.participants-list { list-style: none; padding: 0; margin: 0.5rem 0 1rem 0; display: grid; gap: 0.4rem; }
.participants-list li { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 0.4rem 0.6rem; font-size: 0.95rem; }
.live-badge { display: inline-block; background: #e91e63; color: #fff; font-size: 0.7rem; padding: 0.15rem 0.5rem; border-radius: 999px; margin-left: 0.4rem; vertical-align: middle; animation: pulse 1.8s ease-in-out infinite; }

/* Toast */
.toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 0.6rem 0.9rem; box-shadow: 0 6px 24px rgba(0,0,0,0.15); z-index: 2000; }


.about-flex {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}
.about-text {
    flex: 2;
    min-width: 220px;
}
.about-image {
    flex: 1;
    min-width: 180px;
    display: flex;
    justify-content: center;
}
.project-img {
    width: 100%;
    max-width: 220px;
    border-radius: 10px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 12px rgba(var(--shadow-rgb),0.10);
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.interactive-diagram {
    margin: 3rem auto 0 auto;
    max-width: 700px;
    background: color-mix(in hsl, var(--surface) 92%, var(--bg));
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(var(--shadow-rgb),0.07);
    padding: 2rem 1rem 1rem 1rem;
}
.back-link {
    display: inline-block;
    margin: 1rem 0 0 0;
    color: #fff;
    background: var(--primary);
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.2s;
}
.back-link:hover {
    background: var(--primary-2);
}
.profile-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    margin-bottom: 1rem;
    box-shadow: 0 2px 12px rgba(var(--shadow-rgb),0.15);
    border: 4px solid #fff;
    object-fit: cover;
}
::-webkit-scrollbar {
    width: 10px;
    background: #f4f6fb;
}
::-webkit-scrollbar-thumb {
    background: #c3d0e8;
    border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a0b6e0;
}
@media (max-width: 700px) {
    .projects-grid {
        flex-direction: column;
        align-items: center;
    }
    header.hero h1 {
        font-size: 2.2rem;
    }
}
/* BrainViz DK Specific Styles */
.brainviz-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.brainviz-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="brain" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="2" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23brain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #fff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-badges {
    display: flex;
    gap: 0.8rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.cta-button {
    padding: 0.8rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.cta-button.primary {
    background: white;
    color: #667eea;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.cta-button.secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.cta-button.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.brain-visualization {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brain-3d {
    position: relative;
    width: 200px;
    height: 200px;
    transform-style: preserve-3d;
    animation: rotate3d 20s linear infinite;
}

.brain-surface {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    border-radius: 50% 30% 50% 30%;
    position: relative;
    box-shadow: 0 0 30px rgba(255, 107, 107, 0.3);
}

.brain-slices {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.slice {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.slice-1 {
    width: 60px;
    height: 60px;
    top: -30px;
    left: -30px;
    animation-delay: 0s;
}

.slice-2 {
    width: 40px;
    height: 40px;
    top: -20px;
    left: -20px;
    animation-delay: 0.7s;
}

.slice-3 {
    width: 20px;
    height: 20px;
    top: -10px;
    left: -10px;
    animation-delay: 1.4s;
}

.visualization-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    display: flex;
    gap: 1.5rem;
}

.control-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.control-label {
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
}

.quality-indicator {
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.quality-bar {
    height: 100%;
    background: linear-gradient(90deg, #4ecdc4, #45b7d1);
    width: 75%;
    border-radius: 2px;
    animation: progress 3s ease-in-out infinite;
}

.template-selector {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

@keyframes rotate3d {
    0% { transform: rotateY(0deg) rotateX(10deg); }
    100% { transform: rotateY(360deg) rotateX(10deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 75%; }
    100% { width: 0%; }
}

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

.feature-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.feature-card h4 {
    margin: 0 0 1rem 0;
    color: var(--text);
    font-size: 1.3rem;
}

.feature-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

/* Installation Steps */
.installation-steps {
    margin: 3rem 0;
}

.step-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    position: relative;
}

.step-number {
    position: absolute;
    top: -15px;
    left: 30px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    background: var(--card);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.req-icon {
    font-size: 1.5rem;
}

.req-text {
    flex: 1;
    font-weight: 500;
}

.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-badge.success {
    background: #d4edda;
    color: #155724;
}

.status-badge.optional {
    background: #fff3cd;
    color: #856404;
}

.install-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.method-card {
    background: var(--card);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.method-card.recommended {
    border: 2px solid var(--primary);
    position: relative;
}

.method-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.method-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.recommended-badge {
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.code-block {
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    margin: 1rem 0;
    position: relative;
}

.code-block.small {
    margin: 0.5rem 0;
}

.code-header {
    background: #2d2d2d;
    padding: 0.8rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #404040;
}

.code-title {
    color: #a0a0a0;
    font-size: 0.9rem;
    font-weight: 500;
}

.copy-btn {
    background: #404040;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: #555;
}

.code-block pre {
    margin: 0;
    padding: 1rem;
    color: #d4d4d4;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow-x: auto;
}

.optional-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.feature-option {
    background: var(--card);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-info h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text);
}

.feature-info p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.verification-section {
    margin-top: 1rem;
}

.success-message {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 1rem;
    padding: 1rem;
    background: #d4edda;
    color: #155724;
    border-radius: 8px;
    border: 1px solid #c3e6cb;
}

.success-icon {
    font-size: 1.2rem;
}

/* Quality Presets */
.quality-presets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.preset-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    cursor: pointer;
}

.preset-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.preset-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.preset-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text);
}

.preset-badge {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.preset-badge.fast {
    background: #d4edda;
    color: #155724;
}

.preset-badge.medium {
    background: #fff3cd;
    color: #856404;
}

.preset-badge.slow {
    background: #f8d7da;
    color: #721c24;
}

.preset-badge.very-slow {
    background: #f5c6cb;
    color: #721c24;
}

.preset-specs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.spec-item {
    text-align: center;
    padding: 0.8rem;
    background: var(--card);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.spec-label {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.3rem;
}

.spec-value {
    display: block;
    font-weight: bold;
    color: var(--text);
    font-size: 1.1rem;
}

.preset-use-case {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--card);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.preset-example {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quality-preview {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

.draft-preview {
    background: linear-gradient(45deg, #ff6b6b, #ffa500);
    opacity: 0.6;
}

.standard-preview {
    background: linear-gradient(45deg, #4ecdc4, #45b7d1);
    opacity: 0.8;
}

.publication-preview {
    background: linear-gradient(45deg, #667eea, #764ba2);
    opacity: 1;
}

.print-preview {
    background: linear-gradient(45deg, #f093fb, #f5576c);
    opacity: 1;
    box-shadow: 0 0 20px rgba(240, 147, 251, 0.5);
}

.quality-comparison {
    margin: 3rem 0;
    background: var(--surface);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
}

.comparison-chart {
    margin-top: 1.5rem;
}

.chart-bars {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bar-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bar-label {
    min-width: 100px;
    font-weight: 500;
    color: var(--text);
}

.bar {
    height: 30px;
    border-radius: 15px;
    position: relative;
    transition: width 0.5s ease;
}

.draft-bar {
    background: linear-gradient(90deg, #ff6b6b, #ffa500);
}

.standard-bar {
    background: linear-gradient(90deg, #4ecdc4, #45b7d1);
}

.publication-bar {
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.print-bar {
    background: linear-gradient(90deg, #f093fb, #f5576c);
}

.bar-value {
    min-width: 40px;
    text-align: right;
    font-weight: 600;
    color: var(--text);
}

/* Templates Grid */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.template-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    cursor: pointer;
}

.template-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.template-preview {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    background: var(--card);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.template-visual {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

.mni152-visual {
    background: linear-gradient(45deg, #667eea, #764ba2);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.mni2009c-visual {
    background: linear-gradient(45deg, #4ecdc4, #45b7d1);
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.3);
}

.fsaverage-visual {
    background: linear-gradient(45deg, #ff6b6b, #ffa500);
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

.template-info h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text);
    font-size: 1.3rem;
}

.template-source {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0 0 1rem 0;
}

.template-description {
    color: var(--muted);
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
}

.template-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.spec-tag {
    background: var(--card);
    color: var(--text);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border);
}

.template-management {
    margin: 3rem 0;
    background: var(--surface);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
}

.code-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Responsive Design */
@media (max-width: 900px) {
    .about-flex {
        flex-direction: column;
        gap: 1.2rem;
    }
    .interactive-diagram {
        padding: 1rem 0.2rem 0.5rem 0.2rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .brain-visualization {
        height: 300px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .quality-presets {
        grid-template-columns: 1fr;
    }
    
    .templates-grid {
        grid-template-columns: 1fr;
    }
    
    .install-methods {
        grid-template-columns: 1fr;
    }
    
    .optional-features {
        grid-template-columns: 1fr;
    }
    
    .code-examples {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .projects-grid {
        flex-direction: column;
        align-items: center;
    }
    header.hero h1 {
        font-size: 2.2rem;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .visualization-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .preset-specs {
        grid-template-columns: 1fr;
    }
    
    .requirements-grid {
        grid-template-columns: 1fr;
    }
}


