:root {
    --text-main: #f0f0f0;
    --text-muted: #888888;
    --bg-color: #111111;
    --link-color: #ffffff;
    --border-color: #333333;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 80px 24px;
}

.container > * {
    opacity: 0;
    animation: fadeInSlideUp 0.8s ease forwards;
}

.container > *:nth-child(1) { animation-delay: 0.1s; }
.container > *:nth-child(2) { animation-delay: 0.3s; }
.container > *:nth-child(3) { animation-delay: 0.5s; }
.container > *:nth-child(4) { animation-delay: 0.7s; }
.container > *:nth-child(5) { animation-delay: 0.9s; }
.container > *:nth-child(6) { animation-delay: 1.1s; }

h1 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 32px;
}

.subtitle span {
    display: inline-block;
    opacity: 0;
    animation: fadeInSlideUp 0.5s ease forwards;
}

.subtitle span:nth-child(1) { animation-delay: 0.4s; }
.subtitle span:nth-child(2) { animation-delay: 0.6s; }
.subtitle span:nth-child(3) { animation-delay: 0.8s; }

@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.intro p {
    margin-bottom: 16px;
}

a {
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1px;
    transition: border-color 0.2s ease;
}

a:hover {
    border-bottom-color: var(--text-main);
}

section {
    margin-top: 56px;
}

.section-title {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 6px;
    padding: 8px;
    margin: 0 -8px;
    transition: background-color 0.2s ease;
    position: relative;
}

.list-item:not(:last-child)::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 8px;
    right: 8px;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.08);
}

.experience .list-item:hover,
.writing .list-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.item-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.thumbnail-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0.85;
}


.more-link {
    margin-top: 14px;
    font-size: 13px;
}

.company {
    font-weight: 500;
}

.role {
    color: var(--text-muted);
    margin-left: 4px;
}

.item-right {
    color: var(--text-muted);
    font-size: 13px;
}

.article {
    border-bottom: none;
}

.list-item.article {
    padding-bottom: 8px;
}

.article:hover {
    border-bottom: none;
}

.article:hover .title {
    text-decoration: underline;
    text-decoration-color: var(--border-color);
    text-underline-offset: 4px;
}

.thumbnail {
    width: 48px;
    height: 28px;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    margin-right: 8px;
}

.thumb1 {
    background: linear-gradient(135deg, #444444, #222222);
}

.thumb1::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.thumb2 {
    background: linear-gradient(135deg, #333333, #111111);
}

.thumb2::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
}

.thumb3 {
    background: linear-gradient(135deg, #444444, #222222);
}

.thumb3::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.interests {
    margin-top: 56px;
    margin-bottom: 56px;
}

footer {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 64px;
}

/* ── Language Toggle ── */
#lang-toggle {
    position: fixed;
    top: 24px;
    right: 28px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 50;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 13px;
    color: var(--text-muted);
    padding: 0;
    transition: color 0.2s ease;
    letter-spacing: 0.03em;
}

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

.lang-btn.active {
    color: var(--text-main);
}

.lang-sep {
    color: var(--border-color);
    font-size: 13px;
    user-select: none;
}

html {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--bg-color);
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #555555;
}

#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
}



/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    width: 90%;
    max-width: 500px;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

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

.modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.modal-thumbnail {
    width: 64px;
    height: 40px;
    border-radius: 4px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.modal-title {
    font-size: 20px;
    font-weight: 500;
}

.modal-body {
    color: var(--text-main);
}

.modal-desc {
    margin-bottom: 24px;
    line-height: 1.6;
    color: var(--text-muted);
}

.modal-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.stack-pill {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 12px;
    color: var(--text-main);
}