/*
 * CSS Reset
 */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}




/*
 * Variables
 */
:root {
    --color1: #da0037;
    --color2: #444444;
    --color3: #ededed;
    --color4: #171717;
    --font-size: calc(14px + (16 - 14) * ((100vw - 400px) / (1920 - 400)));
    --margin-top-bottom: calc(48px + (44 - 48) * ((100vw - 400px) / (1920 - 400)));
    --margin-left-right: calc(24px + (512 - 24) * ((100vw - 400px) / (1920 - 400)));
    --navbar-height: calc(48px + (44 - 48) * ((100vw - 400px) / (1920 - 400)));
}




/*
 * Fonts
 */
@font-face {
    font-display: swap;
    font-family: "Dosis";
    font-weight: 400;
    src:
        local("Dosis"),
        url("../fonts/Dosis-Regular.ttf");
}

@font-face {
    font-display: swap;
    font-family: "Oxygen Mono";
    font-weight: 400;
    src:
        local("Oxygen Mono"),
        url("../fonts/OxygenMono-Regular.ttf");
}

@font-face {
    font-display: swap;
    font-family: "Play";
    font-weight: 700;
    src:
        local("Play"),
        url("../fonts/Play-Bold.ttf");
}

@font-face {
    font-display: swap;
    font-family: "Secular One";
    font-weight: 400;
    src:
        local("Secular One"),
        url("../fonts/SecularOne-Regular.ttf");
}

@font-face {
    font-display: swap;
    font-family: "Space Mono";
    font-weight: 400;
    src:
        local("Space Mono"),
        url("../fonts/SpaceMono-Regular.ttf");
}




/*
 * Otros
 */
html {
    scroll-padding-top: 1em;
}

body {
    background-color: var(--color4);
    color: var(--color3);
    font-family: "Space Mono", "Oxygen Mono", Courier, monospace;
    font-size: var(--font-size);
    font-weight: 400;
    line-height: 1.8;
}

main {
    margin: var(--margin-top-bottom) var(--margin-left-right);
}

@media screen and (max-width: 355px) {
    main {
        margin: var(--margin-top-bottom) 1.12ch;
    }
}

h1 {
    border-bottom: 1px solid var(--color1);
    color: var(--color3);
    font-family: 'Secular One', 'Play', sans-serif;
    font-size: 1.5em;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1em;
    margin-top: 1.5em;
    padding-bottom: 0.3em;
    text-transform: uppercase;
}

ul {
    list-style: circle inside;
}

a:active,
a:hover,
a:link,
a:visited {
    color: #58a6ff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}




/*
 * Navbar
 */
#menu {
    background: var(--color2);
    background: radial-gradient(circle, var(--color2) 0%, var(--color4) 100%);
    border-radius: 0px;
    font-family: 'Dosis', sans-serif;
    height: var(--navbar-height);
}

#menu ul,
#menu li {
    list-style: none;
    margin: 0 auto;
    padding: 0;
}

#menu ul {
    width: fit-content;
}

#menu li {
    display: inline;
    float: left;
    position: relative;
}

#menu a {
    color: var(--color3);
    display: block;
    font-size: 1.25em;
    line-height: var(--navbar-height);
    padding: 0 16px;
    text-decoration: none;
    text-transform: uppercase;
}

#menu li a:hover {
    background: var(--color1);
    color: var(--color3);
}

#menu li:hover {
    display: block;
}

#menu a:hover {
    background: var(--color1);
    color: var(--color3);
}

@media screen and (max-width: 450px) {
    #menu a {
        font-size: 0;
        line-height: 2.5rem;
    }

    #menu a::before {
        content: attr(data-emoji);
        font-size: 1.25rem;
    }
}




/*
 * Portfolio
 */
.portafolio-section {
    align-content: center;
    align-items: stretch;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1em;
    justify-content: space-between;
}

@media screen and (max-width: 720px) {
    .portafolio-section {
        flex-direction: column;
        justify-content: center;
    }
}

.portafolio-section a {
    color: var(--color3);
    display: block;
    text-decoration: none;
}

.portfolio-card {
    align-items: stretch;
    border: 1px solid var(--color2);
    display: flex;
    flex-basis: calc(50% - (1em / 2));
    flex-direction: column;
    flex-wrap: nowrap;
    font-size: 1em;
    justify-content: flex-start;
    text-align: center;
}

.portfolio-card img {
    display: block;
    height: 100%;
    max-height: 242px;
    width: 100%;
}

.portfolio-card p {
    font-size: 14px;
    margin: auto;
}




/*
 * Scrollbar
 */
::-webkit-scrollbar {
    -webkit-appearance: none;
    background-color: var(--color4);
    width: 6px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--color2);
    border-radius: 0px;
}
