/* these are the main colors and header image
   replace them with anything you want! */
:root {
    --header-bg: url("header.gif");
    --accent-color: #633aac;
    --link-color: #9f4fb1;
    --button-color: #E5BDF9;
    --bg-color: #FFF3E8;
    --bg-color2: #FFE8FA;
    --text-color: #372558;
    --favorite-color: #CAEC8A;
}
/* you can get hex codes from sites like this:
   https://palettes.shecodes.io/
   i just looked up "css color templates" to find that link! */

/* this applies to all the content */
* {
    color: var(--text-color);
/* change the font here, it's set up to all use the same one */
    font-family: monospace;
}
/* this is for when you select text on the page */
::selection {
    background: var(--accent-color);
    color: var(--bg-color);
}

body {
    background-color: var(--bg-color2);
    margin: 0;
}
/* i think having better line spacing helps text to be more readable, but you can remove it if you want */
p {line-height: 1.5em;}

header {
/* you can add the image url in :root (at the top) if you want */
    background: var(--header-bg);
    background-size: 100% 100%;
    background-position: center;
    max-width: 960px;
/* height now always matches the header image's real proportions (1170x640) so it never gets cropped */
    aspect-ratio: 1170 / 640;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 0 1em;
/* i have a default border-radius set, but i didn't want rounded corners on this element */
    border-radius: 1em;
    box-shadow: var(--button-color) 8px 8px 20px;
}

/* this is your site title displayed at the top of the page */
header h1 {
   padding: .4em;
    border-radius: .3em;
    max-width: 900px;
    font-size: 3em;
    transform: translateY(330px);
    ;
/* you can change the text-align to center or right if you want it placed differently */
    text-align: right;
    color: var(--bg-color);
    text-shadow: var(--accent-color) 4px 4px .5em;
}

nav {
    /*padding: 1em;*/
    margin-top: 2em;
    font-weight: bold;
   
}

nav > ul {
    max-width: 960px;
    margin: auto;
    line-height: 3rem;
/* this stuff makes it wrap around on mobile */
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
/* this line takes away the dot in front of the list items */
    list-style-type: none;
/* list items have default padding but we don't need it for these */
    padding-left: 0;
/* and this spaces out the buttons so they're not touching */
    justify-content: space-evenly;
}
nav li {
    text-align: center;
}
/* image-based nav buttons: pink by default, purple crossfades in on hover */
nav li > a.nav-btn {
    display: inline-block;
    position: relative;
    line-height: 0;
    text-decoration: none;
}
.nav-btn img {
    display: block;
    height: 60px; /* a little bigger than before */
    width: auto;
}
.nav-btn .btn-hover {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 300ms ease-out;
}
.nav-btn:hover .btn-hover {
    opacity: 1;
}

a {
    color: var(--link-color);
    border-radius: .5em;
    text-shadow: var(--bg-color) 1px 1px 2px;
    font-weight: bold;
    transition: color 400ms ease-out, background-color 400ms ease-out, box-shadow 400ms ease-out;
}
a:visited {
    color: var(--text-color);
}
a:hover {
    color: var(--link-color);
}

/* you can change this to anything you want :) */
ul { list-style-type: "❤︎ "; }

#sidebar {
    background: var(--bg-color);
    min-width: 220px;
    margin: 1em;
    padding: 1em;
    border: 2px dotted var(--link-color);
    box-shadow: var(--button-color) 8px 8px 20px;
    border-radius: 2em;
}

#avatar {
    margin: .5em auto;
/* image size is 160px so i made its container a little bigger to fit the borders */
    max-width: 164px;
    max-height: 164px;
    border-radius: 8em;
}
#avatar img {
    background: var(--bg-color2);
    border: 2px solid var(--button-color);
    max-width: 160px;
    border-radius: 8em;
}

#bio {
    margin: 2em 1em;
    background: var(--bg-color2);
    border: 1px solid var(--button-color);
    border-radius: 1em;
}
#bio p { margin: 1em; }

#content {
    display: flex;
    max-width: 960px;
    margin: auto;
}

main {
    background-color: var(--bg-color);
    padding: 1em 2em;
    margin: 1em;
    border: 2px dotted var(--link-color);
    box-shadow: var(--button-color) 8px 8px 20px;
    border-radius: 2em;
}

main > h1,
main > h2,
main > h3 {
    background-color:#E5BDF9;
    border-radius: .4em;
    padding: .2em .5em;
}

/* a class for centering text and images */
.center { text-align: center; }
/* made this a class so i can change it to be centered on mobile */
.img-right { float: right; }

footer {
    text-align: center;
    font-size: small;
    margin: 1em auto;
    max-width: 960px;
}

/* these are the mobile styles! */
@media only screen and (max-width: 800px) {
    #content {
        flex-wrap: wrap;
    }
    #sidebar {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
    }
    header {
        margin: 0 1em;
    }
    header > h1 { 
        font-size: 3em;
        margin: .4em;
    }
    #avatar {margin: 0 1em;}
    #bio {width: 50%;}
    main {margin: 0 1em;}
    #sidebar ul {   
        margin: 0 1em;
        display: flex;
        flex-wrap: wrap;
        line-height: 2em;
    }
    #sidebar li {
        padding-left: 0;
        margin: .3em 1em;
    }
    .img-right {
        float: none;
        text-align: center;
    }
    footer {
        margin: 1em;
    }
}
.gallery-tabs ul {
    max-width: 960px;
    margin: 0 auto 1em auto;
    line-height: normal;
    display: flex;
    flex-wrap: nowrap; /* keep all tab buttons on a single line */
    flex-direction: row;
    list-style-type: none;
    padding-left: 0;
    justify-content: center;
    align-items: center;
    gap: .5em;
    overflow-x: auto; /* if it's ever too tight (e.g. very small screens), scroll instead of wrap */
}
.gallery-tabs li {
    text-align: center;
    flex: 0 0 auto;
}
.gallery-tabs .tab-btn {
    display: inline-block;
    position: relative;
    line-height: 0;
    text-decoration: none;
}
.gallery-tabs .tab-btn img {
    display: block;
    height: 62px; /* shrunk slightly so 4 buttons fit on one line */
    width: auto;
}
.gallery-tabs .tab-btn .btn-hover {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 300ms ease-out;
}
.gallery-tabs .tab-btn:hover .btn-hover {
    opacity: 1;
}
/* the active tab stays on its purple state so it's clear which gallery is showing */
.gallery-tabs .tab-btn.active .btn-hover {
    opacity: 1;
}

.gallery { /* this is the main div that wraps your gallery */
  display:grid;
  grid-template-columns: repeat(3, 280px); /* 3 columns, each bigger now */
  gap:25px; /* more breathing room between images */
  width:fit-content; /* only as wide as the columns need */
  margin:2em auto; /* this centers the whole gallery on the page */
  align-items:center; /* keeps shorter images centered against taller ones in the same row */
}

/* this is the div which wraps every image */
.gallery > div {
  width:280px;
  overflow:visible; /* lets the zoomed image pop out bigger instead of getting clipped */
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
}

.gallery img {
  width:280px; /* this sets the width for every image */
  height:auto; /* letting height be automatic keeps the image's full aspect ratio, nothing gets cut off */
  transition: transform 200ms ease-out; /* makes the zoom feel smoother */
}

/* this resizes the image on hover - hovering ANYWHERE on the div now triggers it,
   not just a precise spot on the image itself */
.gallery > div:hover img {
  transform:scale(1.8); /* image just gets bigger, no cropping/zooming inside it */
  position:relative;
  z-index:10; /* makes sure the enlarged image shows above neighboring images */
}