/* General Reset */
body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    line-height: 1.6; 
    color: #333; 
    max-width: 960px; 
    margin: 0 auto; 
    padding: 40px 20px; 
}

/* HEADER LAYOUT - LEFT ALIGNED */
header { 
    display: flex; 
    align-items: flex-start; /* Aligns logo with top of title */
    justify-content: flex-start; /* Pushes everything to the left */
    gap: 30px; 
    margin-bottom: 40px; 
    flex-wrap: nowrap; /* Keep side-by-side on desktop */
}

.logo-container {
    flex: 0 0 140px; /* Fixed width */
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #ccc;
    color: #888;
    font-weight: bold;
    font-size: 0.9em;
    text-align: center;
}

.header-content {
    flex: 1;
    text-align: left; /* Strict left alignment */
}

/* Typography */
h1 { 
    margin-top: 0;
    margin-bottom: 15px; 
    font-size: 2.2em; 
    line-height: 1.2; 
    color: #000;
}

h2 { 
    border-bottom: 1px solid #999; 
    padding-bottom: 5px; 
    margin-top: 50px; 
    margin-bottom: 20px;
    color: #111; 
    text-align: left;
}

h3 {
    color: #444;
}

code {
    /* background-color: #f0f0f0;  */
    padding: 2px 2px; 
    border-radius: 4px; 
    font-family: 'Courier New', Courier, monospace; 
    font-size: 1em;
    font-style: normal;
}

a { 
    color: #0066cc; 
    text-decoration: none; 
}

a:hover {
    text-decoration: underline;
}

.authors { 
    margin-bottom: 10px; 
    font-size: 1.1em; 
    color: #000; 
    text-align: left;
}

.affiliations { 
    color: #666; 
    font-size: 0.95em; 
    margin-bottom: 20px; 
    text-align: left;
}

.venue {
    color: #000;
    font-size: 1.1em; 
    margin-bottom: 20px; 
    text-align: left;
}

/* Buttons - Left Aligned */
.links { 
    margin-top: 20px; 
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

.btn {
    background-color: #333; 
    color: white; 
    padding: 10px 20px; 
    text-decoration: none; 
    border-radius: 4px; /* Slightly squarer for left-align theme */
    font-weight: 500; 
    font-size: 0.9em;
    transition: background 0.3s;
}
.btn:hover { background-color: #555; }

#video_selector {
    margin-top: 10px;
    margin-bottom: 10px;
    display: flex;
    gap: 15px;
    /* center-align video selector buttons */
    justify-content: center;
}
#video_selector .btn {
    background-color: #eee; 
    color: #333; 
    padding: 8px 16px; 
    font-size: 0.9em;
}
#video_selector .btn:hover {
    background-color: #ccc;
}
#video_selector .btn.active {
    background-color: #333; 
    color: white;
}
#video_selector .btn.active:hover {
    background-color: #555; 
    color: white;
}

.videos_array {
    display: grid;
    gap: 10px;
    justify-content: center; /* Center the grid */
    grid-template-columns: repeat(auto-fit, minmax(20%, 150px)); /* Responsive grid */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.rl_item {
    border: 1px solid #555;
    background-color: #f0f0f0;
    border-radius: 10px;
    padding: 15px;
    font-size: 0.95em;
}
.rl_item h3 {
    margin-top: 0;
    margin-left: 0px;
    margin-bottom: 10px;
    color: #333;
}
.rl_item h3 code {
    background-color: transparent;
    padding: 0;
    font-weight: bold;
}

/* Media & Captions */
.teaser-video { 
    width: 100%; 
    height: 400px; 
    background: #000; 
    border-radius: 4px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: white; 
    margin-bottom: 10px; 
}

.abstract { 
    background-color: #f9f9f9; 
    padding: 25px; 
    border-radius: 4px; 
    border-left: 5px solid #333; 
    text-align: left;
}

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

.media {
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 4px; 
    color: #666; 
}

.media-placeholder { 
    background-color: #eee; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 4px; 
    color: #666; 
    font-weight: bold; 
    border: 1px solid #ddd; 
}

.figure-caption { 
    text-align: left; /* Left aligned captions */
    font-size: 0.9em; 
    color: #555; 
    margin-top: 8px; 
    font-style: italic; 
    display: block;
}
.figure-subcaption { 
    text-align: center; /* Left aligned captions */
    font-size: 0.85em; 
    color: #555; 
    margin-top: 3px; 
    font-style: italic; 
    display: block;
}

.bibtex { 
    background-color: #f4f4f4;
    padding: 15px;
    border-radius: 4px;
    border-left: 5px solid #333;
    font-family: 'Courier New', Courier, monospace;
    white-space: pre-wrap; 
    font-size: 0.85em; 
    overflow-x: auto; 
    text-align: left;
}

/* Footer */
footer { 
    margin-top: 60px; 
    padding-top: 20px; 
    border-top: 1px solid #eaeaea; 
    text-align: left; 
    font-size: 0.9em; 
    color: #888; 
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    header { flex-direction: column; gap: 20px; }
    .logo-container { margin-bottom: 10px; }
    /* On mobile, we might still want left align, or center. Keeping left for consistency. */
}

