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

:root { --accent: #6d28d9; --soft: #f5f3ff; }

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.18s; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1e293b;
    line-height: 1.7;
    background: #fafafa;
}

a { color: #7c3aed; text-decoration: none; }
a:hover { text-decoration: underline; }

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 54px;
    padding: 0 2.5rem;
    background: rgba(13, 8, 32, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.nav-name { color: #fff; font-size: 1.05rem; font-weight: 600; }
.nav-links { display: flex; gap: 1.35rem; list-style: none; flex-wrap: wrap; justify-content: flex-end; }
.nav-links a { color: rgba(255,255,255,0.65); font-size: 0.8rem; font-weight: 500; white-space: nowrap; }
.nav-links a:hover { color: #fff; text-decoration: none; }
.nav-links a.active { color: #c4b5fd; }

.direction-hero {
    padding: 96px 1.5rem 36px;
    color: #fff;
    text-align: left;
    background: linear-gradient(140deg, #0d0820 0%, #2e1065 45%, #5b21b6 100%);
}

.direction-hero-inner { max-width: 920px; margin: 0 auto; }
.direction-hero h1 { margin-bottom: 0.65rem; font-size: 2.15rem; line-height: 1.22; }
.direction-description { max-width: 820px; margin: 0; color: rgba(255,255,255,0.76); font-size: 0.91rem; line-height: 1.68; }
.direction-labels { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 0.42rem; margin-top: 1rem; }
.direction-label {
    padding: 0.22rem 0.62rem;
    color: rgba(255,255,255,0.9);
    font-size: 0.72rem;
    font-weight: 500;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 9999px;
}

.wave-wrap { background: linear-gradient(140deg, #0d0820 0%, #2e1065 45%, #5b21b6 100%); line-height: 0; }
.wave-wrap svg { display: block; }

.page-body { padding: 2.4rem 0 5rem; }
.container { max-width: 920px; margin: 0 auto; padding: 0 2.5rem; }
.section-title { margin-bottom: 1.45rem; color: #2e1065; font-size: 1.45rem; line-height: 1.3; }
.section-title::after {
    content: '';
    display: block;
    width: 38px;
    height: 3px;
    margin-top: 0.45rem;
    border-radius: 2px;
    background: linear-gradient(90deg, #7c3aed, #c084fc);
}

.publication-list { display: grid; gap: 0.9rem; }
.publication-entry {
    padding: 1.15rem 1.25rem;
    background: #fff;
    border: 1px solid #e9e3f8;
    border-left: 3px solid var(--accent);
    border-radius: 8px;
}
.publication-citation { color: #475569; font-size: 0.88rem; line-height: 1.72; }
.publication-citation .paper-title { color: #1e293b; font-weight: 650; }
.publication-actions { display: flex; align-items: center; gap: 0.8rem; margin-top: 0.45rem; }
.publication-entry:has(.official-link) .publication-citation { display: inline; }
.publication-actions:has(.official-link) { display: inline-flex; align-items: baseline; margin: 0 0 0 0.35rem; vertical-align: baseline; }
.official-link {
    display: inline-flex;
    align-items: center;
    padding: 0;
    color: #6d28d9;
    font-size: 0.76rem;
    font-weight: 600;
    background: transparent;
}
.official-link:hover { color: #5b21b6; text-decoration: underline; background: transparent; }
.publication-note { color: #94a3b8; font-size: 0.75rem; font-style: italic; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    margin-top: 2rem;
    font-size: 0.82rem;
    font-weight: 600;
}

footer { padding: 2rem; color: #94a3b8; font-size: 0.8rem; text-align: center; border-top: 1px solid #ede9fe; }
footer a { color: #94a3b8; }

@media (min-width: 1024px) {
    .direction-hero { padding-top: 108px; padding-bottom: 44px; }
    .direction-hero-inner { max-width: 1180px; }
    .direction-hero h1 { font-size: 2.65rem; }
    .direction-description { max-width: 1080px; font-size: 1.04rem; line-height: 1.72; }
    .direction-label { padding: 0.28rem 0.72rem; font-size: 0.8rem; }

    .page-body { padding-top: 3rem; }
    .container { max-width: 1180px; padding-right: 2rem; padding-left: 2rem; }
    .section-title { font-size: 1.7rem; }
    .publication-list { gap: 1rem; }
    .publication-entry { padding: 1.35rem 1.5rem; }
    .publication-citation { font-size: 1rem; line-height: 1.75; }
    .official-link { font-size: 0.86rem; }
    .back-link { font-size: 0.92rem; }
}

@media (max-width: 768px) {
    nav {
        display: block;
        height: 84px;
        min-height: 0;
        padding: 0.55rem 1rem 0.45rem;
        overflow: hidden;
    }
    .nav-name { display: block; width: max-content; margin: 0 auto 0.35rem; font-size: 0.98rem; line-height: 1.35; }
    .nav-links {
        width: calc(100% + 2rem);
        margin: 0 -1rem;
        padding: 0 1rem 0.15rem;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 1rem;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        -webkit-mask-image: linear-gradient(to right, transparent, #000 14px, #000 calc(100% - 14px), transparent);
        mask-image: linear-gradient(to right, transparent, #000 14px, #000 calc(100% - 14px), transparent);
    }
    .nav-links::-webkit-scrollbar { display: none; }
    .nav-links li { flex: 0 0 auto; }
    .nav-links a { position: relative; padding-bottom: 0.3rem; font-size: 0.74rem; }
    .nav-links a.active::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 2px;
        border-radius: 2px;
        background: #a78bfa;
    }
    .direction-hero { padding: 108px 1.1rem 32px; }
    .direction-hero h1 { font-size: 1.75rem; }
    .direction-description { font-size: 0.87rem; }
    .page-body { padding: 2rem 0 3.5rem; }
    .container { padding: 0 1.1rem; }
}

@media (max-width: 480px) {
    .direction-hero { padding-left: 0.95rem; padding-right: 0.95rem; }
    .direction-hero h1 { font-size: 1.58rem; }
    .direction-labels { gap: 0.35rem; }
    .publication-entry { padding: 1rem; }
    .publication-citation { font-size: 0.84rem; }
    .container { padding: 0 0.95rem; }
    footer { padding: 1.5rem 1rem; }
}
