* {
    box-sizing: border-box;
}

body {
    background-color: #121620;
    color: white;
    font-family: monospace;
}

.site-footer {
    margin-top: 4rem;
    padding: 1rem;
    width: 100%;

    text-align: center;
    font-size: 0.8rem;
    color: #666;
}

.site-footer a {
    color: #888;
    text-decoration: none;
}

.site-footer a:hover {
    color: #aaa;
    text-decoration: underline;
}

/* Home page */

.home-page {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 2rem;
}

.home-page h1 {
    font-size: 5rem;
}

.home-page img {
    width: 100%;
    max-width: 300px;
}

.home-page .campfire-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.home-page .console {
    min-width: 300px;
    padding: 1.2rem 1.5rem;
    border: 1px solid #333;
    border-radius: 4px;
    background-color: #0b0d12;
    color: #888;
    font-size: 1rem;
    line-height: 1.7;
}

.home-page .console a {
    display: block;
    color: #aaa;
    text-decoration: none;
}

.home-page .console a:hover {
    color: white;
    text-decoration: underline;
}

/* Error page: share the home page's campfire and console. */

.error-page {
    min-height: 100vh;
    margin: 0;
    padding: 2rem 1rem 0;
}

.error-page main {
    width: 100%;
    flex: 1;
    text-align: center;
}

.error-page h1 {
    margin: 1rem 0;
}

.error-page h2 {
    font-size: clamp(1.25rem, 4vw, 2rem);
}

.error-page main > p {
    font-size: clamp(1rem, 3vw, 1.5rem);
    line-height: 1.6;
}

.error-page .console {
    text-align: left;
    min-width: 0;
    width: 300px;
    max-width: 100%;
}

.error-page .console a:focus-visible {
    color: white;
    outline: 2px solid white;
    outline-offset: 3px;
}

@media (max-width: 680px) {
    .error-page .campfire-area {
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* Photo gallery */

.content-page.photo-gallery-page .gallery-container {
    width: min(950px, 100%);
}

.photo-gallery-page .gallery-meta,
.photo-gallery-page .page-number,
.photo-gallery-page .pagination .disabled {
    color: #8991a3;
}

.photo-gallery-page .gallery-meta {
    margin: 0 0 14px;
}

.photo-gallery-page .gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.photo-gallery-page .photo {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid #303746;
    border-radius: 5px;
    background: #0b0f17;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.photo-gallery-page .photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.photo-gallery-page .photo:hover img {
    transform: scale(1.02);
    opacity: 0.9;
}

.photo-gallery-page .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 35px;
}

.photo-gallery-page .pagination a {
    padding: 9px 15px;
    border: 1px solid #596174;
    border-radius: 6px;
    background: #1a1f2b;
    color: white;
    text-decoration: none;
}

.photo-gallery-page .pagination a:hover,
.photo-gallery-page .pagination a:focus-visible {
    background: #292f3d;
}

.photo-gallery-page .pagination .disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* Photo viewer */

.photo-viewer-page {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 72px 24px 24px;
    background: #10131a;
}

.photo-viewer-page .image-frame {
    display: flex;
    max-width: min(1200px, 100%);
    max-height: calc(100vh - 96px);
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: 1px solid #353b48;
    border-radius: 8px;
    background: #080a0f;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

.photo-viewer-page .image-frame img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 122px);
    width: auto;
    height: auto;
    object-fit: contain;
}

.photo-viewer-page .back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 10px 16px;
    border: 1px solid #596174;
    border-radius: 6px;
    background: #1a1f2b;
    color: white;
    text-decoration: none;
}

.photo-viewer-page .back-button:hover,
.photo-viewer-page .back-button:focus-visible {
    background: #292f3d;
}

/* Content pages */

.content-page {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.content-page .content-container {
    width: min(760px, 100%);
    flex: 1;
    margin: 0 auto;
    padding: 40px 20px;
}

.content-page .content-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid #353b48;
    margin-bottom: 28px;
}

.content-page .content-header h1,
.content-page .content-header p {
    margin: 0;
}

.content-page .content-header h1 {
    font-size: 23px;
}

.content-page .content-header a {
    color: white;
}

.content-page .content-header p,
.notes-page .notes-notice,
.notes-page .note-entry time {
    color: #8991a3;
}

.notes-page .note-list {
    display: grid;
    gap: 18px;
}

.content-page .content-card {
    padding: 20px 22px;
    border: 1px solid #303746;
    border-radius: 8px;
    background: #0b0f17;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.notes-page .note-entry time {
    display: block;
    margin-bottom: 10px;
    font-size: 0.8rem;
}

.notes-page .note-entry p {
    margin: 0;
    color: #e5e8ef;
    font-family: system-ui, sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.about-page .about-content p {
    margin: 0 0 1.15rem;
    color: #e5e8ef;
    font-family: system-ui, sans-serif;
    font-size: 1rem;
    line-height: 1.65;
}

.about-page .about-content p:last-child {
    margin-bottom: 0;
}

@media (max-device-width: 600px) {
    .home-page .campfire-area {
        flex-direction: column;
    }

    .home-page .console {
        font-size: 1.5rem;
    }

    .photo-gallery-page .gallery {
        gap: 2px;
    }

    .photo-viewer-page {
        padding: 58px 10px 10px;
    }

    .photo-viewer-page .back-button {
        top: 10px;
        left: 10px;
        padding: 8px 12px;
    }

    .photo-viewer-page .image-frame {
        max-height: calc(100vh - 68px);
        padding: 6px;
    }

    .photo-viewer-page .image-frame img {
        max-height: calc(100vh - 82px);
    }

    .content-page .content-container {
        padding: 24px 14px;
    }

    .content-page .content-card {
        padding: 17px 16px;
    }
}
