@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');

:root {
    --text-color: #090a0c;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-color);
    background-color: #FBFBFB;
}



h1 {
    font-size: 3.3rem;
    line-height: 1.1;
    font-weight: 600;
    margin-top: 3rem;
    margin-bottom: 0;
}

h2 {
    font-size: 1.5rem;
    margin-block-start: 0.83rem;
    margin-block-end: 0.83rem;
    font-weight: 600;
}

h3 {
    font-weight: 400;
    font-style: italic;
}

p {
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.6;
    margin-block-start: 1.5rem;
    margin-block-end: 1.5rem;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

header {
    width: 100%;
}

header > div {
    margin-left: auto;
    margin-right: auto;
    max-width: 600px;
    padding: 0 20px;
    box-sizing: border-box;
}

header a {
    text-decoration: none;
    color: inherit; 
}

header h1 {
    font-size: 2rem;
    line-height: 44px;
    margin-top: 3rem;
    margin-bottom: 0.5rem;
}

.header-nav {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.header-nav a {
    font-size: 0.9rem;
    font-weight: 400;
    color: #2563eb;
}

.content-wrapper {
    margin-left: auto;
    margin-right: auto;
    max-width: 600px;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

li {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.headline-image {
    width: 400px;
}

.date {
    margin-top: 2.25rem;
    margin-bottom: -0.25rem;
}

time {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0;
    color: #808080;
}

.back-to-top {
    text-align: center;
    margin-bottom: -0.25rem;
    padding-bottom: 10px;
    cursor: pointer;
}

.contents-toggle {
    background-color: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    position: fixed;
    top: 25px;
    left: 15px;
    z-index: 2;
}

#toggle-open {
    display: none;
    z-index: 3;
}

#toggle-close {
    z-index: 3;
}

#table-of-contents {
    position: fixed;
    top: 0;
    left: 0;
    width: 375px;
    box-sizing: border-box;
    overflow-y: auto;
    opacity: 1;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
    height: 100%;
    backdrop-filter: blur(5px);
    background-color: rgba(251, 251, 251, 0.80);
}

#table-of-contents.visible {
    opacity: 1;
    visibility: visible;
}

#table-of-contents.hidden {
    opacity: 0;
    visibility: hidden;
}

#table-of-contents h2 {
    padding: 120px 20px 20px;
}

#table-of-contents-list {
    list-style-type: none;
    padding: 0 20px 20px;
    margin: 0;
}

#table-of-contents-list li {
    cursor: pointer;
    margin-bottom: 0.8rem;
    opacity: 0.5;
}

#table-of-contents-list li.selected {
    opacity: 1;
}

#table-of-contents-list li a {
    text-decoration: none;
}

span.source {
    position: relative;
    display: inline-flex;
    width: 17px;
    height: 17px;
    background-color: #D4D4D4;
    color: var(--text-color);
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    font-size: 11px;
    cursor: pointer;
    margin-left: 4px;
    top: -1px;
    transition: all 0.3s ease-in-out;
}

span.source:hover {
    background-color: #2E86AB;
    color: white;
}

.source-tooltip {
    position: absolute;
    background-color: white;
    width: fit-content;
    padding: 10px 15px;
    border-radius: 5px;
    border: 1px solid black;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 2;
    max-width: 400px;
}

.source-tooltip::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 5px;
    bottom: -5px;
}

.source-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

::selection {
    background-color: #d4fb73;
    color: #000000;
}

@media screen and (max-width: 1060px) {
    #toggle-open {
        display: block;
    }

    #toggle-close {
        display: none;
    }
}

@media screen and (max-width: 750px) {
    #contents-toggle {
        right: 15px;
        left: unset;
    }

    #table-of-contents {
        right: 0;
        left: unset;
    }
}

@media screen and (max-width: 445px) {
    #table-of-contents {
        width: 325px;
    }

    .content-wrapper {
        padding-left: 10px;
        padding-right: 10px;
    }
}