:root {

    /* Colours */

    --colour-primary:    113, 193, 192;
    --colour-dark:       3, 3, 3;
    --colour-medium:     117, 116, 116;
    --colour-light:      248, 245, 240;
    --colour-display:    233, 233, 232;

    --theme-primary:    rgb(var(--colour-primary));
    --theme-dark:       rgb(var(--colour-dark));
    --theme-medium:     rgb(var(--colour-medium));
    --theme-light:      rgb(var(--colour-light));

    /* Fonts */

    --font-body:        'Lato', 'Trebuchet', 'Helvetica', 'Arial';
    --font-heading:     'Poppins', Arial, Helvetica, sans-serif;
    --font-display:     'Baloo Tammudu 2', 'Trebuchet', 'Helvetica', 'Arial';
    --font-cursive:     'Lora', Georgia, Times, serif;
    
    font-family:        var(--font-body);
    font-size:          1.3rem;
    color:              var(--theme-dark);

    --gutter:           1em;
    --gutter-half:      calc( var(--gutter) / 2 );
    --gutter-third:     calc( var(--gutter) / 3 );
    --gutter-quarter:   calc( var(--gutter) / 4 );
    --gutter-double:    calc( var(--gutter) * 2 );
    --gutter-triple:    calc( var(--gutter) * 3 );
}

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

html, body {
    overflow: hidden;
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    text-align: center;
    background: var(--theme-light) url('../img/treeline.png') left bottom repeat-x;
    background-attachment: fixed;
    
    height: 100vh;
    overflow-x: hidden;
    overflow-y: scroll;
    scroll-behavior: smooth;
}

::selection,
::-moz-selection {
    color: var(--theme-light);
    background-color: var(--theme-dark);
}

/* Global Elements */

h1, h2, h3, h4 {
    margin:0;

    line-height: 1.2;
}

h1 {
    display: flex;
    flex-direction: column;

    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 4rem);
    font-weight: 100;
    text-transform: uppercase;    
}

    h1 span {
        display: inline-block;
        margin-top: var(--gutter-third);
        padding-top: var(--gutter-half);
        border-top: 1px solid var(--theme-dark);

        font-family: var(--font-display);
        font-size: 80%;    
        font-weight: 500; 
    }
    
h2 {
    margin-bottom: var(--gutter-half);

    
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 5rem);
    font-weight: 200;    
}

h3 {
    margin-bottom: var(--gutter);

    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.2vw, 3.2rem);
    font-weight: 700;    
}

h4 {
    margin: var(--gutter) 0 0;

    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2vw, 3rem);
    font-weight: 700;    
}

p {
    margin: var(--gutter) 0 0;

    font-size: clamp(1rem, 2.7vw, 1.7rem);  
}

p + * {
    margin-top: var(--gutter);
}

img {
    display: block;
    width: 100%;
    border-style: none;
}

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

    .ul-inline li {
        display: inline-block;
    }

a {
    display: inline-block;
    padding: 0 var(--gutter-quarter);
    text-decoration: none;
    color: inherit;
    background-color: transparent;
    transition: color 0.5s linear, 
                background 0.5s linear;
}

    a:hover,
    a:active {
        color: var(--theme-light);
        background-color: rgba(var(--colour-dark), 0.8);
    }

strong {
    font-family: var(--font-display);
}

small {
    margin-top: var(--gutter);
}

aside {
    font-family: var(--font-cursive);
    font-size: 80%;
}


/* Nav elements */

nav {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    background-color: var(--theme-dark);
    z-index: 9999;
    box-shadow: 0px 0px 8px 2px var(--theme-dark);
}

    nav li {
        display: inline;
    }

    nav a {
        display: inline-block;
        padding: 0 var(--gutter-third);

        font-size: 0.8em;
        font-family: var(--font-display);
        color: var(--theme-light);
    }

    nav a:hover,
    nav a:active {
        color: var(--theme-primary);
    }

a[class*='arrow'] {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.9;
    transition: background 0.3s linear, color 0.3s linear;
}

    a[class*='arrow']::before {
        width: 1em;
        height: 1em;
        font-family: var(--font-heading);
        font-size: 2rem;
        font-weight: 600;
    }

    a[class*='next']::before,
    a[class*='prev']::before {
        line-height: 1;
    }
    
    .arrow-prev,
    .arrow-next {
        position: absolute;
    }

    .arrow-prev {
        left: 0;
    }

    .arrow-next {
        right: 0;
    }

        .arrow-prev::before {
            content: '<';
        }

        .arrow-next::before {
            content: '>';
        }

    .disabled {
        pointer-events: none;
        cursor: default;
        color: var(--theme-medium);
    }

/* Framework */

main {
    display: block;
}

section {
    position: relative;
}    

.section-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    min-height: 100vh;
    width: min(100%, 55em); 
    margin: 0 auto;
    padding: min(10vw, var(--gutter-triple)) min(10vw, var(--gutter-triple));
}

/* Theme */

.theme-primary {
    background-color: rgba(var(--colour-primary), 0.9);
}

.theme-dark {
    background-color:  rgba(var(--colour-dark), 0.9);
    color: var(--theme-light);
}

    .theme-dark img[src*='logo'] {
        filter: invert(100%) 
                brightness(200%) 
                opacity(70%);
    }

.theme-light .section-wrapper > * {
    align-self: center;
    padding: 0 var(--gutter-third);
    background-color: rgba(var(--colour-light), 0.8);
}

.theme-background {
    background: rgba(var(--colour-primary), 0.9) url('../img/treeline.png') 100% 120% repeat-x;
    background-blend-mode: multiply;
    background-size: auto 65%;
}

/* Global styles */

.avatar {
    width: 150px;
    margin: var(--gutter-half) auto;

    background-color: var(--theme-dark);
    border-radius: 100%;
    border: 0.4em solid var(--theme-dark);
}

/* Feedback */

.feedback img {
    max-width: 425px;
    margin: 0 auto;
}

blockquote {
    margin: 0;
    padding: var(--gutter) 0;

    font-family: var(--font-cursive);
    font-size: clamp(1.3rem, 3.5vw, 1.7rem);
    line-height: 1.2;    
}

    blockquote strong {
        color: var(--theme-primary);
    }

    blockquote::before,
    blockquote::after {
        position: relative;
        opacity: 0.9;

        line-height: 1;
    }

    blockquote::before {
        content: '\201c';
        left: -5px;
    }

    blockquote::after {
        content: '\201d';
        right: -5px;
    }

figcaption {
    margin-top: var(--gutter);

    font-size: 80%;
}

/* Gallery */

.gallery-viewport {
    display: flex;
    width: 99vw;
    height: 100vh;
    overflow: scroll;
    scroll-behavior: smooth;
    touch-action: auto;
    -ms-touch-action: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#gallery-viewport::-webkit-scrollbar {
    display: none;
  }

.project {
    position: relative;
    flex: 0 0 100%;
    display: flex;
    justify-content: center;
}

.project > * {
    align-self: center;
}

    .project-image img {
        width: auto;
        max-width: 90vw;
        max-height: 75vh;
    }

/* Skills */

.list-skills {
    font-family: var(--font-heading);
    font-weight: 200;
    font-size: clamp(1rem, 6vw, 2.3rem);
}

    .list-skills li:nth-child(even) {
        color: var(--theme-light);
    }

    .list-skills li + li::before {
        content: '+';
        margin-right: var(--gutter-half);
        color: var(--theme-medium);
    }


/* Agencies */

.list-agencies li {
    width: clamp(19vw, 100%, 13em);
}


/* Contact */

.contact-details {
    margin-top: var(--gutter);
}

    .contact-details li + li {
        margin-top: var(--gutter-quarter);
    }

    .contact-details a {
        font-size: clamp(1.1rem, 2vw, 1.4rem);
        line-height: 1.2;
    }

#contact .avatar {
    background: url(../img/avatar-alt.png) center center no-repeat;
    background-size: contain;
}

#contact .avatar img {
        opacity: 1;
        transition: all 0.3s linear;
    }

    #contact .avatar:hover img {
        opacity: 0;
    }