@font-face {
    font-family: "Cabin Sketch";
    src: url('fonts/CabinSketch-Bold.ttf');
}

@font-face {
    font-family: "IBM Plex Mono ExtraLight";
    src: url('fonts/IBMPlexMono-ExtraLight.ttf');
}

@font-face {
    font-family: "IBM Plex Mono Light";
    src: url('fonts/IBMPlexMono-Light.ttf');
}

:root {
    --font-title : "Cabin Sketch", sans-serif;
    --font-text-default: "IBM Plex Mono Light", monospace;

    --selection-bg: #ddd;
    --selection-fg: #222;
    --bg-gradient-1: #154F8D;
    --bg-gradient-2: #021325;
    --bg-gradient-3: #001016;

    --black1: #111;
    --black2: #222;
    --white0: #eee;
    --white1: #ddd;
    --white2: #ccc;
    --gray: #999;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

.bg {
    /* background: linear-gradient(to bottom right, var(--bg-gradient-1), var(--bg-gradient-2)) center/cover; */
    position: fixed;
    top:0;
    bottom:0;
    left:0;
    right:0;
    z-index: -100;
    background-image: url('static/bg.jpg');
    background-repeat: repeat;
}

body {
    color: var(--white0);
    font-style: normal;
    font-weight: 200;
    font-size: 16px;
    font-family: var(--font-text-default);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

main {
    padding: 0 2rem;
    max-width: 720px;
}

.project-main{
    display: flex;
    flex-direction: column;
    align-items: center;
}

h2 {
    margin: 1rem 0 1rem 0;
    text-shadow: 5px 5px 2px rgba(0, 0, 0, 0.5);
}

h3, h4 {
    width: 100%;
    margin: 1.5rem 0 0.5rem 0;
}

p {
    margin: 0.5rem 0;
    width: 100%;
    text-align: justify;
}

ul {
    /* margin: 1rem 0; */
}

li {
    line-height: 1.5rem;
}

footer {
    margin-top:2rem;
    margin-bottom:3rem;
    text-align: center;
    max-width: 300px;
}

footer > p{
    font-size: 12px;
    font-style: italic;
    text-align: center;
}

footer > a {
    display: block;
    margin-top: .4rem;
}

a {
    font-weight: 400;
    color: var(--white2);
    background-color: auto;
    text-decoration: none;
    cursor: pointer;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

a.thick-underline {
  position: relative;
  display: inline;
  background: url('static/underline.png') repeat-x;
  background-size: 100% 8px;
  background-position: 0 100%;
  padding-bottom: 4px;
}

a.thick-underline:focus, a.thick-underline:hover {
  position: relative;
  display: inline;
  text-decoration: none;
  background: url('static/underline.png') repeat-x;
  background-size: 100% 8px;
  background-position: 0 100%;
  padding-bottom: 4px;
  background-color: var(--black2);
  color: var(--white2);
}

a {
  position: relative;
  display: inline;
  background: url('static/underline_small.png') repeat-x;
  background-size: 100% 4px;
  background-position: 0 100%; 
  padding-bottom: 3px;
}

/* a.underline {
  position: relative;
  display: inline;
  background: url('static/underline_small.png') repeat-x;
  background-size: 100% 4px;
  background-position: 0 100%;
  padding-bottom: 3px;
}

a {
    font-weight: 400;
    color: var(--white2);
    background-color: auto;
    text-decoration: underline;
    cursor: pointer;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
} */

a:visited {
    color: var(--gray);
}

a:focus, a:hover {
    background-color: var(--black2);
    color: var(--white2);
}

a:active {
    color: var(--white2);
    text-decoration: none;
}

h1>a:visited {
    color: var(--white1);
}

h1>a {
    color: var(--white1);
    text-decoration: none;
}

h1>a:visited {
    color: var(--white1);
}

h1>a:focus, h1>a:hover {
    text-decoration: underline;
}

.nobreak{
    white-space: nowrap;
}

.site-header {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin: 2rem 0 1rem 0;
}

.site-title {
    text-align: center;
    margin: 0;
    padding: 1rem 3rem;
    border: solid;
    border-radius: .5rem;
    font-family: var(--font-title);
    font-weight: 700;
    width: fit-content;
    box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.5);
}

.lang-switcher {
    position: absolute;
    right: -3.2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

.lang-flag {
    font-size: .85rem;
    font-family: var(--font-title);
    font-weight: 700;
    line-height: 1;
    letter-spacing: .05em;
    text-decoration: none;
    opacity: .75;
    transition: opacity 0.15s ease;
}

.lang-flag:focus, .lang-flag:hover {
    background-color: var(--black2);
    opacity: 1;
    text-decoration: none;
}

#project-description {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.site-title:active {
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.5);
}

.next-prev-panel{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin-top: 3rem;
    width: 100%;
}

.next-prev-button {
    text-align: center;
    padding: .5rem 0rem;
    border-style: none;
    /* border-radius: .5rem; */
    /* font-weight: 700; */
    background-color: transparent;
    color: var(--white1);
    cursor: pointer;
    max-width: 45%;
}

#prev-proj-button {
    text-align: left !important;
    margin-right: 2rem;
}

#next-proj-button {
    text-align: right !important;
    margin-left: 2rem;
}

.project-link {
    font-weight: 700;
    color: var(--white0);
}

.project-link:active {
    background-color: transparent;
}

.project-link:visited {
    color: var(--white0);
}

.project-link:focus, .project-link:hover {
    color: var(--white0);
    cursor: pointer;
}

.link-list-spacer {
    margin-right: 1rem;
}

.project-date {
    display: inline-block;
    min-width: 5.5ch;
    opacity: .6;
    font-size: .9em;
}

.project-main .project-date {
    align-self: flex-start;
    margin-bottom: 1rem;
}

::selection {
    background-color: var(--selection-bg);
    color: var(--selection-fg);
}

.invisible {
    visibility: hidden;
}

.hidden {
    display: none;
}

.capitalized {
    text-transform: capitalize;
}

.featured-img {
    width: 100%;
    max-width: 450px;
    aspect-ratio: auto;
    border-radius: 8px;
    /* box-shadow: 0 10px 10px rgba(0, 0, 0, 0.5); */
    margin-bottom: 1rem;
    border: 1px solid aliceblue;
}

.img-link {
    display: inline-block;
    background: none;
    padding-bottom: 0;
    text-decoration: none;
}

.img-link:focus, .img-link:hover, .img-link:active {
    background-color: transparent;
    text-decoration: none;
}

.img-link img {
    transform: scale(1);
    transition: transform 0.15s ease;
}

.img-link:hover img {
    transform: scale(1.04);
}

.img-link:active img {
    transform: scale(1);
}

.img-figure {
    margin: 1rem 0;
    width: 100%;
}

.img-figure img {
    width: 100%;
    border-radius: 8px;
}

.img-figure figcaption {
    margin-top: 0.4rem;
    font-size: 0.85rem;
    text-align: center;
    opacity: 0.75;
}

.fadein{
    opacity: 0;
    animation: fadein 1s forwards ease-in-out;
    animation-delay: 0.4s;
}

@keyframes fadein {
    from { 
        opacity: 0;
        scale: 0.4;
    }
    to {
        opacity: 1;
        scale: 1;
    }
}

.fader > * {
    opacity: 0;
    animation: fader 0.7s ease-in-out forwards;
    animation-delay: calc(0.5s + var(--index) * 0.1s);
}

@keyframes fader {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media screen and (max-width: 425px) {
    li {
        font-size: 1.3rem;
        line-height: 2.5rem;
    }

    main {
        padding: 0 1rem;
    }

    .site-header {
        flex-direction: column;
        gap: .75rem;
        margin: 1.5rem 0 1rem 0;
    }

    .site-title {
        padding: .75rem 1.5rem;
    }

    .lang-switcher {
        position: static;
        transform: none;
        flex-direction: row;
        justify-content: center;
    }

    .next-prev-panel {
        flex-direction: column;
        gap: 1rem;
    }

    .next-prev-button {
        max-width: 100%;
    }

    #prev-proj-button, #next-proj-button {
        margin: 0;
        text-align: center !important;
    }

    .project-list {
        list-style: none;
    }

    .project-list__item {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        row-gap: .25rem;
        margin-bottom: .6rem;
    }
}