@font-face {
    font-family: "Archivo";
    src: local("Archivo"), 
        url("../fonts/Archivo-Regular.ttf") format("truetype");
    font-display: swap;
}

@font-face {
    font-family: "Archivo Black";
    src: local("Archivo Black"), 
        url("../fonts/Archivo-Black.ttf") format("truetype");
    font-display: swap;
}

@font-face {
    font-family: "Archivo Italic";
    src: local("Archivo Italic"), 
        url("../fonts/Archivo-Italic.ttf") format("truetype");
    font-display: swap;
}

@font-face {
    font-family: "Archivo Thin";
    src: local("Archivo Thin"), 
        url("../fonts/Archivo-Thin.ttf") format("truetype");
    font-display: swap;
}

@font-face {
    font-family: "Averia Libre";
    src: local("Averia Libre"), 
        url("../fonts/AveriaLibre-Regular.ttf") format("truetype");
    font-display: swap;
}

@font-face {
    font-family: "Averia Libre Bold";
    src: local("Averia Libre Bold"), 
        url("../fonts/AveriaLibre-Bold.ttf") format("truetype");
    font-display: swap;
}

:root {
    --typography-size: 1em;
    --dark: #222222;
    --light: #FFFFFF;
    --primary: #5394AA;
    --accent: #DBBEB7;
    --green: #22aa88;
}

html {
    font-family: "Archivo", system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-display: swap;
    font-size: var(--typography-size);
    background: var(--dark);
    color: var(--light);
}

a {
    color: var(--primary);
    font-weight: bold;
    transition: color 0.3s ease-in-out;
}

input:active,
input:focus,
input:autofill,
textarea:active,
textarea:focus,
textarea:autofill {
    outline: none;
    background: transparent;
}

input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-background-clip: text;
    -webkit-text-fill-color: #ffffff;
    transition: background-color 5000s ease-in-out 0s;
    box-shadow: inset 0 0 20px 20px #23232329;
}

button {
    font-size: 1.3rem;
    color: var(--green);
    background: transparent;
    padding: 0.8rem 2rem;
    border: solid 2px;
    cursor: pointer;
    transition: color 0.3s ease-in-out;
}

button:hover,
button:active,
a:hover,
a:active {
    color: var(--accent);
}

button:hover,
button:active  {
    box-shadow: 2px 4px 0 black;
    text-shadow: 2px 4px 0 black;
    transform: translateY(-2px);
}

.averia-libre {
    font-family: "Averia Libre", Georgia, 'Times New Roman', Times, serif;
}

.averia-libre-bold {
    font-family: "Averia Libre Bold", Georgia, 'Times New Roman', Times, serif;
    font-weight: normal;
}

.archivo-black {
    font-family: "Archivo Black", system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.lowercase {
    text-transform: lowercase;
}

.small-text {
   font-size: 0.9rem;
}

main {
    position: relative;
    display: grid;
    align-content: center;
    justify-items: center;
    justify-content: center;
    grid-template-columns: auto auto auto auto;
    grid-template-rows: auto auto auto auto;
    grid-template-areas: 
        ". i i ."
        ". l r ."
        ". t t ."
        ". . . .";
    height: 100vh;
}

main::before {
    content: '';
    position: fixed;
    height: 200%;
    width: 200%;
    background: url('../img/gradient.png');
    background-size: 75%;
    top: -50%;
    left: -50%;
    transform: rotate(0);
    animation: gradient 10s linear infinite;
    image-rendering: pixelated;
    filter: blur(100px);
    overflow: hidden;
}

@keyframes gradient {
    from {
        transform: rotate(0);
    }

    to {
        transform: rotate(360deg);
    }
}

.background {
    position: fixed;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle farthest-corner at 50% 50%, black, #000000cc, #00000022, transparent);
    background-size: 400%;
    background-position: 50% 50%;
    z-index: 1;
}

.profile-img {
    grid-area: i;
    border: 3px solid;
    align-self: end;
    height: 200px;
    border-radius: 25%;
    margin-bottom: 2rem;
    z-index: 2;
    filter: saturate(75%) brightness(75%);
}

#left-grid {

    grid-area: l;
    padding-right: calc(var(--typography-size));
    z-index: 2;
}

#right-grid {
    grid-area: r;
    border-left: solid 2px;
    padding-left: calc(var(--typography-size));
    z-index: 2;
}

.logo {
    font-size: 2rem;
    line-height: 0;
}

.logo h1 {
    margin-top: 2rem;
}

.logo h2 {
    font-size: 0.525em;
    letter-spacing: 1.35ch;
    padding-left: 0.5rem;
    margin-top: -0.25rem;
}

.info {
    line-height: 0.3;
}

.info * {
    margin-bottom: 1rem;
}

.info .small-text {
    margin-bottom: 1.2rem;
}

.info h1 {
    margin-bottom: 1.5rem;
}

.info h2 {
    font-size: 1rem;
}

p img {
    display: inline;
    width: 1.25ch;
    vertical-align: middle;
}

.logo p {
    text-align: center;
    margin: 0;
    filter: invert(100%);
}

#intro {
    margin-top: 1rem;
    grid-area: t;
    text-align: center;
    z-index: 2;
}

#intro p {
    font-size: 1.3rem;
    font-weight: bold;
    line-height: 0.8;
}

.typewrite {
    color: var(--accent);
}

#intro button {
    margin-top: 2rem;
}

#contact {
    overflow-x: hidden;
    overflow-y: auto;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    visibility: hidden;
    opacity: 0;
}

#contact:target {
    visibility: visible;
    opacity: 1;
    align-content: center;
    justify-content: center; 
    z-index: 4;
    backdrop-filter: blur(100px);
    -webkit-backdrop-filter: blur(100px);
}

#contact form,
#thank-you {
    font-size: 1.3rem;
    width: 90%;
    max-width: 35rem;
}

#contact form input,
#contact form textarea,
#contact form button {
    display: block;
    margin: 1rem auto 0;
    box-sizing: border-box;
    background: transparent;
}

#contact form input,
#contact form textarea {
    padding: .8rem;
    width: 100%;
    color: var(--light);
    border: none;
    border-bottom: 2px solid #ffffff88;
}

#contact form textarea {
    border: solid 2px #ccccff22;
    background: #00000044;
    box-shadow: 0 20px 10px -10px #000404;;
    overflow: hidden;
    resize: none;
}

#contact form *:autofill {
    background: transparent;
}

#contact form input:focus,
#contact form input:active {
    border-color: var(--light);
}

/* Close button */
#contact .close {
    display: inline-block;
    float:right;
    text-decoration: none;
    text-align: right;
    margin-top: 1rem;
}

#contact form #date {
    visibility: hidden;
    position: absolute;
}

.legal {
    display: block;
    margin-top: 2rem;
    font-size: 1rem;
    line-height: 1.2;
    opacity: 0.6;
    padding-bottom: 2rem;
}

#thank-you {
    display: none;
    align-self: center;
}

@media (max-width: 450px) {
    :root {
        --typography-size: 0.75em;
    }

    .legal {
        font-size: 1.2rem;
    }
}

@media (min-width: 1280px) {
    :root {
        --typography-size: 1.2em;
    }

    .legal {
        font-size: 0.85rem;
    }
}

@media (orientation: landscape) {
    main {
        grid-template-columns: auto auto auto auto auto;
        grid-template-rows: auto auto auto auto;
        grid-template-areas: 
            ". . . . ."
            ". l r i ."
            ". t t i ."
            ". . . . .";
    }
    .profile-img {
        align-self: center;
        margin-left: 2rem;
        height: 300px;
    }
}

@media (max-height: 450px) {
    :root {
        --typography-size: 0.75em;
    }

    #contact form textarea {
        height: 10rem;
    }

    .legal {
        font-size: 1.2rem;
    }
}