/* General layout */
html {
    scroll-behavior: smooth;
}
body {
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: #f0f6fc;
    background-color: #0d1117;
    margin: 0;
}
h1 {
    font-size: 34px;
    padding: 0px 13px 0px 13px;
    margin: 0;
    margin-top: 26px;
}
h3 {
    margin: 0;
    margin-bottom: 9px;
}
h4 {
    padding: 0px 13px 13px 13px;
    margin: 0;
    margin-top: -13px;
    font-weight: 400;
}
a {
    color: #f0f6fc;
}
a:hover {
    color: #4493f8;
}

/* Navigation bar */
nav {
    box-shadow: inset 0 -1px 0 #3d444db3;
    background-color: #010409;
    display: flex;
    min-height: 48px;
    overflow: hidden !important;
    justify-content: center;
    box-sizing: border-box;
}
nav ul {
    align-items: center;
    display: flex;
    row-gap: .5rem;
    column-gap: .5rem;
    list-style: none !important;
    justify-content: center;
    width: 100%;
}
nav ul li {
    display: inline-flex !important;
    word-wrap: break-word;
}
nav ul li a {
    color: #f0f6fc;
    outline: none;
    box-shadow: none;
    outline-offset: -2px;
    text-decoration: none;
    border-radius: .375rem;
    cursor: pointer;
    font-size: .875rem;
    line-height: 30px;
    position: relative;
    padding: 0px 8px;
}

/* Footer bar */
footer {
    box-shadow: inset 0px 1px 0px #3d444db3;
    background-color: #010409;
    display: flex;
    min-height: 48px;
    overflow: hidden !important;
    justify-content: center;
    box-sizing: border-box;
    margin-top: 26px;
}

/* Container width */
.container {
    max-width: 896px;
    margin: auto;
    grid-column: 1;
    min-width: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    unicode-bidi: isolate;
    padding: 0px 12px;
}

/* Intro header with link buttons */
.intro-header {
    display: flex;
    justify-content: space-between;
}
.link-buttons {
    display: flex;
    gap: .5rem;
    align-items: center;
}
.link-buttons img {
    width: 32px;
    height: 32px;
    display: flex;
    filter: grayscale(100%) invert(1) brightness(100);
}
.link-buttons a:hover img {
    filter: grayscale(100%) invert(54%) sepia(34%) saturate(4540%) hue-rotate(194deg) brightness(99%) contrast(96%);
}

/* Sections */
section {
    border: 1px solid;
    border-color: transparent;
    padding: 0px 12px;
    transition: border-color .5s ease-in-out;
}
section:not(.last-section) {
    box-shadow: inset 0 -1px 0 #3d444db3;
}
section.flash-border {
    border-color: #4493f8;
}
section img {
    height: 240px;
    display: flex;
}

/* Scroll-top-top button */
#scrollTopBtn {
    position: fixed;
    bottom: 56px;
    right: 16px;
    background-color: #212830;
    color: #f0f6fc;
    font-size: .75rem;
    row-gap: .25rem;
    column-gap: .25rem;
    height: 1.75rem;
    align-items: center;
    appearance: none;
    border: .0625rem solid;
    border-color: #3d444d;
    border-radius: .375rem;
    cursor: pointer;
    display: none;
    font-family: inherit;
    font-weight: 500;
    justify-content: space-between;
    min-width: max-content;
    text-align: center;
    text-decoration: none;
    transition: 80ms cubic-bezier(.65, 0, .35, 1);
    transition-property: color, fill, background-color, border-color;
    user-select: none;
    padding: 0px 8px;
}
#scrollTopBtn:hover {
    background-color: #262c36;
}

/* Image line for stack images all in the same for-the-badge style */
.stack {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    align-items: center;
    margin-bottom: 9px;
}
.stack img {
    height: 2em;
    width: auto;
    vertical-align: middle;
    transition: transform .1s ease;
}
.stack img:hover {
    transform: scale(1.1);
}
.stack.last {
    margin-bottom: 1.5rem;
}

/* Projects in cards with title and interactive thumbnail */
.project-thumb {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 500px;
    border-radius: 1rem;
    overflow: hidden;
    border: 2px solid #3d444d;
    cursor: pointer;
    margin-bottom: 1.5rem;
}
.project-thumb img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform .5s ease;
}
.project-thumb img:hover {
    transform: scale(1.15);
}
.thumb-tag {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 1em;
    pointer-events: none;
    opacity: 0;
    transition: opacity .5s ease;
}
.project-thumb:hover .thumb-tag {
    opacity: 1;
}

/* Modal that opens on project thumbnail click */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: #00000066;
}
.modal-content {
    background: #212830;
    margin: 5% auto 0 auto;
    padding: 8px 16px;
    border-radius: 1rem;
    border: 2px solid #3d444d;
    max-width: 996px;
}

/* Modal header with title and optionally a github image link */
.modal-content .header {
    display: flex;
    justify-content: space-between;
}
.modal-content .header img {
    width: 32px;
    height: 32px;
    transition: box-shadow .25s;
    display: flex;
    filter: invert(1);
    border-radius: 1rem;
}
.modal-content .header a:hover img {
    box-shadow: 0px 0px 0px 2px #a85d00;
}

/* Modal images inside a carousel with buttons */
.carousel {
    position: relative;
    max-width: 100%;
    overflow: hidden;
    border-radius: .5rem;
    border: 2px solid #3d444d;
}
.carousel-track {
    display: flex;
    transition: transform .4s ease-in-out;
}
.carousel-track img {
    max-width: 100%;
    height: auto;
    flex-shrink: 0;
}
.carouselBtn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #f0f6fc;
    font-size: .75rem;
    background-color: #212830;
    border: .0625rem solid;
    border-color: #3d444d;
    border-radius: .375rem;
    cursor: pointer;
    border-radius: .375rem;
}
.carouselBtn:hover {
    background-color: #262c36;
}
.carouselBtn.prev {
    left: 10px;
}
.carouselBtn.next {
    right: 10px;
}

/* Modal close button */
.closeBtn {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 2em;
    font-weight: bold;
    cursor: pointer;
}
.closeBtn:hover {
    color: #4493f8;
}