/* Global styling rules */

:root {
    --primary-bg: #f8f1f1;
    --nav-bg: #a3d2ca;
    --special-txt: #eb5e0b;
    --txt-color: #459996;
    font-size: 62.5%;
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
}

body {
    background-color: var(--primary-bg);
    color: var(--txt-color);
    height: 100vh;
    width: 100vw;
    overflow-x: hidden;
    font-size: 1.8rem;
    font-family: 'Roboto', sans-serif;
}

p {
    font-size: 1.8rem;
    max-width: 120ch;
    line-height: 2.5rem;
}

li {
    max-width: 120ch;
}

.nav-items {
    width: 100%;
}

.nav-items li {
    font-family: 'Playfair Display', sans-serif;
    margin-top: 0.3em;
    font-weight: 600;
    font-size: 1.6rem;
    text-transform: uppercase;
    background: linear-gradient(to left, var(--primary-bg) 0%, var(--nav-bg) 0%);
    padding: 0.6em 1em 0.6em 1em;
    transition: color 1s ease-in-out, background 0.3s ease;
}

.toggle-mode-container {
    position: absolute;
    top: 0;
    background: var(--primary-bg);
    width: 6rem;
    height: 2rem;
    border-radius: 3rem;
    z-index: 100;
    user-select: none;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin: 2rem;
}

.current-mode {
    font-size: 1.3rem;
    margin: 0.5rem;
    transition: 0.5s transform ease-in;
}

.mode-switch {
    background: var(--txt-color);
    width: 2rem;
    border-radius: 50%;
    height: 2rem;
    cursor: pointer;
    transition: 0.5s transform ease-in;
    user-select: none;
    z-index: 100;
}

.active-light {
    transform: translateX(0);
}

.active-dark {
    transform: translateX(40px);
}

.active-light-text {
    transform: translateX(0px);
}

.active-dark-text {
    transform: translateX(-20px);
}

.active-nav-item {
    background: var(--primary-bg) !important;
}

.inactive-nav-item {
    animation: 0.3s linear reverse sweep-to-left;
}

.nav-items li:hover {
    animation: 0.3s linear 1 sweep-to-left;
    background: var(--primary-bg);
}

.nav-items a {
    width: 100%;
    display: inline-block;
    text-decoration: none;
    color: var(--txt-color);
    transition: transform 1s ease-in-out, color 0.1s ease-in-out;
}

.nav-items a:hover {
    transform: scale(1.25);
    color: var(--special-txt);
}

.active-nav-anchor {
    color: var(--special-txt) !important;
    transform: scale(1.25);
}

.personal-img {
    height: 15rem;
    width: 15rem;
    object-fit: cover;
    border: 0.6rem solid var(--txt-color);
    border-radius: 50%;
    margin-bottom: 2em;
}

li {
    list-style: none;
    text-decoration: none;
}

.resume-link {
    text-decoration: none;
    font-weight: bold;
    color: var(--special-txt);
    margin-top: 1em;
    font-size: 1.6rem;
}

.resume-link:hover {
    text-decoration: underline;
}

.social-icons {
    margin-top: 3em;
}

.social-icon {
    display: inline-block;
    width: 4rem !important;
    height: 4rem !important;
    margin-right: 1em;
}

.social-icon:hover {
    animation: 1s ease-in-out wobble-vertical;

}

.icon-svg {
    fill: var(--txt-color);
    transition: transform 0.1s ease-in-out, fill 0.1s ease-in-out;
    width: 5rem;
}

.icon-svg:hover {
    transform: scale(1.2);
    fill: var(--special-txt);
}

.resume-itm {
    min-height: 100vh;
    width: 100%;
    padding: 3em;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-content: center;
    font-size: 1.6rem;
    border-bottom-width: 0.1rem;
    border-bottom-style: solid;
    border-color: var(--nav-bg);
}

.resume-itm h2 {
    color: var(--special-txt);
    font-size: 4.8rem;
    margin: 0 auto 0 auto;
    align-self: flex-start;
    width: 100%;
    text-align: center;
}

#about {
    justify-content: center;
}

#about h1 {
    font-family: 'Playfair Display', sans-serif;
    font-size: 7.2rem;
    font-weight: 800;
    text-transform: uppercase;
}

#about p {
    margin-bottom: 1em;
}

#about span {
    color: var(--special-txt);
}

.first-name {
    display: inline-block;
    animation: 2s ease-in-out 1 wobble-from-top, 1s ease 1 2.55s wobble-left;
}

.last-name {
    display: inline-block;
    color: var(--special-txt);
    animation: 7s ease-in-out 1 wobble-from-right;
}

.subheading {
    text-transform: uppercase;
    font-size: 1.8rem;
    font-weight: 550;
    margin-bottom: 4em;
    animation: 1s ease-in-out 1 1.25s wobble-down;
}

.mail-anch {
    color: var(--txt-color);
    display: inline-block;
    text-decoration: none;
    transition: text-decoration 1s ease, color 0.1s ease-out;
}

.mail-anch:hover {
    text-decoration: underline;
    color: var(--special-txt);
    animation: 1s ease-in-out 1 wobble-horizontal;
}

#projects {
    padding: 4.8rem !important;
}

.projects-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
}

.projects-container div {
    text-align: center;
    margin: 5rem;
    padding: 1rem;
    color: var(--txt-color);
}

.projects-container img {
    /* Make it that the thumbnails have appropriate width on all mobile phones */
    width: 90vw;
    /* Make sure that they don't exceed the maximum proper width, aesthetically */
    max-width: 30rem;
    height: 15rem;
    margin-bottom: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    border-radius: 0.5rem;
}


.projects-container div:hover {
    transform: scale(1.03);
    cursor: pointer;
}

.projects-container div:active {
    transform: scale(0.97);
}

.preview-container {
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: scroll;
    z-index: 100;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--primary-bg);
    display: none;
}

.preview-header {
    position: sticky;
    z-index: 101;
    top: -3px;
    background: var(--nav-bg);
    padding: 1rem 0 1rem 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.exit-sign {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--nav-bg);
    padding: 0.1rem 0.6rem 0.1rem 0.6rem;
    border-radius: 50%;
    margin-right: 1rem;
    user-select: none;
}

.exit-sign:hover {
    color: var(--primary-bg);
    background: red;
    cursor: pointer;
}

.exit-sign:active {
    transform: scale(0.9);
}

.project-title {
    margin-left: 1rem;
    text-align: center;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.project-preview {
    margin-top: 2em;
    display: flex;
    justify-content: space-around;
    flex-direction: row;
}

.project-preview video {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 1);
    border-radius: 0.5rem;
    width: 70%;
    height: auto;
    max-height: 72rem;
}

.arrow {
    background: var(--special-txt);
    color: var(--primary-bg);
    height: fit-content;
    align-self: center;
    padding: 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    user-select: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.arrow:hover {
    transform: scale(1.1);
    cursor: pointer;
}

.arrow:active {
    transform: scale(0.9);
}

.arrow p {
    font-size: 2rem;
    font-weight: 500;
}

.links-container {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    margin: 4rem 0 8rem 0;
}

.links-container a {
    display: inline-block;
    background: var(--special-txt);
    padding: 1rem;
    text-align: center;
    border-radius: 0.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    text-decoration: none;
    color: var(--primary-bg);
    font-weight: 600;
}

.experience-subtitle a {
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    color: var(--special-txt);
}

.experience-subtitle:hover a {
    text-decoration: underline;
}

.experience-subtitle span {
    font-weight: bold;
    text-decoration: none;
    color: var(--special-txt);
}


.experience-subtitle-tools {
    font-size: 1.4rem;
}

.links-container a:hover {
    transform: scale(1.03);
    cursor: pointer;
}

.links-container a:active {
    transform: scale(0.97);
}

.project-description {
    padding: 2rem 3rem 2rem 3rem;
}

.project-description p {
    margin: 1rem;
}

.project-description ul {
    margin: 1rem;
}

.project-description span {
    color: var(--special-txt);
}

.word-game-desc,
.landing-page-desc,
.maw-desc,
.bmdb-desc,
.blasteroids-desc {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: center;
}

.word-game-desc li,
.landing-page-desc li,
.maw-desc li,
.bmdb-desc li,
.blasteroids-desc li {
    margin: 10px 0;
}

.links-container div:hover {
    transform: scale(1.1);
    cursor: pointer;
}

#education {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
}

.subitem {
    padding: 1rem 0 1rem 0;
    margin: 2rem 0 1rem 0;
}

.subitem li {
    margin: 1rem 0 1rem 0;
}

.section-header {
    font-size: 2rem;
    font-weight: 600;
    color: var(--txt-color);
    padding: 2rem 0 2rem 0;
}

.subitem-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
}

.period {
    color: var(--special-txt);
    font-size: 1.6rem;
}

.subheader,
.gpa {
    font-size: 1.6rem;
}

.subitem-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--special-txt);
}

.skills-subsec,
.skill-items {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.skill-items li {
    background-color: var(--txt-color);
    color: var(--primary-bg);
    margin: 0 1rem 1rem 0;
    border-radius: 1rem;
    padding: 0.5rem 1rem;
}

.skill-items li:hover {
    background-color: var(--special-txt);
    cursor: default;
    transform: scale(1.05);
}

.skill-icon {
    width: 5rem;
    height: 5rem;
    margin: 0.5rem 2rem 0.5rem 0rem;
}

.skill-icon path {
    fill: var(--txt-color);
}

.quote-header {
    font-style: italic;
    text-align: center;
    color: var(--special-txt);
    font-size: 1.6rem;
}

.note-section {
    font-size: 1.6rem;
    margin-top: 3rem;
}

.quote-container {
    font-style: italic;
    text-align: center;
    display: flex;
    flex-direction: row;
    justify-content: center;
    margin: 2rem;
}


/* Desktop-specific styling rules */

@media screen and (min-width: 901px) {
    main {
        display: flex;
        flex-direction: row;
    }

    .nav-menu {
        display: contents;
    }

    .toggle-nav {
        display: none;
    }

    .side-nav {
        display: flex;
        z-index: 99;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        position: sticky;
        top: 0px;
        left: 0px;
        height: 100vh;
        min-width: 260px;
        background-color: var(--nav-bg);
    }

    .img-container {
        display: none;
    }
}

/* Mobile-specific styling rules */

@media screen and (max-width: 620px) {

    .first-name {
        display: inline-block;
        animation: 1.9s ease-in-out 1 wobble-from-top
    }

    .last-name {
        display: inline-block;
        color: var(--special-txt);
        animation: 7s ease-in-out 1 wobble-from-right;
    }

}

@media only screen and (max-width: 900px) {
    main {
        display: block;
    }

    .side-nav {
        display: block;
        background-color: var(--nav-bg);
        z-index: 99;
    }

    .toggle-mode-container {
        margin: auto;
        position: static;
    }

    .toggle-nav {
        z-index: 99;
        position: fixed;
        top: -3px;
        width: 100%;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-content: center;
        background-color: var(--nav-bg);
    }

    .nav-menu {
        position: fixed;
        z-index: 98;
        display: flex;
        flex-direction: column;
        background-color: var(--nav-bg);
        width: 100%;
        justify-content: center;
        align-content: center;
        text-align: center;
        padding: 1.5rem 0 1.5rem 0;
        display: none;
        animation: 0.3s ease-out dropdown-nav;
    }

    .inactive-nav-menu {
        animation: 0.3s ease-in fold-top;
    }

    .img-container {
        position: fixed;
        height: 100%;
        width: 100%;
        z-index: 99;
        background: rgba(0, 0, 0, 0.8);
        display: none;
    }

    .close-img {
        background: rgba(0, 0, 0, 0.6);
    }

    .active-img {
        object-fit: cover;
        box-shadow: 0 0.1rem 1.5rem var(--nav-bg);
    }

    .animated-img {
        animation: 1s ease-in-out scale-to-center;
        animation-fill-mode: forwards;
    }

    .personal-img {
        display: none;
    }

    .img-icon {
        height: 5rem;
        width: 5rem;
        object-fit: cover;
        border: 0.3rem solid var(--txt-color);
        border-radius: 50%;
        margin: 0.5em;
        transition: transform 0.5s ease-in-out;
    }

    .mobile-nav-header {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-content: center;
        text-align: center;
    }

    .resume-itm {
        padding: 1rem 2rem;
    }

    .skill-items li {
        margin: 1rem 1rem 0 0;
    }

    .title-name {
        align-self: center;
        margin-left: 0.5em;
        font-weight: 300;
        font-size: 1.8rem;
    }

    .navbar-toggler {
        padding: 0.1rem 3rem 0.1rem 3rem;
        text-align: center;
        background-color: var(--nav-bg);
        border: none;
        font-size: 3.2rem;
        color: var(--txt-color);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .navbar-toggler:active {
        transform: scale(0.9);
    }

    .social-icons {
        margin-top: 1em;
        text-align: center;
    }

    .social-icon {
        width: 2.5rem;
        height: 2.5rem;
        margin-right: 0.5em;
    }

    #about h1 {
        margin-top: 5.5rem;
        font-size: 6.8rem;
        font-weight: 700;
        text-transform: uppercase;
    }

    .subheading {
        margin: 2rem 0 8rem 0;
        font-size: 1.6rem;
    }

    .projects-container img {
        margin: 2rem;
    }

    .project-title {
        font-size: 1.8rem !important;
    }

    .arrow {
        padding: 1rem;
    }

    .links-container div {
        padding: 1rem;
    }

    .subitem-header {
        display: flex;
        flex-direction: column;
        flex-wrap: wrap;
    }

}

@media screen and (max-width: 350px) {
    #about h1 {
        font-size: 5.8rem;
    }

    .resume-itm {
        padding: 1rem;
    }

    .img-icon {
        height: 4rem;
        width: 4rem;
        border: 0.3rem solid var(--txt-color);
        border-radius: 50%;
        margin: 0.5em;
    }

    .nav-menu {
        z-index: 99;
        position: fixed;
        display: flex;
        flex-direction: column;
        background-color: var(--nav-bg);
        width: 100%;
        justify-content: center;
        align-content: center;
        text-align: center;
        display: none;
    }

    .links-container a {
        margin: 0.5rem;
    }
}