* {
    box-sizing: border-box;
}

html {
    background-color: rgb(23, 23, 23);
    color-scheme: dark;
}

/* ==========================
   Design Tokens
========================== */

:root {
    --color-background: rgb(23, 23, 23);
    --color-text: white;
    --color-hover: #B3B3B3;
    --transition: 0.3s;

    --small-space: 12px;
    --medium-space: 24px;
    --large-space: 70px;
    --page-margin: 50px;
    --nav-gap: 12px;
    --footer-bottom: 40px;
    --content-padding: 20px;
    --content-bottom: 40px;
    --social-gap: 15px;
    --link-gap: 18px;
    --image-width: 400px;
}

/* ==========================
   Base Styles
========================== */

body {
    background-color: var(--color-background);
    color: var(--color-text);
    font-family: "Commit Mono", monospace;
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
.site-title {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ==========================
   Header & Navigation
========================== */

header {
    padding: 0;
}

header > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px var(--page-margin);
}

header nav {
    display: flex;
    gap: var(--nav-gap);
}

header nav a {
    padding: 3px 7px;
    border: 1px solid transparent;
    font-size: 13px;
    transition:
        color var(--transition),
        border-color var(--transition);
}

header nav a:hover {
    border-color: rgba(255, 255, 255, 0.18);
}

/* ==========================
   Main Content
========================== */

.home-main {
    padding: 0;
}

main {
    padding: 0 var(--content-padding) var(--content-bottom);
}

.hero-image {
    display: block;
    width: 100%;
}

main > h1 {
    margin: 35px 0 0;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
}

.credit-role {
    opacity: 0.7;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}
/* ==========================
   Contact Page
========================== */

.contact {
    max-width: 500px;
    margin: 45px auto 0;
    text-align: center;
}

.contact p {
    margin: 12px 0;
    font-size: 14px;
}

.contact-intro {
    margin-bottom: 24px;
}

.contact-image {
    width: 100%;
    height: auto;
    margin-bottom: 24px;
}
/* ==========================
   Track Component
========================== */

.track {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--image-width);
    align-items: center;
    gap: var(--large-space);
    margin: var(--large-space) 0;
}

.track-info {
    grid-column: 1;
    max-width: 400px;
}

.track h2 {
    font-size: 26px;
    font-weight: 500;
    line-height: 1.2;
    margin: 0 0 6px;
}

.track p:not(.streaming-links) {
    margin: 3px 0;
    font-size: 14px;
}

.track time {
    display: block;
    font-size: 13px;
    margin-top: 5px;
}

.track > a {
    grid-column: 2;
    justify-self: end;
}

.track img {
    width: 100%;
    max-width: var(--image-width);
    height: auto;
    object-fit: cover;
    transition: opacity var(--transition), transform var(--transition);
}

.track a:hover img {
    opacity: 0.85;
    transform: scale(1.02);
}

.streaming-links {
    display: flex;
    align-items: center;
    gap: var(--link-gap);
    flex-wrap: wrap;
    margin-top: 10px;
}

/* ==========================
   Footer
========================== */

footer {
    padding: var(--large-space) var(--page-margin) var(--footer-bottom);
    text-align: center;
}

/* ==========================
   Social Links
========================== */

.social-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--social-gap);
}

.social-links a {
    margin: 0;
}

/* ==========================
   Link Styles
========================== */

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

.streaming-links a,
.contact a {
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: text-decoration-thickness 0.2s ease,
                text-underline-offset 0.2s ease;
}

.streaming-links a:hover,
.contact a:hover {
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

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

/* ==========================
        Current Page 
========================== */

header nav a.active,
header nav a.active:hover {
    border-color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
}

/* ==========================
   Accessibility
========================== */

a:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 6px;
}

a:active {
    opacity: 0.7;
}

/* ==========================
    Mobile Layout
    Breakpoint: 768px
========================== */

@media (max-width: 768px) {

    :root {
        --large-space: 50px;
        --page-margin: 20px;
    }

    header > div {
        flex-direction: column;
        align-items: stretch;
        gap: var(--medium-space);
    }
    
    header nav {
        width: 100%;
        justify-content: flex-end;
        padding-right: 2px;
    }

    .track {
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        margin: 70px auto;
        gap: var(--medium-space);
    }

    .track > a {
        width: 100%;
    }

    .track img {
        width: 100%;
        max-width: 100%;
    }
    
    .track-info {
        width: 100%;
    }

    footer {
        padding: var(--large-space) var(--content-padding) var(--footer-bottom);
    }

}

/* ==========================
   Header Radio
========================== */

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}


.site-radio {
    display: flex;
    align-items: center;
    gap: 4px;
}


/* Play / Pause */

.radio-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 26px;
    height: 30px;
    padding: 0;

    border: 0;
    background: transparent;

    color: var(--color-text);
    font: inherit;
    font-size: 15px;
    line-height: 1;

    cursor: pointer;

    transition: opacity var(--transition);
}


.radio-play:hover:not(:disabled) {
    opacity: 0.55;
}


.radio-play:disabled {
    cursor: default;
    opacity: 0.3;
}

/* Volume */

.radio-volume {
    display: flex;
    align-items: center;
    width: 72px;
    height: 30px;
}

.radio-volume[hidden],
html.is-ios .radio-volume {
    display: none !important;
}

.radio-volume input {
    width: 100%;
    height: 30px;
    margin: 0;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    cursor: pointer;
    touch-action: pan-y;
    -webkit-tap-highlight-color: transparent;
}

/* Chrome / Safari */

.radio-volume input::-webkit-slider-runnable-track {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
}


.radio-volume input::-webkit-slider-thumb {
    width: 10px;
    height: 10px;
    margin-top: -4px;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    border-radius: 50%;
    background: var(--color-text);
}

/* Firefox */

.radio-volume input::-moz-range-track {
    height: 2px;
    border: 0;
    background: rgba(255, 255, 255, 0.5);
}

.radio-volume input::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 50%;
    background: var(--color-text);
}

/* Keyboard */

.radio-play:focus-visible,
.radio-volume input:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 3px;
}


/* Mobile */

@media (max-width: 768px) {

    .header-left {
        width: 100%;
        gap: 6px;
    }


    .site-radio {
        gap: 3px;
    }

    .radio-play {
        width: 30px;
        height: 38px;
    }

    .radio-volume {
        width: 72px;
        height: 30px;
    }

}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {

    .radio-play {
        transition: none;
    }

}

@view-transition {
    navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 120ms;
}
