@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;1,400;1,500&display=swap');

:root {
    --primary-color: #24768b;
    --secondary-color: #2b2b2b;
    --tertiary-color: #1a1a1a;
    --quaternary-color: #161616;
    --quinary-color: #b3b3b3;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background-color: var(--quaternary-color);

    overflow-x: hidden;

    scroll-behavior: smooth;
}

main {
    height: 100vh;
    width: 100vw;
}

.main-grid {
    padding: 15px;

    --border-radius: 10px;
    --last-border-radius: 40px;

    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
    grid-gap: 10px;

    height: 90vw;
    width: 90vw;
    max-width: 90vh;
    max-height: 90vh;

    position: relative;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.grid-item {
    height: 100%;
    width: 100%;

    color: white;

    box-sizing: border-box;
    padding: 20px;

    border-radius: var(--border-radius);

    background: linear-gradient(145deg, var(--secondary-color), var(--tertiary-color));
    transition: 0.3s cubic-bezier(0.25, 0, 0.25, 1);
}
.grid-item:hover {
    border-radius: var(--last-border-radius);
    /* animation: pulse 0.5s cubic-bezier(0.25, 0, 0.25, 1); */
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 var(--primary-color);
    }
    10% {
        box-shadow: 0 0 20px 0 var(--primary-color);
    }
    100% {
        box-shadow: 0 0 0 0 var(--primary-color);
    }
}

nav.grid-item {
    grid-column: 2 / 3;
    grid-row: 1 / 2;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px;
}
nav.grid-item a {
    text-decoration: none;
    color: var(--quinary-color);
    font-size: 1rem;
    font-weight: 500;
    transition: 0.15s cubic-bezier(0.25, 0, 0.25, 1);

    padding: 15px;
    border-radius: var(--border-radius);
}
nav.grid-item:hover a {
    border-radius: var(--last-border-radius);
}
nav.grid-item a:hover {
    color: white;
}
nav.grid-item a.active {
    background-color: rgba(82, 82, 82, 0.315);
}

/* About */
.grid-item:nth-child(1) {
    grid-column: 1 / 3;
    grid-row: 2 / 7;

    transform: translateX(-50%);
    opacity: 0;
    animation: show 0.7s cubic-bezier(0.25, 0, 0.25, 1) 0.1s forwards;

    display: flex;
    justify-content: space-between;
    flex-direction: column;
}
.grid-item:nth-child(1) h1 {
    font-size: 1.75em;
    font-weight: 600;
    margin: 10px;
    color: #f2f2f2;
}
.grid-item:nth-child(1) p {
    margin: 10px;
}
.grid-item:nth-child(1) .tools {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.grid-item:nth-child(1) h2 {
    font-size: 1.25em;
    font-weight: 500;
    margin: 10px;
}
.grid-item:nth-child(1) .tools img {
    width: 48px;
    height: 48px;

    filter: brightness(0.7);

    position: relative;

    transition: transform 0.3s cubic-bezier(0.25, 0, 0.25, 1), filter 0.15s cubic-bezier(0.25, 0, 0.25, 1);
}
.grid-item:nth-child(1) .tools img:hover {
    filter: brightness(1) drop-shadow(0 0 4px #ffffff75);
}
.grid-item:nth-child(1) .tools:hover img:nth-child(odd) {
    transform: translateY(5px);
}
.grid-item:nth-child(1) .tools:hover img:nth-child(even) {
    transform: translateY(-5px);
}
/* About */

/* Image */
.grid-item:nth-child(2) {
    grid-column: 3 / 4;
    grid-row: 2 / 9;
    padding: 0;
    overflow: hidden;

    transform: translateY(-50%);
    opacity: 0;
    animation: show 0.7s cubic-bezier(0.25, 0, 0.25, 1) 0.25s forwards;
}
.grid-item:nth-child(2) img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s cubic-bezier(0.25, 0, 0.25, 1);
}
.grid-item:nth-child(2):hover img {
    transform: scale(1.1);
}
.grid-item:nth-child(2) div {
    position: absolute;
    top: 0px;
    left: 0px;

    width: 100%;
    height: 100%;

    background: linear-gradient(
        var(--primary-color),
        var(--primary-color) 2px,
        transparent 2px,
        transparent 9px
    );
    background-size: 100% 9px;
        
    animation: scroll-up 22s linear infinite;
    opacity: 0.1;
}
.grid-item:nth-child(2):hover div {
    animation: scroll-down 22s linear infinite;
}
@keyframes scroll-up {
    0% { background-position: 0 100%; }
    100% { background-position: 0 0; }
}
@keyframes scroll-down {
    0% { background-position: 0 0; }
    100% { background-position: 0 100%; }
}
/* Image */

/* Quote */
.grid-item:nth-child(3) {
    grid-column: 3 / 4;
    grid-row: 9 / 12;

    background: linear-gradient(145deg, var(--primary-color), var(--secondary-color));
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2em;
    font-weight: 500;
    color: #ffffffce;

    transform: scale(0.5);
    opacity: 0;
    animation: show 0.7s cubic-bezier(0.25, 0, 0.25, 1) 0.8s forwards;
}
/* Quote */

/* Education */
.grid-item:nth-child(4) {
    grid-column: 2 / 4;
    grid-row: 12 / 19;

    transform: translateX(50%);
    opacity: 0;
    animation: show 0.7s cubic-bezier(0.25, 0, 0.25, 1) 0.4s forwards;
}
.grid-item:nth-child(4) h1 {
    font-size: 1.75em;
    font-weight: 600;
    margin: 5px;
    color: #f2f2f2;
}
.grid-item:nth-child(4) h2 {
    font-size: 1.3em;
    font-weight: 500;
    margin: 5px;
    color: #e4e3e3;
}
.grid-item:nth-child(4) h2 small {
    font-weight: 400;
    color: #d6d6d6;
}
.grid-item:nth-child(4) p {
    font-size: 1em;
    font-weight: 400;
    margin: 5px;
    color: #e4e3e3;
}
.grid-item:nth-child(4) p a {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
}
.grid-item:nth-child(4) p a:hover {
    text-decoration: underline;
}
/* Education */

/* Contact */
.grid-item:nth-child(5) {
    grid-column: 1 / 2;
    grid-row: 9 / 19;

    transform: translateY(50%);
    opacity: 0;
    animation: show 0.7s cubic-bezier(0.25, 0, 0.25, 1) 0.6s forwards;

    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    flex-direction: column;
}
.contact-container {
    border-radius: var(--last-border-radius);

    padding: 15px;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    gap: 10px;

    font-size: 1.2rem;
    font-weight: 500;
    color: var(--quinary-color);
    text-decoration: none;

    transition: 0.15s cubic-bezier(0.25, 0, 0.25, 1);
}
.contact-container:hover {
    box-shadow: inset 0 0 20px 0 #1414149d;
}
.contact-img-container {
    display: flex;
    justify-content: center;
    align-items: center;
}
.contact-img-container img {
    width: 48px;
    height: 48px;
}
.contact-text {
    text-align: center;
}
/* Contact */

/* Profession */
.grid-item:nth-child(6) {
    grid-column: 1 / 2;
    grid-row: 7 / 9;

    background: linear-gradient(145deg, var(--primary-color), var(--secondary-color));
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4em;
    font-weight: 600;

    transform: scale(0.5);
    opacity: 0;
    animation: show 0.7s cubic-bezier(0.25, 0, 0.25, 1) 0.8s forwards;
}
.grid-item:nth-child(6) h3 {
    -webkit-background-clip: text;
    background-clip: text;
    background-image: linear-gradient(145deg, rgb(71, 233, 233), rgb(8, 100, 100));
    transition: color 0.15s cubic-bezier(0.25, 0, 0.25, 1);
    background-size: 50% 100%;
    background-position: 0% 0%;
    animation: scroll-left 2s linear infinite;
    cursor: default;
}
.grid-item:nth-child(6) h3::selection {
    background: transparent;
}
@keyframes scroll-left {
    0% { background-position: 100% 100%; }
    100% { background-position: 0 0; }
}
.grid-item:nth-child(6):hover h3 {
    color: transparent;
}
/* Profession */

/* Profile */
.grid-item:nth-child(7) {
    grid-column: 2 / 3;
    grid-row: 7 / 12;

    cursor: pointer;
    transform: scale(0.3);
    opacity: 0;
    animation: show 0.3s cubic-bezier(0.25, 0, 0.25, 1) 0.1s forwards;
}
.grid-item:nth-child(7) img {
    width: 40%;
    aspect-ratio: 1/1;

    position: relative;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);

    object-fit: cover;

    transition: 0.3s cubic-bezier(0.25, 0, 0.25, 1);

    border-radius: var(--border-radius);
    border: 1px solid var(--tertiary-color);
}
.grid-item:nth-child(7) h2 {
    text-align: center;
    position: relative;
    top: 15%;
}
/* Profile */

@keyframes show {
    100% {
        transform: translate(0);
        opacity: 1;
    }
}

@media (max-width: 700px) or (max-height: 700px) {
    main {
        height: auto;
        width: 100vw;
    }
    .main-grid {
        grid-template-columns: repeat(8, 1fr);
        grid-template-rows: repeat(19, 1fr);
        
        box-sizing: border-box;
        position: relative;
        top: 0;
        left: 0;
        transform: none;
        height: auto;
        width: 100%;
        max-width: 100vw;
        max-height: 200vh;

        align-items: start;
    }

    nav.grid-item {
        grid-column: 1 / 9;
        grid-row: 4 / 5;

        position: sticky;
        top: 10px;
        align-self: start;

        z-index: 999;
    }
    nav.grid-item.is-sticky {
        box-shadow: 0 5px 15px 0 #000000a4;
    }

    .grid-item:nth-child(1) {
        grid-column: 1 / 9;
        grid-row: 5 / 10;

        transform: translateX(-50%);
        opacity: 0;
    }
    .grid-item:nth-child(1) h1 {
        font-size: 2em;
    }
    .grid-item:nth-child(1) p {
        font-size: 1.25em;
    }
    .grid-item:nth-child(1) .tools img {
        flex: 0 0 20%;
    }
    
    .grid-item:nth-child(2) {
        grid-column: 6 / 9;
        grid-row: 10 / 13;

        transform: translateX(50%);
        opacity: 0;
    }
    .grid-item:nth-child(2) img {
        width: 100%;
        object-fit: cover;
    }
    
    .grid-item:nth-child(3) {
        grid-column: 1 / 6;
        grid-row: 10 / 13;

        animation: show 0.7s cubic-bezier(0.25, 0, 0.25, 1) 0.5s forwards;
    }
    
    .grid-item:nth-child(4) {
        grid-column: 1 / 9;
        grid-row: 13 / 17;

        transform: translateY(50%);
        opacity: 0;

        font-size: 1.1em;
    }
    
    .grid-item:nth-child(5) {
        grid-column: 1 / 9;
        grid-row: 17 / 20;

        padding: 0;

        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .contact-container {
        width: 40%;
    }
    
    .grid-item:nth-child(6) {
        grid-column: 5 / 9;
        grid-row: 1 / 4;

        font-size: 1.6rem;

        animation: show 0.7s cubic-bezier(0.25, 0, 0.25, 1) 0.5s forwards;
    }
    
    .grid-item:nth-child(7) {
        grid-column: 1 / 5;
        grid-row: 1 / 4;

        padding: 0;

        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
    }
    .grid-item:nth-child(7) img {
        position: relative;
        top: 0;
        left: 0;
        transform: none;
    }
    .grid-item:nth-child(7) h2 {
        top: 0;
    }
}