* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    padding: 0;
    background-color: #e9e5dc;
    background-image: url("images/paper-texture.png");
    background-repeat: repeat;
    background-size: 700px 700px;
    color: #111;
    font-family: "Courier New", Courier, monospace;
    line-height: 1.5;
}

#container {
    width: 90%;
    max-width: 680px;
    margin: 0 auto;
    padding: 65px 0 85px;
}

/* HEADER */

#header {
    text-align: center;
    background: none;
    border: none;
    padding: 0;
    margin-bottom: 65px;
}

#header h1 {
    margin: 0 0 18px;
    font-size: 1.6rem;
    font-weight: bold;
    letter-spacing: -0.04em;
    text-transform: lowercase;
}

#header ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 18px;
}

#header li {
    font-size: 0.85rem;
}

#header li a {
    color: #111;
    background: none;
    text-decoration: underline;
}

#header li a:hover {
    background: #111;
    color: #e8e7e2;
    text-decoration: none;
}

/* CONTENT */

#content {
    padding: 0;
}

h1 {
    margin: 0 0 12px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: -0.03em;
}

h2 {
    margin: 0 0 20px;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-bottom: 1px solid #111;
    padding-bottom: 6px;
}

h3,
h4,
h5 {
    font-family: "Courier New", Courier, monospace;
}

p {
    margin: 0 0 20px;
}

a {
    color: #111;
    text-decoration: underline;
}

a:hover {
    background: #111;
    color: #e8e7e2;
    text-decoration: none;
}

/* POST LIST */

#postlistdiv ul,
#recentpostlistdiv ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#postlistdiv li,
#recentpostlistdiv li {
    margin-bottom: 14px;
}

#postlistdiv li a,
#recentpostlistdiv li a {
    font-size: 0.95rem;
}

/* POST DATE */

#postDate {
    font-family: "Courier New", Courier, monospace;
    font-size: 0.8rem;
    font-weight: bold;
    margin: 0 0 40px;
    letter-spacing: 0.08em;
}

/* IMAGES */

img {
    max-width: 100%;
    height: auto;
    margin: 12px 0;
}

.right {
    float: right;
    margin-left: 1em;
}

.left {
    float: left;
    margin-right: 1em;
}

.center {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* DIVIDERS */

hr {
    border: 0;
    border-top: 1px solid #111;
    margin: 50px 0 25px;
}

/* NEXT / PREVIOUS */

#nextprev {
    text-align: center;
    font-size: 0.8rem;
    border-top: 1px solid #111;
    padding-top: 20px;
    margin-top: 70px;
}

/* FOOTER */

#footer {
    width: 100%;
    max-width: 680px;
    margin: -1px auto 0;
    padding: 0;
    font-size: 0.7rem;
    text-align: center;
}

#footer hr {
    width: 100%;
    margin: 30px 0;
}

/* CAPTIONS */

.caption {
    margin-top: 0;
    font-size: 0.8rem;
    font-style: italic;
}

/* SMALL IMAGES */

@media only screen and (min-width: 600px) {
    .small {
        max-width: 60%;
        height: auto;
    }
}

/* POST STYLE */

#postTitleH1 {
    font-family: "Courier New", Courier, monospace;
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: -0.05em;
    text-transform: none;
    margin-bottom: 10px;
}


#content p {
    max-width: 620px;
}

#content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 30px auto;
}

#content img:not(.small) {
    filter: contrast(1.03);
}

#content .caption {
    max-width: 500px;
    margin: -18px auto 30px;
    font-size: 0.75rem;
    text-align: center;
}


/* PHOTO GRID */

#content .photo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 30px 0;
}

#content .photo-grid a {
    display: block;
    width: 100%;
}

#content .photo-grid img {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0;
}

/* PHOTO LIGHTBOX */

#photo-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
}

#photo-lightbox.open {
    display: flex;
}

#photo-lightbox #lightbox-image {
    display: block;
    width: auto;
    max-width: 90vw;
    max-height: 88vh;
    height: auto;
    margin: 0;
    object-fit: contain;
}

#photo-lightbox button {
    position: absolute;
    z-index: 100000;
    border: none;
    background: transparent;
    color: white;
    font-family: Arial, Helvetica, sans-serif;
    cursor: pointer;
    line-height: 1;
    padding: 10px;
}

#lightbox-close {
    top: 15px;
    right: 20px;
    font-size: 42px;
}

#lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 60px;
}

#lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 60px;
}

/* LAST.FM */

#lastfm {
    margin-top: 55px;
    margin-bottom: 0;
    padding-bottom: 0;
}

#lastfm h2 {
    margin-bottom: 15px;
}

#lastfm-tracks {
    font-size: 0.85rem;
    margin-bottom: 0;
    padding-bottom: 0;
}

.lastfm-track {
    margin-bottom: 10px;
}

.lastfm-track:last-child {
    margin-bottom: 0;
}

.lastfm-track a {
    text-decoration: none;
}

.lastfm-track a:hover {
    text-decoration: underline;
}

.lastfm-now {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-left: 6px;
}

/* CURRENTLY */

#currently {
    margin-top: 45px;
    margin-bottom: 45px;
}

#currently .currently-title {
    font-family: "Courier New", Courier, monospace;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 0.12em;
    margin-bottom: 15px;
}

#currently p {
    margin: 0 0 8px;
    font-size: 0.85rem;
}

#currently p span {
    display: inline-block;
    width: 70px;
}

/* MOBILE */

@media only screen and (max-width: 599px) {

    #container {
        width: 88%;
        padding-top: 35px;
        padding-bottom: 65px;
    }

    #header {
        margin-bottom: 50px;
    }

    #content {
        font-size: 0.95rem;
    }

    #postTitleH1 {
        font-size: 1.5rem;
    }

    #postDate {
        margin-bottom: 30px;
    }

    #content img {
        margin: 25px auto;
    }

    /* MOBILE PHOTO GRID */

    #content .photo-grid {
        grid-template-columns: 1fr;
    }

    /* MOBILE LIGHTBOX */

    #photo-lightbox #lightbox-image {
        max-width: 88vw;
        max-height: 82vh;
    }

    #lightbox-close {
        top: 10px;
        right: 12px;
        font-size: 36px;
    }

    #lightbox-prev,
    #lightbox-next {
        font-size: 45px;
    }

    /* MOBILE LAST.FM */

    #lastfm {
        margin-top: 40px;
    }

    #lastfm-tracks {
        font-size: 0.85rem;
    }

    /* MOBILE CURRENTLY */

    #currently {
        margin-top: 40px;
        margin-bottom: 40px;
    }

    #currently .currently-title {
        font-size: 0.8rem;
        margin-bottom: 15px;
    }

    #currently p {
        font-size: 0.95rem;
        margin-bottom: 8px;
    }

}

/* GUESTBOOK */

.guestbook-page {
    width: 100%;
    margin: 0;
}

.guestbook-page h2 {
    margin-bottom: 15px;
}

.guestbook-intro {
    font-size: 0.85rem;
    margin-bottom: 25px;
}

.guestbook-frame {
    width: 100%;
    height: 800px;
    overflow: hidden;
}

.guestbook-frame iframe {
    display: block;
    width: 100%;
    height: 800px;
    border: 0;
    margin: 0;
    padding: 0;
}