* {
    margin: 0;
    padding: 0;
}

body {
    font-family: lucida console;
    background-color: #ffffff;
    background-image: url("images/background.png");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: url("images/cursor/cursor.png") 16 16, auto;
}

a, nav button, #gallery img, .viewer-close {
    cursor: url("images/cursor/hover.png") 16 16, pointer;
}

.site-wrapper {
    zoom: 0.9;
    background-color: #d7fbff;
    width: 80%;
    max-width: 480px;
    margin: 40px;
    padding: 10px;
    overflow: hidden;
    box-shadow: 0 2px 20px #ffffff;
    border: 8px double #ffffff;
    border-radius: 32px;
    animation: fade-in 1s ease 0.4s both;
}

h1 {
    font-size: 22px;
    font-weight: 900;
    color: #b8007b;
    text-decoration: underline wavy #99eafc;
}

h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 0;
    width: fit-content;
    color: #ffffff;
    background-color: #081189;
    padding: 2px 4px;
}

h3 {
    font-size: 12px;
    color: #081189;
}

p {
    font-size: 10px;
    margin-top: 4px;
    color: #081189;
}

hr {
    border: none;
    border-top: 3px dotted #99eafc;
    margin-top: 4px;
}

.site-banner {
    display: block;
    max-width: 100%;
    height: auto;
    margin-bottom: 2px;
    border-radius: 16px 16px 0 0;
    transition: transform 0.5s ease;
}

.site-banner:hover {
    transform: scale(1.02);
}

header {
    background-color: #fffcd7;
    padding: 10px;
    padding-bottom: 4px;
    border: 4px dashed #ffffff;
    border-radius: 22px 22px 0 0;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

nav {
    display: flex;
    gap: 4px;
}

nav button {
    background-color: #99eafc;
    color: #2b0c9c;
    border: 3px dotted #ffffff;
    border-radius: 10px;
    padding: 6px;
    font-family: inherit;
    font-size: 12px;
    transition: transform 0.5s ease;
}

nav button:hover {
    transform: scale(1.1);
    background-color: #a1fff7;
}

.nav-icon {
    display: none;
}

main {
    display: grid;
    grid-template-rows: 1fr;
    overflow: hidden;
    transition: grid-template-rows 0.5s ease;
}

main.closed {
    grid-template-rows: 0fr;
}

.main-inner {
    align-self: center;
    min-height: 0;
    min-width: 0;
}

main img {
    flex: 1.75;
    min-width: 0;
    margin: 10px;
    transition: transform 0.5s ease;
}

main img:hover {
    transform: scale(1.2);
}

.main-text {
    flex: 1;
    padding-left: 20px;
    border: 4px dashed #fe77a2;
    border-radius: 18px;
    padding: 12px;
    background-color: #ffffff;
}

.page {
    display: none;
}

.page.active {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 10px;
}

#gallery.active {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-height: 300px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-color: #fe77a2 #ffe6ee;
    scrollbar-width: thin;
}

#gallery img {
    width: 100%;
    aspect-ratio: 1/1;
    height: auto;
    object-fit: cover;
    margin: 0;
    transition: transform 0.3s ease;
}

#gallery img:hover {
    transform: scale(1.02);
}

.social {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1/1;
    flex: 1;
    min-width: 0;
    padding: 10px;
    background-size: cover;
    background-position: center;
    grid-row: 2;
}

#socials.active {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px 0;
    padding: 0;
    padding-top: 30px;
    padding-bottom: 30px;
    margin: 0;
    background-image: url("images/lace.png");
    background-size: 80%;
    background-position: center;
    background-repeat: no-repeat;
}

.social-text {
    margin: 0;
    text-align: center;
}

.label1 {grid-area: 1/1;}
.label2 {grid-area: 3/2;}
.label3 {grid-area: 1/3;}
.label4 {grid-area: 3/4;}

.label1, .label3 {
    margin-bottom: -7%;
}

.social img {
    display: block;
    flex: none;
    width: 60%;
    margin: 0;
    transition: transform 0.6s cubic-bezier(0.36, 1.8, 0.65, 1), scale 0.6s ease;
}

#instagram {
    background-image: url("images/white.png");
}

#pinterest {
    background-image: url("images/blue.png");
}

#twitter {
    background-image: url("images/yellow.png");
}

#github {
    background-image: url("images/pink.png");
}

footer {
    background-color: #ffe6ee;
    display: flex;
    gap: 10px;
    padding: 10px;
    border: 4px dashed #ffffff;
    border-radius: 0 0 22px 22px;
}

footer img {
    flex: 1;
    min-width: 0;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform 0.5s ease;
}

footer img:hover {
    transform: scale(1.05);
}

#toffee {
    border-radius: 0 0 0 16px;
}

#sherbet {
    border-radius: 0 0 16px 0;
}

.viewer {
    position: fixed;
    inset: auto;
    margin: 0;
    padding: 0;
    transform: translate(-50%, -50%);
    border: 2px solid #ffffff;
    border-radius: 16px;
    background-color: #ffffff;
    overflow: hidden;
}

.viewer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background-color: #ffffff;
    color: #2b0c9c;
    font-size: 16px;
    cursor: url("images/cursor/grab.png") 16 16, grab;
    user-select: none;
    touch-action: none;
}

.viewer-bar.dragging {
    cursor: url("images/cursor/grab.png") 16 16, grab;
}

.viewer-close {
    background: #99eafc;
    padding: 6px 8px;
    border: 3px dotted #ffffff;
    border-radius: 10px;
    color: inherit;
    font-family: inherit;
}

.viewer-img {
    display: block;
    max-width: 60vw;
    max-height: 50vh;
}


@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 600px) {
    h1 {
        font-size: 20px;
    }

    header {
        padding-bottom: 10px;
    }

    .header-row {
        flex-direction: column;
        justify-content: center;
        gap: 0px;
        text-align: center;
    }

    nav {
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        gap: 4px;
        width: 100%;
    }

    .nav-icon {
        display: block;
        width: 40px;
        height: 40px;
        object-fit: contain;
        transition: transform 0.5s ease;
    }

    .nav-icon:hover {
        transform: scale(1.2);
    }

    #icon-left {
        margin-right: auto;
        margin-left: 10px;
    }

    #icon-right {
        margin-left: auto;
        margin-right: 10px;
    }

    main img {
        margin: 0;
    }

    #home.active {
        flex-direction: column;
        align-items: stretch;
    }

    #home img {
        flex: none;
        width: 60%;
        align-self: center;
        margin: 0;
    }

    #gallery.active {
        max-height: 260px;
    }
}

@media (max-width: 400px) {
    h1 {
        font-size: 18px;
    }

    nav button {
        padding: 6px 4px;;
        font-size: 8px;
    }

    .nav-icon {
        width: 20px;
        height: 20px;
    }
}