@font-face {
    font-family: 'Maple Mono';
    src: url('../assets/font/MapleMono-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Maple Mono';
    src: url('../assets/font/MapleMono-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Maple Mono';
    src: url('../assets/font/MapleMono-Italic.otf') format('opentype');
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: 'Maple Mono';
    src: url('../assets/font/MapleMono-BoldItalic.otf') format('opentype');
    font-weight: bold;
    font-style: italic;
}

header {
    background-image: url("../assets/Images/book.jpg");
    background-size: cover;
    padding: 20px;
    text-align: center;
    font-size: 24px;
    margin-bottom: 10px;

}

#loop-icon {
    width: 25px;
    height: 25px;
}

#loop-icon,
header input {
    vertical-align: middle;
}

header nav {
    display: inline-block;
}

main {
    padding: 20px;
    text-align: center;
}

body {
    font-family: 'Maple Mono', monospace;
    margin: 0;
    padding: 0;
    background-image: url("../assets/Images/book.jpg");
    background-color: #f4f4f4;
    background-size: cover;
}

input,
button,
textarea,
select {
    font-family: inherit;
}

#hero-icon {
    height: 100px;
    width: 250px;
}

#hero-icon:hover {
    transform: rotate(45deg) scale(1.6);
    transition: transform 0.5s ease-in-out;
}

#blog-layout {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 10px;
    box-sizing: border-box;
    min-height: calc(100vh - 200px);
}

#blog-scroll-area {
    flex: 1;
    max-width: 600px;
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    padding: 30px 40px;
    box-sizing: border-box;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#blog-scroll-area::-webkit-scrollbar {
    display: none;
}

#side-left,
#side-right {
    flex: 0 0 200px;
    display: grid;
    place-items: center;
    padding: 40px 10px;
}

.side-image {
    grid-row: 1;
    grid-column: 1;
    max-width: 180px;
    max-height: 400px;
    object-fit: contain;
    border-radius: 4px;
    filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.25));
    transition: opacity 0.4s ease, transform 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.side-image.active {
    opacity: 1;
    pointer-events: auto;
}

.side-image:hover {
    transform: scale(1.05) rotate(-2deg);
}

.blog-post {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px dashed #c4a882;
    animation: fadeInPost 0.5s ease-out both;
}

.blog-post:last-child {
    border-bottom: none;
}



@keyframes fadeInPost {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

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

.blog-post-header {
    margin-bottom: 12px;
}

.blog-post-title {
    font-size: 1.4em;
    color: #4a3728;
    margin: 0 0 4px 0;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.blog-post-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.blog-post-date {
    font-size: 0.8em;
    color: #8b7355;
    font-style: italic;
}

.blog-post-category {
    font-size: 0.85em;
    color: #c4a882;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
    padding: 2px 6px;
    border-radius: 3px;
}

.blog-post-content {
    font-size: 0.95em;
    line-height: 1.7;
    color: #3d3225;
    text-align: left;
}

.blog-post-content p {
    margin: 0 0 10px 0;
}

.blog-post-content strong {
    color: #4a3728;
}

.blog-post-content em {
    color: #6b5a47;
}

.blog-post-content code {
    background-color: rgba(196, 168, 130, 0.2);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.9em;
}

.blog-post-separator {
    text-align: center;
    color: #c4a882;
    font-size: 1.2em;
    letter-spacing: 8px;
    margin: 5px 0;
    user-select: none;
}

.back-to-top-wrapper {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 20px;
}

.blog-scroll-bottom-spacer {
    height: 180px;
}

.blog-empty {
    text-align: center;
    font-style: italic;
    color: #8b7355;
    padding: 60px 20px;
    font-size: 1.1em;
}

@media (max-width: 1000px) {
    #blog-layout {
        flex-direction: row;
        align-items: flex-start;
        min-height: auto;
        padding: 10px 5px;
    }

    body {
        background-image: url("../assets/Images/page.jpg");
        background-color: #e2d197;
        font-family: 'Maple Mono', monospace;
        margin: 0;
        padding: 0;
        background-size: cover;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    header {
        font-size: 18px;
        background-image: url("../assets/Images/bookup.jpg");
        background-size: cover;
    }

    #hero-icon {
        height: 80px;
        width: 200px;
    }

    #side-left,
    #side-right {
        flex: 0 0 60px;
        padding: 20px 2px;
    }

    .side-image {
        max-width: 55px;
        max-height: 150px;
    }

    #blog-scroll-area {
        flex: 1;
        min-width: 0;
        max-width: none;
        max-height: none;
        overflow-y: visible;
        padding: 15px 8px;
        box-sizing: border-box;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
    }

    .blog-post-title {
        font-size: 1.1em;
    }

    .blog-post-content {
        font-size: 0.85em;
    }

    input {
        display: block;
        margin: 0 auto 10px auto;
    }

    nav {
        display: flex;
        justify-content: center;
        gap: 10px;
    }

    .blog-scroll-bottom-spacer {
        height: 60px;
    }
}