/*
 * 1. Base Styles & Reset
 * Matches the original site's serif font and color palette.
 */
body {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 16px;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f5f5f7;
    /* Light gray background for depth */
}

/*
 * 2. Layout Container
 * Defines the fixed-width, centered main column of the site.
 */
.site-wrapper {
    max-width: 1100px;
    /* Slightly tighter for better readability */
    margin: 50px auto;
    padding: 40px;
    /* Increased padding */
    background-color: #ffffff;
    /* White card look */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    /* Subtle shadow */
    border-radius: 4px;
}

/* 
 * 3. Header & Affiliation 
 */
header {
    text-align: left;
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
}

header h1 {
    font-size: 2.4em;
    font-weight: normal;
    /* More elegant */
    margin: 0;
    color: #111;
    letter-spacing: -0.02em;
}

.affiliation {
    font-size: 1.1em;
    font-weight: 300;
    color: #666;
    margin: 5px 0 0 0;
    font-style: italic;
}

/* 
 * 4. Navigation Menu 
 */
nav {
    margin-bottom: 40px;
    padding: 10px 0;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: flex-start;
    gap: 25px;
    flex-wrap: wrap;
}

nav a {
    text-decoration: none;
    color: #555;
    font-weight: 600;
    font-size: 0.95em;
    padding: 5px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.2s ease;
}

nav a:hover {
    color: #a00;
    /* Deep red */
}

/* 
 * 5. Content Layout (Image + Text) 
 */
.content-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Consolidated Sidebar Image Classes */
.sidebar-image-section {
    flex-shrink: 0;
    width: 100%;
    text-align: center;
}

.sidebar-photo {
    width: 100%;
    max-width: 300px;
    height: auto;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}

.main-content {
    flex-grow: 1;
}

/* 
 * 6. Typography for Content 
 */
.main-content h2 {
    font-size: 1.8em;
    color: #111;
    margin-top: 0;
    font-weight: 400;
    /* Elegant, non-bold heading */
    margin-bottom: 1em;
}

.main-content h3 {
    font-size: 1.3em;
    font-weight: 600;
    color: #222;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    margin-top: 40px;
    margin-bottom: 20px;
}

.main-content p {
    margin-bottom: 1.2rem;
}

.main-content ul {
    list-style: square;
    padding-left: 20px;
    margin-bottom: 1.2rem;
}

.main-content li {
    margin-bottom: 0.5em;
    /* Breathing room for lists */
}

.main-content li ul {
    margin-bottom: 0;
    /* Remove extra spacing after nested lists */
}

/* Link Styling */
a {
    color: #900;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    text-decoration: underline;
    color: #b00;
}

/* 
 * 7. Footer 
 */
footer {
    text-align: center;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #f0f0f0;
    font-size: 0.85em;
    color: #999;
}

/* 
 * 8. Media Query for Desktop Layout 
 */
@media (min-width: 768px) {
    .content-container {
        flex-direction: row;
        align-items: flex-start;
    }

    .sidebar-image-section {
        width: 300px;
        padding-right: 50px;
        /* Generous spacing */
        text-align: left;
    }

    .sidebar-photo {
        margin: 0;
        /* Reset margin for desktop */
    }
}

/*
 * 9. Video & Gallery Styles
 */
.video-container {
    max-width: 600px;
    margin: 30px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.video-container video,
.video-container iframe,
.video-thumbnail {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    display: block;
    border: none;
    object-fit: cover;
}

.video-thumbnail-link {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.video-thumbnail {
    transition: transform 0.3s ease;
}

.video-thumbnail-link:hover .video-thumbnail {
    transform: scale(1.02);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
    z-index: 2;
    pointer-events: none;
}

.play-button::before {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 16px;
    border-color: transparent transparent transparent #fff;
    margin-left: 4px;
}

.video-thumbnail-link:hover .play-button {
    background-color: #f00;
    transform: translate(-50%, -50%) scale(1.1);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    margin-top: 25px;
}

.gallery-thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 2px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.gallery-thumb:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: auto;
    max-width: 90%;
    max-height: 85vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    background: #fff;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 50px;
    font-weight: 100;
    transition: color 0.2s;
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover {
    color: #ccc;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 15px 0;
    font-size: 0.9em;
}

.prev-arrow,
.next-arrow {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 40px;
    font-weight: bold;
    padding: 16px;
    user-select: none;
    transition: background-color 0.3s;
    border-radius: 3px;
}

.prev-arrow:hover,
.next-arrow:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.prev-arrow {
    left: 20px;
}

.next-arrow {
    right: 20px;
}