:root {
    --bg-color: #fafafa;
    --text-primary: #1a202c;
    --text-secondary: #718096;
    --accent: #4a5568;
    --tag-bg: rgba(226, 232, 240, 0.7);
    --tag-active-bg: #2d3748;
    --tag-active-color: #fff;
    --border-light: rgba(0, 0, 0, 0.08);
    --sticky-bg: rgba(250, 250, 250, 0.85);
    --hover-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #0f1115;
        --text-primary: #f7fafc;
        --text-secondary: #a0aec0;
        --accent: #e2e8f0;
        --tag-bg: rgba(45, 55, 72, 0.6);
        --tag-active-bg: #e2e8f0;
        --tag-active-color: #0f1115;
        --border-light: rgba(255, 255, 255, 0.08);
        --sticky-bg: rgba(15, 17, 21, 0.85);
    }
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.background-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at 15% 50%, rgba(100, 116, 139, 0.04), transparent 35%),
                radial-gradient(circle at 85% 30%, rgba(100, 116, 139, 0.04), transparent 35%);
    pointer-events: none;
}

.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

header {
    margin-bottom: 4rem;
}

.logo {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.intro-section {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 5rem;
    font-weight: 400;
}

.intro-section h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.intro-section p {
    margin-bottom: 1.5rem;
}

.intro-section a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--text-secondary);
    transition: var(--hover-transition);
}

.intro-section a:hover {
    color: var(--accent);
    border-bottom-color: var(--text-primary);
}

.intro-section strong {
    font-weight: 600;
}

.projects-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.subtitle {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.tag-navigation-wrapper {
    position: sticky;
    top: 0;
    background: var(--sticky-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    z-index: 10;
    border-bottom: 1px solid var(--border-light);
}

.tag-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.filter-tag {
    background: var(--tag-bg);
    color: var(--text-primary);
    border: none;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: var(--hover-transition);
}

.filter-tag:hover {
    background: rgba(136, 136, 136, 0.2);
}

.filter-tag.active {
    background: var(--tag-active-bg);
    color: var(--tag-active-color);
}

.projects-container {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}

.year-group {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.year-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 0.8rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.project-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    position: relative;
    padding-left: 1.2rem;
    transition: var(--hover-transition);
    animation: slideUp 0.4s ease forwards;
}

.project-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.4rem;
    bottom: 0;
    width: 2px;
    background-color: var(--border-light);
    transition: var(--hover-transition);
}

.project-item:hover::before {
    background-color: var(--text-secondary);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

.project-tag {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    font-weight: 600;
}

.project-desc {
    color: var(--text-primary);
    font-size: 1.05rem;
    line-height: 1.5;
}

.project-item.hidden {
    display: none;
}

footer {
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

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

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

@media (max-width: 600px) {
    .container {
        padding: 3rem 1.5rem;
    }
    
    header {
        margin-bottom: 3rem;
    }
    
    .intro-section {
        font-size: 1rem;
        margin-bottom: 4rem;
    }
}
