/* Retro mode: a MySpace-style skin over the same portfolio data.
   Theme-aware via --retro-* variables: light is the classic blue/white
   MySpace palette, dark keeps those blues but darkens every background
   and box so the skin still reads as retro in dark mode. The toggle on
   the page sets data-theme on <html>; without JS, light is the default.
   Deliberately modern under the hood: real text sizes (no 11px body
   copy), readable contrast, a responsive grid that stacks on mobile,
   and no autoplay music, flashing, glitter, marquee, or custom cursor.
   The clean site is the default; this stylesheet only applies to
   /retro/. */

:root,
[data-theme="light"] {
    --retro-page-bg: #dbe9f6;
    --retro-content-bg: #ffffff;
    --retro-text: #1a1a1a;
    --retro-text-secondary: #555555;
    --retro-link: #004080;
    --retro-header-bg: #003399;
    --retro-header-text: #ffffff;
    --retro-note-text: #dbe9f6;
    --retro-nav-bg: #6698cb;
    --retro-nav-text: #ffffff;
    --retro-border: #6699cc;
    --retro-accent-bg: #e5f0fa;
    --retro-accent-text: #003399;
}

[data-theme="dark"] {
    --retro-page-bg: #0b1220;
    --retro-content-bg: #1a2436;
    --retro-text: #e0e0e0;
    --retro-text-secondary: #b0b0b0;
    --retro-link: #8ab4f8;
    --retro-header-bg: #001a66;
    --retro-header-text: #ffffff;
    --retro-note-text: #c5d6ee;
    --retro-nav-bg: #2a4a7a;
    --retro-nav-text: #ffffff;
    --retro-border: #3a5a8a;
    --retro-accent-bg: #24344d;
    --retro-accent-text: #9db8dd;
}

.retro-body {
    margin: 0;
    background: var(--retro-page-bg);
    color: var(--retro-text);
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

.retro-body a {
    color: var(--retro-link);
}

.retro-wrap {
    max-width: 960px;
    margin: 0 auto;
    background: var(--retro-content-bg);
    border-left: 2px solid var(--retro-border);
    border-right: 2px solid var(--retro-border);
}

.retro-header {
    background: var(--retro-header-bg);
    color: var(--retro-header-text);
    padding: 20px 16px;
}

.retro-header h1 {
    margin: 0 0 4px;
    font-size: 32px;
}

.retro-header p {
    margin: 4px 0;
}

.retro-eyebrow {
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.retro-note {
    font-size: 13px;
    color: var(--retro-note-text);
}

.retro-nav {
    background: var(--retro-nav-bg);
    padding: 8px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.retro-nav a,
.retro-nav button {
    color: var(--retro-nav-text);
    font-weight: bold;
    text-decoration: none;
}

.retro-nav button {
    background: none;
    border: 1px solid var(--retro-nav-text);
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 14px;
    margin-left: auto;
}

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

.retro-grid {
    display: grid;
    /* minmax(0, ...) is the overflow fix: without it, a grid track's
       automatic minimum is its longest unbreakable word, so a repo name
       like ss-space_marine_master_crafted pushed the whole main column
       (and every right-hand card) past the page container. */
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
    align-items: start;
}

.retro-grid > * {
    min-width: 0;
}

.retro-box {
    border: 1px solid var(--retro-border);
    margin-bottom: 16px;
    background: var(--retro-content-bg);
}

.retro-box h2 {
    background: var(--retro-nav-bg);
    color: var(--retro-nav-text);
    margin: 0;
    padding: 6px 10px;
    font-size: 16px;
}

.retro-box-body {
    padding: 10px;
}

.retro-box-body ul {
    margin: 8px 0;
    padding-left: 20px;
}

.retro-profile-img {
    display: block;
    width: 120px;
    height: 120px;
    border: 1px solid var(--retro-border);
    margin-bottom: 10px;
}

.retro-badge {
    display: inline-block;
    background: var(--retro-accent-bg);
    border: 1px solid var(--retro-border);
    padding: 2px 8px;
    margin: 0 4px 4px 0;
    font-size: 13px;
}

.retro-interest h3 {
    margin: 12px 0 2px;
    font-size: 14px;
}

.retro-interest p {
    margin: 0 0 8px;
}

.retro-project {
    border-bottom: 1px dotted var(--retro-border);
    padding: 10px 0;
}

.retro-project:first-child {
    padding-top: 0;
}

.retro-project h3 {
    margin: 0 0 4px;
    font-size: 16px;
}

.retro-project p {
    margin: 4px 0;
}

.retro-project-meta {
    font-size: 13px;
    color: var(--retro-text-secondary);
}

.retro-top8 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.retro-top8-item {
    text-align: center;
    border: 1px solid var(--retro-border);
    padding: 10px 6px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.retro-top8-avatar {
    width: 64px;
    height: 64px;
    margin: 0 auto 8px;
    background: var(--retro-accent-bg);
    border: 1px solid var(--retro-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    color: var(--retro-accent-text);
}

.retro-top8-item p {
    margin: 2px 0;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.retro-small {
    font-size: 13px;
    color: var(--retro-text-secondary);
}

.retro-footer {
    border-top: 2px solid var(--retro-border);
    padding: 12px 16px;
    text-align: center;
    font-size: 13px;
}

@media (max-width: 700px) {
    .retro-grid {
        grid-template-columns: 1fr;
    }

    .retro-top8 {
        grid-template-columns: repeat(2, 1fr);
    }

    .retro-header h1 {
        font-size: 26px;
    }

    .retro-nav button {
        margin-left: 0;
    }
}
