/* --- Fonts --- */

@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Anton&display=swap');
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono&display=swap');

:root {
    --blue: #55C9DF;
    --white: #fff;
    --black: #000;
    --glass-card-border: rgba(255,255,255,0.3);
    --glass-card: rgba(255,255,255,0.1);
    --secondary-text: #d1c9c9;
    --navbar: #212529;
}

* {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font: 100% 'Poppins', sans-serif;
    box-sizing: border-box;
    background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
    overflow-x: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    /* justify-content: center; */
    align-items: center;
    min-height: 100vh; /* the container takes up at least the viewport height */
    max-width: 90%;
    min-width: 300px;
    width: 60vw;
}

.center {
    text-align: center;
}

.about-section,
.skills-section,
.projects-section,
.certificates-section,
.contact-section {
    height: auto;
}

/* --- Nav Bar --- */

nav {
    color: var(--white);
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 0 0 5px 5px;
}

.logo-container {
    display: flex;
    align-items: center;
    padding-left: 5px;
}

#logo {
    font: 1.8rem 'Anton', sans-serif;
    color: transparent;
    -webkit-text-stroke: .1px var(--blue);
    text-decoration: none;
    cursor: pointer;
}

.hamburger {
    display: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--white);
    margin: 5px 0;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
}

.menu {
    list-style: none;
    display: flex;
    margin: 0;
}

.menu li {
    margin-right: 20px;
    list-style: none;
}

.menu li:last-child {
    margin-right: 0;
}

.menu a {
    color: var(--white);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 2px;
}

.menu a:hover {
    background-color: var(--blue);
    color: var(--black);
}

/* --- Nav Bar Responsiveness --- */

@media screen and (max-width: 768px) {
    
    .menu {
        display: none; /* hide menu by default */
        flex-direction: column;
        background-color: var(--navbar);
        position: fixed;
        top: 50px;
        left: 0;
        width: 100%;
        text-align: center;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    }

    .menu.active {
        display: flex; /* show menu when active */
    }

    .menu li,
    .menu li:last-child {
        margin: 0 auto;
    }

    .menu a {
        display: block;
        padding: 10px 20px;
    }

    .menu a:hover {
        background-color: var(--blue);
        color: var(--black);
    }

    .hamburger {
        display: block;
        cursor: pointer;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        -webkit-transform: translateY(8px) rotate(45deg);
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        -webkit-transform: translateY(-8px) rotate(-45deg);
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* --- Home Section --- */

h1.display-1 {
    font-family: 'Anton', sans-serif;
    color: transparent;
    -webkit-text-stroke: 1px var(--blue);
}

.typewriter {
    vertical-align: bottom;
    white-space: nowrap;
}

.typewriter > span {
    color: var(--white);
    display: grid;
    overflow: hidden;
    height: 1.5em;
    place-items: center;
}

.typewriter span .typewriter-text {
    font-family: 'IBM Plex Mono', monospace;
    width: 0%;
    max-width: max-content;
    overflow: hidden;
    height: inherit;
    word-break: break-all;
    animation:
        c 0.5s infinite steps(1),  
        t 2s linear infinite alternate,
        m 12s steps(3) infinite;
}

.typewriter span .typewriter-text:before {
    content:" ";
    display: inline-block;
}

@keyframes t {
    50%, 100% {
        width: 100%;
    }
}

@keyframes c {
    0%, 100% {
        box-shadow: 5px 0 0 #0000;
    }
    50% {
        box-shadow: 3px 0 0 #E8E6D9;
    }
}

@keyframes m {
    100% {
        transform: translateY(-308%);
    }
}

/* --- Home Section Responsiveness --- */

@media screen and (max-width: 600px) {

    .typewriter span .typewriter-text {
        font-size: 0.875rem;
    }

    .typewriter > span {
        height: 1.5rem;
    }

    .btn-outline-info {
        font-size: 0.875rem;
    }
}

/* --- About Section --- */

.container-about {
    display: flex;
    flex-direction: row; /* default row direction */
}

.my-info,
.my-photo {
    flex: 1;
    padding: 10px;
    min-width: 29vw;
    margin-bottom: 25%;
}

.my-info {
    font-family: 'IBM Plex Mono', monospace;
}

strong.role {
    color: var(--blue);
}

/* --- About Section Responsiveness --- */

@media screen and (max-width: 768px) {
    
    .container-about {
        flex-direction: column-reverse; /* reverse order on smaller screens */
    }
}

@media screen and (max-width: 600px) {

    .my-info {
        font-size: 0.875rem;
    }
}

/* --- Tech Stack and Tools Section --- */

.skills-section h1:last-of-type {
    margin-top: 10%;
}

.tech-stack,
.tools {
    color: var(--white);
    box-shadow: 0 5px 31px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-card-border);
    background: var(--glass-card);
    padding: 15px;
}

i.bx,
i.fa-brands {
    color: var(--blue);
    font-size: 2.5rem;
}

p.icon-title {
    font-family: 'IBM Plex Mono', monospace;
}

/* --- Tech Stack and Tools Section Responsiveness --- */

@media screen and (max-width: 600px) {

    p.icon-title {
        font-size: 0.875rem;
    }

    i.bx,
    i.fa-brands {
        font-size: 2rem;
    }
}

/* --- Projects Section --- */

.projects-section {
    margin-top: 20%;
}

.container-projects > .card-deck > .card {
    width: 18rem;
}

.card-text {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--blue);
    font-weight: 600;
}

.card-text:last-of-type {
    font: 0.9rem 'IBM Plex Mono', monospace;
    color: var(--secondary-text);
}

/* --- Projects Section Responsiveness --- */

@media screen and (max-width: 600px) {

    .projects-section {
        margin-top: 13em;
    }
}

/* --- Certificates Section --- */

.certificates-section {
    margin-top: 15em;
}

/* --- Certificates Section Responsiveness --- */

@media screen and (max-width: 768px) {

    .certificates-section {
        margin-top: 12em;
    }
}

/* --- Contact Section --- */

.contact-section {
    margin-top: 15em;
    margin-bottom: 10em;
}

.container-contact {
    display: flex;
    flex-direction: row; /* default row direction */
}

.description,
.form {
    flex: 1;
    min-width: 29vw;
}

.form {
    color: #fff;
    box-shadow: 0 5px 31px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 1.5em;
}

.description,
input[type="text"],
input[type="email"],
textarea,
label {
    font-family: 'IBM Plex Mono', monospace;
}

.warning {
    border: 2px solid var(--blue) !important; /* the warning will only show in 
    the form validation if the user did not fill-out all the required fields */
}

/* --- Contact Section Responsiveness --- */

@media screen and (max-width: 768px) {

    .contact-section {
        margin-top: 0.1em;
    }

    .container-contact {
        flex-direction: column; /* reverse order on smaller screens */
    }
}

@media screen and (max-width: 600px) {

    .description,
    input[type="text"],
    input[type="email"],
    textarea,
    label {
        font-size: 0.875rem;
    }
}

/* --- Footer Section --- */

.footer-section {
    height: 50vh;
}

.icon {
    height: 6vh;
    margin-top: 2rem;
}

.icon a {
    text-decoration: none;
}

.icon a > i.bx,
.icon a > i.fa-brands {
    color: var(--blue);
    font-size: 2.5rem;
    padding: 25px;
}

.copyright {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--secondary-text);
    margin-top: 75px;
}

/* --- Footer Section Responsiveness --- */

@media screen and (max-width: 1024px) {

    .icon {
        margin-top: 1rem;
    }
}

@media screen and (max-width: 600px) {

    .icon a > i.bx,
    .icon a > i.fa-brands {
        font-size: 2rem;
    }

    .copyright p {
        font-size: 0.875rem;
    }
}

@media screen and (max-width: 426px) {

    .icon a > i.bx,
    .icon a > i.fa-brands {
        padding: 20px;
    }
}

@media screen and (max-width: 376px) {

    .icon a > i.bx,
    .icon a > i.fa-brands {
        padding: 10px;
    }
}