/* ==========================================================================
   FONTS
   ========================================================================== */

@font-face {
    font-family: 'Liberation Sans';
    src: url('../assets/LiberationSans.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'FreeMono';
    src: url('../assets/FreeMono.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

/* ==========================================================================
   CSS RESET & BASE
   ========================================================================== */

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

html {
    overflow-y: scroll;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   CSS VARIABLES
   ========================================================================== */

:root {
    --side-margin: 3.5rem;
    --side-margin-mobile: 1rem;
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

body {
    font-family: "Liberation Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: #ffffff;
    color: #101010;
    line-height: 1.5;
    font-size: 1.4rem;
    letter-spacing: 0.026em;
    padding: 6.25rem var(--side-margin-mobile) 3.75rem;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1,
h2 {
    font-family: 'Be Vietnam Pro', "Helvetica Neue", Helvetica, sans-serif;
    font-weight: 300;
    font-size: 1.32rem;
    margin-bottom: 5px;
}

h2 {
    font-weight: normal;
}

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

u {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.member-name {
    font-weight: normal;
    margin-bottom: 5px;
    font-size: 1.7rem;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.container {
    max-width: 1300px;
    margin: 0 auto;
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
    position: fixed;
    top: 2rem;
    left: var(--side-margin-mobile);
    right: var(--side-margin-mobile);
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    --header-title-size: 2rem;
    --header-line-height: 1.1;
}

.site-header h1 {
    font-weight: 400;
    font-size: var(--header-title-size);
    line-height: var(--header-line-height);
}

.site-header h1 a,
.pin-icon {
    transition: opacity 0.3s ease;
}

.site-header h1 a:hover,
.pin-icon:hover {
    opacity: 0.8;
}

.header-nav {
    display: flex;
    align-items: center;
}

.pin-icon {
    display: block;
    width: calc(var(--header-title-size) * var(--header-line-height));
    height: calc(var(--header-title-size) * var(--header-line-height));
    cursor: pointer;
}

.pin-icon svg {
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   CONTENT SECTIONS
   ========================================================================== */

/* Gallery Description */
.gallery-description {
    font-size: 1rem;    
    text-align: left;
    margin-bottom: 1.5rem;
    left: var(--side-margin);
    right: var(--side-margin);
}

/* Manifesto Section */
.manifesto {
    text-align: center;
    margin-bottom: 120px;
}

/* Friends Section */
.friends {
    text-align: center;
    margin-top: 3.75rem;
}

/* ==========================================================================
   MEMBERS GRID
   ========================================================================== */

.members-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.7rem;
    margin-bottom: 6.25rem;
    max-width: 1500px;
    margin-left: auto;
    margin-right: auto;
}

/* Member Card */
.member-card {
    display: flex;
    flex-direction: column;
}

.image-wrapper {
    width: 100%;
    aspect-ratio: 1.5 / 1;
    overflow: hidden;
    background-color: #f0f0f0;
    margin-bottom: 25px;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.member-card:hover .image-wrapper img {
    opacity: 0.8;
}

.member-info {
    text-align: center;
}

/* ==========================================================================
   PHOTO GALLERY
   ========================================================================== */

#arena-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--side-margin);
    align-items: end;
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem 0;
}

#arena-gallery a {
    display: block;
    width: 100%;
}

#arena-gallery img {
    display: block;
    width: 100%;
    height: auto;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#arena-gallery img.loaded {
    opacity: 1;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
    font-family: 'FreeMono', 'Courier New', monospace;
    text-align: center;
    margin-top: 4rem;
    font-size: 1rem;
    letter-spacing: 0.05em;
    color: #999;
    opacity: 0;
    animation: fadeIn 0.5s ease 2s forwards;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* ==========================================================================
   MEDIA QUERIES
   ========================================================================== */

/* Desktop: 751px and up */
@media (min-width: 751px) {
    body {
        padding-left: var(--side-margin);
        padding-right: var(--side-margin);
    }
    
    .site-header {
        left: var(--side-margin);
        right: var(--side-margin);
    }
}

/* Tablets: 768px and up */
@media (min-width: 768px) {
    .members-grid {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 1.7rem;
        row-gap: 80px;
    }
}

/* Large Screens: up to 1700px */
@media (max-width: 1700px) {
    #arena-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Medium Screens: up to 1200px */
@media (max-width: 1200px) {
    #arena-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: up to 750px */
@media (max-width: 750px) {
    body {
        font-size: 0.9rem;
    }
    
    .site-header {
        --header-title-size: 1.5rem;
    }
    
    .gallery-description {
        font-size: 0.9rem;
        left: var(--side-margin-mobile);
    }
    
    .site-footer {
        font-size: 0.8rem;
    }
    
    .member-name {
        font-size: 1.1rem;
    }
    
    #arena-gallery {
        grid-template-columns: 1fr;
        gap: var(--side-margin-mobile);
    }
}