@import url('https://fonts.googleapis.com/css2?family=Mrs+Saint+Delafield&display=swap'); 

:root {
    --background: #060606;      /* If changed, please also change nav color */
    --text-primary: #FDF4DC;
    --text-secondary: #E0DCD3;
    --text-effect: #9C978B;
    --text-accent: #615E58;

    --snow-color: rgba(253, 244, 220, 0.8);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
}

/* Global */

body {
    background-color: var(--background);
    color: var(--text-primary);
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.3vw;
}

/* Navigation */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    display:flex;
    background-color: #06060699;
    justify-content: space-between;
    align-items: center;
    padding: 27px 30px;

    z-index: 1000; /* Fixing Hero animation bug */
}

nav a {
    color: var(--text-primary);
    font-size: 1.5vw;
    text-decoration: none;
    padding: 0px 2px;
}

nav a:hover {
    color: var(--text-effect);
    opacity: 90%;
}

.nav-links {
    display: flex;
    gap: 30px;
}

/* Hero */

#hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;

    position: relative;
}

.hero-figure {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 70vh;

    z-index: 1;
    pointer-events: none;

    transform: scaleX(-1);
    opacity: 0.9;

    margin-bottom: -4px;
}

.hero-title {
    font-size: 5vw;

    position: relative;
    z-index: 2;

    font-family: "Mrs Saint Delafield", cursive;
    font-weight: 400;
    font-style: normal;

    margin-bottom: -10px;

    text-decoration: none;
    color: var(--text-primary);

    display: inline-block;
    padding-right: 0.3em;

}

#hero p{    
    font-size: 1.15vw;
    letter-spacing: 5px;

    position: relative;
    z-index: 2;
}

#desc {
    padding-top: 13px;
    letter-spacing: 5px;
    color: var(--text-effect);
} 

#desc span {
    display: inline-block;
}

/* About */
 
#about {
    padding: 120px 2vw;
}

#about h2 {
    border-bottom: 1px solid var(--text-accent);
    padding-bottom: 15px;
    font-size: 2.2vw;
    letter-spacing: 2px;
    font-weight: bold; 
}

.about-content{
    max-width: 1300px;
    margin-top: 50px;
}

#about p{
    color: var(--text-secondary);
    line-height: 1.5;
}

#about p + p {
    margin-top: 25px;
}

/* About Signature */

.about-signature {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;

    color: var(--text-effect);
    font-size: 1.15vw;
    letter-spacing: 4px;

    margin-top: -15px;
}


/* Archive */

#archive {
    padding: 120px 2vw;
}

.archive-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    color: var(--text-effect);
    letter-spacing: 2px;
    font-size: 0.8vw;
}

#archive h2 {
    border-bottom: 1px solid var(--text-accent);
    padding-bottom: 15px;
    font-size: 2.2vw;
    letter-spacing: 2px;
    font-weight: bold; 
}

.archive-entry {
    margin-top: 35px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--text-accent);
}

.archive-entry h3 {
    font-size: 1.98vw;
    margin-top: 25px;
}

.archive-subtitle {
    font-size: 1vw;
    letter-spacing: 4px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.archive-tags {
    font-size: 0.8vw;
    color: var(--text-effect);
    letter-spacing: 2px;
    margin-top: 18px;
}

.archive-description {
    margin-top: 25px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.archive-entry a{
    display: inline-block; /* Necessary to make margin-top work */
    margin-top: 40px;
    color: var(--text-primary);
    text-decoration: none; /* Rmove the url underline */
    letter-spacing: 2px;
}

.archive-entry a:hover{
    color: var(--text-effect);
}

.archive-entry + .archive-entry {  /* Select archive-entry just after archive entry (aka entry 2,3,4 and so on */
    margin-top: 35px;
}

/* Contact */

#contact {
    padding: 120px 2vw;
}

#contact h2 {
    border-bottom: 1px solid var(--text-accent);
    padding-bottom: 15px;
    font-size: 2.2vw;
    letter-spacing: 2px;
    font-weight: bold; 
}

.contact-content {
    margin-top: 50px;
}

.contact-content p {
    color: var(--text-secondary);
    line-height: 1.5;
}

.contact-links {
    display: flex;
    gap: 35px;
    margin-top: 40px;
}

.contact-links a {
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: 2px;
}

.contact-links a:hover {
    color: var(--text-effect);
}

/* Footer */

footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    color: var(--text-effect);
    font-size: 0.75vw;
    letter-spacing: 2px;
}

/* Responsive */

@media (max-width: 600px) {

    body {
        font-size: 16px;
    }

    nav {
        padding: 22px 20px;
    }

    nav a {
        font-size: 16px;
    }

    .nav-links {
        gap: 18px;
    }

    .hero-title {
        font-size: 8.5vw;
    }
    
    .hero-figure {
        height: 40vh;
    }

    #hero p {
        font-size: 3.2vw;
        letter-spacing: 3px;
    }

    #desc {
        font-size: 2.8vw !important;
        letter-spacing: 2px !important;
    }

    #about {
        padding: 110px 2vw;
    }

    #about h2,
    #archive h2,
    #contact h2 {
        font-size: 5.5vw;
    }

    .archive-meta,
    .archive-tags,
    footer {
        font-size: 3vw;
    }

    .archive-entry h3 {
        font-size: 6vw;
    }

    .archive-subtitle {
        font-size: 3.2vw;
    }

    .about-signature {
        font-size: 2.99vw;
        letter-spacing: 2px;
        gap: 8px;
    }

    /* LAB */

    /* Unfinished */

    #unfinished {
        padding: 110px 2vw;
    }

    #unfinished h2 {
        font-size: 5.5vw;
    }

    .unfinished-meta {
        font-size: 3vw;
    }

    .unfinished-entry h3 {
        font-size: 6vw;
    }

    .unfinished-subtitle {
        font-size: 3.2vw;
    }

    .unfinished-tags {
        font-size: 3vw;
    }

    /* Graveyard */

    #graveyard {
        padding: 110px 2vw;
    }

    #graveyard h2 {
        font-size: 5.5vw;
    }

    .graveyard-meta {
        font-size: 3vw;
    }

    .graveyard-entry h3 {
        font-size: 6vw;
    }

    .graveyard-tags {
        font-size: 3vw;
    }

    /* NOW */

    #now {
        padding: 110px 2vw;
    }

    #now h2 {
        font-size: 5.5vw;
    }

    .now-item {
        display: block;
    }

    .now-item span {
        display: block;
        min-width: 0;
        font-size: 3vw;
    }

    .now-item p {
        margin-top: 10px;
    }

    /* Curiosities */

    #curiosities {
        padding: 110px 2vw;
    }

    #curiosities h2 {
        font-size: 5.5vw;
    }

    .curiosity-meta {
        font-size: 3vw;
    }

    .curiosity-entry h3 {
        font-size: 6vw;
    }
}

/* Extra Effects */

::selection {
    color: white;
    background-color: #302E2A;
}

html {
    scroll-behavior: smooth;
}

#snow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

/* Title glitching while leaving homepage */
.hero-title.transition-out {
    animation: title-out 0.65s steps(4, end) forwards;
}

/* Lab title glitching while appearing */
.lab-page .hero-title.transition-in {
    animation: title-in 0.85s steps(4, end) forwards;
}

/* Hide Lab title before JS starts entrance animation */
.lab-page .hero-title {
    opacity: 0;
}

/* Outgoing title rapid shifts and dissappearing */
@keyframes title-out {
    0% {
        opacity: 1;
        transform: translateX(0) skewX(0deg);
        filter: blur(0);
    }

    20% {
        transform: translateX(-3px) skewX(-2deg);
        filter: blur(0.3px);
    }

    40% {
        transform: translateX(4px) skewX(3deg);
        filter: blur(0.8px);
    }

    60% {
        transform: translateX(-5px) skewX(-4deg);
        filter: blur(1.5px);
    }

    80% {
        opacity: 0.35;
        transform: translateX(3px) scaleX(0.98);
        filter: blur(3px);
    }

    100% {
        opacity: 0;
        transform: translateX(0) scaleX(0.96);
        filter: blur(7px);
    }
}

@keyframes title-in {
    0% {
        opacity: 0;
        transform: translateX(4px) skewX(4deg);
        filter: blur(7px);
    }

    25% {
        opacity: 0.3;
        transform: translateX(-4px) skewX(-3deg);
        filter: blur(3px);
    }

    50% {
        opacity: 0.6;
        transform: translateX(3px) skewX(2deg);
        filter: blur(1.5px);
    }

    75% {
        opacity: 0.85;
        transform: translateX(-2px) skewX(-1deg);
        filter: blur(0.5px);
    }

    100% {
        opacity: 1;
        transform: translateX(0) skewX(0deg);
        filter: blur(0);
    }
}

/* New pages */

#about h2 a,
#archive h2 a {
    color: inherit;
    text-decoration: none;
}


body {
    animation: pageIn 0.3s ease-out;
}

@keyframes pageIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
