:root {
    color-scheme: light;
    --bg-color: #fff;
    --bg-secondary: #fff;
    --card-bg: #fff;
    --card-bg-hover: #faf7fd;
    --primary-color: #d93a7a;   /* pink, matches ../styles.css (sampled from the teaser) */
    --secondary-color: #1c9a91; /* teal */
    --accent-color: #8b5cf6;    /* violet (primary on the main page) */
    --text-color: #333;
    --text-secondary: #555;
    --text-muted: #666;
    --border-color: #e5e5e5;
    --success-color: #087f8c;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 14px;
}

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

/* Header */
header {
    max-width: 940px;
    margin: 0 auto 10px;
    padding: 20px 20px 10px;
    text-align: center;
}

header h1 {
    font-size: calc(1rem + 0.9vw);
    line-height: 1.2;
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 10px;
}

header h2 {
    font-size: calc(1.2rem + 0.2vw);
    font-weight: bold;
    color: var(--text-muted);
}

header p {
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 14px;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 19px;
    padding: 20px 0;
}

.gallery-item {
    display: block;
    color: inherit;
    text-decoration: none;
}

.gallery-item:hover {
    color: var(--accent-color);
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

.gallery-item .caption {
    padding: 10px 0;
}

.gallery-item .caption h3 {
    font-size: 16px;
    font-weight: 600;
}

.gallery-item .caption p {
    font-size: 12px;
    color: var(--accent-color);
    margin-top: 5px;
}

/* Project Detail Page */
.back-link {
    display: inline-block;
    margin-bottom: 25px;
    padding: 8px 16px;
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    color: var(--accent-color);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.back-link:hover {
    background: #f3effe;
    color: var(--accent-color);
}

.project-header {
    text-align: center;
    margin-bottom: 30px;
}

.project-header h1 {
    font-size: calc(1rem + 0.9vw);
    line-height: 1.2;
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 10px;
}

/* Comparison Section */
.comparison-section {
    margin-bottom: 30px;
}

.comparison-section h2 {
    font-size: calc(0.9rem + 0.5vw);
    font-weight: bold;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

@media (max-width: 900px) {
    .comparison-grid {
        grid-template-columns: 1fr;
    }
}

.video-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    min-width: 0;
}

.video-card h3 {
    color: var(--accent-color);
    padding: 12px;
    font-size: 16px;
    text-align: center;
    border-top: 2px solid var(--accent-color);
}

.video-card.highlight h3 {
    color: var(--primary-color);
    border-top-color: #ff6b9d;
}

.video-wrapper {
    padding: 15px;
    background: var(--card-bg);
}

.video-wrapper video {
    width: 100%;
    border-radius: 8px;
    background: #000;
}

/* Visualization Container */
.viz-container {
    padding: 0 15px 15px;
    background: var(--card-bg);
}

.viz-toggle-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.viz-toggle-btn {
    padding: 7px 10px;
    border: 1px solid var(--accent-color);
    background: white;
    color: var(--accent-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.viz-toggle-btn:hover {
    background: #f3effe;
}

.viz-toggle-btn.active {
    background: #4ecdc4;
    border-color: #4ecdc4;
    color: #12383c;
    font-weight: 600;
}

.viz-image-container {
    margin-top: 10px;
}

.viz-image-container img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.viz-image-container img:hover {
    opacity: 0.9;
}

.viz-image {
    display: block;
}

.viz-image.hidden {
    display: none;
}

.zoom-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 8px;
    opacity: 0.7;
}

/* Isolated Examples Grid - 2 pairs per row (4 videos per row) */
.isolated-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

@media (max-width: 1200px) {
    .isolated-grid {
        grid-template-columns: 1fr;
    }
}

.isolated-pair {
    background: var(--card-bg);
    border-radius: 4px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.isolated-pair h4 {
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

.pair-videos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.mini-video {
    position: relative;
}

.mini-video .label {
    display: inline-block;
    background: #4ecdc4;
    color: #12383c;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 980px;
    margin-bottom: 8px;
}

.mini-video video {
    width: 100%;
    border-radius: 8px;
    background: #000;
}

/* Variations Section */
.variations-section {
    margin-top: 60px;
}

.variations-section h2 {
    font-size: calc(0.9rem + 0.5vw);
    font-weight: bold;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.variations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 25px;
}

@media (max-width: 500px) {
    .variations-grid {
        grid-template-columns: 1fr;
    }
}

/* Footer */
footer {
    max-width: 940px;
    margin: 30px auto 0;
    padding: 25px 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
}

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

footer a:hover {
    color: var(--text-color);
}

/* Utility */
.no-video {
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    background: var(--card-bg);
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.97);
    cursor: zoom-out;
    overflow: auto;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 95%;
    max-height: 90%;
    object-fit: contain;
    cursor: default;
    border-radius: 12px;
    box-shadow: 0 0 80px rgba(100, 210, 255, 0.2);
}

.lightbox-close {
    position: fixed;
    top: 25px;
    right: 35px;
    color: #fff;
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.2s ease;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.lightbox-close:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.15);
}

.lightbox-hint {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 980px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

    
a { color: var(--accent-color); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--secondary-color); outline-offset: 3px; }
@media (max-width: 600px) {
    .container, header { padding: 15px; }
    header h1, .project-header h1 { font-size: 1.5rem; }
    .gallery-grid, .isolated-grid, .variations-grid { grid-template-columns: minmax(0, 1fr); }
    .pair-videos { grid-template-columns: minmax(0, 1fr); }
}
