:root {
    --navy: #0b1a2b;
    --accent: #2563eb;
    --accent-dim: #1d4ed8;
    --cream: #fafaf8;
    --white: #fff;
    --text: #1a1a1a;
    --text-2: #475569;
    --text-3: #94a3b8;
    --border: #e2e8f0;
    --border-l: #f1f5f9;
    --tag-bg: #f0f4ff;
    --tag-t: #3b5998;
    --shadow: 0 1px 3px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
    --hover: 0 8px 32px rgba(0,0,0,.08);
    --serif: 'Playfair Display', Georgia, serif;
    --sans: 'Source Sans 3', system-ui, sans-serif;
    --mono: 'IBM Plex Mono', monospace;
    --max: 1100px;
    --gap: 5.5rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--sans);
    color: var(--text);
    background: var(--cream);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

.mono-label {
    font-family: var(--mono);
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: .6rem;
    display: block;
}

.sec-title {
    font-family: var(--serif);
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--navy);
    margin-bottom: 1.75rem;
    line-height: 1.25;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .65s cubic-bezier(.16,1,.3,1), transform .65s cubic-bezier(.16,1,.3,1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(250,250,248,.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-l);
    transition: box-shadow .3s;
}

nav.scrolled {
    box-shadow: 0 1px 12px rgba(0,0,0,.05);
}

.nav-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 54px;
}

.nav-logo {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1rem;
    color: var(--navy);
}

.nav-links {
    display: flex;
    gap: 1.75rem;
}

.nav-links a {
    font-size: .78rem;
    font-weight: 500;
    color: var(--text-2);
}

.nav-links a:hover {
    color: var(--navy);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle svg {
    width: 22px;
    height: 22px;
    stroke: var(--navy);
}

/* Hero Section */
.hero {
    padding: 8.5rem 0 4.5rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 3.5rem;
    align-items: center;
}

.hero-text h1 {
    font-family: var(--serif);
    font-size: 2.8rem;
    font-weight: 500;
    color: var(--navy);
    line-height: 1.12;
    letter-spacing: -.02em;
    margin-bottom: 1.2rem;
}

.tagline {
    font-size: 1.05rem;
    color: var(--text-2);
    line-height: 1.7;
    max-width: 540px;
    margin-bottom: 1.75rem;
}

.hero-links {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
}

.hero-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .9rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: .78rem;
    font-weight: 500;
    color: var(--text-2);
    background: var(--white);
    transition: all .25s;
}

.hero-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 2px 8px rgba(37,99,235,.08);
    transform: translateY(-1px);
}

.hero-link svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.hero-photo {
    width: 260px;
    height: 320px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--border-l);
    border: 1px solid var(--border);
}

.hero-photo .ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-size: .65rem;
    color: var(--text-3);
    background: linear-gradient(145deg, #e8e6e1, #f5f3ef);
}

/* About Section */
.about {
    padding: var(--gap) 0;
}

.about-body {
    max-width: 780px;
}

.about-body p {
    font-size: .92rem;
    color: var(--text-2);
    line-height: 1.85;
    margin-bottom: 1rem;
}

.about-body p strong {
    color: var(--navy);
    font-weight: 600;
}
.about-body p accepted {
    color: var(--navy);
    font-weight: 500;
}

/* News Section */
.news {
    padding: var(--gap) 0;
}

.news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.news-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.1rem 1.25rem;
    transition: box-shadow .25s, transform .25s;
}

.news-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.news-date {
    font-family: var(--mono);
    font-size: .65rem;
    color: var(--text-3);
    margin-bottom: .35rem;
}

.news-body {
    font-size: .84rem;
    color: var(--text-2);
    line-height: 1.55;
}

.news-body strong {
    color: var(--navy);
}
.news-body accepted {
    color: var(--navy);
}
/* Publications Section */
.publications {
    padding: var(--gap) 0;
}

.pub-list {
    list-style: none;
}

.pub-item {
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: .85rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--border-l);
}

.pub-item:last-child {
    border-bottom: none;
}

.pub-num {
    font-family: var(--mono);
    font-size: .7rem;
    color: var(--text-3);
    padding-top: 3px;
}

.pub-title {
    font-family: var(--serif);
    font-size: .95rem;
    font-weight: 500;
    color: var(--navy);
    line-height: 1.4;
    margin-bottom: .3rem;
}

.pub-meta {
    font-size: .8rem;
    color: var(--text-2);
}

.pub-meta .me {
    font-weight: 600;
    color: var(--navy);
}

.pub-tag {
    display: inline-block;
    font-family: var(--mono);
    font-size: .58rem;
    letter-spacing: .05em;
    padding: 2px 7px;
    border-radius: 3px;
    margin-left: .35rem;
    font-weight: 500;
    vertical-align: middle;
}

.pub-tag.first {
    background: #dbeafe;
    color: #1e40af;
}

.pub-tag.second {
    background: #e0e7ff;
    color: #3730a3;
}

/* Experience Section */
.experience {
    padding: var(--gap) 0;
}

.exp-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.75rem 2rem;
    margin-bottom: 1.25rem;
    transition: box-shadow .3s;
}

.exp-card:hover {
    box-shadow: var(--shadow);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .3rem;
}

.exp-role {
    font-weight: 600;
    font-size: 1rem;
    color: var(--navy);
}

.exp-period {
    font-family: var(--mono);
    font-size: .7rem;
    color: var(--text-3);
}

.exp-org {
    font-size: .84rem;
    color: var(--text-3);
    font-style: italic;
    margin-bottom: .85rem;
}

.exp-type {
    display: inline-block;
    font-family: var(--mono);
    font-size: .58rem;
    letter-spacing: .07em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 3px;
    margin-bottom: .85rem;
}

.exp-type.research { background: #dbeafe; color: #1e40af; }
.exp-type.industry { background: #fef3c7; color: #92400e; }
.exp-type.teaching { background: #d1fae5; color: #065f46; }

.exp-bullets {
    list-style: none;
}

.exp-bullets li {
    font-size: .84rem;
    color: var(--text-2);
    line-height: 1.65;
    padding: .15rem 0 .15rem .9rem;
    position: relative;
}

.exp-bullets li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .6rem;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
}

/* Skills Section */
.skills {
    padding: var(--gap) 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.skill-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem 1.35rem;
    transition: box-shadow .25s, transform .25s;
}

.skill-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.skill-card h4 {
    font-family: var(--mono);
    font-size: .68rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: .75rem;
}

.skill-card h4.c1 { color: #2563eb; }
.skill-card h4.c2 { color: #7c3aed; }
.skill-card h4.c3 { color: #059669; }
.skill-card h4.c4 { color: #d97706; }
.skill-card h4.c5 { color: #64748b; }

.stags {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
}

.stags span {
    font-size: .72rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.stags.s1 span { background: #eff6ff; color: #1d4ed8; }
.stags.s2 span { background: #f5f3ff; color: #6d28d9; }
.stags.s3 span { background: #ecfdf5; color: #047857; }
.stags.s4 span { background: #fffbeb; color: #b45309; }
.stags.s5 span { background: #f8fafc; color: #475569; }

/* Projects Section */
.projects {
    padding: var(--gap) 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 1.25rem;
}

.project-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hover);
}

.project-thumb {
    width: 100%;
    height: 170px;
    background: linear-gradient(135deg, #e8edf2, #f0eee9);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-thumb .ph {
    font-family: var(--mono);
    font-size: .62rem;
    color: var(--text-3);
}

.project-body {
    padding: 1.35rem;
}

.project-body h3 {
    font-family: var(--serif);
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: .4rem;
    line-height: 1.3;
}

.project-body p {
    font-size: .8rem;
    color: var(--text-2);
    line-height: 1.6;
    margin-bottom: .85rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
}

.project-tags span {
    font-family: var(--mono);
    font-size: .6rem;
    padding: 3px 7px;
    background: var(--tag-bg);
    color: var(--tag-t);
    border-radius: 4px;
}

/* Footer Section */
.footer {
    padding: 3.5rem 0 2.5rem;
    background: var(--navy);
    color: rgba(255,255,255,.7);
    margin-top: var(--gap);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-text h3 {
    font-family: var(--serif);
    font-size: 1.4rem;
    font-weight: 500;
    color: #fff;
    margin-bottom: .4rem;
}

.footer-text p {
    font-size: .82rem;
    max-width: 400px;
    line-height: 1.6;
}

.footer-actions {
    display: flex;
    gap: .65rem;
    flex-wrap: wrap;
}

.btn-cv {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .6rem 1.3rem;
    background: #fff;
    color: var(--navy);
    border-radius: 6px;
    font-weight: 600;
    font-size: .82rem;
    transition: all .25s;
}

.btn-cv:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
    color: var(--navy);
}

.btn-cv svg {
    width: 15px;
    height: 15px;
}

.btn-email {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .6rem 1.3rem;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 6px;
    font-weight: 500;
    font-size: .82rem;
    transition: all .25s;
    text-decoration: none;
}

.btn-email:hover {
    border-color: rgba(255,255,255,.5);
    color: #fff;
}

.footer-bottom {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255,255,255,.07);
    display: flex;
    justify-content: space-between;
    font-size: .68rem;
    color: rgba(255,255,255,.3);
}

.footer-bottom a {
    color: rgba(255,255,255,.45);
}

.footer-bottom a:hover {
    color: rgba(255,255,255,.75);
}

/* Media Queries (Responsive Design) */
@media(max-width: 768px) {
    :root {
        --gap: 3.5rem;
    }
    .container {
        padding: 0 1.2rem;
    }
    .nav-links {
        display: none;
    }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 54px;
        left: 0;
        right: 0;
        background: rgba(250,250,248,.97);
        backdrop-filter: blur(14px);
        padding: 1.25rem 2rem;
        gap: 1.1rem;
        border-bottom: 1px solid var(--border);
    }
    .nav-toggle {
        display: block;
    }
    .hero {
        padding: 6.5rem 0 2.5rem;
    }
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .hero-text h1 {
        font-size: 2rem;
    }
    .hero-photo {
        width: 180px;
        height: 220px;
        order: -1;
    }
    .news-grid {
        grid-template-columns: 1fr;
    }
    .exp-header {
        flex-direction: column;
    }
    .skills-grid {
        grid-template-columns: 1fr 1fr;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .footer-inner {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    .footer-bottom {
        flex-direction: column;
        gap: .4rem;
        text-align: center;
    }
}

@media(max-width: 480px) {
    .hero-text h1 {
        font-size: 1.7rem;
    }
    .hero-links {
        flex-direction: column;
    }
    .skills-grid {
        grid-template-columns: 1fr;
    }
}