:root {
    --serif-font: "Merriweather", serif;
    --sans-font: "Open Sans", sans-serif;

    --background: #f2f2f2;
    --text: #222;
    --bio-text: #444;
    --secondary-text: #666;
    --card-background: white;
    --nav-background: #111;
    --link: #990000;
    --link-hover: #470000;
}

.dark-mode {
    --background: #181818;
    --text: #eeeeee;
    --bio-text: #cccccc;
    --secondary-text: #aaaaaa;
    --card-background: #242424;
    --nav-background: #080808;
    --link: #ffb8b8;
    --link-hover: #ffe6e6;
}

@media (prefers-color-scheme: dark){
    body:not(.light-mode){
        --background: #181818;
        --text: #eeeeee;
        --bio-text: #cccccc;
        --secondary-text: #aaaaaa;
        --card-background: #242424;
        --nav-background: #080808;
        --link: #ffb8b8;
        --link-hover: #ffe6e6;
    }
}

body{
    margin:0;
    font-family:var(--sans-font);
    background:var(--background);
    color:var(--text);
}

.intro{
    padding:5rem 8vw 1rem;
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:3rem;
}

.intro h1{
    font-family:var(--serif-font);
    font-size:clamp(3rem,7vw,5.8rem);
    font-weight:700;
    line-height:.95;
    margin:0;
}

.intro-text{
    flex:1;
}

.headshot{
    width:220px;
    height:220px;
    object-fit:cover;
    border-radius:50%;
    flex-shrink:0;
}

.subtitle {
    margin-top:1.75rem;

    font-family:var(--sans-font);
    font-size:1rem;
    font-weight:600;
    letter-spacing:.18em;
    text-transform:uppercase;

    color:var(--secondary-text);
}

.bio {
    margin-top:1.25rem;
    max-width:800px;
    font-family:var(--sans-font);
    font-size:1rem;
    line-height:1.5;
    color:var(--bio-text);
}

.gallery-page .bio{
    margin-top:2.5rem;
    max-width:800px;
}

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

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

.links-bar{
    background:var(--nav-background);
    padding:.75rem 8vw;

    color:white;
    text-transform: uppercase;
    text-decoration:none;
    font-weight:500;
    letter-spacing:.02em;
    
    display:flex;
    justify-content:center;
    gap:2rem;
    align-items:center;
}

.links-bar a{
    color:white;
    text-transform: uppercase;
    text-decoration:none;
    font-weight:500;
    letter-spacing:.02em;
}

.links-bar a:hover{
    opacity:.7;
}
.grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
    gap:2rem;
    padding:1.5rem 8vw 5rem
}

.gallery{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
    gap:2rem;
    padding:1.5rem 8vw 5rem;
}

.gallery img{
    width:100%;
    height:auto;
    display:block;
    border-radius:12px;
    box-shadow:0 8px 24px rgba(0,0,0,.08);
    transition:transform .25s ease, box-shadow .25s ease;
}

.gallery img:hover{
        transform:scale(1.02);
        box-shadow:0 12px 30px rgba(0,0,0,.12);
}

.pdf-thumbnail{
    width:100%;
    height:auto;
    display:block;
    border-radius:12px;
    box-shadow:0 8px 24px rgba(0,0,0,.08);
    transition:transform .2s ease;
}

.pdf-thumbnail:hover{
    transform:translateY(-4px);
}

.calendar-gallery{
    grid-template-columns:repeat(2, 1fr);
}

.web-gallery{
    grid-template-columns:repeat(3, 1fr);
}

.lightbox{
    display:none;
    position:fixed;
    z-index:1000;
    inset:0;
    background:rgba(0,0,0,.85);
    justify-content:center;
    align-items:center;
}

.lightbox-image{
    max-width:80vw;
    max-height:80vh;
    width:auto;
    height:auto;
    object-fit:contain;
}

.lightbox-close{
    position:absolute;
    top:2rem;
    right:3rem;
    color:white;
    font-size:3rem;
    cursor:pointer;
}

.lightbox-content{
    display:flex;
    align-items:center;
    gap:1rem;
    max-width:90vw;
    max-height:90vh;
}

.lightbox-prev,
.lightbox-next{
    background:none;
    border:none;
    color:white;
    font-size:3rem;
    cursor:pointer;
    flex-shrink:0;
}

.lightbox-prev:hover,
.lightbox-next:hover{
    opacity:.7;
}

.lightbox-image{
    max-width:80vw;
    max-height:80vh;
    width:auto;
    height:auto;
    object-fit:contain;
}

.lightbox-caption{
    color:white;
    font-family:var(--sans-font);
    text-align:center;
    font-size:.9rem;
    margin-top:1rem;
}

.lightbox-image-wrapper{
    text-align:center;
}

.lightbox-caption{
    color:white;
    font-family:var(--sans-font);
    font-size:.9rem;
    margin:1rem 0 0;
}

.card{
    opacity:.65;
    transition:.25s ease;
    text-decoration:none;
    color:inherit;
    background:var(--card-background);
    border-radius:16px;
    overflow:hidden;
    box-shadow:0 10px 30px rgba(0,0,0,.06);
    transition:.25s
}

.card:hover{
    opacity:1;
    transform:translateY(-6px);
}

.card img{
    width:100%;
    aspect-ratio:4/3;
    object-fit:cover;
    display:block;
    background:#ddd;
}
.card div{
    padding:1.2rem
}

.card p{
    margin:.6rem 0 0;
    font-size:.85rem;
    text-transform:uppercase;
    color:var(--secondary-text);
    letter-spacing:.02em;
}

h3{
    margin:0;
    font-family:var(--serif-font);
    font-size:2rem;
}

.desktop-link{
    display:inline;
}

.mobile-link{
    display:none;
}

.name-row{
    display:flex;
    align-items:baseline;
    gap:.75rem;
}

#theme-toggle{
    border:none;
    background:none;
    font-size:1.5rem;
    cursor:pointer;
    color:var(--text);
    padding:0;
    line-height:1;
    transform:translateY(.1rem);
    transition:opacity .2s ease, transform .2s ease;
}

#theme-toggle:hover{
    opacity:.6;
    transform:translateY(.1rem) rotate(15deg);
}

.mobile-theme-link{
    display:none;
}

.mobile-theme-link a{
    color:var(--secondary-text);
    text-decoration:none;
    font-size:.85rem;
    text-transform:lowercase;
}

.mobile-theme-link a:hover{
    color:var(--text);
}

.site-footer{
    text-align:center;
    padding:1.5rem 8vw;
    font-family:var(--sans-font);
    font-size:.85rem;
    color:var(--secondary-text);
    text-transform:lowercase;
}

.site-footer a{
    color:var(--secondary-text);
    text-decoration:none;
}

.site-footer a:hover{
    color:var(--text);
}

.site-footer p{
    margin-top:1rem;
    line-height:1.6;
}

@media (max-width:700px){

    .intro{
        flex-direction:column;
        align-items:flex-start;
    }

    .headshot{
        display:none;
    }

    .subtitle span{
        display:block;
    }

    .subtitle .divider{
        display:none;
    }

    .desktop-link{
        display:none;
    }

    .mobile-link{
        display:inline;
    }

    .calendar-gallery{
        grid-template-columns:1fr;
    }

    .divider{
        display:none;
    }

    .web-gallery{
        grid-template-columns:1fr;
    }

    .card{
        opacity:1;
    }

    .gallery img:hover,
    .card:hover{
        transform:none;
        opacity:1;
    }

    .mobile-theme-link{
        display:block;
        margin-bottom:1rem;
    }

    .name-row button{
        display:none;
    }

}
