/* VARIABLES */

:root {
    --bg-color: #161413;
    --fg-color: #FBF9FF;
    --link-color: #B8A1CE;
    --title-color: #F58F29;
    --footer-color: #2B2A30;

    --navbar-height: 60px;
}

/* GENERAL */

* {
    margin: 0;
    padding: 0;
}

html {
    background: var(--bg-color);
    color: var(--fg-color);
    font-family: 'M PLUS 1p', sans-serif;
    font-weight: 300;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

abbr[title] {
    text-decoration: none;
}

header, main {
    width: 80%;
    margin: auto;

    p {
        font-size: 1.1em;
        margin: 1em 0;
        line-height: 1.4em;
        text-align: justify;
    }
}

h1, h2, h3, h4, h5, h6 {
    text-align: left;
    color: var(--title-color);
    font-weight: bold;
}

h1 {
    font-size: 2em;
    margin: 1em 0;
}

h2 {
    font-size: 1.7em;
    margin: 0.7em 0;
}

h3 {
    font-size: 1.4em;
    margin: 0.4em 0;
}

hgroup {
    margin: 1em 0;

    h1, h2, h3, h4, h5, h6 {
        margin: 0;
    }

    p {
        margin: 0;
        font-style: italic;
        font-size: 0.85em;
    }
}

section {
    clear: both;
}

.section-anchor {
    position: relative;
    top: calc(var(--navbar-height) * -1.25);
}

.figure {
    margin: 2em 0;
    text-align: center;

    p {
        text-align: center;
        font-size: .75em;
        font-style: italic;
        margin: .5em 0;
    }
}

/* HEADER */

header {
  text-align: center;
}

.profile-picture {
    border-radius: 10%;
    alignment-baseline: alphabetic;
    width: 8em;
    display: block;
    margin: 0 auto;
}

/* NAV */

nav {
    background: var(--bg-color);
    z-index: 100;
    font-size: 1.2em;

    ul {
        display: flex;
        height: var(--navbar-height);
        justify-content: left;

        li {
            list-style-type: none;

            a {
                padding: 0 1em;
                display: inline-block;
                line-height: var(--navbar-height);
                font-weight: 700;
                font-variant: small-caps;
                transition: 1s;
            }
        }

        li:hover {
            a {
                background: var(--link-color);
                text-decoration: none;
                color: var(--bg-color);
            }
        }
    }

    .landing-anchor-link
    {
        display: none;
    }

    .nav-lang-link
    {
        font-weight: normal;
        font-style: italic;
    }

    .nav-index {
        img {
            height: 2.5em;
            vertical-align: middle;
            border-radius: 25%;
            transition: 1s;
        }
    }

    .nav-index:hover {
        a {
            background: transparent;
        }

        img {
            box-shadow: 0 0 0 2px var(--link-color);
        }
    }
}

/* FOOTER */

body > footer {
    margin-top: 1.5em;
    padding: 2em;
    background: var(--footer-color);
    p {
        margin: .25em 0;
        line-height: 1.4em;
        text-align: center;
    }
}

/* PROJECTS MODAL */

.projects-modal {
    width: 95%;
    margin: auto;
    display: grid;
    grid-auto-flow: row;
    grid-template-columns: 1fr 1fr;
    gap: .5em;
    list-style-type: none;

    .projects-element {
        aspect-ratio: 144/89;
    }
}

.projects-button {
    height: 100%;
    width: 100%;
    display: flex;
    align-items: stretch;
    justify-content: left;

    a {
        flex: 1;
        height: 100%;

        .projects-button-title {
            font-size: 1.7em;
            font-weight: bold;
            color: var(--fg-color);
        }
    }
}

.projects-popup {
    visibility: hidden;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: #000000BB;
    z-index: 200;
    transition: .5s;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.projects-popup:target {
    visibility: visible;
    opacity: 1;
}

.projects-popup-window {
    width: 100%;
    overflow: auto;
    max-height: 50%;
    position: relative;
    background: var(--fg-color);
    color: var(--bg-color);
    padding: 2em;

    hr {
        opacity: .5;
        margin: 1em 0;
    }

    .project-links {
        list-style-type: none;
    }
}

.projects-popup-close {
    text-decoration: none;
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    line-height: 1.3em;
    font-size: 1.8em;
    text-align: center;
    color: var(--bg-color);
    transition: 1s;
    font-weight: 900;
    position: absolute;
    top: 1em;
    right: 1em;
}

/* SOCIAL ICONS */

.social-icons {
    list-style-type: None;
    margin-top: 2em;
    display: flex;
    justify-content: center;
    gap: .1em;

    li {
        border-radius: 5%;
        padding: .3em;
        display: flex;
        align-items: center;
        transition: 1s;

        a {
            transition: 1s;
            display: inline-grid;
            width: 2em;
            height: 2em;
            background-color: var(--link-color);
        }
    }

    li:hover {
        background: var(--link-color);

        a {
            background-color: var(--footer-color);
        }
    }
}

/* MEDIA QUERIES */

@media (hover: hover) {
    abbr[title] {
        text-decoration: underline dotted;
    }

    a:hover {
        text-decoration: underline;
    }

    .projects-button {
        justify-content: center;

        a {
            opacity: 0;
            transition: 1s;
            background: var(--link-color);
            display: flex;
            align-items: center;
            justify-content: center;

            .projects-button-title {
                color: var(--bg-color);
            }
        }
    }

    .projects-button:hover {
        a {
            opacity: .85;
        }
    }

    .projects-popup-close {
        width: 1.2em;
        height: 1.2em;
        line-height: 1em;
        font-size: 1.5em;
    }
    
    .projects-popup-close:hover {
        text-decoration: none;
        background: var(--bg-color);
        color: var(--fg-color);
    }
}

@media (hover: none) {
    abbr[title]:after {
        content: " (" attr(title) ")";
    }

    a {
        text-decoration: underline;
    }

    .projects-button {
        a {
            text-decoration: none;
            .projects-button-title {
                margin: .15em;
                text-shadow: 2px 2px 5px var(--bg-color);
            }
        }
    }
}

@media (min-width: 1024px) {
    header, main {
        width: 50%;
    }

    .projects-popup-window {
        width: 30%;
    }
}

@media (orientation: landscape) and (min-width: 1024px) {
    h1, h2, h3, h4, h5, h6 {
        text-align: center;
    }

    hgroup {
        p {
            text-align: center;
        }
    }

    nav {
        position: sticky;
        top: 0;

        ul {
            justify-content: center;
        }

        .landing-anchor-link
        {
            display: list-item;
        }

        .nav-index img {
            border-radius: 100%;
        }
    }

    .profile-picture {
        border-radius: 100%;
    }

    .projects-modal {
        width: 50%;
        float: right;
        margin: 0 1em;
    }

    .projects-button {
        a {
            opacity: 0;
            text-align: center;
        }
    }
}

/* FONTS */

/* M PLUS 1p */
@font-face {
  font-family: 'M PLUS 1p';
  font-style: normal;
  font-weight: 100;
  src: local('M PLUS 1p Thin'), local('MPLUS1p-Thin'), url('../fonts/MPLUS1p/MPLUS1p-Thin.ttf') format('truetype');
}
@font-face {
  font-family: 'M PLUS 1p';
  font-style: normal;
  font-weight: 300;
  src: local('M PLUS 1p Light'), local('MPLUS1p-Light'), url('../fonts/MPLUS1p/MPLUS1p-Light.ttf') format('truetype');
}
@font-face {
  font-family: 'M PLUS 1p';
  font-style: normal;
  font-weight: 400;
  src: local('M PLUS 1p Regular'), local('MPLUS1p-Regular'), url('../fonts/MPLUS1p/MPLUS1p-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'M PLUS 1p';
  font-style: normal;
  font-weight: 500;
  src: local('M PLUS 1p Medium'), local('MPLUS1p-Medium'), url('../fonts/MPLUS1p/MPLUS1p-Medium.ttf') format('truetype');
}
@font-face {
  font-family: 'M PLUS 1p';
  font-style: normal;
  font-weight: 700;
  src: local('M PLUS 1p Bold'), local('MPLUS1p-Bold'), url('../fonts/MPLUS1p/MPLUS1p-Bold.ttf') format('truetype');
}
@font-face {
  font-family: 'M PLUS 1p';
  font-style: normal;
  font-weight: 800;
  src: local('M PLUS 1p ExtraBold'), local('MPLUS1p-ExtraBold'), url('../fonts/MPLUS1p/MPLUS1p-ExtraBold.ttf') format('truetype');
}
@font-face {
  font-family: 'M PLUS 1p';
  font-style: normal;
  font-weight: 900;
  src: local('M PLUS 1p Black'), local('MPLUS1p-Black'), url('../fonts/MPLUS1p/MPLUS1p-Black.ttf') format('truetype');
}