/* Shared styles for the home, blog and project pages.
   Colors and type match the older article pages, which keep their own inline styles. */
:root {
    --bg: #0a0a0a;
    --fg: #fafafa;
    --muted: #888;
    --soft: #d4d4d4;
    --accent: #3b82f6;
    --card-bg: #141414;
    --card-hover: #1a1a1a;
    --border: #262626;
    --live: #22c55e;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.7;
    min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

/* Header and nav */
.site-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}
.site-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}
.site-header .name { color: var(--fg); font-weight: 700; letter-spacing: -0.01em; }
.site-header .name:hover { text-decoration: none; color: var(--accent); }
.role { font-size: 0.95rem; color: var(--muted); margin-bottom: 1rem; }
.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.25rem;
    margin-top: 1rem;
    font-size: 0.875rem;
}
.site-nav a { color: var(--muted); font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--fg); text-decoration: none; }
.site-header.compact { margin-bottom: 2.5rem; padding-bottom: 1.25rem; }
.site-header.compact .site-nav { margin-top: 0.5rem; }

/* Sections */
.section { margin-bottom: 3rem; }
.section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-bottom: 1rem;
}
.section-intro { color: var(--muted); font-size: 0.95rem; margin: -0.5rem 0 1.25rem; }
.more { display: inline-block; margin-top: 1rem; font-size: 0.9rem; font-weight: 500; }

/* Cards */
.cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    color: var(--fg);
    transition: border-color 0.15s, background 0.15s;
}
a.card:hover { text-decoration: none; border-color: var(--accent); background: var(--card-hover); }
.card .kicker {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 0.35rem;
}
.card h3 { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 0.35rem; }
.card p { font-size: 0.9rem; color: var(--muted); line-height: 1.55; }
.card ul { margin-top: 0.6rem; padding-left: 1.1rem; font-size: 0.85rem; color: var(--muted); line-height: 1.6; }
.card .go { display: inline-block; margin-top: auto; padding-top: 0.75rem; font-size: 0.85rem; font-weight: 500; color: var(--accent); }
.live { color: var(--live); }

/* Project page hero */
.hero { margin-bottom: 3rem; }
.hero .kicker { font-size: 0.8rem; color: var(--muted); font-weight: 500; }
.hero h1 { font-size: 2.5rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; margin: 0.25rem 0 0.75rem; }
.hero .lead { font-size: 1.15rem; color: var(--soft); line-height: 1.5; margin-bottom: 0.75rem; }
.hero p { color: var(--muted); font-size: 0.95rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.button {
    display: inline-block;
    padding: 0.55rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--fg);
}
.button:hover { text-decoration: none; border-color: var(--accent); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink, #fff); }
.button.primary:hover { filter: brightness(1.12); }

/* Post list */
.posts { list-style: none; }
.posts li { padding: 1.25rem 0; border-bottom: 1px solid var(--border); }
.posts li:first-child { padding-top: 0; }
.posts li:last-child { border-bottom: none; }
.post-date { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.post-title { font-size: 1.1rem; font-weight: 600; margin: 0.25rem 0 0.4rem; }
.post-title a { color: var(--fg); }
.post-title a:hover { color: var(--accent); text-decoration: none; }
.post-excerpt { font-size: 0.9rem; color: var(--muted); line-height: 1.5; }

/* Footer */
footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--muted);
    font-size: 0.8rem;
}
footer a { color: var(--muted); }
footer p + p { margin-top: 0.4rem; }

@media (max-width: 640px) {
    .container { padding: 2rem 1rem; }
    .site-header h1 { font-size: 1.5rem; }
    .hero h1 { font-size: 2rem; }
    .cards { grid-template-columns: minmax(0, 1fr); }
}

/* Three cards across on wide screens, one column on phones */
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) {
    .cards.three { grid-template-columns: minmax(0, 1fr); }
}
.role a { color: var(--fg); }

/* Line-art animations drawn by /assets/scenes.js, one per project */
.scene { display: block; width: 100%; }
.card-art {
    height: 160px;
    width: calc(100% + 2.5rem);
    margin: -1.25rem -1.25rem 1rem;
    border-radius: 11px 11px 0 0;
    -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent);
    mask-image: linear-gradient(to bottom, #000 78%, transparent);
}
.hero-art {
    height: 300px;
    margin-bottom: 1.75rem;
    border-radius: 12px;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent), linear-gradient(to bottom, transparent, #000 7%, #000 93%, transparent);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent), linear-gradient(to bottom, transparent, #000 7%, #000 93%, transparent);
    mask-composite: intersect;
}
@media (max-width: 640px) {
    .hero-art { height: 220px; }
}

/* Each project's own colours and type: on its page (theme-*) and its home card (t-*) */
.theme-evolved, .t-evolved { --accent: #ff7a3d; --accent-ink: #12110e; }
.theme-jung, .t-jung { --accent: #c9a227; --accent-ink: #0a0a0a; }
.theme-whs, .t-whs { --accent: #c9a66b; --accent-ink: #0b0c0e; }
.theme-evolved .hero h1, .t-evolved h3,
.theme-whs .hero h1, .t-whs h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; letter-spacing: -0.01em; }
.theme-jung .hero h1, .t-jung h3 { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; letter-spacing: 0; }
