:root {
    --gcollazo-dot-com-max-width: 740px;
}

html, body {
    background-color: var(--pico-background-color);
}

body {
    margin: 0 auto;
    max-width: var(--gcollazo-dot-com-max-width);
    -webkit-font-smoothing: antialiased;
}

main.container,
header.container,
footer.container {
    max-width: var(--gcollazo-dot-com-max-width);
    padding-left: var(--pico-spacing);
    padding-right: var(--pico-spacing);
}

@media print {
    footer,
    .nav-top-links {
        display: none;
    }

    .nav-top-branding a {
        margin-right: 0;
    }

    * {
        background: white !important;
        color: black !important;
        text-decoration-color: black !important;
    }
}

.nav-top-branding {
    display: flex;
    justify-content: center;
}

.nav-top-branding-avatar {
    width: 50px;
    border-radius: 50%
}

.nav-top-branding-text {
    margin: 10px 0 0 7px;
}

@media (max-width: 575px) {
    .nav-top-branding-text {
        margin: 17px 0 0 7px;
        font-size: 1rem;
    }

    .nav-top-links {
        display: none;
    }
}

/* Mobile menu styles */
.mobile-menu-button {
    display: none;
    position: absolute;
    right: var(--pico-spacing);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--pico-color);
    padding: 0.5rem;
    z-index: 1001;
}

@media (max-width: 575px) {
    nav {
        position: relative;
    }

    .mobile-menu-button {
        display: block;
    }

    .nav-top-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--pico-background-color);
        z-index: 1000;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        margin: 0;
        padding: 0;
    }

    .nav-top-links.active {
        display: flex;
    }

    .nav-top-links li {
        list-style: none;
        margin: 0;
    }

    .nav-top-links a {
        font-size: 1.5rem;
        text-decoration: none;
        color: var(--pico-color);
    }

    body.menu-open {
        overflow: hidden;
    }
}

.text-muted {
    color: #48536B;
}

hgroup[data-post-title] {
    text-wrap: balance;
}

.blog-feed-note {
    text-align: center;
    font-size: 0.8rem;
    color: var(--pico-muted-color);
    margin-bottom: 2rem;
}

/* Previous / next post links. The slot renders empty on ordinary pages. */
.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--pico-muted-border-color);
}

.post-nav-link {
    flex: 1 1 0;
    /* Long titles would otherwise push the two columns out of balance. */
    min-width: 0;
    text-decoration: none;
}

/* The first and last posts only have one neighbour, and that lone link should
   still sit on its own side of the row. */
.post-nav-next {
    margin-left: auto;
    text-align: right;
}

.post-nav-label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
    color: var(--pico-muted-color);
}

.post-nav-title {
    display: block;
    text-wrap: balance;
}

.post-nav-link:hover .post-nav-title {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .post-nav {
        flex-direction: column;
        gap: 1.5rem;
    }

    .post-nav-next {
        text-align: left;
    }
}

/* Full screen template */
.fullscreen-nav {
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

/* Soundboard */
.soundboard {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.soundboard-pad {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    aspect-ratio: 1;
    margin: 0;
    padding: 1rem;
    border-radius: 1rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.08s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.soundboard-pad:active:not(:disabled) {
    transform: scale(0.96);
}

.soundboard-pad.is-playing {
    box-shadow: 0 0 0 0.25rem var(--pico-primary-focus);
}

.soundboard-pad:disabled {
    opacity: 0.5;
}

.soundboard-pad-icon {
    font-size: 2.5rem;
}

.soundboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    /* The h1 below drops its own margin to sit centred in this row, so the gap
       above the pads lives here instead. */
    margin-bottom: 1.5rem;
}

.soundboard-header h1 {
    margin: 0;
}

.soundboard-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.soundboard-stop {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: auto;
    margin: 0;
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
}

/* Disabled means "nothing is playing" here, not "broken". It recedes into the
   page rather than fading out, and lights up when there is something to stop. */
.soundboard-stop:disabled {
    opacity: 1;
    filter: none;
    background-color: var(--pico-card-background-color);
    border-color: var(--pico-muted-border-color);
    color: var(--pico-muted-color);
}

.soundboard-hint {
    color: var(--pico-muted-color);
}

/* The title row gets tight on a phone, and Esc is not reachable there anyway. */
@media (max-width: 600px) {
    .soundboard-hint {
        display: none;
    }
}

.soundboard-status {
    font-size: 0.8rem;
    color: var(--pico-muted-color);
}

@media (prefers-reduced-motion: reduce) {
    .soundboard-pad {
        transition: none;
    }

    .soundboard-pad:active:not(:disabled) {
        transform: none;
    }
}
