/* HTML Elements */

body {
    font-family: "Nunito Sans", serif;
    max-width: 700px;
    margin: auto;
    padding: 25px;
    background-color: #ffffff;
    color: #000000;
}

section {
    margin: 50px 0 70px 0;
}

h1, h2, h3, h4 {
    font-family: "Rubik", serif;
    font-weight: 500;
}

h3 {
    color: #023047;
}

h4 {
    color: #FB8500;
}

button {
    background-color: dodgerblue;
    padding: 0.75rem;
    border-radius: 10px;
    border: none;
}

/* Overlay for modal or mobile nav */

#body-content {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(128, 128, 128, 0.4);
    z-index: 100;
    display: none;
    transition: color 0.3s ease;
}

/* Desktop Navbar */
.navbar-desktop {
    margin: 0 auto 3rem auto;
    padding: 0.75rem;
    display: flex;
    justify-content: center;
    max-width: 75%;
    background-color: #219EBC;
    border-radius: 25px;
    border-color: slategrey;
}

.navbar-desktop a {
    padding-left: 20px;
    padding-right: 20px;
    text-decoration: none;
    color: white;
    transition: color 0.3s ease;
}

.navbar-desktop a:hover {
    color: midnightblue;
    font-weight: bold;
}

/* Mobile Navbar */

.navbar-mobile {
    margin-bottom: 1rem;
    z-index: 120;
    transition: color 0.3s ease;
    display: none;
}

#navbar-mobile-toggle {
    background-color: azure;
    font-size: 24px;
    border-radius: 15px;
    position: relative;
    margin-bottom: 1rem;
    display: none;
    z-index: 140;
    cursor: pointer;
}

#navbar-mobile-links {
    background-color: #219EBC;
    display: none;
    position: absolute;
    border-radius: 15px;
    font-size: 24px;
    padding: 2rem 2rem 2rem 2rem;
    z-index: 120;
    width: 30%;
}

#navbar-mobile-links .unordered-list {
    list-style-type: none;
    padding: 0px;
}

#navbar-mobile-links li {
    margin-bottom: 1rem;
}

#navbar-mobile-links a {
    color: #ffffff;
    text-decoration: none;
}

#navbar-mobile-links a:hover {
    color: midnightblue;
    font-weight: bold;
}

/* Introduction section */

.introduction {
    display: flex;
    align-items: center;
    gap: 40px;
    justify-content: left;
    background-color: #8ECAE6;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 10px 5px 5px lightgrey;
}


#intro {
    margin: 0;
}

#name {
    margin: 0 0 0.5rem;
}

#title {
    margin: 0.5rem 0 1rem 0;
}


#headshot {
    border-radius: 50%;
    width: 150px;
    height: 150px;
}

/* Project section */

.project-item {
    padding-bottom: 2em;
}

.project-img {
    max-width: 100%;
    border-radius: 15px;
    display: block;
    margin: auto;
    border: 2px solid black;
    box-shadow: 10px 5px 5px lightgrey;
}

/* Bookshelf section */

.items-container {
    display: flex;
    flex-wrap: wrap;
    font-family: "Arial", sans-serif;
}

.items-container .item {
    margin: 10px;
    padding: 10px;
    flex: 1;
    flex-grow: 0;
}

.item h4 {
    font-size: 14px;
    margin-bottom: 0.5em;
    width: 100%;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item p {
    margin-top: 0;
    font-size: 12px;
}

.items-container img {
    max-width: 120px;
    max-height: 100%;
    border-radius: 10px;
    transition: transorm 0.7s ease-in-out;
}

.items-container img:hover {
    transform: rotate(-5deg);
}

.book-title {
    overflow: hidden;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Tic-tac-toe game */

.board {
    display: grid;
    margin: auto;
    grid-template-columns: auto auto auto;
    grid-gap: 0;
    width: 60%;
}

.board div {
    display: flex;
    aspect-ratio: 1;
    justify-content: center;
    align-items: center;
    font-size: 60px;
}

.crystal-button {
    margin: 0;
    padding: 0;
    width: 90px;
    height: 90px;
    position: absolute;
    color: black;
    border-radius: 10px;
    border: none;
    background-color: transparent;
    font-size: 60px;
    color: #ffffff;
}

.game-info {
    text-align: center;
    margin: 2em 0 1em 0;
}

#play-again-button:not([hidden]) {
    margin: 2em auto 0 auto;
    display: block;
    background-color: seagreen;
}

/* Contact section and footer */
.contact-section-container p {
    margin: 0;
}

footer {
    margin-top: 100px;
}

/* Icons */
.icons img {
    max-width: 30px;
    padding: 3px;
    height: auto;
}

/* Media queries for responsive design */
@media (max-width: 768px) {
    .navbar-desktop {
        display: none;
    }

    .navbar-mobile {
        display: block;
    }

    #navbar-mobile-toggle {
        display: block;
    }

    #headshot {
        display: none;
    }

    #tic-tac-toe {
        display: none;
    }
}

@media (min-width: 768px) {
    #body-content {
        display: none;
    }
}