
/* ========================================
   RESET
======================================== */

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


/* ========================================
   BASE STYLES
======================================== */

body {
    color: #000;
    font-family: 'Open Sans', sans-serif;
    font-size: 1em;
    font-weight: 400;
    line-height: 1.8;
    margin: 0;
    padding: 0;
}


/* Typography */

h1,
h2,
h3 {
    font-family: 'Playfair Display', serif;
    line-height: 1.4;
    margin: 0 0 1.8rem 0;
    padding:0;
}

h1 {
    font-size: 3rem;
    max-width: 560px;
    margin: auto 0;
}

h2 {
    font-size: 2.4rem;
}

p {
    margin-bottom: 1.8rem;
    padding: 0;
}


/* Lists */

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

li {
    margin-bottom: 0.5rem;
}


/* Links */

a {
    color: #000;
    text-align: center;
}

.portfolio a {
    background: #000;
    border-radius: 2px;
    color: #fff;
    display: inline-block;
    min-width: 246px;
    padding: 0.5rem 2rem;
    text-decoration: none;
}


/* ========================================
   LAYOUT
======================================== */

/* Main content container */

.maxwidth {
    margin: 0 auto;
    max-width: 1080px;
    padding: 0 2em;
}


/* Sections */

section {
    padding-bottom: 3rem;
}

section:last-of-type {
    border-bottom: 1px solid #000;
    padding-bottom: 3em;
}


/* Two-column layout */

.twocolthird {
    align-items: start;
    display: grid;
    gap: 40px;
    grid-template-columns: 360px 1fr;
    margin-top: 3rem;
}

.twocolthird > h2 {
    align-self: center;
}

.twocolthird p:last-child{ 
    margin-bottom: 0;
}


/* Centred heading layout */

.layoutCenter h2 {
    margin-top: 3rem;
    text-align: center;
}


/* ========================================
   HEADER
======================================== */

#header {
    background-color: #000;
    background-image: url(../i/face.jpg);
    background-position: right calc(50vw - 900px) top -10px;
    background-repeat: no-repeat;
    background-size: auto 720px;
    color: #fff;
    
}

#header .maxwidth {
    min-height: 600px;
    padding: 2em 2em 3em;
    display: flex;
    flex-direction: column;
}

#header img {
    width: 120px;
}

#header img:nth-of-type(1){
    display:block;
}

#header img:nth-of-type(2){
    display:none;
}

/* ========================================
   CONTENT
======================================== */

/* Images */

#content p.image img {
    display: block;
    width: 100%;
}


/* Bordered images */

p.image {
    border-bottom: 1px solid #000;
    border-top: 1px solid #000;
    margin: 0;
    padding: 0 1rem;
    text-align: center;
}


/* ========================================
   LOGO GALLERY
======================================== */

/* Horizontal scrolling list */

.gallery ul {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    overflow-x: scroll;
    padding-bottom: 1rem;
    scrollbar-color: #555 #eee;
    scrollbar-width: thin;
}


/* Individual logo containers */

.gallery li {
    align-items: center;
    border: 1px solid #000;
    border-radius: 2px;
    display: flex;
    flex-shrink: 0;
    height: 4rem;
    justify-content: center;
    width: 10rem;
}


/* Logos */

.gallery img {
    display: block;
}


/* ========================================
   FOOTER
======================================== */

#footer {
    background: url(../i/footer.svg) no-repeat 50% 5rem;
    display: flow-root;
}

#footer > div {
    background: url(../i/cat.svg) no-repeat 2em 0.8rem;
    padding: 6rem 2em 3rem;
}


/* Footer typography */

#footer li {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: bold;
}


/* Footer contact icons */

#footer .tel,
#footer .email,
#footer .linkedin {
    padding-left: 32px;
}

#footer .tel {
    background: url(../i/tel.svg) no-repeat 0 50%;
}

#footer .email {
    background: url(../i/email.svg) no-repeat 0 50%;
}

#footer .linkedin {
    background: url(../i/linkedin.svg) no-repeat 0 50%;
}

#footer .linkedin a {
    text-decoration: none;
}


/* ========================================
   MOBILE
======================================== */

@media (max-width: 768px) {


    /* Typography */

    h1 {
        color: #000;
        margin: 4rem 0 4rem;
    }

    h2 {
    }

    /* Layout */

    .twocolthird {
        display: block;
        grid-template-columns: none;          
    }


    /* Header */

    #header {
        background:none;
        margin-bottom: 0;
    }
    
    #header .maxwidth {
        min-height: auto;  
        padding-bottom:0;
        display: block;
    }
    
    #header #portrait{
        border-top: 1px solid #000;
        border-bottom: 1px solid #000;
        overflow: hidden;
        overflow: clip;
        position: relative;
        text-align: center;
    }
    
    #header #portrait div{
        background: url(../i/face.jpg) no-repeat 100% 0 #000;
        background-size: auto 302px;
        height: 302px;
    }
    
    #header img:nth-of-type(1){
        display:none;
    }

    #header img:nth-of-type(2){
        display:block;
    }
    
    .twocolthird {
    }

    /* Content images */

    #content p.image {
        height: 302px;
        overflow: hidden;
        overflow: clip;
        position: relative;
        text-align: center;
    }

    #content p.image img {
        height: 300px;
        width: auto;
        max-width: none;
        left: 50%;
        position: absolute;
        transform: translateX(-50%);
    }
    
    .layoutCenter h2 {
        text-align: left;
    }

    /* Footer */

    #footer > div {
        padding-top: 11rem;
    }

}
