* {
    box-sizing: border-box;
}

:root{
    --white: #fff;
    --light: #eee;
    --light-cc: #eeec;
    --darker-light: #c8c8c8;
    --gray: #444; 
    --dark: #111;
    --darker-dark: #080808;
    --black: #000;
    --dark-cc: #111c;
    --white-11: #fff1;
    --black-11: #0001;
    --black-44: #0004;
    --white-44: #fff4;
    --black-aa: #000a;
    --white-aa: #fffa;
}

@media (prefers-color-scheme: light) {
    :root {
        --text-color: var(--black);
        --bg-color: var(--light);
        --trailer-color: var(--darker-light);
        --header-color: var(--light-cc);
        --border-color: var(--black-11);
        --button-bg-color: var(--white-44);
        --button-border-color: var(--light);
        --card-overlay-color: var(--white-aa)
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --text-color: var(--white);
        --bg-color: var(--dark);
        --trailer-color: var(--darker-dark);
        --header-color: var(--dark-cc);
        --border-color: var(--white-11);
        --button-bg-color: var(--black-44);
        --button-border-color: var(--gray);
        --card-overlay-color: var(--black-aa)
    }
}

body {
    font-family: 'Roboto Mono', monospace;
    font-weight: 300;
    color: var(--text-color);
    background-color: var(--bg-color);
    background-image: radial-gradient(circle, var(--trailer-color) 10vmin, var(--bg-color) 50vmax);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-attachment: fixed;
    height: 100vh;
    margin: 0;
}

#page-container {
    min-height: 100vh;
    display: grid;
    grid-template-rows: 1fr auto;
}

#grid-container {
    display: grid;
}

@media only screen and (min-width: 601px){       /* desktop */
    #grid-container {
        grid-template-areas: 'pic ttl'
                             'pic inf'
                             ' .  prj'
    }

    #title h2 {
        font-size: 24px;
        margin-left: 1rem;
    }

    #info {
        margin-left: 1rem;
    }

    #pic {
        margin: auto;
        margin-right: 1rem;
        margin-top: 1rem;
        width: 256px;
        height: 256px;
    }

    #projects {
        margin-left: 1rem;
    }

    .buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }

    main{
        width: min(max(50vw, 800px), calc(100% - 4rem));
        margin: 8rem auto 2rem auto;
    }

    .bodywidth {
        width: min(max(50vw, 800px), calc(100% - 4rem));
        margin: 0 auto;
    }
}

@media only screen and (max-width: 600px){       /* mobile */
    #grid-container {
        grid-template-areas: 'pic ttl'
                             'inf inf'
                             'prj prj'
    }

    #title h2 {
        font-size: 20px;
        word-spacing: 100vw;
    }

    #pic {
        margin: auto 1rem auto 0;
        width: 64px;
        height: 64px;
    }

    .buttons {
        flex-direction: column;
        flex-wrap: nowrap;
    }

    main {
        margin: 5rem 2rem 2rem 2rem;
    }

    #coords {
        display: none;
    }

    .bodywidth {
        margin: 0 2rem;
    }
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--header-color);
    white-space: nowrap;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

header .bodywidth,
footer .bodywidth {
    display: grid;
    align-items: center;
    grid-template-areas: 'l r';
}

header h1,
header h1 a:link,
header h1 a:visited {
    padding: .3rem 0;
    font-family: 'Roboto';
    font-size: 24px;
    font-weight: 700;
    font-style: italic;
    color: var(--text-color);
    letter-spacing: -.05rem;
    user-select: none;
    text-decoration: none;
}

footer {
    width: 100%;
    border-top: 1px solid var(--border-color);
}

footer p {
    padding: .3rem 0;
    font-size: min(16px, 3.38vw);
}

.left {
    grid-area: l;
}

.right{
    grid-area: r;
    text-align: right;
}

p,
a:link,
a:visited {
    color: var(--text-color);
    font-size: 16px;
}


h1 {
    font-size: 24px;
}

h2 {
    font-size: 24px;
}

main a:hover {
    color: #4af;
}

#title {
    grid-area: ttl;
}

#info {
    grid-area: inf;
}

.buttons {
    display: flex;
    margin-top: 2rem;
    gap: 1rem;
}

#projects {
    margin-top: 2rem;
    grid-area: prj;
}

#calendar {
    width: auto;
    background-color: #e3e9ff;
    border-top: .25rem solid #e3e9ff;
    border-bottom: .25rem solid #e3e9ff;
    border-radius: .25rem;
}

.button {
    background-color: var(--button-bg-color);
    color: var(--text-color);
    padding: 1rem;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition-duration: .25s;
    border: 1px solid var(--button-border-color);
    border-radius: .5rem;
    white-space: nowrap;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.button:hover {
    color: var(--white);
    margin: -.25rem;
    padding: 1.25rem;
    box-shadow: 0 0 2rem -.75rem var(--text-color);
    color: #000;
    border-color: #fff;
    background-color: #fff;
}

.card {
    display: grid;
    place-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: inset 0 0 0 100vmax var(--card-overlay-color);
}
.card:hover{
    color:inherit;
    box-shadow: inherit;
}

.cardIsl{
    background-image: url(/assets/islBlur.png);
}

.cardCub{
    background-image: url(/assets/cubeBlur.png);
}

.cur {
    animation: blink .5s ease-in-out 0s infinite alternate;
}

#pic {
    align-items: right;
    grid-area: pic;
    border-radius: 50%;
    background-image: url('assets/pfp.png');
    background-size: 100%;
}

.fade {
    animation: fade 1s ease-in backwards;
}

.fade1 {
    animation: fade 1s ease-in .5s backwards;
}

.fade2 {
    animation: fade 1s ease-in .6s backwards;
}

.fade3 {
    animation: fade 1s ease-in .7s backwards;
}

.fade4 {
    animation: fade 1s ease-in .8s backwards;
}

.fade5 {
    animation: fade 1s ease-in .9s backwards;
}

.fade6 {
    animation: fade 1s ease-in 1s backwards;
}

.btnBreathe {
    animation: breathe 1s ease-in-out infinite alternate;
}

.btnBreathe:nth-child(2) {
    animation-delay: .25s;
}

.btnBreathe:nth-child(3) {
    animation-delay: .5s;
}

.btnBreathe:nth-child(4) {
    animation-delay: .75s;
}

@keyframes fade {
    from {opacity: 0;}
}

@keyframes blink {
    to {opacity: 0;}
}

@keyframes breathe {
    to {box-shadow: 0 0 1rem -.75rem var(--text-color)} 
}

#coords {
    user-select: none;
    filter: blur(1px);
}

#trailer {
    width: 24px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    border-color: var(--border-color);
    border-style: solid;
    border-width: 1px;
    position: fixed;
    left: 0px;
    top: 0px;
    z-index: -1000;
    pointer-events: none;
}
