/* assets/css/style.css */
:root {
    --bg-color: #011755;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f2f2f2;
    --text-secondary: #a1a1aa;
    --accent: #d4ff00;
    /* Acid Green - Keeping your brand color */
    --accent-dim: rgba(212, 255, 0, 0.1);
    --font-head: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --container-width: 1100px;
    --nav-height: 80px;
}

/* --- RESET & BASE --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    /* z-index: 0; */
}

section {
    position: relative;
    z-index: 1;
}

a {
    color: inherit;
    text-decoration: none;
    transition: 0.3s ease;
}

ul {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-head);
    font-weight: 600;
}

/* --- UTILITIES --- */
.lang-switch {
    display: inline-flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 999px;
    border: 1px solid var(--card-border);
}

.lang-switch button {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
}

.lang-switch button.active {
    background: var(--accent);
    color: #0b0b0f;
}

.filter-btn.active-filter {
    background: var(--accent);
    color: #0b0b0f;
    border-color: var(--accent);
}

.glass-panel {
    background: rgba(10, 10, 10, 0.6);
    /* Slightly darker/more opaque */
    backdrop-filter: blur(12px);
    /* Stronger blur */
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-pad {
    padding: 100px 0;
}

.text-accent {
    color: var(--accent);
}

.glass-panel {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    border-radius: 12px;
}

/* --- NAVIGATION --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(15px);
    z-index: 1000;
    border-bottom: 1px solid var(--card-border);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.7;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    opacity: 1;
    color: var(--accent);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent);
    transition: 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* --- HERO SECTION --- */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    background: radial-gradient(circle at 80% 20%, rgba(212, 255, 0, 0.05) 0%, transparent 40%);
}

.hero-content {
    max-width: 800px;
    z-index: 2;
}

.hero-pre {
    color: var(--accent);
    font-family: var(--font-head);
    margin-bottom: 20px;
    display: block;
}

.hero-title {
    font-size: clamp(3rem, 5vw, 5rem);
    line-height: 1.1;
    margin-bottom: 30px;
}

.hero-desc {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 40px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    border: 1px solid var(--accent);
    color: var(--accent);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--accent);
    z-index: -1;
    transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.btn:hover::before {
    width: 100%;
}

/* --- SECTIONS & HEADERS --- */
.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 50px;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 20px;
}

.section-title {
    font-size: 2.5rem;
}

/* --- CARDS (Publications & Blog) --- */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 30px;
}

.pub-card {
    padding: 30px;
    transition: transform 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pub-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.pub-year {
    font-family: var(--font-head);
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.pub-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.pub-authors {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex-grow: 1;
}

.pub-venue {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin-bottom: 20px;
}

.pub-links {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    font-weight: 600;
}

.pub-links a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* --- TIMELINE (Experience/Education) --- */
.timeline {
    border-left: 2px solid var(--card-border);
    padding-left: 40px;
    margin-left: 10px;
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -49px;
    top: 5px;
    width: 16px;
    height: 16px;
    background: var(--bg-color);
    border: 2px solid var(--accent);
    border-radius: 50%;
}

.timeline-date {
    color: var(--accent);
    font-family: var(--font-head);
    margin-bottom: 5px;
    display: block;
}

.timeline-role {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
}

.timeline-org {
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

/* --- BADGES --- */
.badge {
    padding: 5px 10px;
    border: 1px solid var(--card-border);
    border-radius: 20px;
    font-size: 0.75rem;
    margin-right: 5px;
}

/* --- NEWS SECTION --- */
.news-section {
    position: relative;
    overflow: hidden;
}

.news-section::before {
    content: '';
    position: absolute;
    inset: -120px -80px;
    background:
        radial-gradient(65% 55% at 18% 20%, rgba(212, 255, 0, 0.08), transparent 60%),
        radial-gradient(50% 40% at 80% 10%, rgba(255, 255, 255, 0.06), transparent 55%);
    z-index: 0;
    pointer-events: none;
}

.news-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.news-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.news-card::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -15%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(212, 255, 0, 0.25) 0%, rgba(212, 255, 0, 0) 65%);
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

.news-card::after {
    content: '';
    position: absolute;
    left: 0;
    top: 16px;
    bottom: 16px;
    width: 3px;
    background: linear-gradient(180deg, rgba(212, 255, 0, 0.6), rgba(255, 255, 255, 0));
    opacity: 0.65;
}

.news-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
}

.news-card:hover::before {
    opacity: 1;
    transform: scale(1);
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.news-date {
    color: #dbe4ff;
    font-weight: 600;
}

.news-tag {
    padding: 3px 12px;
    border-radius: 999px;
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid rgba(212, 255, 0, 0.4);
    font-size: 0.75rem;
    font-weight: 700;
}

.news-title {
    font-size: 1.15rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

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

.news-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-top: 6px;
}

.news-empty {
    color: var(--text-secondary);
    text-align: center;
    grid-column: 1 / -1;
}

.news-hint {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 50px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--card-border);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }

    /* Mobile menu logic to be added via JS if needed */

    main img,
    .glass-panel img {
        max-width: 100%;
        /* 强制宽度不超过父容器 */
        height: auto;
        /* 高度自动适应，保持比例 */
        display: block;
        /* 避免图片底部出现莫名的空隙 */
        margin: 20px auto;
        /* 上下留空，并且居中显示 */
        border-radius: 4px;
        /* 可选：给图片加一点圆角，更好看 */
    }
}

/* Brighten publication detail page */
.post-page {
    position: relative;
    isolation: isolate;
}

.post-page::before {
    content: "";
    position: absolute;
    inset: -90px -40px;
    background:
        radial-gradient(110% 90% at 50% 15%, rgba(255, 255, 255, 0.12), transparent 55%),
        radial-gradient(80% 80% at 50% 60%, rgba(212, 255, 0, 0.05), transparent 75%);
    z-index: -1;
}

.post-page .glass-panel {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.post-page .glass-panel h1,
.post-page .glass-panel h3 {
    color: #f6f8ff;
}

.post-page .glass-panel p {
    color: #dfe6ff;
}

.post-page .glass-panel img {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}