.lang-btn {
    background: none;
    border: none;
    color: var(--fg-muted);
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0;
    text-transform: uppercase;
    font-weight: 500;
}

.lang-btn:hover {
    color: var(--accent);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--fg);
    border: 1px solid var(--border-light);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    text-decoration: none;
}

.btn-primary:hover {
    border-color: var(--fg-muted);
    color: var(--accent);
}

.intro-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.intro-links a {
    color: var(--fg-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.intro-links a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}


.work-list,
.post-list,
.timeline-list {
    list-style: none;
}


.tabs-header {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
    position: relative;
    padding-bottom: 0.5rem;
}

.tab-highlight {
    position: absolute;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: var(--accent);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    border-radius: 2px 2px 0 0;
    z-index: 10;
}

.tab-btn {
    background: none;
    border: none;
    font: inherit;
    font-size: 1rem;
    font-weight: 500;
    color: var(--fg-faint);
    padding: 0.6rem 1rem;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.tab-btn:hover {
    color: var(--fg-muted);
}

.tab-btn.active {
    color: var(--accent);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}


.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.skill-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    color: var(--fg);
    transition: all 0.2s ease;
}

.skill-card:hover {
    background: var(--bg-card);
    border-color: var(--fg-muted);
    transform: translateY(-2px);
}

.skill-icon {
    font-size: 2rem;
    color: var(--fg);
    transition: color 0.2s ease;
}

.skill-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--fg-muted);
    transition: color 0.2s ease;
}

.skill-card:hover .skill-name,
.skill-card:hover .skill-icon {
    color: var(--fg);
}


.timeline-list {
    position: relative;
    padding-left: 3rem;
}

.timeline-list::before {
    content: '';
    position: absolute;
    left: 0.85rem;
    top: 0.25rem;
    bottom: 0.25rem;
    width: 1px;
    background: var(--border-light);
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-icon {
    position: absolute;
    left: -3rem;
    top: 0;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--fg-muted);
    letter-spacing: -0.02em;
    z-index: 1;
}

.timeline-content h3.timeline-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.timeline-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.timeline-role {
    font-size: 0.9rem;
    color: var(--fg-muted);
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--fg-faint);
    font-variant-numeric: tabular-nums;
}

.timeline-meta .timeline-role+.timeline-date::before {
    content: '·';
    margin-right: 0.5rem;
    color: var(--fg-faint);
}

.timeline-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline-content ul li {
    font-size: 0.9rem;
    color: var(--fg-muted);
    line-height: 1.6;
    padding-left: 1rem;
    position: relative;
}

.timeline-content ul li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: var(--fg-faint);
}


.work-list li {
    margin-bottom: 1rem;
}

.work-list li:last-child {
    margin-bottom: 0;
}

.work-item {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 1.25rem;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.work-item:hover {
    background: var(--bg-card);
    border-color: var(--border-light);
}

.work-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.work-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.work-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--fg);
    transition: color 0.2s ease;
}

.work-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.work-links a {
    color: var(--fg-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.work-links a:hover {
    color: var(--accent);
    background: var(--bg-hover);
}

.work-tag {
    font-size: 0.8rem;
    font-family: var(--font-mono);
    border: 1px solid var(--border-light);
    color: var(--fg-muted);
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
}

.work-desc {
    font-size: 0.95rem;
    color: var(--fg-muted);
    line-height: 1.6;
}


.post-list li {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    margin-bottom: 1.2rem;
}

.post-list li:last-child {
    margin-bottom: 0;
}

.post-list time {
    font-size: 0.9rem;
    color: var(--fg-faint);
    min-width: 4.5rem;
    font-variant-numeric: tabular-nums;
}

.post-list a {
    color: var(--fg);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.post-list a:hover {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}


.btn-gh,
.btn-tg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--fg);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
    margin-right: 0.5rem;
    margin-top: 1rem;
}

.btn-gh:hover,
.btn-tg:hover {
    background: var(--bg-hover);
    border-color: var(--fg-muted);
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    color: var(--fg-muted);
    font-size: 1.25rem;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--accent);
}


.overlay-modal {
    background: var(--bg);
    color: var(--fg);
    padding: 0;
    max-width: 600px;
    width: 92%;
    margin: auto;
    position: relative;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.overlay-modal::backdrop {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.modal-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--accent);
}

.close-modal {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: var(--fg-muted);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--accent);
}

.modal-body {
    padding: 1.5rem;
}

.modal-body p {
    color: var(--fg-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.modal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.modal-gallery img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid var(--border-light);
}


.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--bg-card);
    color: var(--fg-muted);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 99;
    cursor: pointer;
    padding: 0;
}

.back-to-top .btt-ring {
    position: absolute;
    top: 0;
    left: 0;
}

.back-to-top .btt-progress {
    transition: stroke-dashoffset 0.1s linear;
}

.back-to-top .btt-arrow {
    position: relative;
    z-index: 1;
    transition: transform 0.2s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    color: var(--accent);
}

.back-to-top:hover .btt-arrow {
    transform: translateY(-2px);
}

.nav-active {
    color: var(--accent) !important;
}

.articles-filter {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.filter-btn {
    background: none;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    color: var(--fg-muted);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--fg-muted);
    color: var(--fg);
}

.filter-btn.active {
    background: var(--fg);
    color: var(--bg);
    border-color: var(--fg);
}

.comment-count-badge {
    font-size: 0.78rem;
    color: var(--fg-faint);
    font-family: var(--font-mono);
    margin-left: auto;
    white-space: nowrap;
}

.btn-secondary:hover {
    color: var(--accent);
    border-color: var(--fg-muted);
}


.theme-toggle {
    background: none;
    border: none;
    color: var(--fg-muted);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, transform 0.2s ease;
    border-radius: 50%;
}

.theme-toggle:hover {
    color: var(--accent);
    background: var(--bg-hover);
}

.theme-toggle:active {
    transform: scale(0.9);
}

.post-list,
.timeline-list {
    list-style: none;
}

@media (max-width: 600px) {
    .post-list li {
        flex-direction: column;
        gap: 0.2rem;
    }

    .post-list time {
        font-size: 0.85rem;
    }

    .tabs-header {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 0.75rem;
        margin-bottom: 1.5rem;
        scrollbar-width: none;
    }

    .tabs-header::-webkit-scrollbar {
        display: none;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .intro-links {
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 1.25rem;
        column-gap: 1rem;
    }

    .intro-links a:not(.btn-primary) {
        min-width: 44px;
        min-height: 44px;
    }

    .timeline-list {
        padding-left: 2.25rem;
    }

    .timeline-list::before {
        left: 0.45rem;
    }

    .timeline-icon {
        left: -2.25rem;
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.55rem;
    }

    .work-info {
        flex-direction: column;
        gap: 0.5rem;
    }
}


[aria-label]:not(.back-to-top):not(input):not(textarea):not(select):not(button):not([type]) {
    position: relative;
}

[aria-label]:not(.back-to-top):not(input):not(textarea):not(select):not(button):not([type])::after {
    content: attr(aria-label);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background: var(--bg-hover);
    color: var(--fg);
    padding: 6px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: var(--font-sans);
    border-radius: 6px;
    border: 1px solid var(--border-light);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    color: var(--fg);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 0.95rem;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

[aria-label]:not(.back-to-top):not(input):not(textarea):not(select):not(button):not([type])::before {
    content: "";
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    border-width: 4px 4px 0 4px;
    border-style: solid;
    border-color: var(--border-light) transparent transparent transparent;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
}

[aria-label]:not(.back-to-top):not(input):not(textarea):not(select):not(button):not([type]):hover::after,
[aria-label]:not(.back-to-top):not(input):not(textarea):not(select):not(button):not([type]):hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    color: var(--fg);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 0.95rem;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}



#dev-terminal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    color: #00ff00;
    font-family: var(--font-mono);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

#dev-terminal.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #00ff0040;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.terminal-body {
    flex: 1;
    overflow-y: auto;
    font-size: 0.95rem;
    line-height: 1.5;
    scrollbar-width: thin;
    scrollbar-color: #00ff00 transparent;
}

.terminal-line {
    margin-bottom: 0.5rem;
}

.terminal-input-wrap {
    display: flex;
    align-items: center;
    margin-top: 1rem;
}

.terminal-input-wrap span {
    margin-right: 0.5rem;
}

#terminal-input {
    background: transparent;
    border: none;
    color: #00ff00;
    font-family: inherit;
    font-size: inherit;
    flex: 1;
    outline: none;
}

.terminal-close-btn {
    background: transparent;
    color: #00ff00;
    border: 1px solid #00ff00;
    padding: 0.2rem 0.6rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.terminal-close-btn:hover {
    background: #00ff00;
    color: #000;
}

/* Reading Progress Bar */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--accent);
    width: 0%;
    z-index: 10000;
    transition: width 0.1s ease-out;
}