:root {
    --font-stack: Arial, Helvetica, system-ui, sans-serif;
    --bounce: cubic-bezier(0, 1.7, 0.8, 1);
}

/* Light theme */
:root {
    --paper: #fefcf2e0;
    --track: #f1f0ea;
    --ink: #2a292c;
    --faded: #62605e;
    --border: rgba(0, 0, 0, 0.13);
    --layer: rgba(20, 17, 23, 0.3);
}

/* Dark theme */
@media (prefers-color-scheme:dark) {
    :root {
        --paper: #171610;
        --track: #2f2e2c;
        --ink: #ffffff;
        --faded: #978aa0;
        --border: rgba(233, 205, 252, 0.15);
        --layer: rgba(4, 3, 5, 0.65);
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    font-family: var(--font-stack);
    margin: 0;
}

html,
body {
    height: 100%;
    scroll-behavior: smooth;
    background-color: var(--paper);
    color: var(--ink);
    line-height: 1.8;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

input,
button,
textarea,
select {
    font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
}

.anchor {
    position: fixed;
    top: 0px;
    pointer-events: none;
}

header {
    display: flex;
    flex-flow: column nowrap;
    gap: 1rem;
    padding: calc(6vw + 3rem) 6vw;
    align-items: center;
    justify-content: center;
}

header>p {
    text-align: center;
    max-width: 48rem;
    text-wrap: balance;
}

.avatar {
    width: calc(4rem + 4vw);
    height: calc(4rem + 4vw);
}

main {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(min(20rem, 100%), 1fr));
    padding: 0 6vw;
}

h1 {
    text-align: center;
    font-size: calc(1.7rem + 3vw);
    font-weight: 750;
    font-variation-settings: 'wght' 750;
    text-wrap: balance;
    line-height: 100%;
    padding: 0 calc(2rem + 10vw) 1rem;
    letter-spacing: -0.1vw;
    text-wrap: balance;
}

h2 {
    font-size: 2.4rem;
    font-weight: 750;
    font-variation-settings: 'wght' 750;
}

h3 {
    font-size: 1.4rem;
    font-weight: 750;
    font-variation-settings: 'wght' 750;
}

time,
.subfooter a {
    display: block;
    color: var(--faded);
    font-size: 80%;
}

p {
    line-height: 160%;
}

p>em {
    font-size: 90%;
    color: var(--faded);
}

li {
    list-style: none;
}

figcaption {
    font-size: 60%;
    color: var(--faded);
    text-align: center;
    display: block;
    margin-top: 0.5rem;
    margin-left: 3rem;
    margin-right: 3rem;
}

code {
    padding: 0rem 0.35rem;
    border-radius: 0.35rem;
    color: #111;
}

code.Purple {
    background-color: purple;
    color: white;
}


.card {
    --color: var(--border);
    border: 1px solid var(--color);
    color: currentColor;
    text-decoration: none;
    border-radius: 1rem;
    overflow: hidden;
    transition: transform var(--bounce) 0.5s;
}

.card:hover {
    --color: var(--faded);
    transform: scale(0.98);
}

.card-image {
    aspect-ratio: 5 / 3;
}

p>a,
p>a:link,
p>a:visited,
span>a,
span>a:link,
span>a:visited {
    color: var(--ink);
    font-weight: 600;
    font-variation-settings: 'wght' 600;
    text-decoration-style: dotted;
    text-decoration-line: underline;
    text-decoration-color: var(--faded);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
}

p>a:hover {
    color: var(--c-accent-hover);
    text-decoration-color: var(--ink);
    text-decoration-style: solid;
}

.padded {
    padding: calc(0.1rem + 1vw) calc(0.6rem + 1vw) calc(0.6rem + 1vw);
}

/* the dim layer */
article {
    visibility: hidden;
    opacity: 0;
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    inset: 0;
    overflow: hidden;
    background: var(--layer);
    transition: opacity linear 0.1s;
    z-index: 99;
    backdrop-filter: blur(10px) grayscale(50%);
}

article:target {
    visibility: visible;
    opacity: 1;
}

.ambilight {
    pointer-events: none;
    position: absolute;
    z-index: -1;
    width: 55rem;
    max-width: 100vw;
    height: 70rem;
    max-height: 40vh;
    object-fit: fill;
    filter: blur(100px);
    mix-blend-mode: screen;
    opacity: 1;
}

/* centered modal */
section {
    display: block;
    position: relative;
    max-width: 48rem;
    width: calc(100% - 6rem);
    border-radius: 2rem;
    outline: 1px solid var(--border);
    overflow: hidden;
    background-color: var(--paper);
    z-index: 999;
    transform: translateY(60px);
    transition: transform var(--bounce) 0.5s;
}

article:target section {
    transform: translateY(0);
}

/* close the overlay on click */
.fullscreen {
    position: absolute;
    inset: 0;
}

.close-button {
    position: fixed;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: var(--faded);
}

.close-button:hover {
    border: 1px solid var(--ink);
    color: var(--ink);
}

.content {
    height: fit-content;
    max-height: calc(100vh - 10rem);
    padding: 0 0 3rem 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.content>h1,
.content>h2,
.content>h3,
.content>p,
.content>ul,
.content>summary {
    padding: 0 calc(1rem + 4vw) 0 calc(1rem + 3vw);
    text-wrap: balance;
}

.content>time {
    padding: 3rem calc(1rem + 4vw) 0 calc(1rem + 3vw);
}

.content>ul {
    display: flex;
    flex-flow: row wrap;
    gap: 1rem;
}

ul.disc {
    padding-left: 3.75rem;
    margin-bottom: 1rem;
    flex-flow: column;
    gap: 0rem;
}

ul.disc li {
    list-style: disc;
}

.content>h2 {
    margin: 0 auto 2rem;
}

.content>h3 {
    margin: 2rem auto 0.5rem;
}

.content>p {
    margin: 0 auto 1.5rem;
}

.content>figure {
    margin: 0 auto 1.5rem;
}

a>img,
.content>figure>img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    background-color: var(--track);
}

.content>summary {
    font-size: 120%;
    margin: 0 auto 1.5rem;
}

.block {
    display: block;
}

polyline {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2px;
}

footer {
    margin-top: 2rem;
}

footer,
.subfooter {
    padding: calc(4vw + 2rem) 6vw;
    display: flex;
    flex-flow: row wrap;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}


footer h2 {
    width: 100%;
    text-align: center;
}

footer>a,
li>a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: var(--ink);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    font-weight: 600;
    font-variation-settings: 'wght' 600;
    text-decoration: none;
}

footer>a:hover,
li>a:hover {
    color: var(--ink);
    border: 1px solid var(--ink);
}

footer>p {
    width: 100%;
    text-align: center;
}

@media (max-width: 940px) {
    h1 {
        font-size: calc(1.7rem + 3vw);
        padding: 0;
    }

    article {
        align-items: end;
        justify-content: center;
    }

    section {
        width: unset;
        max-width: unset;
        border-radius: 2rem 2rem 0 0;
    }

    .content {
        max-height: calc(100vh - 3rem);
    }
}

.testimonials {
    padding: 3rem 6vw;
    margin: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    outline: 0px;
    z-index: 0;
}

.testimonial {
    max-width: 800px;
    width: 100%;
    padding: 3rem;
    text-align: center;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 1rem;
}

.testimonial blockquote {
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
    color: var(--faded);
}

.testimonial cite {
    display: block;
    font-style: normal;
}

.testimonial .author {
    font-weight: bold;
    display: block;
    margin-bottom: 0.25rem;
    color: var(--ink);
}

.testimonial .title {
    font-size: 0.9rem;
    color: var(--faded);
}

@media (max-width: 940px) {
    .testimonial {
        padding: 2rem;
    }
}

@media (max-width: 600px) {
    .testimonials {
        padding: 2rem 6vw;
    }

    .testimonial {
        padding: 1.5rem;
    }

    .testimonial blockquote {
        font-size: 1rem;
    }
}