/* –––––––––––––––––––– */
/* Foundation */
/* –––––––––––––––––––– */

:root{
    --col-primary: #fefaf6;
    --col-secondary: #fff;
    --color-black: #000;
    --color-white: #fff;
    --color-grey: #333;
    --color-light-grey: #646464;
}

html {
    scroll-behavior: smooth;
}

body {
    font: 1rem/1.5 "Work Sans", sans-serif;
    margin: 0;
}

img{
    vertical-align: middle;
}

p{
    max-width: 60ch;
}

h1{
    font-size: calc(2rem + 2vw);
    line-height: 1;
    font-weight: 300;
    margin: 2rem 0;
}

h2{
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 2rem
}

h3{
    font-size: 1.8rem;
    font-weight: 300;
}

a{
    color: inherit;
}

/* –––––––––––––––––––– */
/* Navigation */
/* –––––––––––––––––––– */

nav {
    border-bottom: 1px solid #e3e3e3;
}

nav ul{
    background: var(--col-primary);
    
    display: flex;
    list-style: none;
    font-size: 1.3rem;
    margin: 0;
    padding: 0;
}

nav a {
    display: block;
    padding: calc(1rem + 1vw);
    color: var(--color-grey);
    text-decoration: none;
}

nav a:hover,
nav a:focus {
    text-decoration: underline;
}

nav ul li:nth-child(4){
    margin-left: auto;
}

@media only screen and (max-width: 600px) {
    nav ul{
        font-size: calc(0.75rem + 1vw);
        justify-content: space-around;
    }

    nav ul li:nth-last-child(1), nav ul li:nth-last-child(2){
        display: none;
    }
}

/* –––––––––––––––––––– */
/* Sectioning */
/* –––––––––––––––––––– */

section{
    background: var(--col-primary);
    padding: calc(4rem + 2vh) 5%;
}

section:nth-child(even){
    background: var(--col-secondary);
}

.container{
    max-width: 1380px;
    margin: auto;
}

.container.intro{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.container.intro p{
    font-size: 1.25rem;
    font-weight: 300;
    margin: 1rem 0 2rem;
}

.container.intro img{
    border-radius: 15px;
}

@media only screen and (max-width: 600px) {
    .container.intro img{
        order: -1;
    }
}

footer{
    padding: calc(1.5rem + 1vw);
    text-align: center;

    background: var(--col-primary);
}

footer p{
    max-width: inherit;
}

/* –––––––––––––––––––– */
/* Experience */
/* –––––––––––––––––––– */

dt h4, dt small{
    font-size: 1.125rem;
    padding: 0;
    margin: 0;
    display: block;
}

dt small{
    color: var(--color-light-grey);
    font-size: 0.87rem;
}

dd{
    padding: 0.5rem 0;
    margin: 0 0 2rem;
}

/* –––––––––––––––––––– */
/* Portfolio */
/* –––––––––––––––––––– */

.portfolio-item{
    width: 250px;
}

.portfolio-item img{
    width: 250px;
    height: 200px;
    object-fit: cover;
    border-radius: 3px;
    margin: 1rem 0;
}

.portfolio-item img.align-btm{
    object-position: bottom;;
}

.portfolio-item strong, .portfolio-item p{
    margin: 0;
    display: block;
}

/* –––––––––––––––––––– */
/* Flexing */
/* –––––––––––––––––––– */

.flex{
    display: flex;
    flex-wrap: wrap;
}

.flex.portfolio{
    gap: 1.25rem;
    flex-wrap: wrap;

    margin-top: 1rem;
}

.grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(5rem + 5vw);
}

@media only screen and (max-width: 600px) {
    .grid{
        grid-template-columns: 100%;
    }    
}

/* –––––––––––––––––––– */
/* Buttons */
/* –––––––––––––––––––– */

a.button{
    display: inline-block;
}

.button{
    border: 1px solid rgba(0,0,0,0.5);
    border-radius: 0.5rem;
    
    color: var(--color-black);
    background: transparent;
    
    font: inherit;
    font-size: 0.875rem;
    vertical-align: middle;
    text-decoration: none;

    padding: 0.8rem 1rem;
    cursor: pointer;

    transition: .15s;
}

.button:is(:hover, [aria-selected="true"]) {
    color: var(--col-secondary);
    background: var(--color-grey);
}

.button:is(:hover, [aria-selected="true"]) img {
    filter: invert(1);
}

.button:active{
    transform: translateY(1px);
}

.button-group{
    position: relative;
}
.button-group core-tabs {
    white-space: nowrap;
    display: block;
    overflow-x: auto;
    padding-right: 4rem;
}

.button-group::after{
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 4rem;
    background: linear-gradient(to right, rgba(255,255,255,0), #fefaf6);
    pointer-events: none;
}