/* --- global --- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    background: radial-gradient(circle at top, #13151f, #050509 55%);
    color: #f5f5f5;
}

a {
    color: inherit;
}

/* --- layout --- */

.site-header {
    text-align: center;
    padding: 2rem 1rem 1rem;
}

.site-header h1 {
    margin: 0;
    font-size: 2.4rem;
    letter-spacing: 0.1em;
}

.site-header p {
    margin-top: 0.5rem;
    opacity: 0.8;
}

.site-footer {
    text-align: center;
    padding: 1rem 0 2rem;
    font-size: 0.85rem;
    opacity: 0.6;
}

main {
    padding: 1rem 1.5rem 2rem;
    width: 70%;
    margin: 0 auto;
}

/* --- grid --- */

.record-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

/* --- card --- */

.record-card {
    perspective: 1200px;
    position: relative;
    cursor: pointer;
    aspect-ratio: 1 / 1; /* square */
    height: auto;
}

.record-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s ease;
    transform-style: preserve-3d;
}

.record-card:hover .record-inner {
    transform: rotateY(180deg) scale(1.07);
    z-index: 10;
}

/* faces */

.record-face {
    position: absolute;
    inset: 0;
    overflow: hidden;
    backface-visibility: hidden;
}

/* front */

.record-front {
    background: #111;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.record-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* back */

.record-back {
    background: #050508;
    transform: rotateY(180deg);
    padding: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.record-back-header {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.8rem;
}

.record-back-header .record-title {
    font-size: 0.9rem;
}

.record-tagline {
    opacity: 0.7;
    font-size: 0.75rem;
}

.spotify-link {
    position: absolute;
    bottom: 0.7rem;
    right: 0.7rem;
    z-index: 2;
}

.spotify-icon {
    width: 22px;    
    height: 22px;
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* small screens */

@media (max-width: 600px) {
    .record-card {
        height: 210px;
    }

    .site-header h1 {
        font-size: 2rem;
    }

    main {
        padding-inline: 1rem;
    }
}