@import url("pygment.css");

:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #777777;
  --border: #e5e5e5;

  --headings: #111111;
  --body: #111111;
  --bullets: #999999;
  --quote-borders: #dddddd;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f0f;
    --text: #eaeaea;
    --muted: #9a9a9a;
    --border: #2a2a2a;

    --headings: #eaeaea;
    --body: #eaeaea;
    --bullets: #666666;
    --quote-borders: #333333;
  }
}

blockquote { font-style:italic; margin:20px; padding:5px 10px; }
blockquote cite { display:block; padding:10px 20px 0 0; text-align:right; }

nav, footer, .pagination { text-align:center; clear:both; }

code {
    padding: .2em .4em;
    margin: 0;
    font-size: 85%;
    white-space: break-spaces;
    background-color:#f0f0f0;
    border-radius:6px;
}

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

a:hover {
  color: #4a6fa5;
  border-bottom-color: #4a6fa5;
}

a:has(img) {
  border-bottom: none;
}

hr {
  border: none;
  height: 1px;
  background-color: rgba(0, 0, 0, 0.06);
  margin: 3rem 0;
}

img {
    max-width: 100%;
}

.katex { font-size: 1em; }
.katex-display { font-size: 1.2em; }

/* Archive Timeline Styles */
.timeline-wrapper {
    position: relative;
    margin-top: 26px;
    margin-left: 20px;
    padding-bottom: 26px;
    padding-left: 20px;
    padding-top: 26px;
    border-left: 1px solid var(--border);

    /* The Top Cap */
    &::before {
        content: "";
        position: absolute;
        top: -2px;
        left: -8.5px;
        width: 12px;
        height: 12px;
        border: 2px solid var(--border);
        border-radius: 50%;
        background-color: var(--bg);
        z-index: 2;
        box-shadow: 0 0 0 4px var(--bg);
    }

    /* The Bottom Cap */
    &::after {
        content: "";
        position: absolute;
        bottom: -2px;
        left: -8.5px;
        width: 12px;
        height: 12px;
        border: 2px solid var(--border);
        border-radius: 50%;
        background-color: var(--bg);
        z-index: 2;
        box-shadow: 0 0 0 4px var(--bg);
    }
}

.timeline-year-group {
    position: relative;
    margin-bottom: 25px;

    &:last-of-type {
        margin-bottom: 0;
    }
}

.timeline-year-node {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 13px;

    /* The Year Dot */
    &::before {
        content: "";
        position: absolute;
        left: -28.5px;
        width: 12px;
        height: 12px;
        background-color: var(--bg);
        border: 2px solid var(--text);
        border-radius: 50%;
        z-index: 1;
        box-shadow: 0 0 0 4px var(--bg);
    }

    .year-label {
        font-size: 22px;
        font-weight: bold;
        color: var(--text);
        margin-left: 20px;
        line-height: 22px;
    }
}

.timeline-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.timeline-item {
    position: relative;
    display: flex;
    align-items: baseline;
    padding-left: 20px;
    transition: transform 0.2s ease;

    /* The Date Connector */
    &::before {
        content: "";
        position: absolute;
        left: -20px;
        top: 10.5px;
        width: 20px;
        height: 1px;
        background-color: var(--border);
    }

    /* The Date Dot */
    &::after {
        content: "";
        position: absolute;
        left: -24.5px;
        top: 7px;
        width: 8px;
        height: 8px;
        background-color: var(--border);
        border-radius: 50%;
        z-index: 1;
        transition: transform 0.2s ease;
        box-shadow: 0 0 0 2px var(--bg);
    }

    &:hover {
        &::after {
            background-color: var(--text);
            transform: scale(1.2);
        }

        .item-date .date-text {
            color: var(--text);
            transform: translateX(4px);
        }

        .item-link {
            color: var(--text);
            transform: translateX(4px);
        }
    }

    .item-date {
        min-width: 60px;
        margin-right: 15px;

        .date-text {
            font-style: italic;
            font-size: 11px;
            color: var(--muted);
            display: inline-block;
            transition: transform 0.2s ease;
        }
    }

    .item-link {
        font-size: 14px;
        color: var(--text);
        text-decoration: none;
        line-height: 20px;
        border-bottom: 1px solid transparent;
        display: inline-block;
        transition: transform 0.2s ease;

        &:hover {
            border-color: var(--text);
        }
    }
}
