/* Simple serif theme. Mobile first, with a wider, roomier layout on larger screens. */

:root {
    --ink: #141414;
    --muted: #555;
    --line: #141414;
    --rule: #dcdcdc;
    --bg: #ffffff;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: "Times New Roman", Times, Georgia, serif;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg);
    max-width: 40rem;
    margin: 0 auto;
    padding: 1.75rem 1.15rem 3rem;
}

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

/* Navigation */

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.1rem 1.1rem;
    margin-bottom: 2rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.95rem;
}

nav a {
    color: var(--ink);
    text-decoration: none;
    padding: 0.35rem 0;
}

nav a:hover {
    text-decoration: underline;
}

nav a[aria-current="page"] {
    font-weight: bold;
}

/* Headings */

h1 {
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.2;
    margin: 0 0 0.65rem;
}

h2 {
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.25rem;
    margin: 2.25rem 0 0.85rem;
}

h3 {
    font-size: 1.05rem;
    font-weight: bold;
    line-height: 1.3;
    margin: 0 0 0.25rem;
}

h4 {
    font-size: 0.78rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin: 1.15rem 0 0.35rem;
}

/* Text */

p {
    margin: 0 0 0.75rem;
}

ul {
    margin: 0 0 0.75rem;
    padding-left: 1.15rem;
}

li {
    margin: 0 0 0.4rem;
}

a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

a:hover {
    text-decoration: none;
}

h3 a {
    text-decoration: none;
}

h3 a:hover {
    text-decoration: underline;
}

.meta {
    font-size: 0.8rem;
    color: var(--muted);
    letter-spacing: 0.01em;
    margin: 0 0 0.5rem;
}

.lead {
    margin-bottom: 1.35rem;
}

/* Project and app entries */

.project {
    margin: 0 0 2rem;
}

.items {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.85rem;
    align-items: start;
    margin-top: 0.35rem;
}

.item {
    margin: 0;
}

/* Buttons and back links */

.btn {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.35rem 0.8rem;
    border: 1px solid var(--line);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.3;
}

.btn:hover {
    background: var(--ink);
    color: #fff;
    text-decoration: none;
}

.backlink {
    display: inline-block;
    margin-bottom: 1.35rem;
    font-size: 0.9rem;
    text-decoration: none;
}

.backlink:hover {
    text-decoration: underline;
}

/* Photos */

.photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.5rem;
    margin: 0.65rem 0 0;
}

.photos img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 1px solid var(--rule);
    cursor: zoom-in;
    display: block;
}

/* Lightbox */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    padding: 1rem;
    cursor: zoom-out;
    z-index: 999;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Footer */

footer {
    margin-top: 3rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--line);
    font-size: 0.85rem;
    color: var(--muted);
}

/* Larger screens: smaller readable type, and the same width and side margins on every page */

@media (min-width: 820px) {
    body {
        font-size: 1rem;
        line-height: 1.6;
        max-width: 50rem;
        padding: 3rem 2.5rem 4.5rem;
    }

    nav {
        font-size: 1rem;
        gap: 0.1rem 1.5rem;
        margin-bottom: 2.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    /* Entries stay in one stacked column */

    .items {
        grid-template-columns: 1fr;
        gap: 2.25rem;
    }
}
