/* Modern CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
}

/* Layout */
.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: #fff;
    border-right: 1px solid #eee;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    padding: 2rem;
}

.nav-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.nav-content h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
}

.nav-content ul {
    list-style: none;
}

.nav-content ul li {
    margin-bottom: 1rem;
}

.nav-content ul li a {
    text-decoration: none;
    color: #666;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.nav-content ul li a:hover {
    color: #000;
}

/* External Links */
.external-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background-color: #f5f5f5;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.button:hover {
    background-color: #eee;
    transform: translateY(-1px);
}

/* Main Content */
.content {
    flex: 1;
    margin-left: 280px;
    padding: 3rem;
    max-width: 1200px;
}

.section {
    margin-bottom: 4rem;
}

.section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
}

/* Images */
.image-container {
    margin: 2rem 0;
    text-align: center;
}

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

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);  /* 2 columns */
    gap: 2rem;
    margin-top: 2rem;
}

.video-container {
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.video-container:hover {
    transform: translateY(-2px);
}

.video-container video {
    width: 100%;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.video-container p {
    text-align: center;
    color: #666;
}

/* Video Popup */
.video-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.video-popup.active {
    display: flex;
}

.video-popup-content {
    position: relative;
    width: 80%;
    max-width: 1200px;
}

.video-popup-content video {
    width: 100%;
    border-radius: 8px;
}

.close-popup {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
}

/* Teaser Section */
.teaser-section {
    margin-bottom: 3rem;
    text-align: center;
}

.teaser-video-container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.teaser-video-container video {
    width: 100%;
    border-radius: 4px;
}

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

.result-item {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.result-item h4 {
    margin: 1rem 0;
    color: #1a1a1a;
}

/* Dataset Section */
.dataset-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.dataset-info {
    margin-bottom: 3rem;
}

.dataset-info ul {
    list-style-type: none;
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.dataset-info ul li {
    margin: 0.5rem 0;
    position: relative;
}

.dataset-info ul li:before {
    content: "•";
    position: absolute;
    left: -1.5rem;
    color: var(--accent-color);
}

.dataset-info h3 {
    margin: 2rem 0 1rem;
    color: var(--accent-color);
}

.dataset-link {
    margin-top: 2rem;
    text-align: center;
}

.dataset-link .button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.dataset-link .button:hover {
    background-color: var(--accent-color-dark);
}

/* Visualization Grid */
.visualization-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
    align-items: start;
}

.visualization-item {
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.dataset-image {
    width: 100%;
    height: 300px; /* Fixed height for all images */
    object-fit: cover; /* This will crop EXO2 image */
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    background-color: white; /* For padding around GIF */
}

/* Special handling for GIF to maintain aspect ratio with padding */
.visualization-item[data-dataset="camera"] .dataset-image {
    object-fit: contain;
    padding: 1rem;
}

/* Special handling for LiDAR to maintain aspect ratio */
.visualization-item[data-dataset="lidar"] .dataset-image {
    object-fit: contain;
}

.visualization-item p {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-color);
}

/* Closing Section */
.closing-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 4rem 0;
}

.closing-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.contact-info {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.contact-info p {
    font-size: 1rem;
    color: var(--text-color-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .content {
        margin-left: 0;
        padding: 2rem;
    }

    .dataset-content {
        grid-template-columns: 1fr;
    }

    /* Stack key findings in one column on mobile */
    .key-findings-grid {
        grid-template-columns: 1fr;
    }
}

/* Place critical mobile overrides after base rules to win cascade */
@media (max-width: 768px) {
    /* Stack grids - force single column */
    .key-findings-grid,
    .video-grid,
    .visualization-grid {
        grid-template-columns: 1fr !important;
    }

    /* Tighten spacing on small screens */
    .section {
        margin-bottom: 2rem;
    }

    .content {
        padding: 1.5rem;
    }

    .title-container {
        margin-bottom: 1.5rem;
    }
}

/* Animations */
.section {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Abstract Highlight */
.highlight {
    /* slightly deeper orange at the start, a little brighter at the end */
    background: linear-gradient(
        120deg,
        rgba(255, 138,   0, 0.30) 0%,
        rgba(255, 107,   0, 0.30) 100%
    );
    background-repeat: no-repeat;
    background-size: 100% 0.4em;
    background-position: 0 88%;
    transition: background-size 0.25s ease-in;
    padding: 0 2px;
}
.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6 {
  font-weight: 400;   /* or 500 if you still want a touch of emphasis */
}

.highlight:hover {
    background-size: 100% 100%;}

/* Title and Author Styles */
.title-container {
    margin-bottom: 3rem;
}

.title-container h1 {
    color: #1E3A8A;  /* Modern blue color */
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.author {
    color: #6b7280;  /* Grayish color */
    font-style: italic;
    font-size: 1.2rem;
}

/* Section Headers */
.section h2, .section h3 {
    color: #1E3A8A;  /* Same blue as title */
    margin-bottom: 1.5rem;
}

.section h2 {
    font-size: 2rem;
}

.section h3 {
    font-size: 1.75rem;
}

/* Key Findings Grid */
.key-findings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.finding-item {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.finding-title {
    color: #1E3A8A;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.finding-preview {
    font-size: 1rem;
    color: #4B5563;
}

/* Finding Popup */
.finding-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
    overflow-y: auto;
}

.finding-popup.active {
    display: flex;
}

.finding-popup-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 1000px;
    margin: 2rem auto;
    position: relative;
}

.finding-popup-content h3 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: #1E3A8A;
}

.finding-explanation {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #4B5563;
}

.finding-image {
    width: 100%;
    max-width: 600px;
    margin: 1rem auto;
    display: block;
    border-radius: 4px;
}

/* Tables in popup */
.finding-popup-content .comparison-table {
    font-size: 0.85rem;
    margin: 1rem auto;
    max-width: 700px;
}

.finding-popup-content .comparison-table th,
.finding-popup-content .comparison-table td {
    padding: 0.4rem;
}

/* Tables */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.comparison-table th,
.comparison-table td {
    padding: 0.5rem;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.comparison-table th {
    background-color: #f9fafb;
    font-weight: 500;
}

.comparison-table tr:nth-child(even) {
    background-color: #f9fafb;
}

.comparison-table tr:hover {
    background-color: #f3f4f6;
}

.full-table {
    display: none;
}

/* Finding Images */
.finding-image {
    width: 100%;
    border-radius: 4px;
    margin: 1rem 0;
}

/* Dataset Popup */
.dataset-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
    overflow-y: auto;
}

.dataset-popup.active {
    display: flex;
}

.dataset-popup-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 1000px;
    margin: 2rem auto;
    position: relative;
}

.dataset-popup-content h3 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

.dataset-popup-image {
    width: 100%;
    max-width: 600px;
    height: auto; /* Allow natural height in popup */
    margin: 1rem auto;
    display: block;
    border-radius: 4px;
}

.dataset-explanation {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #4B5563;
}

.close-dataset {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

.close-dataset:hover {
    color: #000;
}

.heart {
    color: #e25555;
    animation: heartbeat 1.5s ease-in-out infinite;
    display: inline-block;
    transform-origin: center;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
} 