@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-display: swap;
    src: url('../assets/fonts/JetBrainsMono-Regular.woff2') format('woff2');
    font-weight: normal;
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-display: swap;
    src: url('../assets/fonts/JetBrainsMono-Bold.woff2') format('woff2');
    font-weight: bold;
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-display: swap;
    src: url('../assets/fonts/JetBrainsMono-Thin.woff2') format('woff2');
    font-weight: thin;
}

/* Brower CSS Reset */
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;}

article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
    display: block;}

body {
    line-height: 1;
    background: transparent;
}

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;
}

body {
    -webkit-text-size-adjust: none;
}

mark {
    background-color: transparent;
    color: inherit;
}

input::-moz-focus-inner {
    border: 0;
    padding: 0;
}

input, select, textarea {
    appearance: none;
}

/* Basic Setup */
html {
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

body {
    background: #fff;
    overflow: hidden;
}

    body.is-preload *, body.is-preload *:before, body.is-preload *:after {
        animation: none !important;
        transition: none !important;
    }

body, input, select, textarea {
    color: #fff;
    /* color: rgba(255, 255, 255, 0.9); */
    font-family: 'JetBrains Mono', Consolas, 'Courier New', monospace;
    font-size: 15pt;
    font-weight: 400 !important; /*700 for bold*/
    letter-spacing: -0.025em;
    line-height: 1.75em;
}

a {
    transition: border-color 0.2s ease-in-out;
    border-bottom: dotted 1px;
    color: inherit;
    outline: 0;
    text-decoration: none;
}

    a:hover {
        border-color: transparent;
    }

/* Background Pic */
#bg {
    backface-visibility: hidden;
    transform: translate3d(0,0,0);

    background: transparent url("../assets/images/background2.JPG") top left;
    background-repeat: no-repeat;
    background-size: cover;
    height: 100%;
    left: 0;
    opacity: 1;
    position: fixed;
    top: 0;
    width: 100%;
}

@keyframes overlay {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

#overlay {
    animation: overlay 1.75s 0s forwards;
    background-attachment: fixed, fixed;
    background-image: url("../assets/images/overlay-pattern.png"), url("../assets/images/overlay.svg");
    background-position: top left, center center;
    background-repeat: repeat, no-repeat;
    background-size: auto, cover;
    height: 100%;
    left: 0;
    opacity: 0;
    position: fixed;
    top: 0;
    width: 100%;
}

#main {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
}

/* Header */

@keyframes header {
    0% {
        transform: translate3d(0,1em,0);
        opacity: 0;
    }

    100% {
        transform: translate3d(0,0,0);
        opacity: 1;
    }
}

@keyframes nav-icons {
    0% {
        transform: translate3d(-3em,0,0);
        opacity: 0;
    }

    100% {
        transform: translate3d(0,0,0);
        opacity: 1;
    }
}

#header {
    backface-visibility: hidden;
    transform: translate3d(0,0,0);
    cursor: default;
    display: inline-block;
    opacity: 1;
    position: relative;
    text-align: center;
    top: 0em;
    vertical-align: middle;
    width: 90%;
}

#header h1 {
    font-size: 2.35em;
    font-weight: bold;
    letter-spacing: -0.05em;
    line-height: 1em;
}

#header p {
    font-size: 1.25em;
    font-weight: thin;
    letter-spacing: -0.05em;
    margin: 0.75em 0 0.25em 0;
    opacity: 0.75;
}

#header nav {
    margin: 0.85em 0 0 0;
}

#header nav a {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-touch-callout: none;
    border: 0;
    display: inline-block;
    padding: 0 1em;
    text-decoration: none;
}

#header nav li {
    backface-visibility: hidden;
    transform: translate3d(0,0,0);
    display: inline-block;
    line-height: 4.5em;
    opacity: 1;
    position: relative;
    top: 0;
}

#header nav li:after {
    content: '\2022'; /* Unicode for bullet point */
    margin: 0 0.5em;
    opacity: 0.8;
    display: inline-block;
    vertical-align: middle;
    position: relative;
    left: 0.23em; /* Move bullet point */
}

/* Initial load animations */
body:not(.overlay-open) {
    /* Header*/
    #header.initial-load {
        animation: header 1.75s forwards;
        opacity: 0;
    }

    /* Nav items*/
    #header nav li.initial-load {
        animation: nav-icons 0.7s ease-in-out forwards;
        opacity: 0;
    }
}

body:not(.overlay-open) #header nav li.initial-load:nth-child(3) {
    animation-delay: 1.7s;
}

body:not(.overlay-open) #header nav li.initial-load:nth-child(2) {
    animation-delay: 2.0s;
}

body:not(.overlay-open) #header nav li.initial-load:nth-child(1) {
    animation-delay: 2.3s;
}

#header nav li:last-child:after {
    content: none; /* Remove bullet after last item */
}

#header nav a span {
    font-size: 1.25em;
    font-weight: thin;
    letter-spacing: -0.05em;
    margin: 0.75em 0 0.25em 0;
    opacity: 0.8;
    border-radius: 4px;
    /* border: solid 1px #fff; */
    padding: 0.5em 1em;
}

#header nav a:hover span {
    background-color: rgba(255, 255, 255, 0.175);
    color: #fff;
}

#header nav a:active span {
    background-color: rgba(255, 255, 255, 0.35);
    color: #fff;
    transform: scale(0.95);
}

/* Pages Overlay */
.overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.1s ease-in-out, visibility 0.1s ease-in-out;
    z-index: 1000;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.overlay-content {
    position: relative;
    background-color: rgba(0, 0, 0, 0.4);
    margin: auto;
    padding: 2em;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 4px;
    color: #fff;
    /* transform: translateY(10px); */
    opacity: 0;
    transition: transform 0.1s ease-in-out, opacity 0.1s ease-in-out;
}

.overlay.active .overlay-content {
    transform: translateY(0);
    opacity: 1;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 1.5em;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.2s;
}

.close-btn:hover {
    opacity: 1;
}

.overlay-content::-webkit-scrollbar {
    width: 8px;
}

.overlay-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.overlay-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.overlay-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Project Container */	
.project-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;/*rounded corners */
    padding: 1.5rem;/*inner spacing */
    margin: 1.5rem 0;/*vertical spacing between containers */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-container:first-child {
    margin-top: 0;  /*rm top margin from first container */
}

.project-container:last-child {
    margin-bottom: 0;  /*rm bottom margin from last container */
}

.project-container h2 {
    margin-bottom: 1rem; /*space below headers */
    color: rgba(255, 255, 255, 0.9);
    /* color: #fff; */
    font-size: 1.9rem; /*1.75em; or 1.5em;*/
    font-weight: bold;
    letter-spacing: -0.05em;
    line-height: 1em;
}

/* Project Images */
.image-container {
    display: flex;
    gap: 1rem;  /* space between images */
    margin: 1rem 0 0 0;  /* only top margin needed bc padding in container */
}

.project-image {
    max-width: calc(50% - 0.5rem);  /*each image takes up half the space minus half the gap */
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /*for depth*/
}

/* stack images on smaller screens */
@media screen and (max-width: 600px) {
    .image-container {
        flex-direction: column;
    }
    
    .project-image {
        max-width: 100%;
    }
}