@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Fraunces:ital,opsz,wght@0,9..144,100..900;1,9..144,100..900&display=swap');

:root {
    --background: #fff;
    --black: #000;
    --border: #0000001f;
    --subtitle: #201f1f;
    --text: #000;
    --textbackground: #f1f1f1;
}

::-moz-selection { /* Code for Firefox */
    background: var(--black);
    color: var(--background);
}
  
::selection {
    background: var(--black);
    color: var(--background);
}

html {
    width: 100%;
    height: auto;

    margin: 0;
    padding: 0;
    box-sizing: border-box;

    background: var(--background);
/*     background-image: url(assets/noise_w.webp); */
    background-size: cover;
}

body {
    overflow: auto;

    display: flex;
    flex-direction: column;
    align-items: center;

    width: 100%;

    margin: 0;
}

#rotate {
    position: fixed;

    top: 0;
    height: 100vh;
    width: 100vw;

    color: var(--black);
    font-family: DM Sans, Arial, Helvetica, sans-serif;

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: -1;
    opacity: 0;
}

#header {
    position: relative;

    display: flex;
    flex-direction: row;
    justify-content: space-between;

    width: 80%;
    margin-top: clamp(3rem, 5vh, 10rem);
    height: 5vh;
}

h1, h2, h3, h4, h5, h6, #icon, li, p {
    color: var(--black);
    font-family: DM Sans, Arial, Helvetica, sans-serif;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

h1, h4, li {
    visibility: hidden;
}

#icon {
    font-size: 16px;
    text-decoration: none;

    display: flex;
    align-items: center;
}

#icon::-moz-selection, #footer h5::selection, img::selection {
    background: none;
    color: var(--black);
}

#icon::selection, #footer h5::selection, img::selection {
    background: none;
    color: var(--black);
}

#menu {
    display: flex;
    flex-direction: row;
    align-items: center;

    height: auto;
}

h5 {
    font-family: Fraunces;
    font-size: 16px;

    cursor: pointer;

    margin: .2em;
}

#mode {
    height: 24px;
    margin-right: 1em;
    cursor: pointer;
}

#lang {
    font-style: italic;
    text-decoration: none;
}

#divider {
    cursor: default;
}

main {
    width: 80%;
}

#hero {
    width: clamp(650px, 63vw, 900px);
    display: flex;
    flex-direction: column;
    justify-content: center;

    margin-top: clamp(0px, 15vh, 150px);
    margin-bottom: clamp(0px, 10vh, 100px);
}

.container {
    overflow-x: visible;
    overflow-y: clip;
}

h1 {
    font-family: Fraunces;
    font-size: clamp(30px, 8vw, 50px); /*/ lower bound may have to change? /*/
    font-weight: 580; /*/ seems too heavy /*/
    font-style: italic;

    margin-top: 0;
    margin-bottom: 0;
    display: inline-block;
}

#hero h4:first-of-type {
    margin-top: 2rem;
}

h4 {
    color: var(--subtitle);
    font-size: clamp(13px, 4vw, 20px);

    margin-top: 1rem;
    margin-bottom: 1rem;
}

h5 a {
    text-decoration: none;
}

sup {
    font-size: clamp(8px, 2vw, 11px);
}

ul {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: clamp(300px, 20vw, 400px);

    padding-inline-start: 1rem;
}

a {
    text-decoration: underline;
    color: inherit;
}

li {
    font-size: clamp(12px, 3vw, 14px);

    right: 5em;
}

#writing, #favorites, #recently {
    position: relative;
    width: clamp(600px, 45vw, 700px);
    top: 0;
}

#favorites, #recently {
    margin-top: 4rem;
}

#writing {
    margin-bottom: 4em;
}

h2 {
    font-size: 24px;
    font-weight: 700;

    margin-top: 0;
}

h3 {
    font-size: 18px;
    line-height: 135%;
    margin-bottom: 0;
}

p {
    color: var(--text);
    font-size: clamp(12px, 3vw, 16px);
    font-style: italic;

    margin-top: .5rem;
    margin-bottom: 2.5rem;

    background-color: var(--textbackground);
}

#interests h2 {
    margin-bottom: .8rem;
}

#end {
    width: 80%;
    margin-top: 0rem;
    margin-bottom: 2rem;

    height: 5rem;

    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;

    border-top: solid var(--border) 2px;
}

#end h5 {
    font-family: DM Sans, Arial, Helvetica, sans-serif;
    font-size: 12px;
    margin: 0;

    cursor: default;
}

h6 {
    font-family: DM Sans, Arial, Helvetica, sans-serif;
    font-size: 12px;

    margin-top: 6rem;
}

@media only screen and (max-width: 1000px) {
    #header, main, #hero, #writing, #favorites, #recently, #end {
        width: 80vw;
    }
}

@media only screen and (max-width: 500px) {
    #hero {
        margin-top: clamp(0px, 10vh, 150px);
    }

    h1 {
        font-size: clamp(28px, 10vw, 80px);
    }

    h2 {
        font-size: clamp(10px, 6vw, 18px);
    }

    h3 {
        font-size: clamp(8px, 4.5vw, 14px);
    }

    ul {
        width: calc(100% - 1rem);
    }

    #end {
        height: 5em;
    }
}

@media only screen and (max-height: 500px) and (orientation: landscape) {
    #rotate {
        opacity: 1;
        z-index: 10;
        background-color: var(--background);
    }
}