/* Universal resets */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

@import url('https://fonts.googleapis.com/css2?family=Garamond:wght@400&display=swap');

@font-face {
    font-family: 'ZT Formom';
    src: url('jkwonn.github.io/assets/fonts/ZT Formom.woff2') format('woff2'),
         url('jkwonn.github.io/assets/fonts/ZT Formom.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'AppleGaramond';
    src: url('/assets/fonts/AppleGaramond.ttf') format('woff2'),
         url('/assets/fonts/AppleGaramond.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'Garamond', serif;
    background-color: white;
    color: #333;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow-y: auto;
}

.sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    padding-top: env(safe-area-inset-top, 30px);
    position: relative;
    z-index: 10;
    min-height: 80px;
}

header {
    text-align: left;
    margin-bottom: 10px; 
}

h1 {
    font-size: clamp(28px, 6vw, 48px);
    font-weight: normal;
    font-family: "AppleGaramond", sans-serif;
    white-space: nowrap;
    text-align: center;
    width: 100%;
    display: block;
    margin-top: env(safe-area-inset-top, 20px);
    padding: 10px 0;
    position: relative;
    z-index: 100;
    visibility: visible !important;
    opacity: 1 !important;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 85vw;
    width: 100%;
    padding: 20px;
    gap: 40px; 
}

nav {
    text-align: left;
    min-width: 200px;
    max-width: 20vw;
}

nav ul {
    list-style: none;
    padding: 0;
}

nav ul li {
    margin: 5px 0;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-size: clamp(14px, 1.5vw, 20px);
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #3366cc;
}

main {
    flex: 2;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

main img {
    max-width: 50vw;
    height: auto;
    display: block;
    image-rendering: pixelated;
}

.news {
    flex: 1;
    width: 20vw;
    text-align: left;
    font-size: clamp(14px, 1.3vw, 18px);
    min-width: 250px;
    padding-left: 40px; 
}

.news h2 {
    font-size: 18px;
    font-weight: normal;
    font-family: "AppleGaramond", sans-serif;
}

.news ul {
    list-style: none;
    padding: 0;
}

.news ul li {
    margin-bottom: 10px;
    font-size: clamp(14px, 1.5vw, 20px);
}

.news ul li a {
    text-decoration: none;
    color: #3366cc;
    font-weight: bold;
}

@media (min-width: 1600px) {
    .container {
        max-width: 1400px;
        margin: auto;
    }
}

@media (max-width: 1024px) {
    .container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .sidebar {
        width: 100%;
        align-items: center;
    }

    nav {
        width: 100%;
        text-align: center;
    }

    .news {
        width: 100%;
        text-align: center;
        margin-top: 20px;
    }

    main img {
        max-width: 80vw;
    }
}

@media (max-width: 900px) {
    nav {
        text-align: center;
        width: 100%;
        margin-bottom: 20px;
    }

    nav ul {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    main img {
        max-width: 60vw;
    }

    .news {
        text-align: center;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 10px;
        gap: 10px;
        max-width: 100vw;
    }

    .sidebar {
        width: 100%;
        align-items: center;
        padding-top: env(safe-area-inset-top, 20px);
    }

    h1 {
        font-size: clamp(20px, 5vw, 36px);
        white-space: normal;
        margin: 10px 0;
    }

    nav {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        text-align: center;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 3px 0;
    }

    nav ul li a {
        white-space: normal;
        overflow-wrap: break-word;
    }

    .news {
        width: 100%;
        min-width: 0;
        text-align: center;
        margin-top: 10px;
        padding-left: 0;
        white-space: normal;
        overflow-wrap: break-word;
    }
}

@media (max-width: 700px) {
    .container {
        padding: 5px;
    }
    .news {
        width: 90%;
        margin-top: 10px;
    }
    main img {
        max-width: 75vw;
    }
}
