/*--- Fonts ---*/

@font-face {
    font-family: 'Inter';
    src: url('../fonts/intervariable.ttf') format('ttf'), url('../fonts/intervariable.woff2') format('woff2');
    font-style: normal;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/intervariable-italic.ttf') format('ttf'), url('../fonts/intervariable-italic.woff2') format('woff2');
    font-style: italic;
}

/*--- Variables ---*/

:root {
    --aside: oklch(0.6588 0.2275 220);
    --aside-dim: oklch(0.6588 0.2275 220 / 50%);
    --aside-dark: oklch(0.6588 0.2275 220 / 10%);
    --black: #0a0a0a;
    --black-dim: #0a0a0a77;
    --black-dark: #0a0a0a11;
    --red: #ff3f3f;
    --white: #fff;
    --white-dim: #fff7;
    --white-dark: #fff1;
    --sunrise: linear-gradient(135deg, #ff3f3f 0%, #ff206c 70%, #ff0099 100%);

    --rounded-corners: 1rem;
    --title-font-size: 3rem;
    --body-font-size: 2rem;
}

/* #ff3f3f = oklch(0.6588 0.2275 26.1) */

/*--- Foundation ---*/

html,
body {
    background: var(--white);
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    color: var(--black);
    font-family: 'Inter';
    font-feature-settings: 'calt', 'dlig', 'cv05', 'ss03';
    font-size: 10px;
    font-weight: 300;
}

::selection {
    background: var(--red);
    color: var(--white);
    text-shadow: none;
}

::-moz-selection {
    background: var(--red);
    color: var(--white);
    text-shadow: none;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--white);
}

::-webkit-scrollbar-thumb {
    background: var(--red);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--black);
}

a,
a:visited {
    color: var(--red);
    text-decoration: none;
}

a:hover {
    color: var(--black);
}

img {
    display: block;
    padding: 0;
    margin: 0 auto;
    outline: 1px solid var(--black-dark);
    max-width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
ol,
ul,
li {
    flex: 100%;
    padding: 0;
    margin: 0;
}

/*--- Font Details ---*/

b {
    font-weight: 500;
}

heavy {
    font-weight: 700;
}

/*--- Logo ---*/

.logo {
    position: fixed;
    top: 25px;
    left: 25px;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    z-index: 1000;
}

.logo a {
    display: block;
    background: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 5px;
}

.logo svg#logo {
    width: auto;
    height: 25px;
    margin: 7.5px;
}

.logo svg#logo #logo-m {
    fill: url(#logo-m-gradient);
}

.logo svg#logo #logo-fold {
    fill: #00000040;
}

.logo a:hover {
    background: var(--sunrise);
    outline: 2px solid #fff;
}

.logo a:hover #logo #logo-m {
    fill: #fff;
    fill-rule: evenodd;
}

.logo a:hover #logo #logo-fold {
    fill: transparent;
}

/*--- Menu ---*/

#menu-container {
    position: fixed;
    top: 25px;
    right: 25px;
    width: 40px;
    height: 40px;
    z-index: 998;
}

#menu-container #menu-switch {
    position: relative;
    display: block;
    width: 40px;
    height: 40px;
    z-index: 1;
    user-select: none;
}

#menu-container #menu-switch input {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    margin: 0;
    z-index: 2;
    opacity: 0;
    cursor: pointer;
    transition: 0.1s ease-in-out;
}

#menu-container #menu-switch .menu-icon {
    position: relative;
    display: block;
    background: var(--red);
    width: 20px;
    height: 2px;
    z-index: 1;
    transition: 0.1s ease-in-out;
}

#menu-container #menu-switch .menu-back {
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 40px;
}

#menu-container #menu-switch #top {
    position: absolute;
    top: 16px;
    left: 10px;
    transform-origin: 0 50%;
}

#menu-container #menu-switch #bottom {
    position: absolute;
    bottom: 15px;
    left: 10px;
    transform-origin: 0 50%;
}

#menu-container #menu-switch:hover input~.menu-icon {
    background: var(--black);
}

#menu-container #menu-switch input:checked~.menu-icon {
    background: var(--black);
}

#menu-container #menu-switch input:checked~#top {
    transform: rotate(45deg);
    translate: 3px -4px;
}

#menu-container #menu-switch input:checked~#bottom {
    transform: rotate(-45deg);
    translate: 3px 3px;
}

#menu-container #menu-view {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    z-index: -1;
    display: block;
    background: var(--white);
    backdrop-filter: blur(10px);
    height: auto;
    transform: translateX(100vw);
}

#menu-container #menu-switch input:checked~#menu-view {
    transform: unset;
}

#menu-container #menu-view #menu {
    display: flex;
    flex-wrap: wrap;
    row-gap: 2rem;
    width: calc(100% / 3);
    padding: calc(100vh / 4) 0;
    margin: 0 auto;
    overflow-x: scroll;
}

#menu-container #menu-view #menu::-webkit-scrollbar {
    display: none;
}

#menu-container #menu-view #menu p {
    padding: 0;
    margin: 0;
    color: var(--black);
    font-size: var(--title-font-size);
    font-style: italic;
    font-weight: 200;
    line-height: 1;
}

#menu-container #menu-view #menu p a,
#menu-container #menu-view #menu p a:visited {
    font-weight: 900;
}

/*--- index.html ---*/

.feed-view {
    display: flex;
    flex-wrap: wrap;
    row-gap: 2rem;
    width: calc(100% / 3);
    padding: calc(100vh / 4) 0;
    margin: 0 auto;
}

.feed-view .article {
    display: flex;
    flex-wrap: wrap;
    row-gap: 0.15rem;
    width: 100%;
}

.feed-view .article h1.article-title {
    width: 100%;
    margin: 0;
    font-size: var(--title-font-size);
    font-style: italic;
    font-weight: 900;
    line-height: 1;
}

.feed-view .article h2.article-date {
    font-weight: 500;
    width: 100%;
    font-size: 1rem;
    line-height: 1.5;
}

/*--- list.html ---*/

.tags-view {
    display: flex;
    flex-wrap: wrap;
    row-gap: 2rem;
    width: calc(100% / 3);
    padding: calc(100vh / 4) 0;
    margin: 0 auto;
}

.tags-view h3.tags-title {
    width: 100%;
    margin: 0;
    font-size: 1.5rem;
    font-style: italic;
    font-weight: 900;
    line-height: 1;
}

.tags-view h3.tags-title::before {
    content: 'Articles tagged as';
    display: inline-block;
    width: auto;
    height: auto;
    margin: 0 0.35em 0 0;
    font-weight: 300;
}

.tags-view .article {
    display: flex;
    flex-wrap: wrap;
    row-gap: 0.15rem;
    width: 100%;
}

.tags-view .article h1.article-title {
    width: 100%;
    margin: 0;
    font-size: var(--title-font-size);
    font-style: italic;
    font-weight: 900;
    line-height: 1;
}

.tags-view .article h2.article-date,
.tags-view .article h2.article-count {
    font-weight: 500;
    width: 100%;
    font-size: 1rem;
    line-height: 1.5;
}

/*--- single.html ---*/

.article-view {
    width: calc(100% / 3);
    padding: calc(100vh / 4) 0;
    margin: 0 auto;
}

.article-view .article {
    display: flex;
    flex-wrap: wrap;
    row-gap: 1.5rem;
    width: 100%;
}

.article-view .article h1.article-title {
    width: 100%;
    font-size: var(--title-font-size);
    font-style: italic;
    font-weight: 900;
    line-height: 1;
    opacity: 0.5;
}

.article-view .article .article-body {
    display: flex;
    flex-wrap: wrap;
    row-gap: 1.5rem;
    width: 100%;
    line-height: 1.5;
}

.article-view .article .article-body h1 {
    font-size: 2.5rem;
    font-weight: 500;
    line-height: 1;
}

.article-view .article .article-body h1 a,
.article-view .article .article-body h2 a {
    color: unset;
    font-style: normal;
    font-weight: unset;
    transition: 0.2s ease-in-out;
}

.article-view .article .article-body h1 a:hover,
.article-view .article .article-body h2 a:hover {
    color: var(--red);
}

.article-view .article .article-body h1 a::before,
.article-view .article .article-body h2 a::before {
    content: '\0023';
    display: inline-block;
    width: 0;
    overflow-x: clip;
    transition: 0.2s ease-in-out;
}

.article-view .article .article-body h1 a:hover::before,
.article-view .article .article-body h2 a:hover::before {
    width: 0.85em;
    margin-left: -0.85em;
}

.article-view .article .article-body h2 {
    font-size: var(--body-font-size);
    font-weight: 900;
    line-height: 1;
}

.article-view .article .article-body hr {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    margin: 0;
}

.article-view .article .article-body hr::before {
    content: '\2022';
    display: block;
    margin: 0;
    color: var(--black);
    font-size: var(--title-font-size);
    text-align: center;
    opacity: 0.5;
}

.article-view .article .article-body p {
    font-size: var(--body-font-size);
}

.article-view .article .article-body p.caption {
    margin: 0 1.5rem -0.5rem 1.5rem;
    font-size: 1.25rem;
    font-weight: 400;
}

.article-view .article .article-body ol,
.article-view .article .article-body ul {
    display: flex;
    flex-wrap: wrap;
    row-gap: 0.25rem;
    font-size: var(--body-font-size);
}

.article-view .article .article-body li {
    margin: 0 0 0 1em;
}

.article-view .article .article-body li::marker {
    color: var(--black-dim);
}

.article-view .article .article-body blockquote {
    position: relative;
    flex: calc(100% - 2rem);
    margin: 0 2rem;
    font-size: var(--body-font-size);
    font-style: italic;
}

.article-view .article .article-body blockquote::before {
    content: '\275d';
    position: absolute;
    display: block;
    top: -0.75rem;
    left: -3rem;
    font-feature-settings: 'calt';
    font-size: 4rem;
    font-weight: 900;
    opacity: 0.25;
}

.article-view .article .article-body blockquote i {
    font-style: normal;
}

.article-view .article .article-body a {
    font-style: italic;
    font-weight: 700;
}

.article-view .article .article-body details summary {
    color: var(--aside);
    font-size: var(--body-font-size);
    font-style: italic;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    transition: 0.1s ease-in-out;
}

.article-view .article .article-body details summary:hover {
    color: var(--black);
    font-weight: 900;
}

.article-view .article .article-body details[open] summary {
    font-weight: 900;
}

.article-view .article .article-body details summary::marker,
.article-view .article .article-body details summary::-webkit-details-marker {
    content: '';
    display: none;
}

.article-view .article .article-body details summary::before {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    box-shadow: 0px 0px 0px 1rem var(--aside) inset;
    border: 2px solid var(--white);
    border-radius: 50%;
    margin-right: 0.5rem;
    outline: 1.5px solid var(--aside);
    transition: 0.1s ease-in-out;
}

.article-view .article .article-body details summary:hover::before {
    box-shadow: 0px 0px 0px 1rem var(--black) inset;
}

.article-view .article .article-body details[open] summary::before {
    box-shadow: 0px 0px 0px 2px var(--aside) inset;
}

.article-view .article .article-body details[open] summary:hover::before {
    box-shadow: 0px 0px 0px 2px var(--black) inset;
}

.article-view .article .article-body details p {
    padding: 1rem 2rem;
    border: 2px solid var(--aside-dim);
    border-radius: var(--rounded-corners);
    margin-top: 1rem;
}

.article-view .article .article-body img {
    border-radius: var(--rounded-corners);
    margin: 0 auto;
}

.article-view .article .article-body zoom {
    border-radius: var(--rounded-corners);
    transition: none;
}

.article-view .article .article-body zoom:hover {
    outline: 0.25rem solid var(--red);
    outline-offset: 0.25rem;
    cursor: pointer;
}

.article-view .article .article-body zoom img.flow {
    opacity: 1;
}

.article-view .article .article-body zoom lightbox {
    content: '';
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    display: none;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    justify-content: center;
    background: var(--white-dim);
    backdrop-filter: blur(10px) grayscale(1);
    padding: 100px;
    pointer-events: none;
    cursor: pointer;
}

.article-view .article .article-body zoom:focus lightbox {
    display: flex;
}

.article-view .article .article-body zoom lightbox img {
    max-width: 100%;
    max-height: 100%;
    outline: 1px solid var(--black-dark);
}

body:has(.article-view .article .article-body zoom:focus) {
    overflow: hidden;
    cursor: default;
}

body:has(.article-view .article .article-body zoom:focus) .article-view .article .article-body zoom {
    pointer-events: none;
}

.article-view .article .article-body .video,
.article-view .article .article-body .video div {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--rounded-corners);
    overflow: hidden;
}

.article-view .article .article-footer {
    display: flex;
    flex-wrap: wrap;
    row-gap: 1.5rem;
    width: 100%;
}

.article-view .article .article-footer .article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 1rem;
    font-style: italic;
    font-weight: 500;
}

.article-view .article .article-footer .article-date {
    font-weight: 500;
    width: 100%;
}

/*--- Medium Screen Size ---*/

@media screen and (max-width:1200px) {

    #menu-container #menu-view #menu,
    .feed-view,
    .article-view {
        width: calc((100% / 3) * 2);
    }

}

/*--- Small Screen Size ---*/

@media screen and (max-width:800px) {
    :root {
        --rounded-corners: 0.5rem;
        --title-font-size: 2.5rem;
        --body-font-size: 1.5rem;
    }

    .logo {
        top: 5px;
        left: 5px;
    }

    #menu-container {
        top: 5px;
        right: 5px;
    }

    #menu-container #menu-view {
        width: 100%;
        margin: 0;
        outline: 0 !important;
    }

    #menu-container #menu-view #menu {
        width: calc(100% - 120px);
        padding: 100px 0;
    }

    .feed-view,
    .tags-view,
    .article-view {
        width: calc(100% - 120px);
        padding: 100px 0;
    }

    .article-view .article .article-body blockquote::before {
        top: -0.5rem;
        left: -2.25rem;
        font-size: var(--title-font-size);
    }

    .article-view .article .article-body ol,
    .article-view .article .article-body ul {
        padding: 0 0 0 1.25rem;
    }

    .article-view .article .article-body blockquote {
        flex: calc(100% - 2em);
        margin: 0 1rem;
    }

    .article-view .article .article-body details p {
        padding: 0.5rem 1rem;
    }

    .article-view .article .article-body zoom {
        border-radius: unset;
    }

    .article-view .article .article-body zoom:hover {
        outline: unset;
        cursor: default;
    }

    .article-view .article .article-body zoom:focus lightbox {
        display: none;
    }

    body:has(.article-view .article .article-body zoom:focus) {
        overflow: unset;
        cursor: unset;
    }

    body:has(.article-view .article .article-body zoom:focus) .article-view .article .article-body zoom {
        pointer-events: unset;
    }

}

/*--- Dark Mode ---*/

@media (prefers-color-scheme: dark) {
    :root {
        --black: #fff;
        --black-dim: #fff7;
        --black-dark: #fff1;
        --white: #0a0a0a;
        --white-dim: #0a0a0a77;
        --white-dark: #0a0a0a11;
    }

    /* Dark Mode reverses black and white */

}