:root {
    --page-bg: #fff;
    --divider: #ddd;
    --code-bg: #1e1e1e;
    --code-fg: #f8f8f2;
    --description: #666;
    --mute: #9b9b9b;

    --year-td: #e6e6e6;
    --month-empty: #f7f7f7;

    --webrings: #f7f7f9;
    --webrings-hover: #ece8ff;
}


body {
    font-family: sans-serif;
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
    background: var(--page-bg);
}

pre {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre;
    background: var(--code-bg);
    color: var(--code-fg);
    padding: 1.2em 0.8em;
    border-radius: 0.5em;
    box-sizing: border-box;
    font-size: 0.9em;
}

a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.content-sidebar-container {
    display: grid;
    grid-template-columns: 1fr 250px;
    gap: 1rem;
}

.content-sidebar-container>* {
    min-width: 0;
}

.post-content iframe,
.post-content img,
.post-content video {
    max-width: 100%;
}

.post-content img,
.post-content video {
    height: auto;
    display: block;
    padding-left: 10px;
}

.sidebar {
    border-left: 2px solid var(--divider);
    padding-left: 1rem;
    font-size: 0.9rem;
}

@media (max-width: 800px) {
    .content-sidebar-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 1;
        border-left: none;
        border-top: 2px solid var(--divider);
        padding: 0 2em;
    }

    .sidebar-top {
        order: -1;
        border-left: none;
        border-bottom: 2px solid var(--divider);
        padding-left: 0;
        padding-bottom: 1rem;
    }
}

.logo-subtitle-container {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
}

.subtitle-group {
    flex: 1;
    display: flex;
    align-items: flex-end;
}

.logo-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.logo-main,
.logo-thorn {
    width: 100%;
}

.logo-thorn {
    margin-top: -30px;
}

@media (max-width: 768px) {
    .logo-subtitle-container {
        flex-direction: column-reverse;
        align-items: flex-start;
    }

    .logo-group {
        align-items: flex-start;
    }

    .subtitle-group {
        width: 100%;
    }
}

.column-links {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    text-align: right;
}

.column-links a {
    margin: 0 0.2rem;
    line-height: 2.4em;
}

/* POST LIST ITEMS */
.post-list-item {
    display: flex;
    gap: 1rem;
    padding: 0.6rem 0;
    align-items: stretch;
    position: relative;
}

/* full click area */
.item-full-link {
    position: absolute;
    inset: 0;
    z-index: 5;
}

.post-list-item a:not(.item-full-link) {
    position: relative;
    z-index: 10;
}

.post-list-item .item-thumb {
    width: 140px;
    height: 100px;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 6px;
}

.post-list-item .item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left top;
}

.post-list-item .item-main-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-right: 40px;
}

.post-list-item:has(.item-thumb) .item-main-group {
    min-height: 100px;
}

.post-list-item .item-title-author-group {
    position: relative;
}

.item-title-author-group .item-title {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.2;
}

.item-title-author-group .item-author {
    position: absolute;
    top: 0;
    right: -24px;
    width: 24px;
}

.item-title-author-group .item-author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--divider);
    display: block;
}

.post-list-item .item-description {
    font-size: 0.9rem;
    color: var(--description);
    margin-top: 0.35rem;
    line-height: 1.4;
    overflow: hidden;
    max-height: calc(100px - 40px);
}

.item-extra-group {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.item-extra-group .item-date {
    margin-right: auto;
    white-space: nowrap;
    font-size: 0.65rem;
    opacity: 0.7;
}

.item-extra-group .item-column {
    margin-right: 24px;
}

.year-nav {
    padding-top: 0
}

.month-nav {
    margin-bottom: 1em;
    margin-top: 1em;
    font-size: 0.9em;
    display: flex;
}

.month-nav a {
    text-decoration: none;
    padding: 0 0.5em;
}

.month-nav .nav-next {
    margin-left: auto;
}

.year-calendar {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.year-calendar td {
    border: 1px solid var(--year-td);
    padding: 1rem;
    text-align: center;
    vertical-align: middle;
    width: 33.333%;
    min-height: 90px;
    background: var(--page-bg);
}

.year-calendar .month-cell.empty {
    background: var(--month-empty);
    color: var(--month-empty);
}

.year-calendar .month-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.year-calendar .month-name {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.year-calendar .month-count {
    font-size: 0.85rem;
    color: #000;
}

.year-calendar .mute {
    color: var(--mute);
}

.month-calendar .has-post {
    font-weight: bold;
}

.author-info {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.author-info-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    order: 2;
}

.author-info-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    order: 1;
    max-width: 65%;
    text-align: left;
}

.author-info-description {
    line-height: 1.4;
}

.author-info-site {
    font-size: 0.875rem;
    color: var(--description);
    margin-top: 0.4em;
}

.author-info-site a {
    color: inherit;
    text-decoration: none;
}

.author-info-site a:hover {
    text-decoration: underline;
}

.post-detail-meta-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (max-width: 800px) {
    .post-detail-meta-container {
        flex-direction: row;
        align-items: flex-start;
        padding: 1em 1em;
    }

    .post-detail-meta-container .meta-left {
        flex: 1;
    }

    .post-detail-meta-container .meta-right {
        flex: 0 0 auto;
        margin-left: 1rem;
    }

    .post-detail-meta-container .author-info {
        flex-direction: column;
    }
}

@media (max-width: 475px) {
    .post-detail-meta-container {
        flex-direction: column;
    }
}

.comments-container {
    border-top: 2px solid var(--divider);
    margin-top: 2em;
}

.author-list {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.25rem 0;
}

.author-list .author-description {
    flex: 2;
    text-align: left;
    word-break: break-word;
    margin-right: 1rem;
    font-size: small;
    max-width: 300px;
}

.author-list .author-name {
    flex: 1;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 20px;
}

.author-list .author-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}



.webrings-wrapper {
    width: fit-content;
    float: right;
    padding: 0 0.5em;
}

.webrings {
    display: flex;
    align-items: left;
    justify-content: left;
    gap: 0.35rem;
    padding: 0.5rem 0.5rem;
    background: var(--webrings);
    border: 2px solid var(--divider);
    border-radius: 10px;
}

.webrings a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.2rem;
    border-radius: 6px;
    transition: transform 0.15s ease, background 0.15s ease;
}

.webrings a:hover {
    background: var(--webrings-hover);
    transform: translateY(-5px);
}

.webrings img {
    height: 31px;
    width: auto;
}

footer {
    display: flex;
    flex-direction: column;
    font-size: small;
    font-weight: bold;
    justify-content: left;
}

footer .copyright-text {
    margin-left: auto;
}

.loading-placeholder {
    padding: 1em;
    text-align: center;
    background: #f4f4f4;
    border-radius: 4px;
    opacity: 0.7;
    width: 90%;
}

.loading-failure {
    font-weight: bold;
    color: #b00020;
    background: #ffe6e6;
}

.loading-success {
    font-weight: bold;
    color: #006b1f;
    background: #e6ffe6;
}

blockquote {
    font-size: 0.95em; /* slightly smaller than body text */
    padding-left: 1em; /* space between border and text */
    border-radius: 4px; /* slightly rounded corners */
}

blockquote p {
    margin: 0.5em 0; /* reduce spacing between paragraphs inside blockquote */
    line-height: 1.4; /* slightly tighter line spacing */
    font-size: 0.95em; /* consistent with blockquote */
}

:root {
    --page-bg: #0e0f12;
    --page-fg: #e6e6eb;

    --panel-bg: #14161b;
    --panel-bg-soft: #1b1e25;

    --divider: #2a2e38;

    --accent: #c62828;
    --accent-soft: #ff5c5c;
    --accent-muted: #7a1f1f;

    --link: #eaeaf0;
    --link-hover: #ff6a6a;

    --description: #a9abb3;
    --mute: #7b7e89;

    --code-bg: #0b0c10;
    --code-fg: #f2f2f2;

    --year-td: #2a2e38;
    --month-empty: #16181f;

    --webrings: #14161b;
    --webrings-hover: #1f2330;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    max-width: 980px;
    margin: 2.5rem auto;
    padding: 0 1.25rem;
    background: var(--page-bg);
    color: var(--page-fg);
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    color: var(--link-hover);
    text-decoration: none;
}

hr {
    border: none;
    border-top: 1px solid var(--divider);
}


pre {
    background: var(--code-bg);
    color: var(--code-fg);
    padding: 1.25em 1em;
    border-radius: 10px;
    font-size: 0.9em;
    overflow-x: auto;
}

.post-content img,
.post-content video,
.post-content iframe {
    max-width: 100%;
    display: block;
    border-radius: 10px;
    background: var(--panel-bg);
}

.post-content a {
    color: var(--link-hover);
    text-decoration: none;
}
.post-content a:hover {
    color: var(--link);
    text-decoration: none;
}

.content-sidebar-container {
    display: grid;
    grid-template-columns: 1fr 270px;
    gap: 2rem;
}

.sidebar {
    border-left: 1px solid var(--divider);
    padding-left: 1.5rem;
    font-size: 0.9rem;
}

.logo-subtitle-container {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.logo-main {
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.6));
}

.logo-thorn {
    margin-top: -32px;
    opacity: 0.85;
}

.column-links {
    text-align: right;
    margin-bottom: 2rem;
    font-size: 0.85rem;
}

.column-links a {
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.column-links a:hover {
    background: var(--panel-bg-soft);
}

.post-list-item {
    display: flex;
    gap: 1.25rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--divider);
    position: relative;
}

.post-list-item:last-child {
    border-bottom: none;
}

.item-thumb {
    width: 150px;
    height: 105px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--panel-bg);
}

.item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-title {
    font-size: 1.1rem;
    font-weight: 650;
    letter-spacing: 0.2px;
}

.item-title:hover {
    color: var(--accent-soft);
}

.item-description {
    color: var(--description);
    margin-top: 0.4rem;
    line-height: 1.45;
}

.item-extra-group {
    margin-top: auto;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--mute);
}

.item-author-avatar {
    border: 2px solid var(--accent-muted);
}

.author-info {
    background: var(--panel-bg);
    border-radius: 14px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.author-info-avatar {
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--divider);
}

.author-info-description {
    color: var(--description);
    font-size: 0.85rem;
}

.year-calendar td {
    border: 1px solid var(--year-td);
    background: var(--panel-bg);
}

.year-calendar .month-cell.empty {
    background: var(--month-empty);
}

.year-calendar .month-name {
    font-weight: 600;
}

.year-calendar .month-count {
    color: var(--accent-soft);
}

.webrings {
    background: var(--webrings);
    border: 1px solid var(--divider);
    border-radius: 14px;
}

.webrings a:hover {
    background: var(--webrings-hover);
    transform: translateY(-1px);
}

blockquote {
    background: var(--panel-bg);
    border-left: 4px solid var(--accent);
    padding: 0.75rem 1rem;
    margin: 1.25rem 0;
    border-radius: 8px;
    color: var(--description);
}

footer {
    border-top: 1px solid var(--divider);
    margin-top: 3rem;
    padding-top: 1rem;
    font-size: 0.75rem;
    color: var(--mute);
}

@media (max-width: 800px) {
    .content-sidebar-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        border-left: none;
        border-top: 1px solid var(--divider);
        padding-left: 0;
        padding-top: 1.5rem;
    }

    .column-links {
        text-align: left;
    }
}
