* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    overflow-x: hidden;
}

:root {
    --off-white: #f4f4f4;
    --white: #ffffff;
    --black: #000000;
    --highlights: #7393b3;
    --global-padding: 20px;
    --navbar-height: 80px;
    --footer-height: 40px;
}

main {
    max-width: 1440px;
    margin: 0 auto;
}

/* Header */

header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background-color: var(--off-white);
}

.navbar-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--navbar-height);
    max-width: 1440px;
    margin: 0 auto;
}

.navbar-brand {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--black);
    text-decoration: none;
    margin-left: var(--global-padding);
}

.navbar-menu {
    display: flex;
    justify-content: center;
    gap: 80px;
    list-style: none;
    margin: 0 auto;
}

.navbar-link {
    color: var(--black);
    text-decoration: none;
    font-size: 1.2rem;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.navbar-link:hover {
    color: var(--highlights);
}

.navbar-link.current {
    text-decoration: underline;
}

.navbar-hamburger {
    display: none;
}

/* Footer */

footer {
    width: 100%;
    background-color: var(--off-white);
}

.footer-section {
    display: flex;
    justify-content: center;
    height: var(--footer-height);
    align-items: center;
    position: relative;
    max-width: 1440px;
    margin: 0 auto;
}

.footer-section p {
    position: absolute;
    left: var(--global-padding);
    font-size: 0.8rem;
    color: var(--black);
}

.socials {
    display: flex;
    height: 100%;
    gap: calc(var(--global-padding)*2);
}

.socials a {
    color: var(--black);
    text-decoration: none;
    font-size: 2rem;
    transition: color 0.3s ease;
}

.socials a:hover {
    color: var(--highlights);
}

.socials i {
    display: flex;
    align-items: center;
    height: 100%;
}

/* Home */

.carousel {
    margin-top: var(--navbar-height);
    height: calc(100vh - var(--navbar-height));
    display: flex;
    overflow-x: hidden;
    position: relative;
}

.group {
    display: flex;
    animation: spin 80s infinite linear;
    height: 100%;
    flex-shrink: 0;
}

.card {
    flex: 0 0 auto;
    height: 100%;
}

.card img{
    height: 100%;
    width: auto;
    display: block;
    object-fit: contain;
    pointer-events: none;
}

@keyframes spin {
    from { translate: 0;}
    to { translate: -100%;}
}

.hero-section {
    display: flex;
    width: 100%;
    gap: var(--global-padding);
    padding: var(--global-padding);
}

.author-image {
    position: relative;
    width: 30%;
    overflow: hidden;
    aspect-ratio: 3/4;
    margin-left: auto;
    margin-right: auto;
    max-width: 300px;
}

.author-image img {
    height: 100%;
    width: 100%;
    object-position: center;
    object-fit: cover;
    pointer-events: none;
}

.hero-text {
    width: 70%;
    gap: var(--global-padding);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-text h1 {
    font-size: 2.5rem;
}

.hero-text p {
    text-align: justify;
    font-size: 1.2rem;
    line-height: 1.2;
}

.hero-text a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.3s ease;
}

.hero-text a:hover {
    color: var(--highlights);
}

/* Gallery */

.gallery-container {
    margin-top: var(--navbar-height);
    min-height: calc(100vh - var(--navbar-height) - var(--footer-height));
    display: flex;
    flex-direction: column;
}

.gallery-header {
    padding-top: var(--global-padding);
    text-align: center;
}

.gallery-header h1 {
    font-size: 2rem;
}

.gallery-section {
    flex: 1;
    padding: var(--global-padding);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--global-padding);
    align-content: flex-start;
}

.gallery-img-wrapper {
    height: auto;
    width: auto;
    max-height: 300px;
    min-width: 0;
    flex-shrink: 1;
    border: 2px solid black;
    overflow: hidden;
    flex-grow: 0;
}

.gallery-img-wrapper img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 300px;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-img-wrapper img:hover {
    transform: scale(1.03);
    cursor: pointer;
}

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

#lightbox-img {
    max-width: calc(100vw - var(--global-padding) * 8);
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: auto;
}

.lightbox-close {
    position: absolute;
    top: 2px;
    right: 10px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    width: calc(4 * var(--global-padding));
    user-select: none;
    z-index: 1;
    padding-bottom: 6px;
}

.lightbox-arrow:hover { 
    opacity: 1;
}

.lightbox-arrow.left {
    left: 0;
}

.lightbox-arrow.right {
    right: 0;
}

.lightbox-content {
    position: absolute;
    top: 80px;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: fit-content;

}

.lightbox-text {
    z-index: 10000;
    margin-top: auto;
    color: white;
    text-align: center;
    height: 80px;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
}

.lightbox-text h2 {
    font-size: 2rem;
    margin: 0;
}

.lightbox-text p { 
    font-size: 1.5rem;
}

.book_covers {
    padding: var(--global-padding) 0 var(--global-padding) 0;
    display: flex;
    justify-content: center;
    gap: calc(2 * var(--global-padding))
}

.book_covers img {
    height: 400px;
}   

.illustrations-link h1 {
    font-size: 1.5rem;
}

.illustrations-link a {
    font-size: 1.5rem;
    text-decoration: none;
    color: black;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.3s ease;
}

.illustrations-link a:hover {
    color: var(--highlights);
}

.illustrations-link {
    padding-top: calc(0.5 * var(--global-padding));
    padding-left: var(--global-padding);
    padding-right: var(--global-padding);
}

/* Contact */

.contact-section {
    margin-top: var(--navbar-height);
    padding: var(--global-padding);
    gap: var(--global-padding);
    display: flex;
    min-height: calc(100vh - var(--navbar-height) - var(--footer-height));
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 1400px;
}

.contact-text {
    width: 50%;
    display: flex;
    flex-direction: column;
    gap: calc(var(--global-padding) / 2);
    text-align: justify;
}

.contact-text h2 {
    font-size: 2rem;
    margin-bottom: var(--global-padding);
}

.contact-text p {
    font-size: 1rem;
}

.divider {
    width: 40px;
    height: 2px;
    background-color: black;
}

.contact-form {
    width: 50%;
    display: flex;
    flex-direction: column;
    gap: var(--global-padding);
}

.form-group-container {
    display: flex;
    flex-direction: column;
    gap: var(--global-padding);
}

.contact-form-info {
    display: flex;
    flex-direction: column;
    gap: var(--global-padding);
}

.form-names {
    display: flex;
    gap: var(--global-padding);
}

.form-names .form-group {
    flex: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
}

.form-input,
.form-textarea {
    padding: 12px;
    border: 2px solid black;
    background: transparent;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    resize: none;
}

.form-textarea {
    min-height: 140px;
}

.form-submit {
    padding: 14px 32px;
    background-color: black;
    color: white;
    border: 2px solid black;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.2s, color 0.2s;
    align-self: flex-start;
}

.form-submit:hover {
    background-color: transparent;
    color: black;
}

.thanks-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    gap: var(--global-padding)
}

.thanks-text h1 {
    font-size: 3rem;
    text-align: center;
}

.thanks-text a {
    font-size: 2.5rem;
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.3s ease;
}

.thanks-text a:hover {
    color: var(--highlights);
}

/* Media Queries */

@media screen and (max-width: 1200px) {
    .navbar-menu {
        gap: 60px;
    }
}

@media screen and (max-width: 968px) {
    /* Header */

    .fa-bars {
        line-height: normal !important;
    }

    .navbar-hamburger {
        display: block;
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        color: #000;
        z-index: 10;
        font-size: 1.5rem;
        border: none;
        background: none;
        cursor: pointer;
        padding: 0;
    }

    .navbar-menu {
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        position: fixed;
        top: var(--navbar-height);
        right: -100%;
        width: 300px;
        opacity: 0;
        transition: all 0.5s ease;
        background: var(--off-white);
        z-index: 10;
        margin: 0;
        height: auto;
        gap: 40px;
        padding: 40px 0;
    }

    .navbar-menu.active {
        right: 0;
        opacity: 1;
    }

    .navbar-link {
        text-align: center;
        display: flex;
        justify-content: center;
        background-color: var(--off-white);
        font-size: 1.2rem;
        line-height: normal;
        overflow: hidden;
    }

    /* Footer */
    .socials {
        position: absolute;
        right: var(--global-padding);
    }

    /* Home */

    .carousel {
        height: 70vh;
    }

    .hero-section {
        flex-direction: column;
    }

    .hero-text {
        width: 100%;
    }

    .author-image {
        width: 100%;
        height: 450px;
    }

    .author-image img {
        object-fit: contain;
    }

    .illustrations-link h1,
    .illustrations-link a {
    font-size: 1.1rem;
    }

    /* Contact */
    .contact-section {
        flex-direction: column;
    }

    .contact-text {
        height: 40vh;
        width: 100%;
        max-width: 500px;
        display: flex;
        justify-content: center;
    }

    .contact-form {
        width: 100%;
        max-width: 500px;
    }

    .thanks-text h1 {
        font-size: 2rem;
    }

    .thanks-text a {
        font-size: 1.5rem;
    }
}

@media screen and (max-width: 700px) {
    /* Home */

    .hero-text h1 {
    font-size: 2.2rem;
    }  

    .hero-text p {
        font-size: 1.1rem;
        line-height: 1.2;
    }
}

@media screen and (max-width: 600px) {
    /* Home */

    .hero-text h1 {
    font-size: 2rem;
    }  

    .hero-text p {
        font-size: 1rem;
        line-height: 1.1;
    }

    .author-image {
        height: 350px;
    }
}

@media screen and (max-width: 550px) {
    /* Home */

    .hero-text h1 {
    font-size: 1.8rem;
    }  

    .hero-text p {
        font-size: 0.9rem;
        line-height: 1.1;
    }
}

@media screen and (max-width: 500px) {
    :root {
        --global-padding: 10px;
        --navbar-height: 60px;
    }

    .footer-section p {
        font-size: 0.58rem;
    }

    .socials a {
        font-size: 1.5rem
    }

    .navbar-menu {
        width: 100%;
    }

    .navbar-brand {
        font-size: 1rem;
    }

    /* Home */
    .carousel {
        height: 60vh;
    }

    .hero-text h1 {
    font-size: 1.6rem;
    }  

    .hero-text p {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .author-image {
        height: 300px;
    }

    .hero-text a {
    text-underline-offset: 1px;
    }

    /* Gallery */
    .gallery-header h1 {
        font-size: 1.5rem;
    }

    .illustrations-link a {
        text-underline-offset: 1px;
    }

    .illustrations-link h1,
    .illustrations-link a {
    font-size: 0.9rem;
    }

    /* Contact */
    .contact-text h2 {
        font-size: 1.8rem;
        margin-bottom: var(--global-padding);
    }

    .contact-text p {
        font-size: 0.9rem;
    }
}