/*
 * =====================================================
 * Main Stylesheet
 * Author: Matěj Křenek <xkrenem00>
 * 
 * 👉 Please read README.md for design principles,
 *    design philosophy, class naming conventions 
 *    and etc..
 * =====================================================
 */


/* CSS variables */
:root {
    --color-primary: #6366F1;
    --color-secondary: #222222;
    --color-light: #EEEEEE;
    --color-gray: #888888;
    --color-dark: #151516;
    --color-primary-gradient: linear-gradient(to top, var(--color-primary) 0%, rgba(0, 0, 0, 0) 100%);
}

::selection {
    background-color: var(--color-primary);
    color: var(--color-light);
}

html {
    scroll-behavior: smooth;
    font-size: 62.5%;
    /* 1rem = 10px */
}

body {
    font-family: 'Inter', serif;
    font-optical-sizing: auto;
    background-color: var(--color-dark);
    color: var(--color-light);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.container {
    max-width: 96rem;
    width: 100%;
    margin: 0 auto;
    padding: 0 3.2rem;
}

@media screen and (max-width: 48rem) {
    .container {
        padding: 0 2.4rem;
    } 
}

ul {
    list-style: none;
}

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

p {
    font-size: 1.6rem;
    font-weight: 400;
}

/* 
 * -------------------------
 * Navigation Styles
 * -------------------------
 */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(21, 21, 22, 0.3);
    backdrop-filter: blur(1.5rem);
    -webkit-backdrop-filter: blur(1.5rem);
    height: 9rem;
    z-index: 10;
}

@media screen and (max-width: 48rem) {
    .nav {
        height: 9rem;
        background-color: unset;
        backdrop-filter: unset;
        -webkit-backdrop-filter: unset;
    }
    
}


.nav .container {
    height: 100%;
}

.nav__menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3.2rem;
    height: 100%;
}

.nav__menu li {
    text-align: center;
}

.nav__menu--link {
    font-weight: 500;
    font-size: 1.8rem;
    color: var(--color-light);
    transition: 0.3s ease color, 0.3s ease opacity;
    text-align: center;
}

.nav__menu--link:hover,
.nav__menu--link:active,
.nav__menu--link:focus {
    opacity: 0.8;
}

.nav__menu--link.is-active {
    color: var(--color-primary);
}

.nav__hamburger {
    display: none;
    border: none;
    background-color: var(--color-secondary);
    color: var(--color-gray);
    border-radius: 1rem;
    padding: 0.8rem;
    position: absolute;
    top: 2.4rem;
    right: 2.4rem;
    cursor: pointer;
    transition: 0.3s ease opacity;
    z-index: 100;
}

.nav__hamburger:hover,
.nav__hamburger:active,
.nav__hamburger:focus {
    opacity: 0.7;
}

.nav__hamburger--open,
.nav__hamburger--close {
    width: 3.2rem;
    height: 3.2rem;
}

.nav__hamburger--close {
    display: none;
}

.nav__hamburger:not(.is-active).is-dark {
    background-color: var(--color-dark);
}

.nav__hamburger--open {
    display: flex;
}

@media screen and (max-width: 48rem) {
    .nav.is-active {
        height: 100vh;
        background-color: var(--color-secondary);
    }

    .nav.is-active .nav__menu {
        display: flex;
    }

    .nav.is-active .nav__hamburger {
        background-color: var(--color-dark);

    }

    .nav.is-active .nav__hamburger--close {
        display: flex;
    }

    .nav.is-active .nav__hamburger--open {
        display: none;
    }

    .nav__menu {
        height: 100%;
        flex-direction: column;
        display: none;
    }

    .nav__menu--link {
        font-size: 2.4rem;
    }

    .nav__hamburger {
        display: block;
    }
    
}

/* 
 * -------------------------
 * Header Section Styles
 * -------------------------
 */
header {
    height: 100vh;
    max-height: 64rem;
    padding-top: 9rem;
}

@media screen and (max-width: 48rem) {
    header {
        padding-top: 0rem;
        max-height: 42rem;
    }
    
}

.header .container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3.2rem;
    height: 100%;
    text-align: center;
}

.header__title {
    font-size: 6.4rem;
    font-weight: 600;
}

@media screen and (max-width: 48rem) {
    .header__title {
        font-size: 3.2rem;
    }    
}

/* 
 * -------------------------
 * Section Styles
 * -------------------------
 */
main {
    display: flex;
    flex-direction: column;
    gap: 10.2rem;
}

.section {
    padding-top: 9rem;
}

@media screen and (max-width: 48rem) {
    main {
        gap: 4.8rem;
    }
    .section {
        padding-top: 4.8rem;
    }
}

.section__title {
    font-size: 4.2rem;
    margin-bottom: 3.2rem;
    font-weight: 600;
}

.section__text {
    font-size: 1.8rem;
    color: var(--color-gray);
    line-height: 150%;
}

@media screen and (max-width: 48rem) {
    .section__title {
        font-size: 2.4rem;
    }

    .section__text {
        font-size: 1.6rem;
    }
}

/**
 * -------------------------
 * Skill Section Styles
 * -------------------------
 */
 .section#skills .container {
    display: flex;
    gap: 6.4rem;
    align-items: start;
}

@media screen and (max-width: 48rem) {
    .section#skills .container {
        flex-direction: column;
        gap: 2.4rem;
    }
}

.section#skills .icon--wizard {
    margin-bottom: 2.4rem;
    height: 5.6rem;
    display: block;
}

.skills__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, auto);
    gap: 1.6rem;
    justify-items: center;
    align-items: center;
    margin-top: 8rem;
}

@media screen and (max-width: 48rem) {
    .skills__grid {
        margin-top: 0rem;
    }
}

.skills__item {
    background-color: var(--color-secondary);
    padding: 1.2rem;
    border-radius: 1rem;

}

.skills__item img {
    width: 4.8rem;
    height: 4.8rem;
    object-fit: contain;

}

@media screen and (max-width: 48rem) {
    .skills__item img {
        width: 3.2rem;
        height: 3.2rem;
    
    }
}

/**
 * -------------------------
 * About Section Styles
 * -------------------------
 */
.section#about .container {
    display: flex;
    gap: 6.4rem;
    align-items: center;
    
}

@media screen and (max-width: 48rem) {
    .section#about .container {
        flex-direction: column-reverse;
        align-items: start;
        gap: 1.4rem;
    }

}

.section#about .section__left {
    display: flex;
    width: 40%;
}

@media screen and (max-width: 48rem) {
    .section#about .section__left {
        width: 100%;
    }

}

.section#about .section__left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(0.05rem);
}

.section#about .section__right {
    width: 60%;
}

@media screen and (max-width: 48rem) {
    .section#about .section__right {
        width: 100%;
    }

    .section#about .section__left img {
        max-width: 25rem;

    }   

}

.section#about .section__right > span {
    font-size: 1.6rem;
    margin-bottom: 1.6rem;
    color: var(--color-gray);
    display: block;
}

/* 
 * -------------------------
 * Footer Section Styles
 * -------------------------
 */
.footer .container {
    text-align: center;
    margin-bottom: 3.2rem;
    margin-top: 9.6rem;
}

.footer__text {
    font-size: 1.6rem;
}

@media screen and (max-width: 48rem) {
    .footer .container {
        margin-top: 4.8rem;
    }

    .footer__text {
        font-size: 1.4rem;
    }
}


.github {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.6rem;
    max-width: 48rem;
    text-align: center;
    margin: 0 auto;
    margin-top: 9.6rem;
    color: var(--color-gray);
}


.github__image {
    width: 6.4rem;
}

@media screen and (max-width: 48rem) {
    .github {
        margin-top: 4.8rem;
    }

    .github__image {
        width: 4.8rem;
    }
}

.github__text {
    font-size: 4.2rem;
}

@media screen and (max-width: 48rem) {
    .github__text {
        font-size: 2.4rem;
    }
}


.github__text a {
    color: var(--color-light);
    transition: 0.3s ease text-decoration;
}

.github__text a:hover,
.github__text a:active,
.github__text a:focus {
    text-decoration: underline;
}

/* 
 * -------------------------
 * Button Styles
 * -------------------------
 */
.btn {
    background-color: var(--color-primary);
    color: var(--color-light);
    font-weight: 600;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.6rem 5.6rem;
    border-radius: 1.6rem;
    border: none;
    transition: 0.3s ease opacity;
}

.btn:hover,
.btn:active,
.btn:focus {
    opacity: 0.8;
}

@media screen and (max-width: 48rem) {
    .btn {
        font-size: 1.4rem;
        padding: 1.2rem 3.2rem;    
    }
}

/* 
 * -------------------------
 * Text Styles
 * -------------------------
 */
.text--gradient {
    background: var(--color-primary-gradient);
    color: transparent;
    background-clip: text;
}

.text--primary {
    color: var(--color-primary);
}

/* 
 * -------------------------
 * Card Styles
 * -------------------------
 */
.card {
    border-radius: 1.6rem;
    background-color: var(--color-secondary);
    padding: 3.2rem;
    display: flex;
    justify-content: space-between;
    align-items: start;
}

@media screen and (max-width: 48rem) {
    .card {
        padding: 2.4rem;
        flex-direction: column;
        gap: 2.4rem;
    }
}

.card__left {
    display: flex;
    align-items: start;
    gap: 2.4rem;
    text-align: start;
}

.card__left img {
    width: 6.4rem;
    object-fit: contain;
}

@media screen and (max-width: 48rem) {
    .card__left {
        width: 100%;
        flex-direction: column;
    }

    .card__left img {
        width: 4.8rem;
    }
}

.card__left p {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.card__left span {
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--color-gray);
}

.card__right {
    text-align: end;
    display: flex;
    flex-direction: column;
}

@media screen and (max-width: 48rem) {
    .card__left p {
        font-size: 1.6rem;
    }

    .card__right {
        width: 100%;
    }
}

.card__dateRange {
    font-size: 1.6rem;
    color: var(--color-gray);
    text-align: end;
    white-space: nowrap;
    line-height: 150%;
}

.card__list {
    display: flex;
    flex-direction: column;
    gap: 3.2rem;
}

@media screen and (max-width: 48rem) {
    .card__list {
        gap: 1.6rem;
    }

    .card__dateRange {
        font-size: 1.4rem;
    }
}

.card__tagList {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.8rem;
    flex-wrap: wrap;
}

.card__tag {
    color: var(--color-light) !important;
    background-color: var(--color-dark);
    border-radius: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 1.2rem;
    font-size: 1.2rem !important;
    white-space: nowrap;
    text-align: center;
}