/* GitHub-Inspired Theme - v2.1 */
:root {
    --bg: #0d1117;
    --bg-secondary: #161b22;
    --bg-card: #161b22;
    --text: #c9d1d9;
    --text-secondary: #8b949e;
    --text-tertiary: #6e7681;
    --accent: #58a6ff;
    --accent-hover: #79c0ff;
    --border: #30363d;
    --border-hover: #484f58;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

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

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

/* Navigation */
nav {
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    background: var(--bg);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.nav-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo {
    width: 26px;
    height: 26px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

.logo {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    line-height: 26px;
}

.nav-center {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-center a {
    color: var(--text-secondary);
    font-size: 1.3rem;
    white-space: nowrap;
    font-weight: 500;
}

.nav-center a:hover,
.nav-center a.active {
    color: var(--text);
}

/* Hero */
.hero {
    padding: 4rem 0 3rem;
    border-bottom: 1px solid var(--border);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 700px;
    text-align: justify;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.24);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    border-color: var(--border-hover);
    background: var(--bg-secondary);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.24);
    transform: translateY(-2px);
}

/* Sections */
section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--border);
}

section:last-of-type {
    border-bottom: none;
}

h1 {
    color: #c9d1d9 !important;
    transition: color 0.2s;
}

h1:hover {
    color: #79c0ff !important;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #c9d1d9 !important;
    transition: color 0.2s;
}

h2:hover {
    color: #79c0ff !important;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

p {
    text-align: justify;
}

/* Cards */
.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
    align-items: stretch;
}

.cards > a {
    display: flex;
    min-height: 100%;
}

@media (max-width: 900px) {
    .cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .cards {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.24);
    transform: translateY(-2px);
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin: 0;
}

/* Project Card */
.project {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.project:hover {
    border-color: var(--border-hover);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.24);
    transform: translateY(-2px);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.project h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.project p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.project-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

.tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tech span {
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

/* Publications */
.pub {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.pub:hover {
    border-color: var(--border-hover);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.24);
    transform: translateY(-2px);
}

.pub h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.pub h3 a {
    color: var(--text);
}

.pub h3 a:hover {
    color: var(--accent);
}

.pub-meta {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    margin-bottom: 0.75rem;
}

.pub p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin: 0;
}

.pub-section {
    margin-bottom: 3rem;
}

.pub-section h2 {
    font-size: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    color: #c9d1d9 !important;
    cursor: pointer;
    user-select: none;
    margin-bottom: 1.5rem;
}

.pub-section h2::after {
    content: ' ▼';
    font-size: 0.8em;
    transition: transform 0.3s;
    display: inline-block;
    margin-left: 0.5rem;
}

.pub-section h2.collapsed::after {
    content: ' ▶';
}

.pub-section-content {
    max-height: 10000px;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
}

.pub-section-content.hidden {
    max-height: 0;
}

/* Contact */
.social {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.social a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.9375rem;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.social a:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.24);
    transform: translateY(-2px);
}

.social svg {
    width: 20px;
    height: 20px;
}

/* Footer */
footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

footer p {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

/* Project Images */
.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .logo {
        font-size: 0.9rem;
    }

    .nav-center {
        gap: 1.5rem;
    }

    .nav-center a {
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .nav-center {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .hero-cta,
    .social {
        flex-direction: column;
    }

    .btn,
    .social a {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .nav-center {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .nav-center a {
        font-size: 0.8rem;
    }

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

    h2 {
        font-size: 1.75rem;
    }
}
