/* ===== Post Card Glass Effect ===== */
.layout > #post {
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(158, 204, 171, 0.12);
}

@supports (backdrop-filter: blur(10px)) {
    .layout > #post {
        background: rgba(255, 255, 255, 0.72) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

/* ===== Index Post Cards ===== */
.recent-post-item {
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.recent-post-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(158, 204, 171, 0.18);
}

/* ===== Code Block — reference: DESIGN.md code-window-card ===== */
figure.highlight {
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Mac-style dots — match DESIGN.md dark surface header */
figure.highlight .highlight-tools {
    background: #000;
    padding: 10px 12px;
}

figure.highlight .highlight-tools::after,
figure.highlight .highlight-tools::before {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    content: '';
    margin-right: 8px;
}

figure.highlight table,
figure.highlight pre {
    padding: 8px 16px 16px;
    font-size: 14px;
    line-height: 1.6;
}

/* ===== TOC Refinement ===== */
.toc-link {
    transition: color 0.15s ease;
}

/* ===== Custom Scrollbar (Webkit) ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #9eccab;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #7cb892;
}

/* ===== Disable Avatar & Icon Rotation ===== */
.avatar-img img:hover {
    transform: none !important;
}

.card-info-social-icons i:hover {
    transform: none !important;
}

/* ===== About Page ===== */
.about-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 0 16px;
}

.about-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(158, 204, 171, 0.4);
    box-shadow: 0 4px 20px rgba(158, 204, 171, 0.2);
}

.about-name {
    margin: 16px 0 4px;
    font-size: 28px;
    font-weight: 600;
    color: var(--font-color, #141413);
}

.about-desc {
    font-size: 16px;
    color: #8e8b82;
}

.about-divider {
    width: 60px;
    margin: 40px auto 28px;
    border: none;
    border-top: 2px solid #9eccab;
}

/* --- Interest Tags --- */
.about-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.about-tags .hl-label {
    font-size: 14px;
    padding: 4px 14px;
    border-radius: 999px;
}

/* --- Skill Bars --- */
.skill-bars {
    max-width: 560px;
    margin: 0 auto;
}

.skill-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    margin-bottom: 18px;
    gap: 6px 12px;
}

.skill-name {
    font-size: 15px;
    color: var(--font-color, #3d3d3a);
}

.skill-name i {
    width: 20px;
    margin-right: 6px;
    text-align: center;
}

.skill-pct {
    font-size: 13px;
    color: #8e8b82;
    font-weight: 500;
}

.skill-track {
    grid-column: 1 / -1;
    height: 6px;
    background: #e6dfd8;
    border-radius: 3px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s ease;
}

.skill-bar:hover .skill-fill {
    filter: brightness(1.1);
}

/* --- Game Cards --- */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    max-width: 640px;
    margin: 0 auto;
}

.game-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(158, 204, 171, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(158, 204, 171, 0.18);
}

.game-cover {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.game-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
}

.game-name {
    flex: 1 1 100%;
    font-size: 15px;
    font-weight: 600;
    color: var(--font-color, #252523);
}

.game-platform {
    font-size: 12px;
    color: #6c6a64;
    background: #f5f0e8;
    padding: 2px 10px;
    border-radius: 999px;
}

.game-score {
    font-size: 13px;
    color: #e8a55a;
    font-weight: 500;
    margin-left: auto;
}

.about-footnote {
    text-align: center;
    font-size: 12px;
    color: #8e8b82;
    margin-top: 12px;
}

/* --- Social Links --- */
.about-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

/* ===== About Page Responsive ===== */
@media (max-width: 768px) {
    .about-avatar {
        width: 110px;
        height: 110px;
    }

    .about-name {
        font-size: 24px;
    }

    .game-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .skill-bars {
        max-width: 100%;
    }
}

/* ===== Dark Mode Overrides ===== */
[data-theme='dark'] .layout > #post {
    background: rgba(30, 30, 30, 0.82) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

[data-theme='dark'] .layout > #post {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

[data-theme='dark'] .recent-post-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

[data-theme='dark'] .about-avatar {
    border-color: rgba(158, 204, 171, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-theme='dark'] .about-desc,
[data-theme='dark'] .about-footnote,
[data-theme='dark'] .skill-pct {
    color: #9a9a9a;
}

[data-theme='dark'] .game-card {
    background: var(--card-bg, #1e1e1e);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

[data-theme='dark'] .game-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

[data-theme='dark'] .game-platform {
    color: #a09d96;
    background: #2a2a2a;
}

[data-theme='dark'] .skill-track {
    background: #2a2a2a;
}

/* ===== Tabs — disable slide-up animation when switching languages ===== */
/* Overrides theme: _tags/tabs.styl `animation: tabshow .5s`.
   Same specificity as the theme rule, but custom.css loads after /css/index.css. */
.container .tabs > .tab-contents .tab-item-content.active {
    -webkit-animation: none;
    -moz-animation: none;
    -o-animation: none;
    -ms-animation: none;
    animation: none;
}
