:root {
    /* Map to themes.css variables */
    --gh-body: transparent;
    /* Body background handled by themes.css */
    --gh-panel: var(--card-bg);
    --gh-card: var(--card-bg);
    --gh-border: var(--border-color);
    --gh-text: var(--text-color);
    --gh-muted: var(--navbar-text);
    --gh-accent: var(--primary-color);
    --gh-accent-soft: var(--glass-border);

    /* Contribution Graph - Dynamic Mapping */
    --gh-green-0: var(--card-bg);
    --gh-green-1: var(--border-color);
    --gh-green-2: var(--secondary-color);
    /* Use secondary for mid-intensity */
    --gh-green-3: var(--primary-color);
    --gh-green-4: var(--primary-color);

    --gh-shadow: 0 10px 30px -10px var(--shadow-color);
    --gh-radius: var(--border-radius);
    --gh-contrib-size: 14px;
    --gh-contrib-gap: 3px;
    font-family: var(--font-family);
}

body {
    background-color: var(--bg-color);
    color: var(--gh-text);
    /* Background image is handled by themes.css on body */
}

a {
    color: var(--gh-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.gh-page {
    padding: 6rem 0 5rem;
    /* Increased top padding for floating navbar */
}

/* --- Profile Header --- */
.gh-profile-header {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--gh-border);
    border-radius: var(--gh-radius);
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--gh-shadow);
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}

/* Add a subtle glow effect to the header */
.gh-profile-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--gh-accent-soft) 0%, transparent 70%);
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
}

.gh-profile-identity {
    display: flex;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.gh-profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--gh-accent);
    flex-shrink: 0;
    background: var(--bg-color);
    box-shadow: 0 0 20px var(--gh-accent-soft);
    transition: transform 0.3s ease;
}

.gh-profile-avatar:hover {
    transform: scale(1.05) rotate(5deg);
}

.gh-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gh-profile-meta {
    max-width: 520px;
}

.gh-display-name {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gh-text), var(--gh-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.2rem;
}

.gh-username {
    color: var(--gh-muted);
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    font-family: monospace;
}

.gh-profile-bio {
    color: var(--gh-text);
    margin-bottom: 1.2rem;
    line-height: 1.6;
    opacity: 0.9;
}

.gh-profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--gh-muted);
    font-size: 0.9rem;
}

.gh-profile-tags i {
    color: var(--gh-accent);
    margin-right: 0.35rem;
}

.gh-profile-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

.gh-stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--gh-border);
    border-radius: var(--gh-radius);
    padding: 1.25rem;
    width: 140px;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.gh-stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--gh-accent);
    background: var(--gh-accent-soft);
}

.gh-stat-card span {
    display: block;
    font-size: 0.8rem;
    color: var(--gh-muted);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.gh-stat-card strong {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gh-accent);
}

/* --- Contributions Graph --- */
.gh-contributions {
    background: var(--gh-card);
    border: 1px solid var(--gh-border);
    border-radius: var(--gh-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--gh-shadow);
    backdrop-filter: blur(10px);
}

.gh-contributions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--gh-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.gh-contributions-header strong {
    color: var(--gh-text);
    font-size: 1.1rem;
}

.gh-square {
    width: var(--gh-contrib-size);
    height: var(--gh-contrib-size);
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
}

/* Dynamic Contribution Colors */
.gh-square.level-0 {
    background: rgba(255, 255, 255, 0.05);
}

.gh-square.level-1 {
    background: var(--gh-border);
    opacity: 0.5;
}

.gh-square.level-2 {
    background: var(--gh-border);
    opacity: 0.8;
}

.gh-square.level-3 {
    background: var(--gh-accent);
    opacity: 0.6;
}

.gh-square.level-4 {
    background: var(--gh-accent);
    opacity: 1;
    box-shadow: 0 0 8px var(--gh-accent);
}

/* --- Layout Grid --- */
.gh-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

.gh-post-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
}

/* --- Sidebar --- */
.gh-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.gh-card {
    background: var(--gh-card);
    border: 1px solid var(--gh-border);
    border-radius: var(--gh-radius);
    padding: 1.5rem;
    box-shadow: var(--gh-shadow);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gh-card-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gh-muted);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--gh-border);
    padding-bottom: 0.5rem;
}

.gh-search-form {
    display: flex;
    align-items: center;
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--gh-border);
    border-radius: 999px;
    padding: 0;
    /* Remove padding for seamless look */
    box-sizing: border-box;
    transition: all 0.3s ease;
    overflow: hidden;
    /* Clip children to border-radius */
    height: 46px;
    /* Fixed height for consistency */
}

.gh-search-form:focus-within {
    border-color: var(--gh-accent);
    box-shadow: 0 0 15px var(--gh-accent-soft);
    background: rgba(255, 255, 255, 0.05);
}

.gh-search-form input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--gh-text);
    padding: 0 1.2rem;
    font-size: 0.95rem;
    outline: none;
    min-width: 0;
    height: 100%;
}

.gh-search-form button {
    flex: 0 0 50px;
    /* Fixed width */
    height: 100%;
    /* Full height */
    border: none;
    background: var(--gh-accent);
    /* Solid accent color */
    color: #fff;
    border-radius: 0;
    /* No radius, relies on container overflow */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.gh-search-form button:hover {
    background: var(--secondary-color);
    /* Change color on hover */
    transform: none;
    /* No scaling, just color shift */
}

.gh-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gh-category-list li a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: var(--gh-muted);
    border: 1px solid transparent;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.02);
}

.gh-category-list li.active a,
.gh-category-list li a:hover {
    color: #fff;
    border-color: var(--gh-accent);
    background: var(--gh-accent);
    box-shadow: 0 4px 15px var(--gh-accent-soft);
}

/* --- Post List --- */
.gh-post-card {
    background: var(--gh-card);
    border: 1px solid var(--gh-border);
    border-radius: var(--gh-radius);
    padding: 1.5rem;
    box-shadow: var(--gh-shadow);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.gh-post-card:hover {
    border-color: var(--gh-accent);
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 15px 30px -10px var(--gh-accent-soft);
}

.gh-post-card.featured {
    border: 1px solid var(--gh-accent);
}

.gh-post-card.featured::after {
    content: 'Featured';
    position: absolute;
    top: 0;
    right: 0;
    background: var(--gh-accent);
    color: #fff;
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-bottom-left-radius: 8px;
    font-weight: bold;
}

.gh-card-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.gh-card-header a {
    color: var(--gh-text);
    background: linear-gradient(to right, var(--gh-text), var(--gh-text));
    background-size: 0% 2px;
    background-repeat: no-repeat;
    background-position: left bottom;
    transition: background-size 0.3s ease;
}

.gh-post-card:hover .gh-card-header a {
    color: var(--gh-accent);
}

.gh-chip {
    border: 1px solid var(--gh-border);
    border-radius: 50px;
    padding: 0.25rem 0.8rem;
    font-size: 0.75rem;
    color: var(--gh-accent);
    background: rgba(255, 255, 255, 0.05);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gh-card-thumb {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--gh-border);
    max-height: 280px;
    position: relative;
}

.gh-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gh-post-card:hover .gh-card-thumb img {
    transform: scale(1.05);
}

.gh-btn {
    background: var(--gh-accent);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--gh-accent-soft);
}

.gh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--gh-accent-soft);
    filter: brightness(1.1);
    color: #fff;
}

.gh-btn.ghost {
    background: transparent;
    border: 1px solid var(--gh-border);
    color: var(--gh-text);
    box-shadow: none;
}

.gh-btn.ghost:hover {
    border-color: var(--gh-accent);
    color: var(--gh-accent);
}

/* --- Post Detail Page --- */
.gh-post-hero {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--gh-card);
    border-bottom: 1px solid var(--gh-border);
    position: relative;
}

.gh-post-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--gh-text) 0%, var(--gh-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gh-post-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--gh-text);
}

.gh-post-content h2 {
    font-size: 2rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: var(--gh-accent);
    border-bottom: 1px solid var(--gh-border);
    padding-bottom: 0.5rem;
}

.gh-post-content p {
    margin-bottom: 1.5rem;
}

.gh-post-content img {
    max-width: 100%;
    border-radius: var(--gh-radius);
    margin: 2rem 0;
    box-shadow: var(--gh-shadow);
}

.gh-post-content blockquote {
    border-left: 4px solid var(--gh-accent);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--gh-muted);
    background: rgba(255, 255, 255, 0.02);
    padding: 1.5rem;
    border-radius: 0 12px 12px 0;
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .gh-layout {
        grid-template-columns: 1fr;
    }

    .gh-post-layout {
        grid-template-columns: 1fr;
    }

    .gh-sidebar {
        order: 2;
    }

    .gh-post-hero h1 {
        font-size: 2rem;
    }
}

/* --- Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gh-post-card {
    animation: fadeIn 0.5s ease-out forwards;
}




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

a:hover {
    text-decoration: underline;
}

.gh-page {
    padding: 3rem 0 5rem;
}

.gh-profile-header {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--gh-border);
    border-radius: var(--gh-radius);
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--gh-shadow);
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.gh-profile-identity {
    display: flex;
    gap: 1.5rem;
}

.gh-profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--gh-border);
    flex-shrink: 0;
    background: var(--bg-color);
}

.gh-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gh-profile-meta {
    max-width: 520px;
}

.gh-display-name {
    font-size: 2rem;
    font-weight: 700;
}

.gh-username {
    color: var(--gh-muted);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.gh-profile-bio {
    color: var(--gh-text);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.gh-profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--gh-muted);
    font-size: 0.95rem;
}

.gh-profile-tags i {
    color: var(--gh-accent);
    margin-right: 0.35rem;
}

.gh-profile-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.gh-stat-card {
    background: var(--card-bg);
    border: 1px solid var(--gh-border);
    border-radius: var(--gh-radius);
    padding: 1.25rem;
    width: 160px;
    text-align: center;
}

.gh-stat-card span {
    display: block;
    font-size: 0.85rem;
    color: var(--gh-muted);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.gh-stat-card strong {
    font-size: 2rem;
    font-weight: 700;
}

.gh-contributions {
    background: var(--gh-card);
    border: 1px solid var(--gh-border);
    border-radius: var(--gh-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--gh-shadow);
}

.gh-contributions-body {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.gh-github-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.gh-contributions-main {
    flex: 1;
    min-width: 0;
}

.gh-month-legend {
    display: none;
}

.gh-month-axis {
    margin-left: 46px;
    margin-bottom: 0.5rem;
    height: 16px;
    overflow: hidden;
}

.gh-month-label-layer {
    position: relative;
    height: 100%;
}

.gh-month-label-layer span {
    position: absolute;
    font-size: 0.75rem;
    color: var(--gh-muted);
    text-transform: uppercase;
}

.gh-grid-area {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.gh-weekday-labels {
    display: flex;
    flex-direction: column;
    gap: var(--gh-contrib-gap);
    font-size: 0.75rem;
    color: var(--gh-muted);
    margin-top: 2px;
    min-width: 32px;
}

.gh-week-columns {
    display: flex;
    gap: var(--gh-contrib-gap);
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-gutter: stable;
}

.gh-week-column.year-hidden {
    display: none;
}

.gh-week-columns::-webkit-scrollbar {
    height: 6px;
}

.gh-week-columns::-webkit-scrollbar-thumb {
    background: var(--gh-border);
    border-radius: 3px;
}

.gh-week-column {
    display: flex;
    flex-direction: column;
    gap: var(--gh-contrib-gap);
}

.gh-square {
    width: var(--gh-contrib-size);
    height: var(--gh-contrib-size);
    border-radius: 3px;
    border: 1px solid var(--gh-border);
    background: var(--gh-green-0);
    cursor: pointer;
    padding: 0;
}

.gh-square.future {
    opacity: 0.15;
    cursor: default;
    border-color: var(--gh-border);
}

.gh-square.level-0 {
    background: var(--gh-green-0);
}

.gh-square.level-1 {
    background: var(--gh-green-1);
}

.gh-square.level-2 {
    background: var(--gh-green-2);
}

.gh-square.level-3 {
    background: var(--gh-green-3);
}

.gh-square.level-4 {
    background: var(--gh-green-4);
    color: #051b0b;
}

.gh-square:hover:not(.future) {
    border-color: var(--gh-accent);
}

.gh-square:focus-visible {
    outline: 2px solid var(--gh-accent);
    outline-offset: 2px;
}

.gh-contribution-scale {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 46px;
    font-size: 0.75rem;
    color: var(--gh-muted);
}

.gh-scale-bar {
    display: flex;
    gap: var(--gh-contrib-gap);
}

.gh-year-selector {
    width: 90px;
    border-left: 1px solid var(--gh-border);
    padding-left: 1.25rem;
}

.gh-year-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 7.2rem;
    overflow-y: auto;
    padding-right: 2px;
}

.gh-year-list::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.gh-year-list {
    scrollbar-width: none;
}

.gh-year-chip {
    background: transparent;
    border: 1px solid var(--gh-border);
    border-radius: 999px;
    color: var(--gh-muted);
    padding: 0.35rem 0.8rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.gh-year-chip.active,
.gh-year-chip:hover {
    color: #fff;
    border-color: var(--gh-accent);
    background: var(--gh-accent);
    box-shadow: 0 0 10px var(--gh-accent-soft);
}

.gh-contributions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--gh-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.gh-contributions-header strong {
    color: var(--gh-text);
    display: block;
    font-size: 1.1rem;
}

.gh-mini-cell.level-0 {
    background: var(--gh-green-0);
}

.gh-mini-cell.level-1 {
    background: var(--gh-green-1);
}

.gh-mini-cell.level-2 {
    background: var(--gh-green-2);
}

.gh-mini-cell.level-3 {
    background: var(--gh-green-3);
}

.gh-mini-cell.level-4 {
    background: var(--gh-green-4);
    color: #051b0b;
}

.gh-mini-cell:focus-visible {
    outline: 2px solid var(--gh-accent);
    outline-offset: 2px;
}

.gh-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

.gh-post-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
}

.gh-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.gh-card {
    background: var(--gh-card);
    border: 1px solid var(--gh-border);
    border-radius: var(--gh-radius);
    padding: 1.8rem;
    box-shadow: var(--gh-shadow);
}

.gh-card-title {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gh-muted);
    margin-bottom: 1rem;
}

.gh-search-form {
    display: flex;
    background: #0f1928;
    border: 1px solid var(--gh-border);
    border-radius: 999px;
    overflow: hidden;
}

.gh-search-form input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.75rem 1.25rem;
    color: var(--gh-text);
    font-size: 0.95rem;
}

.gh-search-form input:focus {
    outline: none;
}

.gh-search-form button {
    width: 52px;
    background: var(--gh-accent);
    border: none;
    color: #fff;
    cursor: pointer;
}

.gh-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.gh-category-list li a {
    display: block;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    color: var(--gh-muted);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.gh-category-list li.active a,
.gh-category-list li a:hover {
    color: var(--gh-text);
    border-color: var(--gh-border);
    background: rgba(255, 255, 255, 0.03);
}

.gh-timeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.65rem;
}

.gh-load-more-timeline {
    margin-top: 0.75rem;
    text-align: center;
}

.timeline-chip {
    background: #0f1928;
    border: 1px solid var(--gh-border);
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: var(--gh-muted);
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
    text-align: left;
}

.timeline-chip strong {
    font-size: 1.1rem;
    color: var(--gh-text);
}

.timeline-chip.level-0 {
    background: #0f1928;
}

.timeline-chip.level-1 {
    background: rgba(31, 111, 235, 0.08);
}

.timeline-chip.level-2 {
    background: rgba(31, 111, 235, 0.15);
}

.timeline-chip.level-3 {
    background: rgba(38, 166, 65, 0.25);
}

.timeline-chip.level-4 {
    background: rgba(57, 211, 83, 0.4);
}

.timeline-chip:hover,
.timeline-chip.level-3,
.timeline-chip.level-4 {
    border-color: var(--gh-accent);
    transform: translateY(-2px);
}

.gh-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.gh-content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.gh-content-header h2 {
    margin: 0;
}

.gh-content-header p {
    color: var(--gh-muted);
    margin: 0.35rem 0 0;
}

.gh-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.gh-filter-chip {
    background: var(--gh-accent-soft);
    border: 1px solid rgba(31, 111, 235, 0.35);
    color: var(--gh-text);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.9rem;
}

.gh-filter-chip a {
    margin-left: 0.45rem;
    color: inherit;
}

.gh-repo-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.gh-post-card {
    background: var(--gh-card);
    border: 1px solid var(--gh-border);
    border-radius: var(--gh-radius);
    padding: 1.5rem;
    box-shadow: var(--gh-shadow);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.gh-post-card:hover {
    border-color: var(--gh-accent);
    transform: translateY(-4px);
}

.gh-post-card.featured {
    border-color: var(--gh-accent);
    background: radial-gradient(circle at top right, rgba(31, 111, 235, 0.08), transparent 55%), var(--gh-card);
}

.gh-card-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.gh-card-header h3 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
}

.gh-card-header a {
    color: var(--gh-text);
}

.gh-chip {
    border: 1px solid var(--gh-border);
    border-radius: 999px;
    padding: 0.25rem 0.8rem;
    font-size: 0.85rem;
    color: var(--gh-muted);
}

.gh-card-thumb {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--gh-border);
    max-height: 260px;
}

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

.gh-card-summary {
    color: var(--gh-muted);
    margin: 0;
    line-height: 1.6;
}

.gh-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.gh-meta {
    color: var(--gh-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.gh-meta a {
    color: var(--gh-text);
}

.gh-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gh-border);
    display: inline-block;
}

.gh-btn {
    background: var(--gh-accent);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.55rem 1.4rem;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(31, 111, 235, 0.35);
    text-decoration: none;
}

.gh-btn.btn-sm {
    padding: 0.35rem 1rem;
    font-size: 0.85rem;
}

.gh-btn.ghost {
    background: transparent;
    border: 1px solid var(--gh-border);
    color: var(--gh-text);
}

.gh-load-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.gh-post-page .gh-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gh-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.gh-post-hero {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gh-post-summary {
    color: var(--gh-muted);
    line-height: 1.7;
    margin: 0;
}

.gh-auth-page {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.gh-auth-hero {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gh-auth-hero h1 {
    margin: 0;
    font-size: 2.2rem;
}

.gh-auth-hero p {
    color: var(--gh-muted);
    margin: 0;
}

.gh-auth-card {
    padding: 2.25rem;
}

.gh-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.gh-form-errors {
    color: #ff9494;
    background: rgba(255, 148, 148, 0.12);
    border: 1px solid rgba(255, 148, 148, 0.3);
    border-radius: 12px;
    padding: 0.85rem 1rem;
}

.gh-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.gh-form-group label {
    font-weight: 600;
}

.gh-input {
    background: #0f1928;
    border: 1px solid var(--gh-border);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    color: var(--gh-text);
}

.gh-input:focus {
    outline: none;
    border-color: var(--gh-accent);
}

.gh-field-error {
    color: #ff9494;
    font-size: 0.85rem;
}

.gh-auth-switch {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    align-items: center;
}

.gh-auth-switch a {
    color: var(--gh-accent);
}

.w-100 {
    width: 100%;
}

.gh-post-cta {
    margin-top: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.gh-reader-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.gh-meta-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(48, 54, 61, 0.8);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    min-width: 130px;
}

.gh-meta-card span {
    display: block;
    font-size: 0.8rem;
    color: var(--gh-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.gh-meta-card strong {
    display: block;
    font-size: 1.1rem;
    margin-top: 0.2rem;
}

.gh-post-actions {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    flex-wrap: wrap;
}

.gh-icon-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--gh-border);
    background: transparent;
    color: var(--gh-text);
    cursor: pointer;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.gh-icon-btn i {
    font-size: 0.9rem;
}

.gh-icon-btn:hover {
    border-color: var(--gh-accent);
    transform: translateY(-1px);
}

.gh-post-author {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.gh-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #0f1928;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--gh-accent);
    overflow: hidden;
}

.gh-avatar.lg {
    width: 56px;
    height: 56px;
}

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

.gh-post-meta-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gh-muted);
    font-size: 0.9rem;
}

.gh-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.gh-chip.ghost {
    color: var(--gh-accent);
    border-color: rgba(31, 111, 235, 0.35);
    background: rgba(31, 111, 235, 0.1);
}

.gh-chip.outline {
    background: transparent;
}

.gh-post-cover {
    margin: 1.5rem 0 2rem;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--gh-border);
}

.gh-post-cover img {
    width: 100%;
    display: block;
    object-fit: cover;
}

.gh-post-body {
    line-height: 1.85;
    color: var(--gh-text);
    font-size: 1rem;
}

.gh-reading-lead {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gh-border);
    margin-bottom: 1.5rem;
}

.gh-reading-lead p {
    margin: 0.25rem 0 0;
    color: var(--gh-muted);
}

.gh-reading-lead-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    color: var(--gh-muted);
    font-size: 0.9rem;
}

.gh-post-content {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.gh-post-content h2,
.gh-post-content h3,
.gh-post-content h4 {
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

.gh-post-content p {
    margin: 1rem 0;
}

.gh-post-bottom-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gh-border);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.gh-bottom-copy h3 {
    margin: 0;
}

.gh-bottom-copy p {
    margin: 0.3rem 0 0;
    color: var(--gh-muted);
}

.gh-bottom-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.gh-reading-tools .gh-card-title+.gh-reading-tools-grid {
    margin-bottom: 1rem;
}

.gh-reading-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.gh-reading-tools-grid strong {
    font-size: 1.2rem;
}

.gh-muted-label {
    font-size: 0.8rem;
    color: var(--gh-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.gh-toc {
    max-height: 420px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.gh-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.gh-toc-list li a {
    color: var(--gh-muted);
    font-size: 0.92rem;
    line-height: 1.45;
    display: block;
}

.gh-toc-list li a:hover {
    color: var(--gh-text);
}

.gh-toc-list li.is-sub {
    margin-left: 1rem;
    font-size: 0.85rem;
}

.gh-empty-toc {
    color: var(--gh-muted);
}

.gh-related-posts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gh-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.gh-related-card {
    border: 1px solid var(--gh-border);
    border-radius: 14px;
    padding: 1.1rem;
    background: rgba(255, 255, 255, 0.02);
    text-decoration: none;
    color: var(--gh-text);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.gh-related-card:hover {
    border-color: var(--gh-accent);
    transform: translateY(-3px);
}

.gh-related-card p {
    margin: 0;
    color: var(--gh-muted);
    line-height: 1.5;
}

.gh-related-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--gh-muted);
}

.gh-related-footer {
    font-size: 0.85rem;
    color: var(--gh-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.gh-last-comment {
    font-size: 0.8rem;
    color: var(--gh-muted);
}

.gh-comment-form {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gh-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.gh-form-group textarea {
    background: #0f1928;
    border: 1px solid var(--gh-border);
    border-radius: 12px;
    padding: 0.85rem;
    color: var(--gh-text);
    resize: vertical;
}

.gh-form-group textarea:focus {
    outline: none;
    border-color: var(--gh-accent);
}

.gh-comment-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gh-comment {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gh-border);
}

.gh-comment:last-child {
    border-bottom: none;
}

.gh-comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #0f1928;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--gh-accent);
    overflow: hidden;
}

.gh-comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gh-comment-main {
    flex: 1;
    min-width: 0;
}

.gh-comment-meta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.85rem;
    color: var(--gh-muted);
}

.gh-comment-meta a {
    color: var(--gh-text);
    font-weight: 600;
}

.gh-comment-body {
    color: var(--gh-text);
    line-height: 1.6;
    word-break: break-word;
}

.gh-comment-body p {
    margin: 0.35rem 0 0;
}

.gh-comment-reply-to {
    color: var(--gh-muted);
    font-size: 0.85rem;
}

.gh-link-btn {
    background: none;
    border: none;
    color: var(--gh-accent);
    padding: 0;
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.gh-link-btn:hover {
    color: #4f8ff7;
    text-decoration: underline;
}

.gh-comment-replies {
    margin-top: 0.5rem;
}

.gh-reply-floating {
    background: #0f1928;
    border: 1px solid var(--gh-border);
    border-radius: 14px;
    padding: 1rem;
    margin-top: 1rem;
}

.gh-reply-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.gh-comment-more {
    margin-top: 1rem;
    text-align: center;
}

.gh-comment.depth-limit {
    border: none;
    color: var(--gh-muted);
    font-size: 0.85rem;
}

.gh-loading {
    color: var(--gh-muted);
}

.no-posts,
.gh-empty-state {
    text-align: center;
    padding: 2rem;
    background: var(--gh-card);
    border-radius: var(--gh-radius);
    border: 1px solid var(--gh-border);
    color: var(--gh-muted);
}

.timeline-link {
    text-decoration: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media (max-width: 1024px) {
    .gh-layout {
        grid-template-columns: 1fr;
    }

    .gh-profile-header {
        flex-direction: column;
    }

    .gh-profile-identity {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .gh-profile-meta {
        max-width: 100%;
    }

    .gh-profile-tags {
        justify-content: center;
    }

    .gh-profile-stats {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .gh-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .gh-card-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .gh-profile-header {
        padding: 1.5rem;
    }

    .gh-card {
        padding: 1.2rem;
    }

    .gh-reader-meta {
        flex-direction: column;
        width: 100%;
    }

    .gh-post-actions {
        width: 100%;
        justify-content: space-between;
    }

    .gh-reading-lead {
        flex-direction: column;
    }

    .gh-post-bottom-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .gh-reading-tools-grid {
        grid-template-columns: 1fr;
    }

    .gh-contributions-body {
        flex-direction: column;
    }

    .gh-year-selector {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--gh-border);
        padding-left: 0;
        padding-top: 1rem;
    }

    .gh-year-list {
        flex-direction: row;
        flex-wrap: wrap;
        max-height: none;
    }
}

/* --- Baidu Tieba Style Comments --- */
.gh-comment-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--gh-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--gh-card);
}

.tieba-floor {
    display: flex;
    border-bottom: 1px solid var(--gh-border);
    min-height: 150px;
}

.tieba-floor:last-child {
    border-bottom: none;
}

.tieba-floor-left {
    width: 130px;
    background: rgba(255, 255, 255, 0.02);
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-right: 1px solid var(--gh-border);
    flex-shrink: 0;
}

.tieba-avatar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: sticky;
    top: 100px;
    /* Adjusted for header height if any */
    width: 100%;
}

.tieba-avatar {
    width: 80px;
    height: 80px;
    border: 1px solid var(--gh-border);
    padding: 4px;
    background: #161b22;
    flex-shrink: 0;
}

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

.tieba-avatar span {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gh-accent-soft);
    color: var(--gh-accent);
    font-size: 2rem;
    font-weight: bold;
}

.tieba-username {
    font-size: 0.9rem;
    width: 100%;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 5px;
}

.tieba-username a {
    color: var(--gh-accent);
}

.tieba-floor-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    min-width: 0;
    /* Critical for preventing flex items from overflowing */
}

.tieba-floor-content {
    flex: 1;
    margin-bottom: 20px;
}

.tieba-floor-body {
    line-height: 1.8;
    color: var(--gh-text);
    font-size: 1.05rem;
    word-break: break-word;
}

.tieba-floor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--gh-muted);
    margin-bottom: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 10px;
}

.tieba-floor-info {
    display: flex;
    gap: 15px;
}

.tieba-floor-num {
    color: var(--gh-muted);
}

.tieba-action-btn {
    background: none;
    border: none;
    color: var(--gh-accent);
    cursor: pointer;
    padding: 0;
}

.tieba-action-btn:hover {
    text-decoration: underline;
}

/* Sub-comments Area */
.tieba-sub-comments-area {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--gh-border);
    padding: 5px 15px;
    border-radius: 4px;
    margin-top: 10px;
}

.tieba-sub-comments-area:empty {
    display: none;
}

.tieba-sub-comment {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--gh-border);
    width: 100%;
}

.tieba-sub-comment:last-child {
    border-bottom: none;
}

.tieba-sub-avatar {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    margin-top: 2px;
}

.tieba-sub-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
}

.tieba-sub-avatar span {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gh-accent-soft);
    color: var(--gh-accent);
    font-size: 0.85rem;
    border-radius: 2px;
}

.tieba-sub-main {
    flex: 1;
    min-width: 0;
}

.tieba-sub-content {
    font-size: 0.92rem;
    line-height: 1.6;
    word-break: break-word;
    color: var(--gh-text);
}

.tieba-sub-user {
    color: var(--gh-accent);
    font-weight: 600;
    text-decoration: none;
}

.tieba-sub-user:hover {
    text-decoration: underline;
}

.tieba-reply-text {
    color: var(--gh-muted);
    margin: 0 4px;
    font-size: 0.85rem;
}

.tieba-sub-footer {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--gh-muted);
    margin-top: 6px;
}

.tieba-sub-action {
    background: none;
    border: none;
    color: var(--gh-accent);
    cursor: pointer;
    padding: 0;
    font-size: 0.8rem;
}

.tieba-sub-action:hover {
    text-decoration: underline;
}

.tieba-more-replies {
    padding: 10px 0;
    text-align: left;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.tieba-more-btn {
    background: none;
    border: none;
    color: var(--gh-accent);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0;
}

@media (max-width: 768px) {
    .tieba-floor-left {
        width: 80px;
        padding: 15px 5px;
    }

    .tieba-avatar {
        width: 50px;
        height: 50px;
    }

    .tieba-username {
        font-size: 0.8rem;
        max-width: 70px;
    }
}