/* Shared styles for the sub-pages (project pages and writing).
   Colors mirror the tokens in index.html so both themes match the homepage. */

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

:root {
    color-scheme: light;
    --bg: #ffffff;
    --text: #1a1a1a;
    --text-2: #444;
    --text-3: #6b6b6b;
    --muted: #6f6f6f;
    --line: #f0f0f0;
    --icon-bg: #f4f4f4;
    --shot-bg: #fff;
    --shot-edge: rgba(0, 0, 0, .07);
    --shot-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px -6px rgba(0, 0, 0, .12);
    --pill: #ffffff;
    --pill-line: rgba(0, 0, 0, .1);
    --ok: #2a9a52;
    --ok-text: #1f7a40;
    --sold: #c8951a;
    --sold-text: #946200;
    --todo: #fff3c4;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #11100e;
    --text: #eee9e1;
    --text-2: #bdb6aa;
    --text-3: #a39c91;
    --muted: #8c857a;
    --line: #23211d;
    --icon-bg: #1f1d1a;
    --shot-bg: #1a1916;
    --shot-edge: rgba(255, 255, 255, .08);
    --shot-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -6px rgba(0, 0, 0, .6);
    --pill: #34312c;
    --pill-line: rgba(255, 255, 255, .12);
    --ok: #3fbf6e;
    --ok-text: #6fd497;
    --sold: #e0ad3a;
    --sold-text: #e8c06a;
    --todo: #4a3d12;
}

body {
    font-family: 'Geist', sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    padding: clamp(2rem, 6vw, 4.5rem) clamp(1rem, 6vw, 6rem) 4rem;
}

.page {
    max-width: 720px;
    margin: 0 auto;
}

a {
    color: inherit;
}

/* Top bar: portrait + name back to the homepage. */
.site-head {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: clamp(2.5rem, 7vw, 4rem);
    font-size: .9rem;
}

.site-head a {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    text-decoration: none;
    font-weight: 500;
}

.site-head img {
    width: 28px;
    height: 28px;
    border-radius: 30%;
    object-fit: cover;
}

.site-head .crumb {
    color: var(--muted);
}

.site-head .crumb a {
    color: var(--muted);
    font-weight: 400;
}

/* Page title block. */
.eyebrow {
    font-size: .7rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .8rem;
}

h1 {
    font-size: clamp(1.65rem, 1.05rem + 1.7vw, 2.15rem);
    line-height: 1.2;
    font-weight: 500;
    letter-spacing: -.024em;
    text-wrap: balance;
    margin-bottom: 1rem;
}

.lede {
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--text-2);
    text-wrap: pretty;
    margin-bottom: 1.6rem;
}

/* Project header: icon, name, status. */
.project-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.project-head img {
    width: 56px;
    height: 56px;
    border-radius: 22%;
    object-fit: cover;
    background: var(--icon-bg);
}

.project-head h1 {
    margin: 0;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .75rem;
    font-weight: 500;
    margin-top: .2rem;
}

.status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status.active {
    color: var(--ok-text);
}

.status.acquired {
    color: var(--sold-text);
}

/* Key facts as a quiet definition list. */
.facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: .55rem 1.5rem;
    font-size: .9rem;
    padding: 1.1rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin: 1.8rem 0;
}

.facts dt {
    color: var(--muted);
}

.facts dd {
    color: var(--text);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-bottom: 2.5rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--pill-line);
    background: var(--pill);
    font-size: .85rem;
    font-weight: 500;
    text-decoration: none;
    transition: opacity .15s;
}

.pill:hover {
    opacity: .7;
}

/* Prose for project write-ups and posts. */
.prose {
    font-size: 1.02rem;
    line-height: 1.75;
    color: var(--text-2);
}

.prose>*+* {
    margin-top: 1.1rem;
}

.prose h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -.01em;
    margin-top: 2.2rem;
}

.prose strong {
    color: var(--text);
    font-weight: 600;
}

.prose a {
    color: var(--text);
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.prose ul {
    padding-left: 1.2rem;
}

.prose li+li {
    margin-top: .35rem;
}

/* Gaps the author still needs to fill in; never shipped live (drafts are noindex). */
.todo {
    background: var(--todo);
    color: var(--text);
    border-radius: 4px;
    padding: 0 .3em;
    font-style: normal;
}

.draft-note {
    font-size: .8rem;
    color: var(--text);
    background: var(--todo);
    border-radius: 8px;
    padding: .7rem .9rem;
    margin-bottom: 1.6rem;
}

/* A single proof image inside a post, like a sale notification. */
.receipt {
    margin: 1.8rem 0;
}

.receipt img {
    display: block;
    width: 100%;
    max-width: 220px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 0 0 1px var(--shot-edge), var(--shot-shadow);
}

.receipt figcaption {
    margin-top: .7rem;
    font-size: .8rem;
    color: var(--muted);
}

/* Screenshot grid. */
.shots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.shots img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    background: var(--shot-bg);
    box-shadow: 0 0 0 1px var(--shot-edge), var(--shot-shadow);
}

.post-meta {
    font-size: .85rem;
    color: var(--muted);
    margin-bottom: 2rem;
}

footer {
    margin-top: 4rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: .8rem 1.5rem;
    font-size: .75rem;
    color: var(--muted);
}

.foot-links {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1.1rem;
    list-style: none;
}

.foot-links a {
    color: var(--muted);
    text-decoration: none;
    transition: color .15s ease;
}

.foot-links a:hover {
    color: var(--text);
}
