* {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    font-family: Inter, sans-serif;
}

body {
    display: flex;
    flex-direction: column;
}

/* header */

.title {
    display: flex;
    align-items: flex-start;
    width: 100%;
    height: 6rem;
    padding-left: 80px;
    position: fixed;
    top: 0;
    z-index: 1;
    background-color: #ffffff;
}

.title-name {
    width: auto;
    padding-top: 10px;
}

.title h1 {
    margin: 0px;
}

.title h2 {
    margin: 0;
}

/* navigation */

nav {
    display: flex;
    align-items: center;
    width: auto;
    list-style-position: inside;
    margin-left: 1rem;
    padding-top: 1rem;
}

nav ul {
    display: flex;
    margin: 0;
    padding: 0;
}

nav li {
    padding: 5px;
}

nav li:nth-last-child(-n + 2){
    list-style: none;
}

nav a {
    display: inline-block;
    text-decoration: none;
    color: #777777;
    padding-bottom: 0.12em;

    background-image: linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 100%);
    background-size: 0% 0.1em;
    background-position: 0 100%;
    background-repeat: no-repeat;

    transition: background-size 400ms ease;
}

nav a:hover {
    background-size: 100% 0.1em;
}

/* Main content */

.main {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 90%;
    margin-top: 150px;
}

.section {
    display: flex;
    flex: 1;
    margin-bottom: 100px;
    scroll-margin-top: 8rem;
}

.vertical-header {
    border-right: 1px solid #929AAB;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: auto;
}

.vertical-header-paragraph {
    transform: rotate(180deg);
    writing-mode: vertical-rl;
    font-size: 2rem;
    font-weight: 900;
}

/* Intro */

.intro {
    padding-left: 80px;
    display: flex;
}

.intro img {
height: 250px;
border-radius: 50%;
}

#intro-text {
    padding-left: 50px;
}

/* Web disign section */

.web-design-content {
    display: grid;
    align-items: center;
    gap: 25px;
    padding-left: 50px;
    width: 100%;
    grid-template-columns: 350px 350px;
}

.web-design-card {
    display: flex;
    flex-direction: column;
    width: 350px;
    height: 200px;
    align-items: center;
    justify-content: center;
}

.web-design-img {
    height: auto;
    width: 100%;
    border-radius: 5px;
    margin-bottom: 5px;
}

.web-design-img, .art-img {
    filter: drop-shadow(-3px 3px 3px #cccccc);
    transition: transform 0.3s ease;
}

.web-design-img:hover, .art-img:hover {
    transform: translate(5px, -5px);
}

.web-design-card p {
    margin: 0;
    padding-top: 5px;
    align-self: flex-start;
}

/* art section */

.art-content {
    display: grid;
    grid-template-columns: repeat(3, 300px);
    grid-template-rows: repeat(2, 400px);
    gap: 25px;
    padding-left: 50px;
    width: 100%;
}

.art-img {
    max-width: 100%;
    height: 400px;
    cursor: pointer;
}

/* footer */

footer {
    background-color: #040D12;
    height: 100px;
    width: 100%;
    flex-shrink: 0;
    color: #DDE6ED;
    padding: 10px 80px;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

footer a {
    color: #DDE6ED;
    text-decoration: none;
}

footer a:visited {
    color: #DDE6ED;
}

footer p {
    margin: 0;
}

#email-img {
    height: 20px;
    margin-right: 5px;
}

button {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    background-color: rgba(0, 0, 0, 0);
    border: none;
    color: #DDE6ED;
    font-family: Inter, sans-serif;
    cursor: pointer;
}

#contacts {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#contacts a {
    margin-top: 5px;
}

.social-icon {
    height: 20px;
    margin-right: 5px;
}

#social {
    display: flex;
    margin-top: 5px;
    width: 100%;
    justify-content: flex-start;
}



/* Lightbox */

#lightbox {
    width: 100%;
    height: 100%;
    position: fixed;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
}

#lightbox.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

#lightbox img{
    height: 90%;
}

/* Media breakpoints */

@media (max-width: 870px) {

    * {
        margin: 0;
        padding: 0;
    }

    .main {
        width: 100%;
    }

    #intro {
        padding-left: 0;
        align-items: center;
        justify-content: center;
    }

    #intro-text {
        padding: 0 10px;
    }

    #intro-text h2{
        margin: 0.83em 0;
    }

    .intro img {
        height: 100px;
    }

    .web-design-content, .title, .web-design{
        display: block;
        width: 100%;
    }

    nav {
        margin-left: 0;
        justify-content: center;
    }

    nav li{
        list-style: none;
    }

    .section {
        flex-direction: column;
        justify-content: center;
    }

    .vertical-header {
        border: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: auto;
        text-align: center;
    }

    .vertical-header-paragraph {
        transform: rotate(0deg);
        writing-mode: horizontal-tb;
        font-size: 2rem;
        font-weight: 900;
        margin-bottom: 20px;
    }

    .title {
        padding: 0;
        justify-content: center;
    }

    .title-name {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        padding: 5px 10px;
    }

    .title h2 {
        align-self: center;
    }
    
    .web-design-card {
        margin-bottom: 20px;
    }

    .web-design-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 0;
    }

    .art-content {
        padding: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin-bottom: 10px;
    }

    footer {
        height: 100%;
        width: 100%;
        justify-content: center;
        align-items: center;
        padding: 5px 0;
        text-align: left;
        font-size: 0.8rem;
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        justify-content: space-evenly;
        margin-left: 10px;
    }

    .footer-content *{
        padding: 2px 0;
    }
}

#email {
    padding: 0;
    margin-right: 5px;
}

@media (max-width: 1100px) {
    .art-content {
        grid-template-columns: repeat(2, 300px);
        grid-template-rows: repeat(3, 400px);
    }
}