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

* {
    margin: 0;
}

html,
body {
    min-height: 100%;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

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

button,
input,
textarea {
    font: inherit;
}

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

:root{

    --bg:#050505;
    --text:#f2f2f2;
    --muted:#777;
    --border:#1a1a1a;

    --font-body:Inter,sans-serif;
    --font-heading:"Space Mono",monospace;
    --font-meta:"IBM Plex Mono",monospace;

    --content-width:720px;
    --page-width:1200px;

    --space-xs:.5rem;
    --space-sm:1rem;
    --space-md:2rem;
    --space-lg:4rem;
    --space-xl:8rem;

}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);

    font-family: var(--font-body);
    line-height: 1.7;

    overflow-x: hidden;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

p {
    margin-bottom: var(--space-md);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.2;
}

.entry-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 1.2;
}

.entry-meta,
small,
time {
    font-family: var(--font-meta);
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
}

main {
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 4rem 2rem;
}

.noise {
    position: fixed;
    inset: 0;

    pointer-events: none;

    opacity: .025;

    background-image: url("/assets/images/noise.png");
    background-repeat: repeat;

    z-index: -1;
}

.site-header {
    position: sticky;
    top: 0;

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;

    padding: .75rem 2rem;
    -moz-column-gap: 1rem;
         column-gap: 1rem;        /* adds a guaranteed buffer between columns */

    background: var(--bg);
}

.site-title {
    grid-column: 2;
    justify-self: center;

    font-size: .95rem;
    font-weight: 400;
    letter-spacing: .15em;
}

.site-nav {
    grid-column: 3;
    justify-self: end;

    display: flex;
    gap: 1.5rem;
}

.site-nav a {
    font-size: .75rem;
    color: var(--muted);
}

.site-nav a:hover {
    color: var(--text);
}

@media (max-width: 600px) {
    .site-header {
        grid-template-columns: 1fr auto;
    }

    .site-title {
        grid-column: 1;
        justify-self: start;
    }

    .site-nav {
        grid-column: 2;
        gap: 1rem;
    }
}

.search-trigger {
    grid-column: 1;
    justify-self: start;

    background: none;
    border: none;
    cursor: pointer;

    font-family: var(--font-meta);
    font-size: .75rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);

    padding: 0;
    transition: color .2s;
}

.search-trigger:hover {
    color: var(--text);
}

.site-nav a[href="/feed.xml"] {
    color: var(--muted);
    opacity: .5;
}

.site-nav a[href="/feed.xml"]:hover {
    color: var(--text);
    opacity: 1;
}

/* Archive Index */

.archive-index {
    max-width: 700px;
    margin: auto;
}

.archive-heading {
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 4rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.archive-index-record {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    align-items: baseline;
    gap: 2rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.archive-number {
    font-family: var(--font-meta);
    font-size: .75rem;
    color: var(--muted);
    white-space: nowrap;
}

.archive-title {
    font-size: .95rem;
}

.archive-title:hover {
    color: var(--muted);
}

.archive-year {
    font-family: var(--font-meta);
    font-size: .75rem;
    color: var(--muted);
}

.archive-year-break {
    margin: 2rem 0 0;
    border-top: 1px solid var(--border);
    opacity: .3;
}

/* Entry Pagination */

.entry-pagination {
    display: flex;
    justify-content: space-between;
    margin-top: 6rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.entry-pagination a,
.entry-pagination span {
    font-family: var(--font-meta);
    font-size: .8rem;
    color: var(--muted);
}

.entry-pagination a:hover {
    color: var(--text);
}

/* Archive Record (entry footer) */

.archive-record {
    margin-top: 8rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.archive-record h2 {
    font-size: .8rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2rem;
}

.archive-record dl {
    display: grid;
    grid-template-columns: 120px 1fr;
    row-gap: 1rem;
}

.archive-record dt {
    font-size: .85rem;
    font-family: var(--font-meta);
    color: var(--muted);
}

.archive-record dd {
    font-size: .75rem;
    margin: 0;
}

.entry {
    padding-block: var(--space-xl);
}

.entry-header {
    max-width: var(--content-width);
    margin: 0 auto var(--space-lg);
}

.entry-meta {
    display: flex;
    gap: 1rem;

    margin-bottom: 1rem;

    font-family: var(--font-meta);
    font-size: .75rem;
    letter-spacing: .12em;
    text-transform: uppercase;

    color: var(--muted);
}

.entry-title {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 2vw, 2rem);
    font-weight: 400;
    line-height: 1.2;

    margin-bottom: 1rem;
}

.entry-title a {
    text-decoration: none;
}

.entry-location {
    color: var(--muted);
    font-family: var(--font-meta);
}

.entry-images {
    display: flex;
    flex-direction: column;
    gap: 3rem;

    margin: 3rem auto;

    max-width: var(--content-width);
}

.archive-image img {
    display: block;
    width: 100%;
    height: auto;
}

.entry-body {
    max-width: 700px;
    margin: 0 auto;

    line-height: 1.8;
}

.entry-body p:last-child {
    margin-bottom: 0;
}

.site-footer {
    margin-top: 10rem;
    padding: 4rem 0;

    text-align: center;

    opacity: .4;

    font-size: .8rem;
}

.search-overlay {
    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, .7);
    backdrop-filter: blur(4px);

    display: flex;
    align-items: flex-start;
    justify-content: center;

    padding-top: 12vh;

    z-index: 100;

    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}

.search-overlay.is-open {
    opacity: 1;
    pointer-events: all;
}

.search-modal {
    width: 100%;
    max-width: 560px;
    margin: 0 2rem;
}

.search-header {
    display: flex;
    align-items: center;
    gap: 1rem;

    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;

    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--text);
}

.search-input::-moz-placeholder {
    color: var(--muted);
}

.search-input::placeholder {
    color: var(--muted);
}

.search-close {
    background: none;
    border: none;
    cursor: pointer;

    font-size: .8rem;
    color: var(--muted);
    padding: 0;
    transition: color .2s;
}

.search-close:hover {
    color: var(--text);
}

.search-results {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;

    max-height: 60vh;
    overflow-y: auto;
}

.search-result a {
    display: block;
}

.search-result-meta {
    font-family: var(--font-meta);
    font-size: .7rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .3rem;
}

.search-result-title {
    font-size: .95rem;
    margin-bottom: .3rem;
    transition: color .2s;
}

.search-result a:hover .search-result-title {
    color: var(--muted);
}

.search-result-excerpt {
    font-size: .8rem;
    color: var(--muted);
    line-height: 1.6;
}

.search-empty {
    font-family: var(--font-meta);
    font-size: .8rem;
    color: var(--muted);
}

.search-trigger {
    grid-column: 1;
    justify-self: start;

    -moz-appearance: none;

         appearance: none;
    -webkit-appearance: none;
    background: none;
    border: none;
    border-radius: 0;
    cursor: pointer;
    width: auto;

    font-family: var(--font-meta);
    font-size: .75rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);

    padding: 0;
    transition: color .2s;
}

.search-trigger:hover {
    color: var(--text);
}
