/*
 * Matches the real stunslow.com brand: near-black background, electric-blue
 * accent, Orbitron for display type, Inter for body copy. Always dark —
 * the live brand site has no light mode, so this doesn't follow the
 * visitor's OS preference; that's a deliberate brand-fidelity choice, not
 * an oversight.
 */

:root {
    color-scheme: dark;
    --bg: #02040a;
    --surface: #0d1322;
    --surface-2: rgba(255, 255, 255, 0.04);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #ffffff;
    --muted: #94a3b8;
    --muted-2: #64748b;
    --accent: #3b82f6;
    --accent-strong: #60a5fa;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Pins the footer to the viewport bottom when there's little content, while
   still scrolling normally once the grid grows past the viewport. Auto
   side-margins (used below for max-width centering) disable a flex item's
   default full-width stretch, so each direct child needs width:100% back. */
.site-header, .intro, .portfolio-grid, .portfolio-empty, .site-footer { width: 100%; }
.portfolio-grid, .portfolio-empty { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }

a { color: var(--accent); }

.site-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-name {
    font-family: "Orbitron", "Inter", sans-serif;
    font-weight: 800;
    font-size: 17px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.site-name .accent { color: var(--accent); }

.contact-link {
    color: var(--muted);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: 0.02em;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    padding: 8px 16px;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.contact-link:hover { color: var(--text); border-color: var(--accent); }

.intro {
    max-width: 60ch;
    margin: 0 auto;
    padding: 8px 24px 32px;
    color: var(--muted);
    font-size: 15px;
}

/* Fixed 2-column masonry: each card's height comes from its own cover
   image's natural proportions — no crop, no letterbox padding, regardless
   of what aspect ratio a screenshot is. CSS multi-column packs items into
   whichever column is shortest, top to bottom, rather than aligning items
   into strict rows. */
.portfolio-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px 80px;
    column-count: 2;
    column-gap: 28px;
}

.portfolio-item {
    color: inherit;
    text-decoration: none;
    display: block;
    break-inside: avoid;
    margin-bottom: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.portfolio-item:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.portfolio-cover {
    background: var(--surface);
    overflow: hidden;
    line-height: 0;
}

.portfolio-cover img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.35s ease;
}
.portfolio-item:hover .portfolio-cover img { transform: scale(1.04); }

.portfolio-cover-placeholder {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #1e2a4a, #151b2e);
}

.portfolio-body { padding: 18px 20px 20px; }

.portfolio-title {
    font-family: "Orbitron", "Inter", sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    font-size: 14.5px;
    text-align: center;
    margin: 0;
}
.portfolio-title + .portfolio-description { margin-top: 8px; }
.portfolio-description {
    font-size: 13.5px;
    color: var(--muted);
    margin: 0;
    line-height: 1.55;
}

.portfolio-empty {
    max-width: 1200px;
    margin: 64px auto;
    padding: 64px 24px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--border-strong);
    border-radius: 12px;
}

.site-footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 24px;
    color: var(--muted-2);
    font-size: 13px;
    border-top: 1px solid var(--border);
}

@media (max-width: 640px) {
    .site-header { padding: 28px 20px 8px; }
    .portfolio-grid { column-count: 1; padding: 16px 20px 64px; }
    .intro { padding: 8px 20px 24px; }
}
