*, *::before, *::after {
    margin: 0;
}
:root {
    --bg-col: #113;
    --slide-1: #213;
    --slide-2: #312;
    --link-col: #aff;
    --link-hover: #9dd;
    --link-active: #faa;
    --link-visited: #7cc;
    --text-col-1: white;
    --text-col-2: black;
    --p-table-bg: #155;
    --p-table-bg-hover: #377;
    --p-table-border: #7a7;
    --p-table-border-hover: #9c9;
    --figure-bg: #eca;
}
html {
    font-size: 1.6vw;
    box-sizing: border-box;
    scroll-behavior: smooth;
}
h1, h2, p {
    margin-top: 0.5em;
    margin-bottom: 0.5em;

}
header.nav-section {
    position: fixed;
    right: 0;
    width: 6vw;
    font-size: 0.6rem;
    height: 100vh;
}
header.nav-section nav {
    position: absolute;
    bottom: 3rem;
    height: 30%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
}
.link-button {
    width: 6vw;
    height: 1rem;
    border-radius: 0.3rem;
    background-color: var(--link-col);
    text-align: center;
    line-height: 1rem;
    text-decoration: none;
    color: var(--text-col-2);
}
.link-button:hover {
    background-color: var(--link-hover);
}

body {
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    color: var(--text-col-1);
    background-color: var(--bg-col);
}

main {
    width: 90%;
    margin-right: auto;
}
section, #intro {
    min-height: 100vh;
    position: relative;
    width: 100%;
    padding: 1rem;
}
#intro, #bohr-model, #bibliography {
    background-color: var(--slide-1);
}
#full-bio, #fun-facts {
    background-color: var(--slide-2);
}
.short-bio {
    display: flex;
    justify-content: space-between;
}
.short-bio p {
    width: 60%;
    line-height: 2.5rem;
}
.short-bio img {
    height: 80vh;
}
figure {
    background-color: var(--figure-bg);
    color: var(--text-col-2);
    font-size: 0.85rem;
    font-family: 'Times New Roman', Times, serif;
    overflow: hidden;
}
figure img {
    width: 100%;
}
figure figcaption {
    padding: 0.2rem;
}
.full-bio {
    display: grid;
    grid-template-columns: auto auto 24rem;
    grid-template-rows: 2rem 13.5rem auto;
    grid-template-areas: 
    "title title figure"
    "text text figure"
    "text2 text2 text2";
}
.bio-img-fig {
    display: inline-block;
    width: 100%;
    padding: 0.5rem;
    border-radius: 0.2rem;
    color: black;
    grid-area: figure;
}
.full-bio h2 {
    grid-area: title;
    text-align: center;
}
.bio-text {
    grid-area: text;
    padding: 0.5rem;
}
.bio-text-2 {
    grid-area: text2;
    padding: 0.5rem;
}
.bio-img {
    object-fit: contain;
    width: 100%;
}
#bohr-model {
    position: relative;
}
/* Periodic Table */

.periodic-table {
    height: 30vw;
    display: grid;
    width: 60vw;
    grid-template-columns: repeat(18, 3vw);
    grid-template-rows: repeat(9, 3vw);
    gap: 3px;
}
.empty-16 {
    grid-column: span 16;
}
.empty-10 {
    grid-column: span 10;
}
.empty-2 {
    grid-column: span 2;
}
.element:not(.empty) {
    border: 4px solid var(--p-table-border);
    background-color: var(--p-table-bg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.element:not(.empty):hover {
    transform: scale(1.1);
    background-color: var(--p-table-bg-hover);
    background-color: var(--p-table-border-hover);
}
.element:not(.empty):active {
    background-color: var(--link-active);
}
.element .number {
    font-size: 0.5rem;
    margin-left: 4px;
    align-self: flex-start;
}
.element .letter {
    bottom: 4px;
    text-align: right;
    margin-right: 4px;
    font-size: 1rem;
    font-weight: bold;
    align-self: flex-end;
}

/* Electron model */
#model-intro {
    max-height: 15%;
}

.model {
    position: relative;
    top: 3vw;
    margin-left: 20vw;
    width:  6vw;
    height: 6vw;
    color: black;
    display: grid;
    place-content: center;
    place-items: center;
}

.nucleus {
    width: 2.6vw;
    height: 2.6vw;
    background-color: rgb(200, 244, 255);
    border-radius: 50%;
    grid-column: 1;
    grid-row: 1;
    
    /* Element letter */
    display: flex;
    justify-content: center;
    align-items: center;
}

.orbit-point {
    /* background-color: #7771; */
    grid-column: 1;
    grid-row: 1;
}

.valence-1 {
    width: 5vw;
    height: 5vw;
}
.valence-2 {
    width: 9vw;
    height: 9vw;
}
.valence-3 {
    width: 13vw;
    height: 13vw;
}

.electron {
    width: 0.7rem;
    height: 0.7rem;
    background-color: yellow;
    border-radius: 50%;
    border: 1px solid black;

    /* Electron e */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.5rem;
}

.e1 {
    animation: orbit-e1 5s linear infinite;
}
.e2 {
    transform: rotate(45deg);
    animation: orbit-e2 5s linear infinite;
}
.e3 {
    transform: rotate(90deg);
    animation: orbit-e3 5s linear infinite;
}
.e4 {
    transform: rotate(135deg);
    animation: orbit-e4 5s linear infinite;
}
.e5 {
    transform: rotate(180deg);
    animation: orbit-e5 5s linear infinite;
}
.e6 {
    transform: rotate(225deg);
    animation: orbit-e6 5s linear infinite;
}
.e7 {
    transform: rotate(270deg);
    animation: orbit-e7 5s linear infinite;
}
.e8 {
    transform: rotate(315deg);
    animation: orbit-e8 5s linear infinite;
}

.e1 .electron {
    animation: orbit-e1 5s linear infinite reverse;
}
.e2 .electron {
    transform: rotate(45deg);
    animation: orbit-e8 5s linear infinite reverse;
}
.e3 .electron {
    transform: rotate(90deg);
    animation: orbit-e7 5s linear infinite reverse;
}
.e4 .electron {
    transform: rotate(135deg);
    animation: orbit-e6 5s linear infinite reverse;
}
.e5 .electron {
    transform: rotate(180deg);
    animation: orbit-e5 5s linear infinite reverse;
}
.e6 .electron {
    transform: rotate(225deg);
    animation: orbit-e4 5s linear infinite reverse;
}
.e7 .electron {
    transform: rotate(270deg);
    animation: orbit-e3 5s linear infinite reverse;
}
.e8 .electron {
    transform: rotate(45deg);
    animation: orbit-e2 5s linear infinite reverse;
}

@keyframes orbit-e1 {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
@keyframes orbit-e2 {
    0% {
        transform: rotate(45deg);
    }

    100% {
        transform: rotate(405deg);
    }
}
@keyframes orbit-e3 {
    0% {
        transform: rotate(90deg);
    }

    100% {
        transform: rotate(450deg);
    }
}
@keyframes orbit-e4 {
    0% {
        transform: rotate(135deg);
    }

    100% {
        transform: rotate(495deg);
    }
}
@keyframes orbit-e5 {
    0% {
        transform: rotate(180deg);
    }

    100% {
        transform: rotate(540deg);
    }
}
@keyframes orbit-e6 {
    0% {
        transform: rotate(225deg);
    }

    100% {
        transform: rotate(585deg);
    }
}
@keyframes orbit-e7 {
    0% {
        transform: rotate(270deg);
    }

    100% {
        transform: rotate(630deg);
    }
}
@keyframes orbit-e8 {
    0% {
        transform: rotate(315deg);
    }

    100% {
        transform: rotate(675deg);
    }
}

#valence-jump {
    position: absolute;
    left: 40vw;
    top: 9rem;
    font-size: 1rem;
    padding: 0.3rem;
    border-radius: 0.5rem;
    width: 6rem;
}
/* Hidden Paragraphs */

.hid-p {
    position: absolute;
    font-size: 0.9rem;
    top: 7rem;
    right: 3vw;
    width: 20vw;
}

.button {
    background-color: var(--link-hover); /* swapped link hover and link col so that button pops when hovered over */
    border: none;
}

.button:hover {
    background-color: var(--link-col);
    transform: scale(1.1);
}
.button:active {
    background-color: var(--link-active);
}

#para-cycle {
    position: absolute;
    font-size: 1.2rem;
    bottom: 5rem;
    right: 6vw;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
}

#show-model {
    position: absolute;
    font-size: 1.2rem;
    bottom: 5rem;
    left: 2vw;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
}

.hidden {
    display: none;
}
/* Fun Facts */

#fun-facts {
    display: grid;
    gap: 1rem;
    grid-template-columns: 45% 25% 25%;
    grid-template-rows: 3rem auto auto;
    grid-template-areas: 
    "header header header"
    "list img1 img2"
    "list img1 img2";
}
#fun-facts h2 {
    grid-area: header;
}
#fun-facts ul {
    grid-area: list;
}
#fun-facts ul li{
    margin-bottom: 0.4rem;
}
#fun-facts .img-1 {
    grid-area: img1;
    width: 100%;
    height: 93%;
    border-radius: 0.5rem;
}
#fun-facts .img-2 {
    grid-area: img2;
    width: 100%;
    height: 93%;
    border-radius: 0.5rem;
}

/* Bibliography */

a.bib-link {
    color:var(--link-col);
}
a.bib-link:hover {
    color: var(--link-hover);
}
a.bib-link:active {
    color: var(--link-active);
}
a.bib-link:visited {
    color: var(--link-visited);
}