.site-header {
    display: flex;
    flex-direction: column;
}

/* Spread out each header horizontally */
.header-top,
.header-middle,
.header-bottom {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: var(--container-padding);
}

.header-top {
    padding-top: var(--space-sm);
    padding-bottom: var(--space-sm);
    height: var(--space-xxl);
}

.header-middle {
    background-color: var(--color-main);
    position: relative;
}

.header-bottom {
    background-color: var(--color-neutral-dark);
    transition: background-color 0.3s ease;
    position: relative;
}

.site-title {
    color: var(--color-title);
    font-family: var(--font-headings);
    font-weight: var(--weight-bold);
    font-size: var(--heading-size-h1);
    line-height: var(--line-height-tight);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.125rem;
    transition: letter-spacing 0.3s ease, text-shadow 0.2s ease;
}

#cc-shell {
    display: flex;
    flex-direction: row;
    margin-bottom: -0.5rem;
}

#cc-shell div{
    height: var(--heading-size-h3);
    width: var(--heading-size-h3);
    background-image: url(/assets/images/shell-c.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    image-rendering: pixelated;
    transition: transform 0.3s ease, background-image 0.3s ease;
}

.site-title:hover {
    letter-spacing: 0.2rem;
    text-shadow: 0.3rem 0.3rem var(--color-neutral-dark);
    opacity: 1;
}

.site-title:hover #cc-shell div {
    transform: rotate(90deg);
    background-image: url(/assets/images/shell-c-eyes.png);
}

.social-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
}

.social-links img {
    width: var(--text-size-medium);
}

.nav-links {
    display: flex;
    flex-direction: row;
    list-style: none;
    font-family: var(--font-headings);
    font-weight: var(--weight-bold);
    font-size: var(--text-size-huge);
    padding: 0;
}

.nav-links li {
    line-height: var(--line-height-tight);
    transition: opacity 0.3s ease, letter-spacing 0.3s ease, text-shadow 0.2s ease;
    flex: 1;
    text-align: center;
    opacity: 1;
    text-shadow: 0.5rem 1rem transparent;
}

.nav-links li a {
    transition: color 0.3s ease;
    display: block;
    padding-right: var(--space-md);
}

.nav-links li:first-child a {
    padding-left: 0;
}

/* Color cycling for navigation links */
.nav-links li:nth-child(1) a {
    color: var(--color-2);
}

.nav-links li:nth-child(2) a {
    color: var(--color-3);
}

.nav-links li:nth-child(3) a {
    color: var(--color-4);
}

.nav-links li:nth-child(4) a {
    color: var(--color-5);
}

.nav-links li:nth-child(5) a {
    color: var(--color-6);
}

.nav-links li:nth-child(6) a {
    color: var(--color-neutral-white);
}

.nav-links:hover li {
    opacity: 0;
}

.nav-links li:hover {
    opacity: 1 !important;
    letter-spacing: .2rem;
    text-shadow: 0.3rem 0.3rem var(--color-neutral-dark);
}

.nav-links li:hover a {
    color: var(--color-neutral-white) !important;
    opacity: 1;
}

/* Makes background color change on hover */
.nav-links li:nth-child(1):hover ~ .header-bottom,
.header-bottom:has(.nav-links li:nth-child(1):hover) {
    background-color: var(--color-2);
}

.nav-links li:nth-child(2):hover ~ .header-bottom,
.header-bottom:has(.nav-links li:nth-child(2):hover) {
    background-color: var(--color-3);
}

.nav-links li:nth-child(3):hover ~ .header-bottom,
.header-bottom:has(.nav-links li:nth-child(3):hover) {
    background-color: var(--color-4);
}

.nav-links li:nth-child(4):hover ~ .header-bottom,
.header-bottom:has(.nav-links li:nth-child(4):hover) {
    background-color: var(--color-5);
}

.nav-links li:nth-child(5):hover ~ .header-bottom,
.header-bottom:has(.nav-links li:nth-child(5):hover) {
    background-color: var(--color-6);
}

.nav-links li:nth-child(6):hover ~ .header-bottom,
.header-bottom:has(.nav-links li:nth-child(6):hover) {
    background-color: var(--color-neutral-dark);
}

#now-playing {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    font-size: var(--text-size-regular);
    color: var(--color-text-inverted);
}

#now-playing.fade-in {
    opacity: 1;
}

#now-playing #album-cover {
    width: var(--text-size-medium);
    transition: transform 0.5s, opacity 0.5s ease-in-out;
    display: block;
}

#now-playing #album-cover:hover {
    transform: scale(2);
}

#now-playing div a {
    color: var(--color-text-inverted);
}

#now-playing #date a {
    font-size: var(--text-size-small);
    color: var(--color-neutral-3);
}

#turtl-container {
    position: absolute;
    right: var(--space-lg);
    bottom: -0.625rem;
    height: 7.5rem;
    display: flex;
    align-items: flex-end;
}

.turtl {
    width: var(--heading-size-h1);
    image-rendering: pixelated;
    cursor: pointer;
    z-index: 2;
}

.turtl:active {
    transform: scale(0.95);
}

#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    height: 3rem;
    z-index: 1;
}

#theme-icon {
    font-size: var(--text-size-large);
    line-height: 1.1;
    display: block;
    transition: transform 0.5s ease-in-out;
}

#theme-toggle:hover #theme-icon {
    transform: rotate(8deg);
}

#visitor-counter {
    display: flex;
    gap: var(--space-sm);
    font-family: var(--font-code);
    font-weight: var(--weight-normal);
    font-size: var(--text-size-regular);
    position: absolute;
    right: var(--space-lg);
    top: var(--space-md);
    color: var(--color-neutral-white);
}

#visitor-number {
    display: flex;
    flex-direction: row;
    gap: var(--space-xs);
}

#visitor-number span {
    background-color: var(--color-neutral-white);
    color: var(--color-neutral-black);
    padding: var(--space-xs) var(--space-sm);
    line-height: 1;
    border-radius: var(--border-radius-sm);
}