/* GENERAL STYLES */
:root {
    --main-bg-color:            #fefefe;
    --tile-bg-color-hover:      #fefefe;

    --tile-border-color:        transparent;
    --tile-border-color-hover:  #d2eef6;

    --title-text-color:         #1f1e1ee0;
    --tile-cover-text-color:    #1e1e1ed9;
    --tile-content-text-color:  #1a1a1ad9;

    --link-color:               #4684B4;
    --link-color-hover:         #bbe0f8;
    --link-color-active:        #61b0db;

    --tile-bg-color:            #e4f3fa;
    /* --blog-bg-color:            #e4f3fa;
    --about-bg-color:           #e4f3fa;
    --research-bg-color:        #e4f3fa;
    --projects-bg-color:        #e4f3fa;
    --experience-bg-color:      #e4f3fa;
    --extra-bg-color:           #e4f3fa;
    --contact-bg-color:         #e4f3fa;
    --links-bg-color:           #e4f3fa; */
}

html {
    height: 100%;
    width: 100%;
    scroll-behavior: smooth;
    background-color: var(--main-bg-color);
}

body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: "Lexend", sans-serif;
    font-optical-sizing: auto;
    display: flex;
    flex-direction: column;
}


/* DEFAULT TEXT MARGINS */
h1, h2, h4, p, ul { margin: 0; }


/* TEXT STYLES */
h1 {
    color: var(--title-text-color);
    opacity: 0;
    animation: fadeIn 0.9s ease 0.9s;
    animation-fill-mode: forwards;
}

h2 {
    font-weight: 600;
}

ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

li + li {
    margin-top: 0.2rem;
}

a:link, a:visited {
    color: var(--link-color);
    background-color: transparent;
    text-decoration: none;
}

a:hover {
    color: var(--link-color-hover);
    background-color: transparent;
}

a:active {
    color: var(--link-color-active);
    background-color: transparent;
}


/* HEADER STYLES */
.header {
    display: flex;
    flex-direction: row;
    margin-top: 2rem;
    margin-left: 2rem;
    /* justify-content: space-between; */
}

.header > img {
    opacity: 0;
    height: 0;
    min-height: 100%;
    margin-left: 1rem;
    animation: fadeIn 0.9s ease 2.2s;
    animation-fill-mode: forwards;
}


/* TILE STYLES */
.tiles {
    flex-grow: 1;
    padding: 2rem;

    display: grid;
    grid-template-areas:
        "blog about about about contact"
        "research research projects projects links"
        "experience experience experience extra links";
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    grid-template-rows: 2fr 2fr 2fr;
    gap: 2rem;
}

.tiles > div {
    background: var(--tile-bg-color);
    border-radius: 2rem;
    border: 0.15rem solid var(--tile-border-color);
    position: relative;
    padding: 1rem;
    transition: 500ms ease 5ms;

    display: flex;
    justify-content: center;
    align-items: center;

    opacity: 0;
    animation-name: fadeIn;
    animation-duration: 0.9s;
    animation-fill-mode: forwards;
}

.tiles > div * {
    transition: 500ms ease 5ms;
}

.tile-cover {
    z-index: 2;
    position: absolute;
    color: var(--tile-cover-text-color);
}

.content {
    height: 100%;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    display: flex;
    flex-direction: row;
    color: var(--tile-content-text-color);
}

.desc {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}

.content > img {
    height: 0;
    min-height: 100%;
    border-radius: 0.5rem;
}

.extra img {
    border-radius: 50%;
    opacity: 0.9;
}

.vertical-item {
    flex-grow: 1;
    text-align: center;
}

.vertical-item > a > img {
    height: 0;
    min-height: 70%;
}

.contact-items {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-items > a {
    display: flex;
    flex-direction: row;
    align-items: center;
    font-size: large;
    font-weight: 600;
    margin: 0.3rem;
}

.contact-items > a > i {
    margin-right: 0.5rem;
}

.link-items > img {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60%;
}

.link-items > a > h4 {
    padding-bottom: 0.5rem;
}


.blog {
    grid-area: blog;
    animation-delay: 1.1s;
    /* background: var(--blog-bg-color) */
}
.about {
    grid-area: about;
    animation-delay: 1.2s;
    /* background: var(--about-bg-color); */
}   
.contact {
    grid-area: contact;
    animation-delay: 1.4s;
    /* background: var(--contact-bg-color); */
}
.projects {
    grid-area: projects;
    animation-delay: 1.5s;
    /* background: var(--projects-bg-color); */
}
.experience {
    grid-area: experience;
    animation-delay: 1.6s;
    /* background: var(--experience-bg-color); */
}
.extra {
    grid-area: extra;
    animation-delay: 1.8s;
    /* background: var(--extra-bg-color); */
}
.research {
    grid-area: research;
    animation-delay: 1.3s;
    /* background: var(--research-bg-color); */
}
.links {
    grid-area: links;
    animation-delay: 1.7s;
    /* background: var(--links-bg-color); */
}


/* FONTAWESOME STYLES */
.fa-github {
    color: #501DAF;
}

.fa-linkedin {
    color: #0077B5;
}

.fa-instagram {
    color: #ff0069;
}

.fa-pencil {
    color: #de6000;
}

.fa {
  margin: 0;
}


/* HOVER EFFECTS */
.tiles > div:hover .tile-cover, .tiles > div:active .tile-cover {
    opacity:0;
    transform: scale(0);
    visibility: hidden;
}

.tiles > div:hover .content, .tiles > div:active .content {
    opacity:1;
    visibility: visible;
}

.tiles > div:hover, .tiles > div:active {
    background: var(--tile-bg-color-hover);
    border: 0.15rem solid var(--tile-border-color-hover);
}


/* ANIMATION KEYFRAMES */
@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}


/* MEDIA QUERIES */
@media only screen and (max-width: 65rem) {
    .tiles {
        grid-template-areas:
            "blog about about about"
            "research research projects projects"
            "experience experience experience links"
            "extra contact contact links";
        grid-template-columns: 1fr 1fr 1fr 1fr;
        grid-template-rows: 2fr 2fr 2fr 2fr;
    }

    .research > .content > img {
        height: 8rem;
        min-height: auto;
        width: 8rem;
    }
}

@media only screen and (max-width: 50rem) {
    .tiles {
        grid-template-areas:
            "blog"
            "about"
            "research"
            "projects"
            "experience"
            "extra"
            "contact"
            "links";
        grid-template-columns: 1fr;
        grid-template-rows: 2fr auto auto 2fr 2fr 2fr 2fr 2fr;
    }

    .about > .content > img {
        height: 8rem;
        min-height: auto;
        width: 8rem;
    }

    .link-items > img {
        height: 0;
        min-height: 90%;
        width: unset;
    }
}
