@font-face {
    font-family: "PixelJP";
    src: url("assets/PixelMplus12-Regular.ttf") format("truetype");

    font-weight: normal;
}

@font-face {
    font-family: "PixelJP";
    src: url("assets/PixelMplus12-Bold.ttf") format("truetype");

    font-weight: bold;
}

body {
    background: white;
    color: black;
    background: #f5f5f5;

    font-family:
        "PixelJP",
        "MS Gothic",
        "Osaka-Mono",
        monospace;

    font-size: 16px;
    letter-spacing: 1px;
    line-height: 1.9;

    image-rendering: pixelated;

    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: grayscale;

    text-rendering: optimizeSpeed;
    margin-left: 60px;
    padding: 10px;
    width: 90%;

}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CRT SCANLINES */

body::before {
    content: "";

    position: fixed;
    inset: 0;

    pointer-events: none;

    background:
        repeating-linear-gradient(to bottom,
            rgba(0, 0, 0, 0.12) 0px,
            rgba(0, 0, 0, 0.12) 1px,
            transparent 2px,
            transparent 4px);

    opacity: 0.45;

    z-index: 999;
}

/* SCREEN FLICKER */

body::after {
    content: "";

    position: fixed;
    inset: 0;

    pointer-events: none;

    background: rgba(255, 255, 255, 0.03);

    animation: flicker 0.15s infinite;

    z-index: 998;
}

@keyframes flicker {
    0% {
        opacity: 0.92;
    }

    50% {
        opacity: 0.98;
    }

    100% {
        opacity: 0.93;
    }
}

::selection {
    background: black;
    color: white;
}


a {
    color: black;
    text-decoration: none;
}

a:hover {
    background: black;
    color: white;
}

.logo a {
    display: inline-block;

    font-size: 40px;
    background: black;
    color: white;

    padding: 6px 12px;

    margin-bottom: 20px;
}

.site-header {
    border-bottom: 2px solid black;

    padding-bottom: 10px;
    margin-bottom: 10px;
}


.post-title {
    display: inline-block;

    background: black;
    color: white;

    padding: 4px 10px;

    margin-bottom: 18px;

    font-size: 30px;

    letter-spacing: 2px;
}

.post-content p {
    padding-bottom: 15px;
}

.date {
    font-size: 12px;

    letter-spacing: 1px;

    opacity: 0.7;

    margin-bottom: 10px;
}

.site-footer {
    border-top: 2px solid black;

    padding-top: 20px;

    margin-top: 60px;

    font-size: 12px;
}


/* POSTS SCREEN */

.posts-screen {
    border: 2px solid black;

    padding: 30px;

    margin-bottom: 40px;
}

.screen-title {
    display: inline-block;

    background: black;
    color: white;

    padding:
        6px 12px;

    margin-bottom: 30px;

    letter-spacing: 2px;
}

.post-list {
    display: flex;

    flex-direction: column;

    gap: 10px;
}


.navbar {
    display: flex;

    flex-wrap: wrap;

    gap: 10px;

    margin-top: 5px;

    padding-top: 5;

    border-top: 2px dotted grey;
}

/* NAV ITEMS */

.navbar a {
    display: inline-block;

    padding: 5px 5px;

    text-align: center;

    letter-spacing: 1px;

    transition: all 0.12s linear;
}

/* HOVER STATE */

.navbar a:hover {
    background: black;
    color: white;
}

/* ACTIVE SPACING CONTEXT (optional visual breathing room) */

.site-header {
    padding-bottom: 0px;
}

/* pushes content away from navbar */
main,
.content {
    margin-top: 15px;
}

/* SEARCH BAR */

.gallery-controls {
    margin-bottom: 20px;
}

#search {
    width: 100%;

    padding: 10px 12px;

    border: 2px solid black;

    background: white;

    color: black;

    font-family: inherit;

    outline: none;

    letter-spacing: 1px;
}

#search::placeholder {
    color: black;

    opacity: 0.5;
}

/* CRT hover feel */
#search:focus {
    background: black;
    color: white;
}

#search:focus::placeholder {
    color: white;
    opacity: 0.6;
}

.site-header,
.content,
.posts-screen,
.gallery-screen,
.post,
img,
.site-footer {
    max-width: 900px;
    margin-left: 60px;
    padding: 5px;
    width: 90%;


    margin-left: auto;
    margin-right: auto;
}

/* sidebar */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 60px;
    height: 100vh;
    background: black;
    color: white;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;

    padding: 20px 0;
}

/* ICONS */

.sidebar-icons {
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;

}


.sidebar-icons a {
    border: none;
    color: white;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.sidebar-icons a:hover {
    background: white;
    color: black;
}

/* VERTICAL TEXT */

.side-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);

    font-size: 11px;
    opacity: 0.8;
}

/* BOTTOM LABEL */

.side-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);

    font-size: 11px;
    opacity: 0.6;
}

/* MAIN CONTENT */

.content {
    margin-left: 60px;
    padding: 60px;
    width: 100%;
}
