/* meishi.shop-matched theme: cream, navy, system sans, one narrow column, all lowercase. */

:root {
    /* three colours, used wisely: cream ground, navy structure, selvedge
       red for anything you interact with. same cloth as meishi.shop. */
    --bg: #f2eee4;
    --navy: #2a4166;   /* the name, the headings, the bones */
    --accent: #a13d36; /* hover, selection, the little bit of colour */
    --ink: #454d60;    /* body text, a quieter shade of the navy */
    --muted: #6a7286;
    --line: #2a4166;
    --rule: #d8d2c4;
}

::selection {
    background: var(--navy);
    color: var(--bg);
}

* {
    box-sizing: border-box;
}

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

body {
    font-family: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    text-transform: lowercase;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    max-width: 36rem;
    min-height: 100dvh;
    margin: 0 auto;
    padding: 2rem 1rem 2rem;
    display: flex;
    flex-direction: column;
}

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

/* Headings */

h1 {
    font-size: 1.75rem;
    font-weight: bold;
    color: var(--navy);
    text-transform: lowercase;
    letter-spacing: -0.015em;
    line-height: 1.2;
    margin: 0 0 0.65rem;
}

h2 {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--navy);
    text-transform: lowercase;
    letter-spacing: 0.01em;
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.25rem;
    margin: 2.25rem 0 0.85rem;
}

h3 {
    font-size: 1.0625rem;
    font-weight: bold;
    color: var(--navy);
    line-height: 1.3;
    margin: 0 0 0.25rem;
}

h4 {
    font-size: 0.9375rem;
    font-weight: bold;
    text-transform: lowercase;
    letter-spacing: 0.03em;
    color: var(--navy);
    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(--navy);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

a:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

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(--accent);
    border-color: var(--accent);
    color: var(--bg);
    text-decoration: none;
}

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

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

.backlinks {
    margin: 0 0 1.35rem;
}

.backlinks .backlink {
    margin-bottom: 0;
}

/* 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;
}

.lightbox button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: 1px solid #fff;
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    padding: 0.35rem 0.8rem;
    cursor: pointer;
}

/* Focus */

a:focus-visible,
button:focus-visible,
.photos img:focus-visible {
    outline: 2px solid var(--navy);
    outline-offset: 2px;
}

.lightbox button:focus-visible {
    outline-color: #fff;
}

/* Sticker mockups */

.mockups {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin: 0.65rem 0 0.75rem;
}

.mock {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 50%;
    border: 2px solid var(--ink);
    background: var(--bg);
    box-shadow: 0 1px 3px rgba(34, 48, 74, 0.25);
    font-size: 0.7rem;
    line-height: 1.2;
}

.mock-lg { width: 7.5rem; height: 7.5rem; }
.mock-md { width: 6rem; height: 6rem; }
.mock-sm { width: 3rem; height: 3rem; font-size: 0.55rem; }

/* Footer */

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

footer p {
    margin: 0 0 0.35rem;
}

footer a {
    color: var(--muted);
}

/* Larger screens: same narrow column, roomier padding, like meishi.shop */

@media (min-width: 820px) {
    body {
        padding: 3rem 1.5rem 2.5rem;
    }
}
