:root {
    --bg: #0b0b0d;
    --surface: #16161a;
    --surface-2: #1d1d22;
    --text: #f5f5f7;
    --muted: #a1a1aa;
    --accent: #f5f5f7;
    /* Sampled from highlightlab-logo.png (#0379d7) and brightened for contrast
       against --bg, where the raw logo blue sits too dark to read as a link.
       5.9:1 against the page background. Previous value was #ff6b35. */
    --accent-hl: #2b90e8;
    --accent-parnon: #ef4444;
    --accent-pitch: #3b82f6;
    /* Builds links point at YouTube. Same value as --accent-parnon today, but
       named separately so the two can move independently and so a red on a
       Builds card is not read as a Parnon reference. True #f00 is too harsh
       against this background. */
    --accent-yt: #ef4444;
    --border: #2a2a30;
    --max-width: 960px;
}

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

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

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

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

.wrap {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---------- header ---------- */

header {
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    background: rgba(11, 11, 13, 0.85);
    backdrop-filter: saturate(180%) blur(12px);
    z-index: 10;
}

header .inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

header .brand {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

header nav {
    display: flex;
    gap: 1.4rem;
    font-size: 0.9rem;
}

header nav a {
    color: var(--muted);
    transition: color 0.15s ease;
}

header nav a:hover {
    color: var(--text);
}

/* ---------- hero ---------- */

.hero {
    /* The side padding has to be restated here. .hero shares an element with
       .wrap and comes later in this file, so a `5rem 0 4.5rem` shorthand
       silently zeroes out .wrap's `0 1.5rem` and the hero alone sits flush
       against the viewport edge. Keep this in sync with .wrap. */
    padding: 5rem 1.5rem 4.5rem;
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.hero-photo {
    width: 200px;
    height: 200px;
    flex: none;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
}

.hero h1 {
    font-size: clamp(2rem, 5.5vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.hero .tagline {
    margin-top: 1rem;
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text);
    max-width: 34em;
}

@media (max-width: 620px) {
    .hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.75rem;
        padding-top: 3.5rem;
    }

    .hero-photo {
        width: 150px;
        height: 150px;
    }
}

.hero .tagline strong {
    color: var(--text);
    font-weight: 500;
}

/* ---------- sections ---------- */

section {
    padding: 0 0 4.5rem;
}

.section-title {
    font-size: clamp(1.45rem, 3vw, 1.75rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 1.4rem;
}

/* ---------- work cards ---------- */

.cards {
    display: grid;
    gap: 1rem;
}

.card {
    display: block;
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.6rem;
}

.card-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
}

.card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.card-logo {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    display: block;
    flex-shrink: 0;
}

.badge {
    font-size: 0.82rem;
    color: var(--card-accent, var(--muted));
    white-space: nowrap;
}

.card p {
    color: var(--text);
    font-size: 0.97rem;
    max-width: 56em;
}

/* One wide proof shot per product, sitting between the card header and the
   description. 16/9 with object-fit means a slightly off-ratio source still
   fills the box instead of letterboxing itself. */
.card-media {
    margin: 0.9rem 0 1.1rem;
}

.card-media img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.card-media figcaption {
    margin-top: 0.55rem;
    font-size: 0.82rem;
    color: var(--muted);
}

.card-links {
    margin-top: 1.1rem;
    display: flex;
    gap: 1.4rem;
    flex-wrap: wrap;
}

.card-link {
    font-size: 0.87rem;
    font-weight: 500;
    color: var(--card-accent, var(--muted));
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease;
}

.card-link:hover {
    border-bottom-color: currentColor;
}

/* ---------- content / links ---------- */

.link-row {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.6rem 1.1rem;
    font-size: 0.92rem;
    color: var(--text);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.pill:hover {
    border-color: var(--muted);
    background: var(--surface-2);
}

.pill.soon {
    color: var(--muted);
    cursor: default;
    opacity: 0.55;
}

.pill.soon:hover {
    border-color: var(--border);
    background: var(--surface);
}

/* ---------- builds ---------- */

.builds {
    display: grid;
    gap: 1.1rem;
    /* min() keeps the track from forcing a 220px column wider than the
       viewport at phone widths, which was clipping the cards at 390px. */
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}

.build {
    display: block;
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.18s ease;
}

.build:hover {
    border-color: #46464f;
}

.build img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-bottom: 1px solid var(--border);
}

.build h3 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    padding: 1rem 1.1rem 0;
}

.build p {
    color: var(--text);
    font-size: 0.89rem;
    padding: 0.35rem 1.1rem 0;
}

.build-link {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-yt);
    padding: 0.85rem 1.1rem 1.1rem;
}

@media (max-width: 620px) {
    .builds {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .build {
        display: grid;
        grid-template-columns: 128px 1fr;
        grid-template-rows: auto auto auto;
        column-gap: 1rem;
        align-content: center;
        padding: 0.9rem;
    }

    .build img {
        grid-column: 1;
        grid-row: 1 / -1;
        align-self: center;
        /* Match the desktop framing. A square here would centre-crop the 3/4
           sources, cutting roughly an eighth off the top and bottom of each. */
        aspect-ratio: 3 / 4;
        border: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
        border-radius: 8px;
    }

    .build h3,
    .build p,
    .build-link {
        grid-column: 2;
        padding: 0;
    }

    .build p {
        margin-top: 0.3rem;
        font-size: 0.85rem;
    }

    .build-link {
        margin-top: 0.55rem;
    }
}

/* ---------- figures ---------- */

figure {
    margin: 0;
}

.champ-figure {
    margin: 1.75rem 0;
    width: fit-content;
    max-width: 100%;
}

.champ-figure img {
    max-width: 460px;
}

figure img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    border: 1px solid var(--border);
}

figcaption {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: var(--muted);
}

/* ---------- player preview card ---------- */

.profile-card {
    --card-accent: var(--accent-hl);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.6rem;
    width: fit-content;
    max-width: 100%;
}

.profile-head {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid var(--border);
}

.profile-photo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.profile-head h3 {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: -0.015em;
}

.profile-sub {
    margin-top: 0.2rem;
    font-size: 0.88rem;
    color: var(--muted);
}

.avg-groups {
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--border);
}

/* One split per row, one column per stat, so PPG/APG/GP are labelled once
   instead of repeating under every season. */
.avg-table {
    width: 100%;
    max-width: 420px;
    border-collapse: collapse;
}

.avg-table th,
.avg-table td {
    padding: 0.3rem 0;
    text-align: left;
}

.avg-table .num {
    text-align: right;
    width: 4.5rem;
}

.avg-table thead th {
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    padding-bottom: 0.15rem;
}

.avg-table tbody th {
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    padding-right: 1rem;
}

.avg-table tbody td {
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 620px) {
    .profile-card {
        padding: 1.2rem;
    }

    /* Let the stat columns size to their numbers so all four fit a phone. */
    .avg-table .num {
        width: auto;
        padding-left: 1.1rem;
    }

    .avg-table thead th {
        font-size: 0.72rem;
    }

    .avg-table tbody th {
        font-size: 0.74rem;
        letter-spacing: 0.07em;
        padding-right: 0.5rem;
    }

    .avg-table tbody td {
        font-size: 1.3rem;
    }
}

.hide {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.gamelog-scroll {
    overflow-x: auto;
    padding: 0.5rem 0 0;
}

.gamelog {
    width: auto;
    border-collapse: collapse;
    font-size: 0.87rem;
    white-space: nowrap;
}

.gamelog th {
    text-align: left;
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    font-weight: 500;
    padding: 0.45rem 1.1rem 0.45rem 0;
}

.gamelog td {
    padding: 0.4rem 1.1rem 0.4rem 0;
    border-top: 1px solid var(--border);
    color: var(--text);
}

.gamelog th:last-child,
.gamelog td:last-child {
    padding-right: 0;
}

.gamelog .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.clip-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--card-accent);
    font-variant-numeric: tabular-nums;
    opacity: 0.85;
    transition: opacity 0.15s ease;
}

.clip-link:hover {
    opacity: 1;
}

.clip-link svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.clip-link svg circle {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
}

.clip-link svg path {
    fill: currentColor;
}

.gamelog tr.po td {
    /* Tint of --accent-hl. Hardcoded because rgba() cannot take a hex var. */
    background: rgba(43, 144, 232, 0.07);
}

.gamelog .round {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--card-accent);
    margin-left: 0.4rem;
}

.wl {
    display: inline-block;
    width: 1.15rem;
    font-weight: 700;
    font-size: 0.78rem;
}

.wl.w { color: #22c55e; }
.wl.l { color: var(--muted); }

.profile-ctas {
    display: flex;
    gap: 1.4rem;
    flex-wrap: wrap;
    margin-top: 1.4rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.profile-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--card-accent);
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease;
}

.profile-cta svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.profile-cta svg circle {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
}

.profile-cta svg path {
    fill: currentColor;
}

.profile-cta:hover {
    border-bottom-color: currentColor;
}

/* ---------- footer ---------- */

footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding: 2.5rem 0 3rem;
    font-size: 0.9rem;
    color: var(--muted);
}

footer .inner {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-copy {
    text-align: center;
}

.icon-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.icon-sep {
    width: 1px;
    height: 22px;
    background: var(--border);
    margin: 0 0.35rem;
}

/* Product logos, flattened to single colour masks so they sit at the same
   weight as the social glyphs, then crossfading to the real brand colours on
   hover. Sources are images/*-mark.png and images/*-mark-color.png. */
.mark {
    display: block;
    width: 21px;
    height: 21px;
    background-color: currentColor;
    transition: opacity 0.18s ease;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.mark-hl {
    -webkit-mask-image: url(/images/highlightlab-mark.png);
    mask-image: url(/images/highlightlab-mark.png);
}

.mark-parnon {
    -webkit-mask-image: url(/images/parnon-mark.png);
    mask-image: url(/images/parnon-mark.png);
}

.mark-color {
    position: absolute;
    width: 21px;
    height: 21px;
    display: block;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.social:hover .mark {
    opacity: 0;
}

.social:hover .mark-color {
    opacity: 1;
}

.social {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--muted);
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.social:hover {
    color: var(--text);
    border-color: var(--muted);
    background: var(--surface-2);
}

.social svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    display: block;
}

/* Each social glyph carries a mono layer and a brand colour layer that
   crossfade on hover, matching the product marks above. */
.social svg .mono,
.social svg .color {
    transition: opacity 0.18s ease;
}

.social svg .color {
    opacity: 0;
}

.social:hover svg .mono {
    opacity: 0;
}

.social:hover svg .color {
    opacity: 1;
}

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

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