@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --ink: #111;
    --muted: #555;
    --paper: #ffffff;
    --bg: #f6f6f6;

    --teal: teal;
    --shadow: rgba(0, 0, 0, 0.15) 0px 10px 20px, rgba(0, 0, 0, 0.1) 0px 6px 6px;

    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2rem;
    --space-5: 3rem;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.5;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

img {
    max-width: 100%;
    display: block;
}

h1,
h2,
h3,
p {
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: min(1100px, 100% - 2rem);
    margin: 0 auto;
}

h1 {
    font-size: 2.25rem;
    line-height: 1.1;
    letter-spacing: 0.5px;
    font-family: "Playfair Display", serif;
}

h2 {
    font-size: 2rem;
    line-height: 1.15;
    font-family: "Playfair Display", serif;
    font-weight: 500;
}

h3 {
    font-size: 1.1rem;
    line-height: 1.2;
    font-family: "Playfair Display", serif;
    font-weight: 400;
}

p {
    color: var(--muted);
}

.site-header {
    position: relative;
    padding: var(--space-5) 0;
}

.site-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 450px;

    background: var(--teal);

    clip-path: polygon(
        0 0,
        100% 0,
        100% 50%,
        0 100%
    );

    z-index: -1;
}

.header-grid {    
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    align-items: center;
}

.hero-media {
    position: relative;
    width: min(320px, 100%);
}

.hero-photo {
    box-shadow: var(--shadow);
}

.hero-photo-tablet {
    display: none;
}

.hero-name {
    position: absolute;
    left: 1.4rem;
    bottom: 1rem;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

.about-card {
    padding-top: var(--space-3);
    width: min(400px, 80vw);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-card p {
    margin-top: var(--space-3);
}

.social-row {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-3);
}

.social-row a {
    display: inline-flex;
    width: 32px;
    height: 32px;
}

.social-row a:hover {
    opacity: 0.5;
}

.work {
    padding: var(--space-5) var(--space-3);
    padding-bottom: 5rem;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-5);
    margin-top: var(--space-3);
}

.project-card {
    background: var(--paper);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.project-shot {
    background-color: var(--teal);

    aspect-ratio: 16 / 9;
    padding: 0;
    display: grid;
    place-items: center;

    color: #fff;
}

.project-body {
    padding: var(--space-3);
}

.project-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.project-title {
    padding-left: 0.5rem;
}

.project-links {
    display: flex;
    gap: var(--space-2);
}

.project-links a {
    display: inline-flex;
    width: 1.5rem;
    height: 1.5rem;
}

.project-links a:hover {
    opacity: 0.5;
}

.project-desc {
    margin-top: var(--space-2);
}

.contact {
    background: var(--teal);
    color: #fff;
    padding: var(--space-5) var(--space-3);
    padding-bottom: 0;
}

.contact-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.contact-text h2 {
    text-align: center;
    margin-bottom: var(--space-4);
}

.contact-text p:nth-of-type(1){
    font-size: 1.25rem;
    line-height: 1.25;
}

.contact p,
.contact li {
    color: #fff;
}

.contact-address {
    margin-top: var(--space-3);
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: var(--space-3) 0;
}

.contact-list li {
    display: flex;
    gap: .5em;
    align-items: center;
    padding: .3em 0;
}

.contact-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: #fff;
    fill: currentColor;
}

.contact .social-row {
    margin-top: var(--space-5);
    justify-self: center;
    color: black;
}

.contact-media {
    margin-inline: calc(50% - 50vw);
}

.contact-photo {
    width: 100%;
    height: min(640px, 60vh);
    object-fit: cover;
    object-position: center;
}

@media (min-width: 768px) {
    .about-card {
        background: var(--paper);
        box-shadow: var(--shadow);
        padding: var(--space-4);
    }

    .work {
        padding: var(--space-5);
        padding-bottom: 7rem;
    }

    .container h2 {
        align-self: flex-start;
    }

    .contact {
        padding-bottom: var(--space-5);
    }

    .contact-grid {
        flex-direction: row;
        align-items: stretch;
    }

    .contact-text {
        flex: 1;
    }

    .contact-text h2 {
        text-align: start;
        margin-bottom: var(--space-3);
    }

    .contact .social-row {
        justify-self: flex-start;
    }

    .contact-media {
        flex: 1;
        margin-inline: 0;
    }

    .contact-photo {
        height: 100%;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-photo,
    .site-header .social-row {
        display: none;
    }

    .about-card {
        display: flow-root;
        position: relative;
        width: 72vw;
        margin: 6rem auto 0;
        padding: 5rem var(--space-5);
    }

    .about-card p {
        line-height: 1.75;
    }

    .hero-photo-tablet {
        display: block;
        float: left;

        width: 280px;
        height: 300px;
        object-fit: cover;

        box-shadow: var(--shadow);

        margin: -150px 25px 20px -100px;
    }
    
    .hero-name {
        inset: 3.3rem auto auto 5rem;
        font-size: 3rem;
        z-index: 1;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-5);
    }
}

@media (min-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .header-grid {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: var(--space-5);
    }

    .hero-media {
        width: 380px;
        flex: 0 0 auto;
        z-index: 1;
    }

    .hero-photo {
        width: 100%;
        height: 420px;
        object-fit: cover;
        object-position: center;
    }

    .hero-name {
        left: auto;
        right: 1.2rem;
    }

    .about-card {
        display: flex;
        flex-direction: column;

        max-width: 500px;
        flex: 1;
        transform: translateX(-55px);
    }

    .site-header .social-row {
        align-self: flex-end;
    }
}