/*
    Theme Name: Kryštof Vyleťal
*/

:root {
    --primary-color: #000000;
    --background-color: #ffffff;

    font-size: 16px;
}

* {
    font-family: "Instrument Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings: "wdth" 100;
}

h1 {
    font-size: 120px;
    font-weight: 400;
    margin: 0;
}

h2 {
    font-size: 40px;
    font-weight: 700;
    margin: 0;
}

p, .navbar-links a, label, input, textarea, select, button {
    font-size: 30px;
    font-weight: 400;
    margin: 0;
}

a {
    color: var(--primary-color);
    font-size: 30px;
    font-weight: 400;
    text-decoration: none;
    border-bottom: 1px var(--primary-color) solid;
}

b {
    font-weight: 700;
}

@media (max-width: 1200px) {
    :root {
        font-size: calc(16px * 2 / 3);
    }

    h1 {
        font-size: 80px;
        font-weight: 400;
        margin: 0;
    }

    h2 {
        font-size: 35px;
        font-weight: 700;
        margin: 0;
    }

    p, .navbar-links a, label, input, textarea, select, button {
        font-size: 25px;
        font-weight: 400;
        margin: 0;
    }

    a {
        color: var(--primary-color);
        font-size: 25px;
        font-weight: 400;
        text-decoration: none;
        border-bottom: 1px var(--primary-color) solid;
    }

    .shape {
        scale: 0.66;
        transform-origin: bottom right;
    }
}

@media (max-width: 700px) {
    :root {
        font-size: calc(16px / 3);
    }

    h1 {
        font-size: 40px;
        font-weight: 400;
        margin: 0;
    }

    h2 {
        font-size: 25px;
        font-weight: 700;
        margin: 0;
    }

    p, .navbar-links a, label, input, textarea, select, button {
        font-size: 20px;
        font-weight: 400;
        margin: 0;
    }

    a {
        color: var(--primary-color);
        font-size: 20px;
        font-weight: 400;
        text-decoration: none;
        border-bottom: 1px var(--primary-color) solid;
    }

    .shape {
        scale: 0.33;
        transform-origin: bottom right;
    }
}


body {
    margin: 0;
    padding: 0 3rem;
    background-color: var(--background-color);
    color: var(--primary-color);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2.5rem 0;
    border-bottom: solid 1px var(--primary-color);

    & .navbar-links {
        display: flex;
        gap: 2rem;
        align-items: center;

        & a {
            border-bottom: none;
            color: var(--primary-color);
        }
    }
}

@media (max-width: 800px) {
    .navbar {
        display: none;
    }
}

@media (width > 800px) {
    .navbar-mobile, .navbar-exit {
        display: none !important;
    }
}

.navbar-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2.5rem 0;
    border-bottom: solid 1px var(--primary-color);

    & a {
        cursor: pointer;
    }

    & .navbar-links {
        display: flex;
        gap: 2rem;
        align-items: center;

        & a {
            border-bottom: none;
            color: var(--primary-color);
        }
    }
}

.hamburger {
    &:not(.active) {
        display: none !important;
    }
    position: fixed;
    overflow: hidden;
    height: 100%;
    width: 100%;
    left: 0;
    background-color: var(--background-color);
    padding: 0 3rem;
    z-index: 100;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;

    & a {
        cursor: pointer;
    }

    & .hamburger-header {
        display: flex;
        flex-direction: row;
        padding: 2.5rem 0;
        border-bottom: 1px solid var(--primary-color);
        align-items: center;
        justify-content: space-between;
        margin-bottom: 3rem;
    }

    & .navbar-links {
        flex-direction: column;
        gap: 1.5rem;
        display: flex;
        align-items: start;

        & a {
            border: none;
        }
    }
}

section {
    padding: 5rem 0;
    border-bottom: solid 1px var(--primary-color);
}

.section-title {
    display: flex;
    flex-direction: row;
    gap: 2.5rem;
    
    & > *:first-child {
        flex-basis: 55%;
    }

    & > *:last-child {
        flex-basis: 45%;
    }
}

@media (max-width: 1600px) {
    .section-title {
        flex-direction: column !important;

        & * {
            flex: 1;
        }
    }
}


.portfolio-grid {
    margin: 5rem 0 2.5rem 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
}
.portfolio-item {
    width: 100%;
    aspect-ratio: 16/9;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    
    & div {
        width: 100%;
        height: 100%;
        transition: 0.25s;
        position: absolute;
        background-position: center;
        background-size: cover;
        pointer-events: none;

        &.image2 {
            z-index: 9;
            opacity: 0;
        }
    }

    & .logo {
        opacity: 0;
        pointer-events: none;
        z-index: 10;
        object-fit: contain;
        transition: 0.25s;
        color: white;
    }

    &:hover .logo {
        opacity: 1;
    }
    &:hover .image1 {
        filter: brightness(0.25);
    }
}

@media (max-width: 1000px) {
    .portfolio-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}


.contact-grid {
    margin: 5rem 0 2.5rem 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}
.contact-item {
    width: 100%;
    aspect-ratio: 4/5;
    background-color: #bfbfbf;
    object-fit: cover;
}

@media (max-width: 1000px) {
   .contact-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}


.single-desc, .content {
    margin-top: 5rem;

    & table {
        
        & tr, td {
            height: fit-content;
        }
    }
}
.single-info {
    display: grid;
    grid-template-columns: min-content auto;
    gap: 0 2rem;

    height: fit-content;

    & :nth-child(2n - 1) {
        font-weight: 700;
    }
}



.portfolio-gallery {
    display: grid;
    width: 100%;
    max-width: 100%;
    gap: 1rem;

    & div {
        gap: 1rem;
    }

    & .portfolio-row {
        max-width: 100%;
        flex-wrap: none;
        height: 100%;
    }

    & figure {
        width: 100%;
        height: 100%;
        align-self: stretch;
        flex-basis: 1;
        
        max-height: 100%;
    }

    & img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        overflow: hidden;
    }
}



.about {
    display: flex;
    flex-direction: row;
    margin-top: 5rem;
    gap: 2.5rem;
    
    & *:first-child {
        flex-basis: 55%;
    }

    & *:last-child {
        flex-basis: 45%;
    }

    & img {
        max-width: 100%;
    }
}

@media (max-width: 700px) {
   .about {
        flex-direction: column !important;
    }
}

.contact {
    display: flex;
    flex-direction: row;
    margin-top: 5rem;
    gap: 2.5rem;
    
    & .half:first-child {
        flex-basis: 55%;
    }

    & .half:last-child {
        flex-basis: 45%;
    }


    & form {
        display: flex;
        flex-direction: column;
        gap: 2.5rem;
        
        & .form-row {
            display: flex;
            flex-direction: row;
            gap: 0.5rem;
            justify-content: space-between;
            align-items: center;

            & div {
                flex-basis: 50%;
                width: 100%;
            }
        }

        & input, textarea, select {
            border: var(--primary-color) 1px solid;
            width: 100%;
            outline: none;
            padding: 1rem;
            box-sizing: border-box;
            margin-top: 0.5rem;
            resize: none;
            background-color: var(--background-color);
        }

        & select {
            appearance: none; /* Disable the default arrow */
            -webkit-appearance: none; /* For WebKit-based browsers */
            -moz-appearance: none; /* For Firefox */
            background-image: url('data:image/svg+xml;utf8,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 9L12 15L18 9" stroke-width="1" stroke-linecap="sharp" stroke-linejoin="round" stroke="currentColor"/></svg>');
            background-repeat: no-repeat;
            background-position: right 0.5rem center;
            background-size: 50px;
            cursor: pointer;
        }

        & .checkbox {
            & input {
                border: var(--primary-color) 1px solid;
                border-radius: 0;
                margin: 0;
                width: 36px;
                height: 36px;
            
                outline: none;
            }

            margin-top: 0.5rem;
            gap: 0.5rem;
            display: flex;
            flex-direction: row;
            justify-content: left;
            align-items: center;
        }

        button {
            width: 100%;
            box-sizing: border-box;
            outline: none;
            border: none;
            background-color: var(--primary-color);
            color: var(--background-color);
            padding: 1rem;
            font-weight: 700;
        }
    }
}

@media (max-width: 1000px) {
    .contact {
        display: flex;
        flex-direction: column;
        margin-top: 5rem;
        
        & .half {
            flex: 1;
        }
    }

    .form-row {
        flex-direction: column !important;
        gap: 2.5rem !important;
    }
}



.footer-links {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 2.5rem;
    margin-top: 5rem;

    & div {
        width: 100%;

        &:last-child {
            text-align: right;
        }
    }

    & a {
        border-bottom: none;
    }
}

@media (max-width: 1000px) {
    .footer-links {
        flex-direction: column;

        & div {
            text-align: left !important;
        }
    }
}

.credit {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5rem 0;
}

@media (max-width: 1200px) {
    .credit {
        flex-direction: column !important;
        gap: 0.5rem;
    }
}