* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}
/* family=Oranienbaum&family=Roboto */

:root {
    --text: black;
    --description-text: hsl(from var(--text) h s 40);
    --bg: white;
    --primary: #0891b2;
    --shadow: 2px 2px 10px grey;
    --sans-serif-font: "Roboto", serif;
    --serif-font: "Oranienbaum", serif;
    --std-padding: 40px 80px;
}

.container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.diagonal-box {
    --diag-box-translate: 50vh;
    --diag-box-skew: 14deg;
    position: absolute;
    isolation: isolate;
    width: 100vw;
    height: 100vh;
    background: var(--primary);
    transform: translateY(calc(var(--diag-box-translate) * -1))
        skewY(calc(var(--diag-box-skew) * -1));
    z-index: -1;
}

header {
    padding: 80px 80px;
}

.about-me {
    background: var(--bg);
    box-shadow: var(--shadow);

    padding: 30px 60px;
}

.about-me .photo {
    /* should change with breakpoint for responsiveness */
    position: relative;
    display: flex;
    justify-content: center;
}

.about-me img {
    max-width: 350px;
    object-fit: cover;
}

.about-me .name {
    position: absolute;
    bottom: 0px;
    color: #000;
    text-align: center;
    text-shadow: 2px 2px 4px white;
    font-size: 3em;
}

.about-me .title {
    font-family: var(--serif-font);
    font-size: 3rem;
    padding: 10px 0;
}

.about-me .description {
    font-family: var(--sans-serif-font);
    color: var(--description-text);
    font-size: 1.2rem;
    line-height: 1.7;
    flex: 1;
}

.social-links {
    display: flex;
    flex-direction: row;
    justify-content: end;
    gap: 8px;
}

/*main content*/
main {
    padding: var(--std-padding);
}

.works .title {
    font-family: var(--serif-font);
    font-size: 3rem;
    padding: 10px 0;
}

.works .projects {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 40px;
}

.works .project {
    box-shadow: var(--shadow);
}

.project .project-img {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
}

.project .project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project .project-desc-container {
    display: grid;
    gap: 20px;
    padding: 20px 30px;
}

.project-desc-container .project-title {
    display: flex;
}

.project-title .project-name {
    flex: 1;
    font-size: 2rem;
    font-family: var(--serif-font);
}

.project-title .links {
    display: flex;
    flex-direction: row;
}

.project-desc-container .desc {
    color: var(--description-text);
    font-family: var(--sans-serif-font);
    line-height: 1.5;
}

/* footer */
footer {
    --text: white;
    background: var(--primary);
    color: var(--text);
    padding: var(--std-padding);
}

.contact {
    display: flex;
    gap: 20px;
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    font-family: var(--sans-serif-font);
    font-weight: 400;
    gap: 20px;
}

.contact .title {
    font-size: 3rem;
    font-family: var(--serif-font);
}

.contact img {
    max-width: 600px;
    height: 100%;
    object-fit: cover;
}

.contact .social-links {
    display: flex;
    justify-content: start;
}

.phone svg,
.mail svg {
    fill: white;
}

.phone-icon,
.mail-icon {
    line-height: 0;
}

.phone,
.mail {
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact .contact-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

svg {
    height: 30px;
    width: 30px;
}

/* for mobile */
@media (max-width: 699px) {
    .diagonal-box {
        --diag-box-skew: 28deg;
    }

    .container {
        --std-padding: 40px 40px;
    }

    header {
        padding: 80px 40px;
    }

    .about-me {
        background: none;
        box-shadow: none;
        padding: 0;
    }

    .social-links {
        justify-content: center;
    }

    .about-me img {
        height: 500px;
    }

    footer {
        padding: 0;
    }

    .contact {
        flex-direction: column;
    }

    .contact .content {
        padding: var(--std-padding);
    }

    .contact img {
        max-width: 100%;
        height: 500px;
        /* to remove that gap at the bottom */
        display: grid;
    }

    .contact-info svg {
        display: none;
    }

    .phone,
    .mail {
        gap: 0;
    }
}

/* for tablets */
@media (min-width: 700px) and (max-width: 1050px) {
    .diagonal-box {
        --diag-box-skew: 18deg;
        --diag-box-translate: 70vh;
    }

    .about-me .photo {
        float: left;
        transform-origin: bottom right;
        transform: translateX(-11%) scale(1.2);
    }

    .about-me .content {
        display: inline;
    }

    .photo .name {
        top: 0;
        transform: translate(90%, -2%);
    }

    .about-me .social-links {
        visibility: hidden;
    }

    .contact img {
        max-width: 250px;
    }
}

/* use flex for pcs */
@media (min-width: 1051px) {
    .about-me {
        display: flex;
        gap: 20px;
    }
    .about-me .content {
        display: flex;
        flex-direction: column;
    }
    .about-me .content .description {
        flex: 1;
    }
    .about-me .photo {
        padding-left: 40px;
    }
    .photo {
        transform-origin: right;
        transform: scale(1.4);
    }
}

a {
    transition: transform 0.2s;
}

a:hover {
    transform: scale(1.1) rotate(-20deg);
}

a:active {
    transform: scale(0.9) rotate(20deg);
}
