/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/* Declare variables for styles */
:root {
    --main-background: hsl(0, 0%, 94%);
    --body-text: #000;
    --dark-background: #000;
    --light-text: #fff;
    --link-color: hsl(0, 82%, 49%);
    --margin: 50px;
    --bigSpacing: 32px;
    --padding: 12px;
}

/* baseline styles */
body {
    background-color: var(--main-background);
    color: var(--body-text);
    font-family: 'Inter', Helvetica, sans-serif;
    line-height: 140%;
    /* padding-bottom: calc(var(--bigSpacing)*3); */
    min-height: 100vh;
}
p {
    font-weight: 250;
    margin-bottom: var(--padding);
}
a {
    color: var(--link-color);
}
strong {
    font-weight: bold;
}

section {
    margin-bottom: var(--margin);
    width: calc(100% - 2 * var(--margin));
    margin-left: auto;
    margin-right: auto;
    transition: opacity .3s;
}

section h1 {
    font-weight: lighter;
    font-size: 45px;
    border-bottom: 1px solid #000;
    margin-bottom: 24px;
    line-height: 74%;
}

section ul li {
    margin-bottom: 12px;
}

#content.loading {
    opacity: 0;
}

.dark {
    background-color: var(--dark-background);
    color: var(--light-text);
}
.two-column {
    display: grid;
    grid-template-columns: 68vh 1fr;
    column-gap: 50px;
    max-height: 38vh;
    overflow: hidden;
    width: 100%;
}
.two-column div svg {
    width: 100%;
    height: auto;
    top: -3px;
    position: relative;
    left: -2px;
}

@media (width < 940px) {
    .two-column {
        grid-template-columns: 1fr;
        max-height: none;
    }
    .two-column div svg {
        top: 80px;
    }
    nav {
        font-size: 12px;
    }
    .portfolio li {
        max-width: none !important;
    }
}

@media (height < 850px){
    .constrained p {
        font-size: 14px;
        line-height: 130%;
    }
}

nav {
    position: absolute;
    top: 5px;
    right: 20px;
    color: var(--light-text);
    padding: var(--padding);
}
nav ul {
    display: grid;
    grid-template-columns: auto auto auto auto;
    grid-gap: var(--bigSpacing);
}
nav a {
    color: var(--light-text);
    text-decoration: none;
    font-weight: 600;
}
nav a:hover,
nav a:active,
nav a:focus {
    text-decoration: underline;
}
nav a:focus {
    outline: 2px solid var(--link-color);
    outline-offset: 4px;
}

nav.secondaryPage {
    position: relative;
    width: 100%;
    background-color: var(--dark-background);
    top: auto;
    right: auto;
    padding: 15px;
}
nav.secondaryPage ul {
    padding-left: 50vw;
}
nav.secondaryPage ul li.active a {
    text-decoration: underline;
}

.constrained {
    padding: 20px;
    max-width: 500px;
    padding-top: 100px;
}

footer {
    position: relative;
    bottom: -126px;
    padding: var(--bigSpacing);
    background: #dfdfdf;
    width: calc(100% - 2*var(--bigSpacing));
}

.portfolio {
    display: flex;
    flex-wrap: wrap;
    position: relative;
}
.portfolio li {
    flex: 1 0 35vw;
    margin: 12px;
    max-width: calc(50% - 24px);;
}
.portfolio li img {
    width: 100%;
    height: auto;
}
.portfolio li a p {
    text-align: center;
    font-size: 12px;
}

.modal {
    position: fixed;
    top: -2000px;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 75vw;
    max-width: 1000px;
    overflow: hidden;
    height: 680px;
    background: #fff;
    padding: 12px;
    border-radius: 5px;
    box-shadow: 4px 4px 6px rgba(0,0,0,.5);
    z-index: 1200;
    display: none;
    transition: top .5s;
}
.modal.open {
    top: 50%;
}
.modal .content {
    overflow: scroll;
    height: calc(680px - 60px);
}
.modal .modal-title {
    border-bottom: 1px solid #ccc;
    margin-bottom: 12px;
    padding: 12px 0;
}
.modal .modal-title .close {
    border: 0;
    background: transparent;
    position: absolute;
    right: 10px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
}
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(11px);
    z-index: 1000;
    display: none;
}

.carousel {
    overflow: hidden;
}
.carousel li img {
    width: 100%;
    height: auto;
}
.carousel ul {
    display: flex;
    /* overflow: scroll; */
    position: relative;
    left: 0px;
    transition: left .3s;
}
.carousel ul li {
    flex: 1 0 100%;
}
.carousel .controls {
    position: absolute;
    top: 40%;
    width: calc(100% - 24px);
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.carousel .controls button {
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 100px;
    background: rgba(255,255,255,.75);
    box-shadow: 1px 1px 1px rgba(0,0,0,.5);
    cursor: pointer;
    margin-left: 10px;
}
.carousel .controls button:hover {
    background: rgba(255,255,255,.95);
}
.carousel .controls button:focus {
    outline: 2px solid var(--link-color);
    outline-offset: 4px;
}
.carousel .controls button:last-child {
    margin-left: auto;
    margin-right: 10px;
}

.protected {
    display: none;
}

iframe {
    width: 100%;
    border: 0;
    height: 80vh;
}