/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
    font-size: 16px;
}

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

/* Header Styles */
.header {
    background: #ffffff;
    color: #333;
    padding: 100px 0 80px;
    text-align: center;
    border-bottom: 1px solid #e5e5e5;
}

.project-title {
    font-family: 'Google Sans', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #000;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.project-subtitle {
    font-family: 'Google Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 50px;
    color: #666;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.4;
}

/* Authors Section */
.authors-section {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.author-card {
    text-align: center;
    position: relative;
    cursor: pointer;
}

.author-image {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: block;
    text-decoration: none;
    cursor: pointer;
}

.author-image:hover {
    border-color: #007acc;
    transform: scale(1.05);
}

.author-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    border-radius: 50%;
}

.author-image:hover .hover-overlay {
    opacity: 1;
}

.author-info h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 5px;
    color: #333;
}

.author-info h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.author-info h3 a:hover {
    color: #007acc;
}

.author-info p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.3;
}

/* Project Links */
.project-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.link-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #000;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 1px solid #000;
}

.link-button:hover {
    background: #333;
    border-color: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.link-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Main Content */
.main-content {
    padding: 60px 0;
}

section {
    margin-bottom: 80px;
}

section h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
    color: #000;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

/* Abstract Section */
.abstract-section {
    background: #ffffff;
    padding: 60px 0;
}

.abstract-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
}

.abstract-text {
    flex: 1;
}

.abstract-text p {
    font-size: 1.2rem;
    line-height: 1.7;
    margin-bottom: 25px;
    color: #333;
    text-align: justify;
}

.abstract-figure {
    flex: 0 0 auto;
    max-width: 500px;
    width: 45%;
}

.teaser-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Teaser Section */
.teaser-section {
    background: #f8f9fa;
    padding: 40px 0 60px;
    margin-top: 40px;
    border-bottom: 1px solid #e5e5e5;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.teaser-section .results-carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.teaser-section .carousel-btn {
    background: #007acc;
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.teaser-section .carousel-btn:hover {
    background: #005a9e;
    transform: scale(1.05);
}

.teaser-section .carousel-content {
    flex: 1;
    max-width: 1000px;
}

.teaser-section .video-trio {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.teaser-section .video-container {
    text-align: center;
}

.teaser-section .video-container h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #333;
    font-weight: 500;
}

.teaser-section .video-placeholder {
    background: #ffffff;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
    transition: border-color 0.3s ease;
}

.teaser-section .video-placeholder:hover {
    border-color: #007acc;
}

.teaser-section .teaser-video {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e5e5e5;
    transition: border-color 0.3s ease;
}

.teaser-section .teaser-video:hover {
    border-color: #007acc;
}

.teaser-section .carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.teaser-section .indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background 0.3s ease;
}

.teaser-section .indicator.active {
    background: #007acc;
}

/* Project Links Section */
.project-links-section {
    background: #ffffff;
    padding: 40px 0;
    border-bottom: 1px solid #e5e5e5;
}

.project-links-section .project-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

/* Main Video Section */
.main-video-section {
    background: #ffffff;
    padding: 50px 0;
}

.video-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.video-placeholder-large {
    background: #ffffff;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    padding: 80px 40px;
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    transition: border-color 0.3s ease;
}

.video-placeholder-large:hover {
    border-color: #007acc;
}

/* Tracking GIFs Section */
.tracking-gifs-section {
    background: #ffffff;
    padding: 50px 0;
}

.gifs-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 40px;
}

.gif-section {
    text-align: center;
}

.gif-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #333;
    font-weight: 500;
}

.gif-placeholder {
    background: #f8f9fa;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 60px 20px;
    color: #666;
    font-style: italic;
    transition: border-color 0.3s ease;
}

.gif-placeholder:hover {
    border-color: #007acc;
}

.tracking-video-container {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.tracking-video-grid {
    position: relative;
    display: grid;
    grid-template-columns: auto repeat(4, 1fr);
    grid-template-rows: auto 1fr;
    gap: 10px;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    padding-top: 30px;
    padding-left: 60px;
}

.tracking-caption-row {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    padding: 10px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 0;
    height: 50%;
    top: 50%;
}

.tracking-caption-col {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    padding: 10px;
    text-align: center;
}

.tracking-video-grid video {
    grid-column: 2 / -1;
    grid-row: 2;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Projection Section */
.projection-section {
    background: #f8f9fa;
    padding: 60px 0;
}

/* Mode switcher styles */
.mode-switcher {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.mode-button {
    padding: 10px 20px !important;
    background: #f8f9fa !important;
    color: #333 !important;
    border: 2px solid #e5e5e5 !important;
    border-radius: 6px !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
    text-align: center !important;
    text-decoration: none !important;
    outline: none !important;
    /* Debug styling to make sure CSS is applied */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    min-width: 120px !important;
}

.mode-button:hover {
    background: #e9ecef !important;
    border-color: #007bff !important;
    color: #007bff !important;
}

.mode-button.active {
    background: #007bff !important;
    border-color: #007bff !important;
    color: white !important;
}

/* Face Parsing Button */
.projection-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.face-parsing-btn {
    padding: 10px 20px !important;
    background: #f8f9fa !important;
    color: #333 !important;
    border: 2px solid #e5e5e5 !important;
    border-radius: 6px !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
    text-align: center !important;
    text-decoration: none !important;
    outline: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    min-width: 150px !important;
}

.face-parsing-btn:hover {
    background: #e9ecef !important;
    border-color: #28a745 !important;
    color: #28a745 !important;
}

.face-parsing-btn.active {
    background: #28a745 !important;
    border-color: #28a745 !important;
    color: white !important;
}

/* Image Selection Grid */
.image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.image-item {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.image-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.selection-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    mix-blend-mode: multiply;
}

.image-item.selected .image-overlay {
    opacity: 1;
}

.projection-section p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: #333;
}

.projection-widget {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-top: 40px;
}

.image-selection {
    background: #ffffff;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 30px;
}

.image-selection h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #333;
    font-weight: 500;
}


.cube-projection {
    text-align: center;
}

.cube-projection h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #333;
    font-weight: 500;
}

.projection-viewer {
    background: #ffffff;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 40px 20px;
    transition: border-color 0.3s ease;
}

.projection-viewer:hover {
    border-color: #007acc;
}

.projection-viewer .viewer-placeholder {
    background: #f8f9fa;
    border: 2px dashed #e5e5e5;
    border-radius: 8px;
    padding: 80px 20px;
    color: #666;
    font-style: italic;
    transition: border-color 0.3s ease;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.projection-viewer .viewer-placeholder:hover {
    border-color: #007acc;
}

.projection-viewer .viewer-placeholder p {
    margin-bottom: 10px;
}

.projection-viewer .viewer-placeholder em {
    font-size: 0.9rem;
    color: #999;
}

/* Method Section */
.method-section {
    background: #ffffff;
    padding: 50px 0;
}

.method-video {
    text-align: center;
    margin-bottom: 40px;
}

.method-video video {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

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

.method-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 20px;
    color: #333;
}

/* Sample Controls */
.sample-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.sample-btn {
    padding: 10px 20px;
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sample-btn:hover {
    background: #e9ecef;
    border-color: #007acc;
}

.sample-btn.active {
    background: #007acc;
    color: white;
    border-color: #007acc;
}

/* Point Matching Section */
.point-matching-section {
    background: #f8f9fa;
    padding: 60px 0;
}

.point-matching-section p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: #333;
}

/* Dense Warping Section */
.dense-warping-section {
    background: #f8f9fa;
    padding: 60px 0;
}

.dense-warping-section p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: #333;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.grid-item {
    text-align: center;
}

.grid-item h3 {
    font-size: 1.2rem;
    margin-top: 15px;
    color: #333;
    font-weight: 500;
}

.grid-item h3 strong {
    font-weight: 700;
}

.comparison-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stacked-images {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stacked-images .comparison-image {
    width: 100%;
    height: auto;
}

.image-pair-column {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.image-pair-item {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.image-pair-column .image-placeholder {
    flex: 1;
    min-height: 120px;
}

.image-pair-column h3 {
    margin-top: 5px;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.grid-item .image-placeholder {
    background: #ffffff;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 60px 20px;
    color: #666;
    font-style: italic;
    transition: border-color 0.3s ease;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-item .image-placeholder:hover {
    border-color: #007acc;
}

/* Stereo Reconstruction Section */
.stereo-reconstruction-section {
    background: #ffffff;
    padding: 60px 0;
}

.stereo-reconstruction-section p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: #333;
}

.stereo-widget {
    margin-top: 40px;
}

.stereo-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.method-selector {
    display: flex;
    gap: 10px;
}

.method-btn {
    padding: 8px 16px;
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.method-btn:hover {
    background: #e9ecef;
    border-color: #007acc;
}

.method-btn.active {
    background: #007acc;
    color: white;
    border-color: #007acc;
}

.view-controls {
    display: flex;
    gap: 10px;
}

.view-btn {
    padding: 8px 16px;
    background: #000;
    color: white;
    border: 1px solid #000;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background: #333;
    border-color: #333;
}

.stereo-viewer {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    align-items: start;
}

.input-images {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.image-container h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #333;
    font-weight: 500;
}

.image-container .image-placeholder {
    background: #f8f9fa;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
    transition: border-color 0.3s ease;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-container .image-placeholder:hover {
    border-color: #007acc;
}

.stereo-images-grid {
    display: flex;
    flex-direction: row;
    gap: 10px;
    flex-wrap: nowrap;
    width: 100%;
}

.stereo-images-grid img {
    display: block;
    flex: 1;
    width: 0;
    height: auto;
    max-width: 100%;
    margin-bottom: 0 !important;
    object-fit: contain;
}

.point-cloud-viewer {
    text-align: center;
}

.point-cloud-viewer h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #333;
    font-weight: 500;
}

.viewer-placeholder {
    background: #f8f9fa;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 80px 20px;
    color: #666;
    font-style: italic;
    transition: border-color 0.3s ease;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.viewer-placeholder:hover {
    border-color: #007acc;
}

.viewer-placeholder p {
    margin-bottom: 10px;
}

.viewer-placeholder em {
    font-size: 0.9rem;
    color: #999;
}

/* BibTeX Section */
.bibtex-section {
    background: #f8f9fa;
    padding: 50px 0;
}

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

.bibtex-container pre {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 30px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    border: 1px solid #34495e;
}

/* Footer */
.footer {
    background: #f8f9fa;
    color: #666;
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid #e5e5e5;
}

.footer p {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

/* Responsive Design */
/* Medium screens */
@media (max-width: 1200px) {
    .results-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .project-title {
        font-size: 2.8rem;
    }
    
    .project-subtitle {
        font-size: 1.2rem;
    }
    
    .authors-section {
        gap: 25px;
    }
    
    .author-image {
        width: 100px;
        height: 100px;
    }
    
    .abstract-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .abstract-text p {
        font-size: 1.1rem;
    }
    
    .abstract-figure {
        max-width: 100%;
    }
    
    .teaser-section {
        margin-top: 30px;
        padding: 30px 0 50px;
    }
    
    .teaser-section .video-trio {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .stereo-viewer {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .projection-widget {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .sample-controls {
        gap: 10px;
    }
    
    .sample-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .mode-switcher {
        gap: 10px;
    }
    
    .mode-button {
        padding: 8px 16px !important;
        font-size: 0.85rem !important;
    }
    
    .stereo-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .method-selector {
        justify-content: center;
    }
    
    .view-controls {
        justify-content: center;
    }
    
    .gifs-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .method-video {
        margin-bottom: 30px;
    }
    
    .method-video video {
        max-width: 100%;
    }
    
    .project-links {
        gap: 20px;
    }
    
    .project-links-section {
        padding: 30px 0;
    }
    
    .project-links-section .project-links {
        gap: 20px;
    }
    
    .link-button {
        padding: 10px 20px;
        font-size: 0.9rem;
        gap: 6px;
    }
    
    .link-icon {
        width: 14px;
        height: 14px;
    }
    
    section h2 {
        font-size: 2rem;
    }
    
    .abstract-section p {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .header {
        padding: 80px 0 60px;
    }
    
    .project-title {
        font-size: 2.2rem;
    }
    
    .project-subtitle {
        font-size: 1.1rem;
    }
    
    .authors-section {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .author-image {
        width: 90px;
        height: 90px;
    }
    
    .project-links {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .project-links-section {
        padding: 25px 0;
    }
    
    .project-links-section .project-links {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .link-button {
        width: 200px;
        text-align: center;
        justify-content: center;
        gap: 6px;
    }
    
    .link-icon {
        width: 14px;
        height: 14px;
    }
    
    .teaser-section {
        margin-top: 20px;
        padding: 20px 0 40px;
    }
    
    /* Image grid responsive */
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .selection-image {
        height: 120px;
    }
}

@media (max-width: 480px) {
    .image-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .selection-image {
        height: 100px;
    }
}
