* {
    box-sizing: border-box;
}

body, html {
    height: auto;
    min-height: 100%;
}

body {
    margin: 0;
    font-family: "Nanum Myeongjo", "Georgia", serif;
    display: flex;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 350px;
    background-color: #0c5230;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 20px;
    overflow-y: auto;
}

.sidebar h1 {
    font-size: 26px;
    text-align: left;
    line-height: 40px;
    margin-top: 5px;
    margin-bottom: 30px;
    font-weight: normal;
}

.sidebar h1 a {
    color: white;
    text-decoration: none;
    font-size: 26px;
    font-family: "Sixtyfour";
}

.header-fix {
    letter-spacing: -4px;
}

.sidebar a {
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    display: block;
    cursor: pointer;
    font-size: 20px;
}

.sidebar a:hover {
    color: lightgray;
    transition: color ease-in 0.1s;
}
.dropdown-content {
    max-height: 0;
    overflow: hidden;
    background-color: #0a4728;
}

.dropdown-content a {
    padding-left: 45px;
}

.dropdown.open .dropdown-content {
    max-height: 500px;
    border-top: 1px solid #126b3f;
    border-bottom: 1px solid #126b3f;
    transition: max-height .3s ease;
}

.sidebar-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 350px;
    text-align: center;
    padding: 15px 10px;
    font-size: 14px;
    color: #d0e6dc;
    background-color: #0a4728;
    font-style: italic;
    z-index: 1000;
}

#current {
    text-decoration: underline solid white 1px;
}

main {
    flex: 1;
    padding: 30px;
    margin-left: 350px;
}

main p {
    margin-right: 20%;
    font-size: 20px;
}

main h2 {
    font-family: "Sixtyfour", "Nanum Myeongjo", serif;
    font-weight: normal;
    margin-top: 10px;;
    margin-bottom: 50px;
    font-size: 30px;
}

main h3 {
    font-size: 25px;
}

ul {
    font-size: 20px;
    margin-right: 20%;
    display: block;
    padding-left: 20px;
}

ul li {
    font-size: 20px;
}

ul li a {
    word-wrap: normal;
    overflow-wrap: anywhere;
}

.citations {
    padding-left: 2em;
    text-indent: -2em;
    list-style: none;
}

.portrait {
    width: 50%;
    max-width: 500px;

}

.video-container {
    position: relative;
    width: 100%;
    max-width: 960px;
    aspect-ratio: 16 / 9;
    margin-top: 20px;
    overflow: hidden;
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.container {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
    max-width: 1200px;
    margin-left: 0;
    margin-bottom: 50px;
    gap: 20px;
}

.description {
    flex: 1;
}

.description h3, .description p {
    margin-top: 0;
    line-height: 1.3;
}

.iframe-container {
    flex: 1;
    max-width: 640px;
}

iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    border: 1px solid #ccc;
    display: block;
    background-color: black;
}

.fourbythree {
    aspect-ratio: 4/3 !important;
}

.slideshow-container {
    flex: 1;
    max-width: 640px;
    max-height: auto;
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
    background: #000;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    cursor: pointer;
    padding: 10px 15px;
    font-size: 18px;
    transition: background-color 0.2s;
    z-index: 10;
}

.nav-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

.instagram-container {
    flex: 1;
    max-width: 640px;
    aspect-ratio: 9 / 16;
    position: relative;
    overflow: hidden;
    background: #fafafa;
}

.instagram-container iframe,
.instagram-container blockquote {
    width: 100%;
    height: 100%;
    border: none;
    margin: 0;
}

.image-container {
    flex: 1;
    max-width: 640px;
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.static-image-container {
    flex: 1;
    max-width: 320px;
    position: relative;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 20px;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.static-image-container img {
    width: 100%;
}

.image-grid-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 50px auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.image-grid-container h3 {
    margin-top: 0;
    font-size: 25px;
}

.image-grid-container p {
    font-size: 18px;
    line-height: 1.4;
    margin-bottom: 10px;
    max-width: 80%;
}

.image-grid {
    display: flex;
    align-items: baseline;
    width: 100%;
    max-width: 1300px;
    margin-left: 0;
    margin-bottom: 50px;
    gap: 20px;
}

.image-grid figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.image-grid img {
    width: 100%;
    height: auto;
    object-fit: cover;
    background-color: #000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-grid img:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.image-grid figcaption {
    margin-top: 20px;
    font-size: 16px;
    color: #333;
    font-style: italic;
    max-width: 90%;
}

.one-image {
    width: 300px;
    height: auto;
    align-items: baseline;
    margin-bottom: 20px;
}

.fullscreen-overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.fullscreen-overlay .content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.fullscreen-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.fullscreen-overlay img {
    object-fit: contain;
    transform: scale(0.95);
    max-width: 95%;
    max-height: 80vh;
    transition: transform 0.3s ease;
}

.fullscreen-overlay.active img {
    transform: scale(1);
}

.fullscreen-overlay .caption {
    color: #fff;
    font-size: 18px;
    font-style: italic;
    margin-top: 15px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    text-align: center;
}

.fullscreen-overlay.active .caption {
    opacity: 1;
}

.fullscreen-overlay .close-btn {
    position: fixed;
    z-index: 3000;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 35px;
    cursor: pointer;
    transition: color 0.3s;
}

.fullscreen-overlay .close-btn:hover {
    color: #ccc;
}

.mobile-only-text {
    color: gray;
    display: none;
    font-size: 16px;
}

@media (max-width: 1000px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        padding: 10px 0;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-around;
        align-items: flex-start;
        border-bottom: 3px solid #126b3f;
    }

    .sidebar h1 {
        margin: 10px 0;
        text-align: center;
        width: 100%;
    }

    .sidebar a {
        font-size: 16px;
        padding: 10px 16px;
    }

    .sidebar-footer {
        display: none;
    }

    main {
        margin-left: 0;
        padding: 20px;
    }

    h2 {
        margin-left: 0;
    }

    ul li {
        font-size: 18px;
    }

    .static-image-container {
        max-width: 100%;
        margin-left: 0;
    }

    main .container:nth-of-type(2) .static-image-container,
    main .container:nth-of-type(3) .static-image-container {
        display: none;
    }

    .container, 
    .image-grid-container {
        flex-direction: column;
        align-items: left;
        gap: 15px;
    }

    .iframe-container,
    .slideshow-container,
    .instagram-container,
    .image-container {
        width: 100%;
        max-width: 100%;
    }

    .image-grid {
        width: 80%;
        max-width: 700px;
        flex-wrap: wrap;
    }

    .image-grid figure {
        flex: 1 1 calc(30% - 20px);
    }    

    .image-grid figcaption {
        font-size: 14px;
    }

    .one-image {
        flex: 1 1 calc(50% - 20px);
        width: 300px;
    }

    main h2 {
        font-size: 26px;
        margin-bottom: 20px;
    }

    main h3 {
        font-size: 22px;
    }

    main p {
        font-size: 18px;
        margin-right: 0;
    }

    .fullscreen-overlay {
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 0 10px;
    }

    .fullscreen-overlay .content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    .fullscreen-overlay img {
        margin: 0 auto;
        display: block;
        transform: none;
        max-width: 95%;
        max-height: 70vh;
        object-fit: contain;
    }

    .fullscreen-overlay .caption {
        font-size: 16px;
        margin-top: 10px;
    }

    .fullscreen-overlay .close-btn {
        font-size: 32px;
        width: 40px;
        height: 40px;
        top: 10px;
        right: 10px;
        background-color: rgba(0, 0, 0, 0.5);
        touch-action: manipulation;
    }
}

@media (max-width: 600px) {
    .image-grid figure {
        flex: 1 1 calc(50% - 20px);
    }   

    .mobile-only-text {
        display: block;
        margin-top: 0;
    }
}


