/*
 * Editorial archive theme
 * Keeps the existing templates and behavior while replacing the neon/glass look
 * with a quieter graphite-and-paper visual system.
 */

:root {
    color-scheme: dark;
    --primary-color: #c7a66a;
    --primary: #c7a66a;
    --primary-light: #d8bd86;
    --secondary-color: #8f7956;
    --gradient-start: #c7a66a;
    --gradient-end: #8f7956;
    --bg-color: #0d0e0e;
    --card-bg: #151614;
    --glass-bg: rgba(20, 21, 19, 0.92);
    --glass-border: rgba(218, 198, 160, 0.16);
    --text-color: #e7e1d6;
    --text-light: #bcb5a9;
    --text-muted: #807b73;
    --border-color: rgba(218, 198, 160, 0.13);
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
    --shadow-hover: 0 22px 60px rgba(0, 0, 0, 0.28);
    --radius: 6px;
    --radius-sm: 4px;
    --blur: 0px;
    --page-width: 1240px;
    --serif: "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
    --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
    scrollbar-color: #4b453b #111210;
    scrollbar-width: thin;
}

body {
    min-height: 100vh;
    color: var(--text-color);
    background: #0d0e0e;
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.75;
    letter-spacing: 0.01em;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 12% -8%, rgba(179, 144, 87, 0.09), transparent 38%),
        radial-gradient(ellipse at 88% 34%, rgba(255, 255, 255, 0.025), transparent 30%),
        linear-gradient(180deg, #111210 0%, #0c0d0c 58%, #090a09 100%);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.28;
    background-image:
        repeating-linear-gradient(0deg, transparent 0, transparent 3px, rgba(255, 255, 255, 0.008) 4px),
        repeating-linear-gradient(90deg, transparent 0, transparent 5px, rgba(255, 255, 255, 0.006) 6px);
}

::selection {
    color: #11120f;
    background: #d1b47d;
}

a {
    color: inherit;
    transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

a:hover {
    color: var(--primary-light);
}

button,
input,
textarea {
    font: inherit;
}

button,
a,
[onclick] {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 1px solid var(--primary-light);
    outline-offset: 4px;
}

.dynamic-bg {
    z-index: -3;
    background: transparent;
}

.glow-orb,
.stars,
.star {
    display: none;
}

.glass {
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    box-shadow: var(--shadow);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.container {
    width: min(100% - 40px, var(--page-width));
    max-width: var(--page-width);
    padding-right: 0;
    padding-left: 0;
}

.datetime-weather-container {
    display: none !important;
}

/* Navigation */

.navbar {
    position: sticky;
    top: 16px;
    width: min(calc(100% - 40px), 1180px);
    margin: 20px auto 0;
    padding: 0 18px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: rgba(14, 15, 14, 0.9);
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.navbar .container {
    width: 100%;
    height: 66px;
    padding: 0;
}

.navbar-brand {
    min-width: max-content;
    gap: 10px;
    color: var(--text-color);
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0.08em;
}

.navbar-brand i {
    display: none;
}

.navbar-brand::before {
    content: "\2726";
    color: var(--primary-light);
    font-family: Georgia, serif;
    font-size: 20px;
    line-height: 1;
}

.navbar-menu {
    gap: 3px;
}

.navbar-menu a {
    position: relative;
    padding: 10px 16px;
    border-radius: 0;
    color: #9e998f;
    font-size: 13px;
    letter-spacing: 0.08em;
}

.navbar-menu a i {
    display: none;
}

.navbar-menu a:hover,
.navbar-menu a.active {
    color: var(--text-color);
    background: transparent;
    box-shadow: none;
}

.navbar-menu a.active::after {
    content: "";
    position: absolute;
    right: 16px;
    bottom: 4px;
    left: 16px;
    height: 1px;
    background: var(--primary-light);
}

.navbar-search {
    gap: 8px;
    padding: 7px 12px;
    border-color: var(--border-color);
    border-radius: 999px;
    background: #111210;
}

.navbar-search:focus-within {
    border-color: rgba(216, 189, 134, 0.56);
    box-shadow: none;
}

.navbar-search input {
    width: 138px;
    color: var(--text-color);
    font-size: 12px;
}

.navbar-search input::placeholder {
    color: #716d65;
}

.navbar-search i {
    color: var(--primary-light) !important;
    font-size: 12px;
}

/* Home introduction */

.home-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
    gap: clamp(36px, 8vw, 120px);
    align-items: end;
    padding-top: clamp(72px, 10vw, 132px);
    padding-bottom: clamp(54px, 7vw, 88px);
    border-bottom: 1px solid var(--border-color);
}

.eyebrow {
    margin-bottom: 18px;
    color: var(--primary-light);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.22em;
}

.home-intro h1 {
    margin: 0;
    color: #ebe5da;
    font-family: var(--serif);
    font-size: clamp(42px, 6vw, 76px);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 0.015em;
}

.home-intro-copy {
    max-width: 580px;
    margin-top: 24px;
    color: #9d978d;
    font-size: 16px;
}

.home-intro-aside {
    padding: 4px 0 4px 22px;
    border-left: 1px solid rgba(216, 189, 134, 0.42);
}

.home-intro-aside span {
    display: block;
    margin-bottom: 9px;
    color: var(--primary-light);
    font-size: 11px;
    letter-spacing: 0.14em;
}

.home-intro-aside p {
    max-width: 250px;
    color: #8c877e;
    font-family: var(--serif);
    font-size: 16px;
    line-height: 1.8;
}

.section-heading {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.section-number,
.section-en {
    color: var(--primary-light);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.section-heading h2 {
    color: var(--text-color);
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 400;
}

.section-en {
    justify-self: end;
    color: var(--text-muted);
}

/* Main layout */

.main-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 26px;
    padding-top: 34px;
    padding-bottom: 24px;
}

.content-left {
    min-width: 0;
}

.content-right {
    width: auto;
    min-width: 0;
}

#articleList {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    counter-reset: journal-card;
}

.article-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    counter-increment: journal-card;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: rgba(19, 20, 18, 0.76);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: border-color 180ms ease, background-color 180ms ease;
}

.article-card::before {
    content: counter(journal-card, decimal-leading-zero);
    position: absolute;
    top: 13px;
    left: 15px;
    z-index: 4;
    min-width: 30px;
    color: rgba(241, 232, 216, 0.82);
    font-family: Georgia, serif;
    font-size: 12px;
    letter-spacing: 0.08em;
}

.article-card:hover {
    border-color: rgba(216, 189, 134, 0.34);
    background: rgba(23, 24, 21, 0.9);
    box-shadow: none;
    transform: none;
}

.article-card:first-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
}

.article-cover {
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-radius: 0;
    background: #10110f;
}

.article-card:first-child .article-cover {
    height: 100%;
    min-height: 330px;
}

.article-cover a {
    display: block;
    width: 100%;
    height: 100%;
}

.article-cover::after {
    background: linear-gradient(180deg, transparent 45%, rgba(8, 9, 8, 0.38));
    opacity: 1;
}

.article-cover img {
    filter: saturate(0.62) contrast(0.96) brightness(0.76);
    transform: scale(1.002);
    transition: filter 240ms ease, transform 500ms ease;
}

.article-card:hover .article-cover img {
    filter: saturate(0.78) contrast(1) brightness(0.84);
    transform: scale(1.025);
}

.article-cover-text {
    border: 0;
    background:
        linear-gradient(145deg, rgba(216, 189, 134, 0.04), transparent 45%),
        repeating-linear-gradient(135deg, transparent 0, transparent 36px, rgba(216, 189, 134, 0.035) 37px),
        #111210;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.article-cover-text::before {
    opacity: 1;
    animation: none;
    background: radial-gradient(circle at 75% 30%, rgba(216, 189, 134, 0.11), transparent 28%);
    transform: none;
}

.article-cover-text::after {
    top: 50%;
    right: -12%;
    bottom: auto;
    left: -12%;
    height: 1px;
    opacity: 0.6;
    animation: none;
    background: rgba(216, 189, 134, 0.26);
    transform: rotate(-12deg);
}

.cover-title {
    max-width: 85%;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: #bcb4a6;
    background: transparent;
    box-shadow: none;
    text-shadow: none;
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.06em;
}

.cover-title::before {
    display: none;
}

.article-card:hover .article-cover-text,
.article-card:hover .cover-title {
    color: #dcd4c7;
    border-color: transparent;
    background-color: transparent;
    box-shadow: none;
    text-shadow: none;
    transform: none;
}

.article-info {
    min-height: 218px;
    padding: 21px 22px 22px;
}

.article-card:first-child .article-info {
    min-height: 330px;
    justify-content: center;
    padding: 42px 36px;
}

.article-title {
    margin-bottom: 12px;
    padding-right: 30px;
    color: #e3ddd2;
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 400;
    line-height: 1.45;
}

.article-card:first-child .article-title {
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.35;
}

.article-title:hover {
    color: var(--primary-light);
    text-shadow: none;
}

.article-summary {
    color: #969087;
    font-size: 13px;
    line-height: 1.8;
}

.article-tags {
    gap: 6px;
    margin-top: 16px;
}

.tag {
    padding: 3px 9px;
    border: 1px solid rgba(216, 189, 134, 0.2);
    border-radius: 999px;
    color: #aaa397;
    background: transparent;
    font-size: 10px;
    backdrop-filter: none;
}

.tag:hover {
    color: #e3d7c0;
    border-color: rgba(216, 189, 134, 0.5);
    background: rgba(216, 189, 134, 0.06);
    box-shadow: none;
    transform: none;
}

.top-badge {
    display: inline-block;
    padding: 2px 7px;
    margin-right: 8px;
    border: 1px solid rgba(216, 189, 134, 0.32);
    border-radius: 2px;
    color: var(--primary-light);
    background: transparent;
    box-shadow: none;
    font-family: var(--sans);
    font-size: 9px;
    vertical-align: 3px;
}

.article-meta {
    gap: 12px;
    margin-top: auto;
    padding-top: 17px;
    color: #716d65;
    font-size: 10px;
}

.article-meta i {
    color: #8e7955;
}

.pagination {
    gap: 5px;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.pagination a,
.pagination span {
    min-width: 38px;
    padding: 7px 11px;
    border: 1px solid transparent;
    border-radius: 2px;
    color: #8e8980;
    background: transparent;
    backdrop-filter: none;
    text-align: center;
}

.pagination a:hover,
.pagination .active {
    color: #ece3d3;
    border-color: rgba(216, 189, 134, 0.4);
    background: rgba(216, 189, 134, 0.06);
    box-shadow: none;
}

/* Shared cards and sidebar */

.card,
.sidebar-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: rgba(18, 19, 17, 0.72);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.card:hover,
.sidebar-card:hover {
    border-color: rgba(216, 189, 134, 0.24);
    box-shadow: none;
    transform: none;
}

.sidebar-card {
    margin-bottom: 14px;
}

.card-header {
    gap: 8px;
    padding: 15px 17px;
    color: #cfc7ba;
    border-bottom-color: var(--border-color);
    font-family: var(--serif);
    font-size: 14px;
    font-weight: 400;
}

.card-header i {
    color: var(--primary-light);
    font-size: 11px;
}

.card-body {
    padding: 15px 17px;
}

.author-card {
    padding: 24px 20px 20px;
    text-align: left;
}

.author-avatar {
    width: 64px;
    height: 64px;
    margin-bottom: 18px;
    border: 1px solid rgba(216, 189, 134, 0.28);
    border-radius: 50%;
    filter: saturate(0.72);
    box-shadow: none;
}

.author-card:hover .author-avatar {
    box-shadow: none;
    transform: none;
}

.author-name {
    margin-bottom: 5px;
    color: #e4ddd1;
    background: none;
    -webkit-text-fill-color: currentColor;
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 400;
}

.author-intro {
    margin-bottom: 20px;
    color: #8f8980;
    font-size: 12px;
}

.author-stats {
    justify-content: flex-start;
    gap: 0;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.stat-item {
    flex: 1;
    text-align: left;
}

.stat-item + .stat-item {
    padding-left: 14px;
    border-left: 1px solid var(--border-color);
}

.stat-value {
    color: #d7c19a;
    background: none;
    -webkit-text-fill-color: currentColor;
    font-family: Georgia, serif;
    font-size: 18px;
    font-weight: 400;
}

.stat-label {
    color: #716d65;
    font-size: 9px;
    letter-spacing: 0.08em;
}

.notice-content {
    padding: 0;
    border: 0;
    border-radius: 0;
    color: #928c82;
    background: transparent;
    font-size: 12px;
}

.hot-article-item {
    gap: 11px;
    padding: 11px 0;
    border-bottom-color: var(--border-color);
}

.hot-article-item:hover,
.category-item:hover {
    transform: none;
}

.hot-article-cover {
    width: 58px;
    height: 44px;
    border-radius: 2px;
    background: #0f100e;
}

.hot-article-cover img {
    filter: saturate(0.58) brightness(0.78);
}

.hot-article-item:hover .hot-article-cover img {
    transform: none;
}

.hot-article-title {
    color: #aaa399;
    font-family: var(--serif);
    font-size: 12px;
    line-height: 1.55;
}

.hot-article-date {
    margin-top: 3px;
    color: #68645e;
    font-size: 9px;
}

.category-item {
    padding: 9px 0;
    border-bottom-color: var(--border-color);
}

.category-name {
    color: #a9a298;
    font-size: 12px;
}

.category-name i {
    color: #8d7854;
    font-size: 10px;
}

.category-count {
    min-width: 24px;
    padding: 1px 6px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: #858078;
    background: transparent;
    font-size: 9px;
    text-align: center;
}

.tag-cloud {
    gap: 6px;
}

/* Page headers and listings */

.page-header,
.search-header,
.category-header,
.tag-header {
    margin-bottom: 34px;
    padding: clamp(60px, 8vw, 96px) 0 28px;
    border: 0;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-align: left;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.page-title,
.search-header h2,
.category-header h2,
.tag-header h2 {
    margin: 0 0 10px;
    color: #e6dfd3;
    background: none;
    -webkit-text-fill-color: currentColor;
    font-family: var(--serif);
    font-size: clamp(34px, 5vw, 52px);
    font-weight: 400;
    letter-spacing: 0.03em;
}

.page-title i,
.search-header h2 i,
.category-header h2 i,
.tag-header h2 i {
    margin-right: 10px;
    color: var(--primary-light);
    font-size: 0.46em;
    vertical-align: 0.18em;
}

.page-desc,
.search-header p {
    color: #88837b;
    font-size: 13px;
}

body > .container[style] {
    width: min(100% - 40px, var(--page-width));
    padding-right: 0 !important;
    padding-left: 0 !important;
}

/* Archives */

.archive-container {
    max-width: 880px;
    margin: 0 auto;
}

.archive-total {
    margin-bottom: 32px;
    color: #8e887f;
    font-size: 13px;
    text-align: left;
}

.archive-total span {
    color: var(--primary-light);
    font-family: Georgia, serif;
    font-weight: 400;
}

.timeline {
    padding-left: 104px;
}

.timeline::before {
    left: 73px;
    width: 1px;
    background: rgba(216, 189, 134, 0.24);
    box-shadow: none;
}

.timeline-year {
    margin-bottom: 48px;
}

.timeline-year-title {
    position: relative;
    margin-bottom: 0;
    padding: 0 0 12px;
    color: #d8c49e;
    background: none;
    -webkit-text-fill-color: currentColor;
    font-family: Georgia, var(--serif);
    font-size: 20px;
    font-weight: 400;
}

.timeline-year-title::before {
    left: -36px;
    top: 10px;
    width: 7px;
    height: 7px;
    border: 0;
    background: var(--primary-light);
    box-shadow: 0 0 0 5px rgba(216, 189, 134, 0.08);
}

.timeline-item {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 18px;
    align-items: baseline;
    margin: 0;
    padding: 15px 0;
    border: 0;
    border-top: 1px solid var(--border-color);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.timeline-item:hover {
    border-color: rgba(216, 189, 134, 0.36);
    box-shadow: none;
    transform: none;
}

.timeline-item::before {
    display: none;
}

.timeline-date {
    margin: 0;
    color: #716d65;
    font-family: Georgia, serif;
    font-size: 10px;
    letter-spacing: 0.06em;
}

.timeline-title {
    color: #bdb6aa;
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 400;
}

.timeline-title:hover {
    color: var(--primary-light);
    text-shadow: none;
}

/* About */

.about-card {
    display: grid;
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
    gap: clamp(36px, 7vw, 88px);
    max-width: 1040px;
    margin: 52px auto;
    padding: clamp(34px, 5vw, 64px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: rgba(18, 19, 17, 0.7);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.about-header {
    margin: 0;
    text-align: left;
}

.about-avatar {
    width: 92px;
    height: 92px;
    margin-bottom: 24px;
    border: 1px solid rgba(216, 189, 134, 0.3);
    border-radius: 50%;
    filter: saturate(0.65);
    box-shadow: none;
}

.about-card:hover .about-avatar {
    box-shadow: none;
    transform: none;
}

.about-name {
    margin-bottom: 8px;
    color: #e4ddd2;
    background: none;
    -webkit-text-fill-color: currentColor;
    font-family: var(--serif);
    font-size: 30px;
    font-weight: 400;
}

.about-intro {
    color: #88837b;
    font-size: 13px;
}

.about-content {
    grid-column: 2;
    grid-row: 1 / span 2;
    padding-left: 36px;
    border-left: 1px solid var(--border-color);
    color: #aaa399;
    line-height: 2;
}

.about-content h3 {
    margin: 4px 0 14px;
    color: #d2b986;
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 400;
}

.about-content p {
    margin-bottom: 14px;
}

.social-links {
    justify-content: flex-start;
    gap: 8px;
    margin-top: 28px;
}

.social-links a {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: #9e978d;
    background: transparent;
    box-shadow: none;
    font-size: 13px;
}

.social-links a:hover {
    color: var(--primary-light);
    border-color: rgba(216, 189, 134, 0.45);
    box-shadow: none;
    transform: none;
}

/* Links */

.my-site {
    padding: 28px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: rgba(18, 19, 17, 0.72);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.my-site-logo {
    border: 1px solid rgba(216, 189, 134, 0.24);
    filter: saturate(0.66);
    box-shadow: none;
}

.my-site-name {
    color: #dfd8cd;
    background: none;
    -webkit-text-fill-color: currentColor;
    font-family: var(--serif);
    font-weight: 400;
}

.my-site-desc {
    color: #8f8980;
}

.my-site-url {
    color: #c5aa79;
}

.apply-btn,
.submit-btn,
.comment-submit,
.btn-submit {
    border: 1px solid rgba(216, 189, 134, 0.55);
    border-radius: 3px;
    color: #e4d5b9;
    background: rgba(216, 189, 134, 0.05);
    box-shadow: none;
    font-weight: 400;
    letter-spacing: 0.06em;
}

.apply-btn:hover,
.submit-btn:hover,
.comment-submit:hover,
.btn-submit:hover {
    color: #171712;
    background: #c9ab75;
    box-shadow: none;
    transform: none;
}

.links-grid {
    gap: 12px;
}

.link-card {
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: rgba(18, 19, 17, 0.72);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.link-card:hover {
    border-color: rgba(216, 189, 134, 0.34);
    box-shadow: none;
    transform: none;
}

.link-icon {
    border: 1px solid rgba(216, 189, 134, 0.2);
    filter: saturate(0.62);
    box-shadow: none;
}

.link-name {
    color: #d5cec2;
    font-family: var(--serif);
    font-weight: 400;
}

.link-desc,
.links-count {
    color: #7f7a72;
}

.modal-overlay {
    background: rgba(4, 5, 4, 0.8);
    backdrop-filter: blur(4px);
}

.modal-box {
    border: 1px solid rgba(216, 189, 134, 0.24);
    border-radius: var(--radius);
    background: #151614;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
}

.modal-title {
    color: #ded7cb;
    background: none;
    -webkit-text-fill-color: currentColor;
    font-family: var(--serif);
    font-weight: 400;
}

.btn-cancel {
    border: 1px solid var(--border-color);
    color: #999289;
    background: transparent;
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.03);
}

.upload-box {
    border-color: rgba(216, 189, 134, 0.22);
    border-radius: 3px;
    background: #111210;
}

.upload-box:hover {
    border-color: rgba(216, 189, 134, 0.5);
    background: #141512;
}

/* Forms and guestbook */

.guestbook-container {
    max-width: 840px;
}

.message-form,
.message-list,
.comment-section {
    padding: 28px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: rgba(18, 19, 17, 0.72);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.message-list {
    margin-top: 16px;
}

.message-form textarea,
.form-row input,
.form-group input,
.comment-form textarea,
.comment-form-row input {
    border: 1px solid var(--border-color);
    border-radius: 3px;
    color: #ddd6cb;
    background: #111210;
    box-shadow: none;
}

.message-form textarea:focus,
.form-row input:focus,
.form-group input:focus,
.comment-form textarea:focus,
.comment-form-row input:focus {
    border-color: rgba(216, 189, 134, 0.58);
    box-shadow: none;
    outline: none;
}

.message-form textarea::placeholder,
.form-row input::placeholder,
.form-group input::placeholder,
.comment-form textarea::placeholder,
.comment-form-row input::placeholder {
    color: #625f59;
}

.message-item,
.comment-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.message-avatar,
.comment-avatar {
    border: 1px solid rgba(216, 189, 134, 0.18);
    filter: saturate(0.62);
}

.message-nickname,
.comment-nickname {
    color: #d3c8b5;
    font-family: var(--serif);
    font-weight: 400;
}

.message-time,
.comment-time {
    color: #69655f;
}

.message-text,
.comment-text {
    color: #aaa399;
}

.message-reply,
.comment-reply {
    color: #a88f62;
}

.message-reply:hover,
.comment-reply:hover {
    color: var(--primary-light);
    text-shadow: none;
}

.message-children,
.comment-children {
    border-left-color: rgba(216, 189, 134, 0.2);
}

/* Article detail */

.article-detail {
    padding: clamp(30px, 5vw, 58px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: rgba(18, 19, 17, 0.76);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.article-detail-title {
    margin-bottom: 22px;
    color: #e8e1d6;
    background: none;
    -webkit-text-fill-color: currentColor;
    font-family: var(--serif);
    font-size: clamp(34px, 5vw, 52px);
    font-weight: 400;
    line-height: 1.35;
    letter-spacing: 0.02em;
}

.article-detail-meta {
    gap: 18px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    color: #77726a;
    font-size: 11px;
}

.article-detail-meta span {
    gap: 6px;
}

.article-detail-meta i {
    color: #9d8359;
}

.article-detail .article-tags {
    margin: 18px 0 4px;
}

.article-content {
    color: #b8b1a6;
    font-family: var(--serif);
    font-size: 17px;
    line-height: 2;
}

.article-content p {
    margin: 0 0 1.35em;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
    color: #e0d9ce;
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1.5;
}

.article-content h2 {
    margin: 2.2em 0 0.8em;
    padding-bottom: 0.4em;
    border-bottom: 1px solid var(--border-color);
}

.article-content pre {
    border: 1px solid var(--border-color);
    border-radius: 3px;
    background: #0d0e0d;
    box-shadow: none;
}

.article-content code {
    color: #d8c49c;
    background: rgba(216, 189, 134, 0.07);
}

.article-content img {
    border: 1px solid var(--border-color);
    border-radius: 3px;
    filter: saturate(0.8);
    box-shadow: none;
}

.article-content blockquote {
    padding: 8px 0 8px 22px;
    border-left: 2px solid #aa8d5c;
    border-radius: 0;
    color: #999187;
    background: transparent;
}

.article-content a {
    color: #d0b37c;
    border-bottom: 1px solid rgba(208, 179, 124, 0.3);
}

.article-actions {
    border-top-color: var(--border-color);
}

.action-btn {
    border: 1px solid var(--border-color);
    border-radius: 3px;
    color: #9e978d;
    background: transparent;
    box-shadow: none;
}

.action-btn:hover {
    color: var(--primary-light);
    border-color: rgba(216, 189, 134, 0.44);
    background: rgba(216, 189, 134, 0.05);
    box-shadow: none;
    transform: none;
}

.action-btn i {
    color: inherit;
}

.comment-section {
    margin-top: 16px;
}

.comment-title {
    color: #ded7cc;
    font-family: var(--serif);
    font-weight: 400;
}

.comment-title i {
    color: var(--primary-light);
}

.toc-card {
    top: 104px;
}

.toc-card .card-body {
    scrollbar-color: #4a4439 transparent;
}

.toc-card .card-body::-webkit-scrollbar-thumb {
    background: #4a4439;
}

.toc-list li {
    border-bottom-color: var(--border-color);
}

.toc-list a {
    color: #8f8980;
    font-size: 11px;
}

.toc-list a:hover {
    color: #d1b47e;
    background: transparent;
}

.toc-list li.active {
    border-left-color: #b59661;
    background: rgba(216, 189, 134, 0.05);
}

.toc-list li.active a {
    color: #d4bc90;
}

/* AI page and assistant entry */

.ai-chat-page {
    max-width: var(--page-width);
}

.ai-chat-wrapper {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: rgba(18, 19, 17, 0.78);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.ai-chat-header,
.ai-chat-float-header {
    border-bottom: 1px solid var(--border-color);
    background: #151614;
}

.ai-chat-title {
    color: #dfd8cc;
    font-family: var(--serif);
    font-weight: 400;
}

.ai-chat-title i,
.ai-chat-float-title i {
    color: var(--primary-light);
}

.ai-chat-desc {
    color: #817c74;
}

.ai-chat-iframe {
    background: #111210;
}

#ai-chat-float-btn {
    right: 24px;
    bottom: 24px;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(216, 189, 134, 0.34);
    border-radius: 50%;
    color: #cdb581;
    background: rgba(16, 17, 15, 0.94);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
    animation: none;
}

#ai-chat-float-btn::after {
    content: "AI";
    font-family: Georgia, serif;
    font-size: 11px;
    letter-spacing: 0.08em;
}

#ai-chat-float-btn i {
    display: none;
}

#ai-chat-float-btn:hover {
    color: #f0dfbd;
    border-color: rgba(216, 189, 134, 0.62);
    background: #171813;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.34);
    transform: none;
}

#ai-chat-float-window {
    border: 1px solid rgba(216, 189, 134, 0.22);
    border-radius: var(--radius);
    background: #151614;
    box-shadow: 0 24px 74px rgba(0, 0, 0, 0.48);
}

.ai-chat-float-actions button,
.ai-chat-close {
    border: 1px solid var(--border-color);
    color: #99938a;
    background: transparent;
}

.ai-chat-float-actions button:hover,
.ai-chat-close:hover {
    color: var(--primary-light);
    background: rgba(216, 189, 134, 0.05);
    transform: none;
}

/* Footer */

.footer {
    margin-top: 70px;
    padding: 34px 0 42px;
    border-top: 1px solid var(--border-color);
    color: #858078;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.footer-links {
    gap: 22px;
    margin-bottom: 14px;
}

.footer-links a {
    color: #8e8980;
    font-size: 11px;
    letter-spacing: 0.06em;
}

.footer-links a:hover {
    color: var(--primary-light);
    text-shadow: none;
}

.footer-links i {
    display: none;
}

.footer-copyright {
    color: #5f5c57;
    font-size: 10px;
    letter-spacing: 0.06em;
}

/* Featured-card sizing and resilient fallback for the placeholder cover file. */
.article-card:first-child {
    height: 360px;
}

.article-card:first-child .article-cover,
.article-card:first-child .article-info {
    min-height: 0;
}

.article-cover:has(img[src$="default-cover.jpg"]) {
    background:
        radial-gradient(circle at 72% 28%, rgba(216, 189, 134, 0.12), transparent 24%),
        repeating-linear-gradient(135deg, transparent 0, transparent 36px, rgba(216, 189, 134, 0.035) 37px),
        #111210;
}

.article-cover img[src$="default-cover.jpg"],
.hot-article-cover img[src$="default-cover.jpg"] {
    display: none;
}

.hot-article-cover:has(img[src$="default-cover.jpg"]) {
    position: relative;
    background: #141510;
}

.hot-article-cover:has(img[src$="default-cover.jpg"])::after {
    content: "\2726";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #8f7956;
    font-family: Georgia, serif;
    font-size: 12px;
}

@media (max-width: 720px) {
    .article-card:first-child {
        height: auto;
    }
}

/* Placeholder avatars become typographic marks until a real image is configured. */
.author-avatar[src$="default-avatar.png"],
.about-avatar[src$="default-avatar.png"],
.comment-avatar[src$="default-avatar.png"],
.message-avatar[src$="default-avatar.png"] {
    display: none;
}

.author-card:has(> .author-avatar[src$="default-avatar.png"])::before,
.about-header:has(> .about-avatar[src$="default-avatar.png"])::before,
.comment-item:has(> .comment-avatar[src$="default-avatar.png"])::before,
.message-item:has(> .message-avatar[src$="default-avatar.png"])::before {
    content: "J";
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(216, 189, 134, 0.28);
    border-radius: 50%;
    color: #c9ad77;
    background:
        radial-gradient(circle at 68% 28%, rgba(216, 189, 134, 0.12), transparent 28%),
        #121310;
    font-family: Georgia, serif;
    font-weight: 400;
}

.author-card:has(> .author-avatar[src$="default-avatar.png"])::before {
    width: 64px;
    height: 64px;
    margin-bottom: 18px;
    font-size: 24px;
}

.about-header:has(> .about-avatar[src$="default-avatar.png"])::before {
    width: 92px;
    height: 92px;
    margin-bottom: 24px;
    font-size: 32px;
}

.comment-item:has(> .comment-avatar[src$="default-avatar.png"])::before,
.message-item:has(> .message-avatar[src$="default-avatar.png"])::before {
    width: 42px;
    height: 42px;
    font-size: 15px;
}

/* Responsive */

@media (max-width: 1080px) {
    .navbar-menu a {
        padding-right: 11px;
        padding-left: 11px;
    }

    .navbar-search input {
        width: 110px;
    }

    .main-content {
        grid-template-columns: minmax(0, 1fr) 258px;
        gap: 18px;
    }

    .article-card:first-child {
        grid-template-columns: 1fr 0.92fr;
    }
}

@media (max-width: 920px) {
    .navbar {
        width: min(calc(100% - 24px), 900px);
    }

    .navbar-search input {
        display: none;
    }

    .navbar-search {
        width: 36px;
        height: 36px;
        justify-content: center;
        padding: 0;
    }

    .main-content {
        grid-template-columns: 1fr;
    }

    .content-right {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        width: 100%;
    }

    .sidebar-card {
        margin: 0;
    }

    .author-card {
        grid-row: span 2;
    }

    .article-detail + .comment-section {
        margin-top: 12px;
    }

    .about-card {
        grid-template-columns: 1fr;
    }

    .about-content {
        grid-column: 1;
        grid-row: auto;
        padding-top: 30px;
        padding-left: 0;
        border-top: 1px solid var(--border-color);
        border-left: 0;
    }
}

@media (max-width: 720px) {
    body {
        font-size: 14px;
    }

    .container,
    body > .container[style] {
        width: min(100% - 28px, var(--page-width));
    }

    .navbar {
        top: 8px;
        width: calc(100% - 16px);
        margin-top: 8px;
        padding: 0 12px;
        border-radius: 5px;
    }

    .navbar .container {
        display: grid;
        grid-template-columns: 1fr auto;
        height: auto;
        min-height: 58px;
    }

    .navbar-brand {
        font-size: 16px;
    }

    .navbar-menu {
        grid-column: 1 / -1;
        order: 3;
        display: flex;
        width: 100%;
        gap: 0;
        overflow-x: auto;
        border-top: 1px solid var(--border-color);
        scrollbar-width: none;
    }

    .navbar-menu::-webkit-scrollbar {
        display: none;
    }

    .navbar-menu li {
        flex: 0 0 auto;
    }

    .navbar-menu a {
        padding: 11px 13px;
        white-space: nowrap;
    }

    .navbar-menu a.active::after {
        right: 13px;
        bottom: 5px;
        left: 13px;
    }

    .home-intro {
        grid-template-columns: 1fr;
        gap: 38px;
        padding-top: 72px;
        padding-bottom: 52px;
    }

    .home-intro h1 {
        font-size: clamp(38px, 13vw, 58px);
    }

    .home-intro-copy {
        margin-top: 18px;
        font-size: 14px;
    }

    .home-intro-aside {
        max-width: 320px;
    }

    .main-content {
        padding-top: 24px;
    }

    #articleList {
        grid-template-columns: 1fr;
    }

    .article-card:first-child {
        grid-column: auto;
        display: flex;
    }

    .article-cover,
    .article-card:first-child .article-cover {
        height: 220px;
        min-height: 0;
    }

    .article-info,
    .article-card:first-child .article-info {
        min-height: 0;
        padding: 21px 20px 22px;
    }

    .article-card:first-child .article-title {
        font-size: 23px;
    }

    .content-right {
        grid-template-columns: 1fr;
    }

    .author-card {
        grid-row: auto;
    }

    .page-header,
    .search-header,
    .category-header,
    .tag-header {
        padding-top: 58px;
    }

    .timeline {
        padding-left: 28px;
    }

    .timeline::before {
        left: 5px;
    }

    .timeline-year-title::before {
        left: -26px;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .about-card {
        margin: 28px auto;
        padding: 28px 22px;
    }

    .form-row,
    .comment-form-row {
        flex-direction: column;
    }

    .links-grid {
        grid-template-columns: 1fr;
    }

    .article-detail,
    .comment-section,
    .message-form,
    .message-list {
        padding: 24px 20px;
    }

    .article-content {
        font-size: 16px;
        line-height: 1.9;
    }

    #ai-chat-float-btn {
        right: 16px;
        bottom: 16px;
        width: 44px;
        height: 44px;
    }

    .footer {
        margin-top: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

