@import url('https://fonts.googleapis.com/css?family=Poppins:200,300,400,500,600,700,800,900&display=swap');

:root {
    --showcasePadding: 3vw;
    --backgroundColor: #111;
    --offTextColor: #eee;
    --textColor: #fff;
    --topBarHeight: 7vh;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    color: var(--textColor);
}

body {
    width: 100%;
    min-height: 100vh;
}

ul {
    list-style: none;
}

h2 {
    font-size: 5em;
    font-weight: 500;
    line-height: 1em;
    text-transform: uppercase;
}
h3 {
    font-size: 4em;
    font-weight: 300;
    line-height: 1em;
    text-transform: uppercase;
}
h4 {
    font-size: 3em;
    font-weight: 500;
    line-height: 1em;
    text-transform: uppercase;
}

/* LOADING SCREEN */
.splash {
    background: var(--backgroundColor);
    z-index: 102;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
}
.splash.hidden {
    z-index: -100;
    transition: 0.25s;
    opacity: 0;
}

/* BACKGROUND */
.background {
    background: var(--backgroundColor);
    position: fixed;
    width: 100%;
    height: 100vh;
}

/* TOPBAR */
#topbar {
    background: var(--backgroundColor);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    width: 100%;
    height: var(--topBarHeight);
    z-index: 101;
    user-select: none;
    transition: box-shadow 0.25s;
}
#topbar.scrolled {
    box-shadow: 0 2px 16px rgba(0,0,0,0.7);
}

.logo {
    display: flex;
    width: fit-content;
    align-items: center;
    padding: 0 var(--showcasePadding);
}
.logo a { text-decoration: none; }
.logo-img {
    height: 4vh;
    width: auto;
    display: block;
}
.logo-text {
    display: none;
    font-family: 'Poppins', sans-serif;
    font-weight: 200;
    font-size: 0.85em;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--textColor);
}

/* HAMBURGER */
#nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.75em;
    margin-left: auto;
    margin-right: var(--showcasePadding);
}
#nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--textColor);
    transition: transform 0.25s, opacity 0.25s;
}
#topbar.nav-open #nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#topbar.nav-open #nav-toggle span:nth-child(2) { opacity: 0; }
#topbar.nav-open #nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* MENU */
.menu {
    display: flex;
    align-items: center;
    max-width: 60em;
    padding: 0 var(--showcasePadding);
    margin-left: auto;
    margin-right: 0;
}
.menu ul {
    display: flex;
    justify-content: flex-end;
    flex-direction: row;
    flex-grow: 1;
    flex-basis: 0;
    gap: 2.5em;
}
.menu ul li {
    list-style: none;
    transition: 0.25s;
}
.menu ul li.selected {
    background: var(--offTextColor);
}
.menu ul li:hover {
    background: var(--textColor);
    cursor: pointer;
}
.menu ul li:hover a {
    color: var(--backgroundColor);
}
.menu ul li a {
    text-decoration: none;
    font-size: 1em;
    transition: 0.25s;
}

.butTxt-hid {
    all: unset;
    padding-left: 1em;
    padding-right: 1em;
}
.butTxt-hid.selected {
    color: var(--backgroundColor);
}

/* HOME PAGE */
#showcase {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    top: var(--topBarHeight);
    width: 100%;
    min-height: calc(100vh - var(--topBarHeight));
    padding: var(--showcasePadding);
}
#showcase p {
    font-size: 1.1em;
    margin: 3em 0;
    font-weight: 400;
    max-width: 60em;
}
#showcase .txtBut {
    max-width: 60em;
}
.butShow {
    display: flex;
    align-items: center;
    font-size: 1em;
    border: #fff;
    padding: 10px 30px;
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 500;
    margin-top: 10px;
    letter-spacing: 2px;
    transition: 0.2s;
}
.butShow:hover {
    background: #fff;
    color: #111;
    letter-spacing: 3px;
}

/* SOCIALS */
#social {
    position: absolute;
    display: flex;
    justify-content: space-between;
    bottom: 0;
    left: 0;
    margin-bottom: var(--showcasePadding);
    margin-left: var(--showcasePadding);
    width: 6em;
    z-index: 10;
}
.butSocial {
    list-style: none;
    width: 2em;
    transform: scale(1);
    transition: 0.5s;
}
.butSocial:hover {
    transform: scale(1.2);
}

@media (max-width: 700px) {
    :root {
        --topBarHeight: 8vh;
        --showcasePadding: 1.25rem;
    }

    /* NAV */
    #nav-toggle { display: flex; }
    .logo-img { display: none; }
    .logo-text { display: flex; align-items: center; }
    .menu {
        position: fixed;
        top: var(--topBarHeight);
        left: 0;
        width: 100%;
        max-width: 100%;
        margin: 0;
        background: var(--backgroundColor);
        padding: 0.5em 0 1.5em;
        box-shadow: 0 4px 16px rgba(0,0,0,0.7);
        opacity: 0;
        pointer-events: none;
        visibility: hidden;
        transform: translateY(-4px);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s 0.2s;
        z-index: 100;
    }
    #topbar.nav-open .menu {
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
        transform: translateY(0);
        transition: opacity 0.2s ease, transform 0.2s ease;
    }
    .menu ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }
    .menu ul li {
        width: 100%;
        background: none !important;
    }
    .menu ul li.selected { background: var(--offTextColor) !important; }
    .menu ul li a { display: block; padding: 0.85em 1.25rem; }
    .butTxt-hid { padding: 0; }

    /* TYPOGRAPHY */
    h2 { font-size: 1.25em; }
    h3 { font-size: 1em; }
    h4 { font-size: 1.5em; }

    /* PORTFOLIO GRID */
    #portfolio ul { grid-template-columns: 1fr; grid-template-rows: none; height: auto; gap: 2px; }
    #portfolio ul li button { height: auto; }
    #portfolio ul li button img { height: 28vh; }
    #portfolio ul li button h4 { font-size: 1em; }

    /* PIECE IMAGES */
    #piece ul li img { max-width: 90vw; }

    /* PROJECTS */
    .projects-gallery {
        grid-template-columns: 1fr !important;
        padding-left: var(--showcasePadding) !important;
        padding-right: var(--showcasePadding) !important;
    }
    .projects-gallery .featured { width: 100% !important; }

    /* HOME */
    .logo-intro { display: none; }
    #showcase { position: relative; z-index: 1; top: auto; min-height: 0; padding: 1rem var(--showcasePadding) 0.5rem; }
    #showcase h2 { margin-bottom: 0.35em; }
    #showcase h3 { font-weight: 400; }
    #showcase p  { font-size: 0.65em; margin: 0.5em 0; line-height: 1.6; }
    .butShow { padding: 8px 16px; letter-spacing: 1px; }
    #social { position: relative; bottom: auto; left: auto; margin: 0.75em 0 1em var(--showcasePadding); width: 3.5em; }
    .butSocial { width: 1.25em; }
}

/* PORTFOLIO GRID */
.hiddenBut {
    background: none;
    border: none;
    cursor: pointer;
    display: block;
    width: 100%;
}
#portfolio {
    position: relative;
    z-index: 1;
    padding: var(--showcasePadding);
    width: 100%;
}
#portfolio ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1vw;
    height: calc(100vh - var(--topBarHeight) - var(--showcasePadding) * 2);
}
#portfolio ul li button {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    z-index: 10;
}
#portfolio ul li button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
#portfolio ul li button h4 {
    font-size: 2em;
    visibility: hidden;
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    z-index: 8;
    transition: 0.5s;
    color: rgba(0, 0, 0, 0);
}
#portfolio ul li button:hover h4 {
    visibility: visible;
    background: rgba(0, 0, 0, 0.5);
    color: var(--textColor);
}

/* PORTFOLIO PIECE PAGE */
#piece {
    position: relative;
    z-index: 1;
    padding: var(--showcasePadding);
    width: 100%;
}
#piece ul {
    display: flex;
    flex-wrap: wrap;
    gap: 1vw;
}
#piece ul li img {
    max-width: 40vw;
    height: auto;
}
