/* reset — kills default browser margins/padding so we start clean */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

ul {
    list-style: none; /* removes the bullet points from every <ul> */
}

a {
    color: inherit;
    text-decoration: none;
}

/* design tokens — change here, updates everywhere */
:root {
    --bg: #141313;
    --text: #fdfdfc;
    --text-muted: rgba(229, 226, 225, 0.8);
    --text-dim: #c4c7c8;
    --text-faint: #8e9192;
    --nav-bg: rgba(58, 57, 57, 0.8);
    --nav-active: #504e4e;
    --border-faint: rgba(255, 255, 255, 0.05);
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Satoshi", sans-serif;
    font-size: 16px;
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 24px;
    gap: 60px;
}

/* ---------- nav ---------- */
.pill-nav {
    background: var(--nav-bg);
    border: 1px solid var(--border-faint);
    border-radius: 9999px; /* huge radius = pill shape */
    padding: 7px;
    backdrop-filter: blur(6px);
}

.pill-nav ul {
    display: flex;
    gap: 0;
}

.pill-nav a {
    display: block;
    padding: 4px 20px;
    font-size: 14px;
    color: var(--text-dim);
    border-radius: 9999px;
    letter-spacing: -0.5px;
    transition: background 0.2s ease;
}

.pill-nav a.active {
    background: var(--nav-active);
    color: var(--text);
}

/* ---------- main column ---------- */
main {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* ---------- intro: avatar next to text ---------- */
.intro {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.avatar {
    width: 124px;
    height: 124px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0; /* stops it squishing on small screens */
}

.intro-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    /* no fixed height */
}

/* tighter cluster: name + tagline together, then a small gap, then stars, then socials */
.intro-text h1 {
    font-size: 18px;
    font-weight: 400;
    letter-spacing: -0.7px;
}

.tagline {
    font-size: 14px;
    color: var(--text-muted);
    letter-spacing: -0.5px;
    margin-bottom: 10px; /* small breathing room before stars */
}

.stars {
    color: #ef859b;
    font-size: 14px;
    letter-spacing: 4px;
    margin-bottom: 10px; /* breathing room before socials */
}

.socials {
    display: flex;
    gap: 12px;
    /* removed margin-top: auto and padding-top — those were pushing socials to the bottom */
}

.socials a {
    font-size: 14px;
    color: var(--text-muted);
    letter-spacing: -0.5px;
}

/* ---------- bio prose ---------- */
.bio {
    display: flex;
    flex-direction: column;
    gap: 16px;
    color: #e5e2e1;
    letter-spacing: 0.15px;
}

.bio a {
    color: var(--text-muted);
    text-decoration: underline;
}

/* ---------- works ---------- */
.works {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 40px;
}

.works h2 {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-dim);
}

.works-list li {
    display: grid;
    grid-template-columns: 60px 1fr auto; /* year | title | type — auto = whatever it needs */
    gap: 32px;
    align-items: center;
    padding: 14px 10px;
}

.works-list .year {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-faint);
}

.works-list .title {
    font-size: 14px;
    color: var(--text);
    letter-spacing: -0.5px;
}

.works-list .type {
    font-size: 12px;
    color: var(--text-dim);
    letter-spacing: -0.5px;
}

/* ---------- now playing hover card ---------- */

.music-link {
    position: relative;
    display: inline-block;
}

.music-link > a {
    color: var(--text-muted);
    text-decoration: underline;
}

/* outer card */
.now-playing {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);

    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 280px;
    padding: 10px;

    background: rgba(40, 38, 38, 0.95);
    border: 1px solid var(--border-faint);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);

    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
    z-index: 10;
}

.music-link:hover .now-playing {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* inner card — holds album art + track info */
.track-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;

    background: rgba(255, 255, 255, 0.04); /* slightly lighter than outer */
    border: 1px solid var(--border-faint);
    border-radius: 8px;
}

.album-art {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.track-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0; /* lets text truncate if too long */
}

.track-title {
    font-size: 14px;
    color: var(--text);
}

.track-artist {
    font-size: 12px;
    color: var(--text-muted);
}

/* "last played" sits outside the inner card */
.track-meta {
    font-size: 12px;
    color: var(--text-muted);
    padding: 0 4px;
}

/* ---------- screened hover: watches counter ---------- */

.screened-link {
    position: relative;
    display: inline-block;
}

.screened-link > a {
    color: var(--text-muted);
    text-decoration: underline;
}

.watches-card {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 28px;

    background: rgba(40, 38, 38, 0.95);
    border: 1px solid var(--border-faint);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);

    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
    z-index: 10;
}

.screened-link:hover .watches-card {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* the row of little yellow squares */
.watches-squares {
    display: flex;
    gap: 4px;
}

.sq {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    background: #b8a03e; /* the mustard yellow from your design */
    /* each square fades in slightly behind the next */
    animation: pulse 1.2s ease-in-out infinite;
}

/* stagger the animation so they pulse in sequence */
.sq:nth-child(1) {
    animation-delay: 0s;
}
.sq:nth-child(2) {
    animation-delay: 0.15s;
}
.sq:nth-child(3) {
    animation-delay: 0.3s;
}
.sq:nth-child(4) {
    animation-delay: 0.45s;
}
.sq:nth-child(5) {
    animation-delay: 0.6s;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 0.4;
    }
    50% {
        opacity: 1;
    }
}

.watches-label {
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ---------- basic hovers ---------- */

/* email link in bio */
.bio a[href^="mailto:"] {
    transition: color 0.2s ease;
}

.bio a[href^="mailto:"]:hover {
    color: #ef859b;
}

/* socials — pink hover, with a gentle stagger feel via transition-delay */
.socials a {
    transition: color 0.25s ease;
}

.socials a:hover {
    color: #ef859b;
}

/* selected works rows — deeper pink on title hover */
.works-list li {
    transition: background 0.2s ease;
    border-radius: 6px;
}

.works-list li:hover {
    background: rgba(255, 255, 255, 0.02);
}

.works-list .title {
    transition: color 0.2s ease;
}

.works-list li:hover .title {
    color: #d96680; /* deeper hue of ef859b */
}

.music-link:hover > a {
    color: #ef859b;
}

.screened-link:hover > a {
    color: #ef859b;
}

.music-link > a {
    color: var(--text-muted);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.screened-link > a {
    color: var(--text-muted);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.stars {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.star {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 14px;
    color: rgba(239, 133, 155, 0.25);
    transition:
        color 0.15s ease,
        transform 0.15s ease;
}

.star:hover {
    transform: scale(1.15);
}
.star.lit,
.star.selected {
    color: #ef859b;
}

/* ---------- case study page ---------- */

.case-study {
    max-width: 680px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
    width: fit-content;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--text);
}

.back-arrow {
    font-size: 16px;
}

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

.case-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.case-header h1 {
    font-size: 28px;
    font-weight: 400;
    letter-spacing: -0.8px;
    color: var(--text);
}

.case-date {
    font-size: 12px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 30px;
}

.case-lede {
    font-size: 16px;
    color: #e5e2e1;
    letter-spacing: 0.15px;
    line-height: 1.6;
}

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

.case-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 26px;
}

.case-section h2 {
    font-size: 20px;
    font-weight: 400;
    letter-spacing: -0.4px;
    color: var(--text);
    margin-bottom: 4px;
}

.case-section h3 {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.2px;
    color: var(--text);
    margin-top: 20px;
    margin-bottom: 4px;
}

.case-section p {
    font-size: 15px;
    line-height: 1.65;
    color: #e5e2e1;
    letter-spacing: 0.1px;
}

.case-section em {
    font-style: italic;
    color: var(--text);
}

.case-section a {
    color: var(--text-muted);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.case-section a:hover {
    color: #ef859b;
}

/* ---------- lists inside prose ---------- */

.case-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-left: 20px;
    list-style: disc; /* override the global list-style: none */
}

.case-list li {
    font-size: 15px;
    line-height: 1.65;
    color: #e5e2e1;
    letter-spacing: 0.1px;
}

.case-list li::marker {
    color: var(--text-faint);
}

/* ---------- lesson callout ---------- */

.case-lesson {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-left: 2px solid #ef859b;
    border-radius: 0 8px 8px 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    letter-spacing: 0.1px;
}

.lesson-label {
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #ef859b;
}

/* ---------- demo / figure block ---------- */

.case-demo {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 30px 0;
}

.demo-frame {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-faint);
    border-radius: 12px;
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.demo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.demo-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.demo-placeholder {
    font-family: "IBM Plex Mono", monospace;
    font-size: 12px;
    letter-spacing: 0.5px;
    color: var(--text-faint);
    text-transform: uppercase;
}

.case-demo figcaption {
    font-size: 12px;
    text-align: center;
    color: var(--text-faint);
    letter-spacing: 0.3px;
}

/* ---------- playground page ---------- */

.playground {
    width: 100%;
    max-width: 600px;
}

.playground-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.card {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    background: #0e0e0e;
    border: 1px solid var(--border-faint);
    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        background 0.25s ease;
}

.card {
    height: 100%;
}
.card:hover {
    transform: translateY(-2px);
    border-color: rgba(239, 133, 155, 0.3);
    background: rgba(255, 255, 255, 0.04);
}

/* the orb image area */
.card-art {
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.card-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* the text portion under the orb */
.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: "IBM Plex Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-faint);
}

.card-tag {
    color: var(--text-muted);
}

.card-title {
    font-size: 18px;
    font-weight: 400;
    letter-spacing: -0.3px;
    color: var(--text);
}

.card-desc {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-muted);
    letter-spacing: 0.1px;
}

/* responsive — single column on small screens */
@media (max-width: 640px) {
    .playground-grid {
        grid-template-columns: 1fr;
    }
}

.case-body code {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.85em; /* slightly smaller than body text */
    color: #ef859b;
    background: rgba(239, 133, 155, 0.1); /* faint pink wash */
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: -0.2px;
}
