/* =====================================================
   Farhad Nooralahzadeh — Personal Academic Website
   Premium, FAANG-level professional design
   ===================================================== */

/* --- CSS Variables --- */
:root {
    --primary: #1a56db;
    --primary-dark: #1340a4;
    --primary-light: #e8effc;
    --accent: #0ea5e9;
    --accent-dark: #0284c7;
    --text: #0f172a;
    --text-light: #475569;
    --text-lighter: #94a3b8;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --bg-dark: #0f172a;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.06), 0 2px 4px -2px rgba(0,0,0,0.04);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.07), 0 4px 6px -4px rgba(0,0,0,0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.07), 0 8px 10px -6px rgba(0,0,0,0.03);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
}

/* --- Dark Mode Variables --- */
[data-theme="dark"] {
    --primary: #6ea8fe;
    --primary-dark: #9ec5fe;
    --primary-light: rgba(110,168,254,0.12);
    --accent: #38bdf8;
    --accent-dark: #7dd3fc;
    --text: #e2e8f0;
    --text-light: #94a3b8;
    --text-lighter: #64748b;
    --bg: #0f172a;
    --bg-alt: #1e293b;
    --bg-dark: #020617;
    --border: #334155;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.4), 0 2px 4px -2px rgba(0,0,0,0.3);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.4), 0 4px 6px -4px rgba(0,0,0,0.3);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.4), 0 8px 10px -6px rgba(0,0,0,0.2);
    --bg-card: #1e293b;
}

[data-theme="dark"] #navbar {
    background: rgba(15,23,42,0.92);
}

[data-theme="dark"] .hero-bg-pattern {
    background:
        radial-gradient(circle at 15% 50%, rgba(110,168,254,0.06) 0%, transparent 50%),
        radial-gradient(circle at 85% 20%, rgba(56,189,248,0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 90%, rgba(110,168,254,0.04) 0%, transparent 40%);
}

[data-theme="dark"] .hero-links a {
    background: var(--bg-alt);
    border-color: var(--border);
    color: var(--text-light);
}

[data-theme="dark"] .hero-links a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

[data-theme="dark"] .hero-image img,
[data-theme="dark"] .hero-placeholder-photo {
    border-color: var(--border);
}

[data-theme="dark"] .highlight-card {
    background: var(--bg-alt);
    border-color: var(--border);
}

[data-theme="dark"] .research-card {
    background: var(--bg-alt);
    border-color: var(--border);
}

[data-theme="dark"] .pub-row {
    background: var(--bg);
    border-color: var(--border);
}

[data-theme="dark"] .pub-left {
    background: var(--bg-alt);
    border-right-color: var(--border);
}

[data-theme="dark"] .pub-figure img {
    border-color: var(--border);
}

[data-theme="dark"] .pub-figure-placeholder {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

[data-theme="dark"] .pub-keyword {
    background: var(--primary-light);
    color: var(--primary);
}

[data-theme="dark"] .project-card {
    background: var(--bg-alt);
    border-color: var(--border);
}

[data-theme="dark"] .timeline-item::before {
    background: var(--bg-alt);
    border-color: var(--border);
}

[data-theme="dark"] .filter-btn {
    color: var(--text-light);
    background: var(--bg-alt);
    border-color: var(--border);
}

[data-theme="dark"] .filter-btn.active,
[data-theme="dark"] .filter-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

[data-theme="dark"] .metric {
    border-color: var(--border);
}

[data-theme="dark"] .section-alt {
    background: var(--bg-alt);
}

[data-theme="dark"] footer {
    background: var(--bg-dark);
    color: var(--text-lighter);
}

[data-theme="dark"] #backToTop {
    background: var(--bg-alt);
    color: var(--text-light);
    border: 1px solid var(--border);
}

[data-theme="dark"] .timeline-toggle {
    color: var(--text-light);
    border-color: var(--border);
}

[data-theme="dark"] .timeline-toggle:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* --- Theme toggle button --- */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-alt);
    color: var(--text-light);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 0.9rem;
    margin-left: 4px;
}

.theme-toggle:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-light);
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover { color: var(--primary-dark); }

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Wider container used only for the combined About + News frame */
.about-news-container {
    max-width: 1260px;
}

/* --- Navigation --- */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    transition: all var(--transition);
}

#navbar.scrolled {
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-logo {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--primary) !important;
    letter-spacing: -0.03em;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 4px;
}

.nav-links a {
    display: block;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-light);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    letter-spacing: -0.01em;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-links a.nav-external {
    color: var(--primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all var(--transition);
}

/* --- Hero Section --- */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 100px 24px 80px;
}

.hero-bg-pattern {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 50%, rgba(26,86,219,0.05) 0%, transparent 50%),
        radial-gradient(circle at 85% 20%, rgba(14,165,233,0.04) 0%, transparent 50%),
        radial-gradient(circle at 50% 90%, rgba(26,86,219,0.03) 0%, transparent 40%);
    pointer-events: none;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 480px;
    align-items: center;
    gap: 30px;
    width: 100%;
}

.hero-text { flex: 1; }

.hero-head {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 14px;
}

.hero-identity {
    min-width: 0;
}

.hero-name {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 4.4vw, 3rem);
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
    margin-bottom: 12px;
    letter-spacing: -0.025em;
}

.hero-title {
    font-size: 1.32rem;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 4px;
}

.hero-affiliation {
    font-size: 1.12rem;
    color: var(--text-lighter);
    margin-bottom: 4px;
}

.hero-focus {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.01em;
    margin: 0;
}

.hero-location {
    color: var(--text-lighter);
    opacity: 0.85;
}

.hero-location i {
    font-size: 0.8em;
    margin-right: 2px;
}

.hero-tagline {
    font-size: 1.2rem;
    color: var(--text-light);
    line-height: 1.6;
    max-width: 560px;
    margin-bottom: 20px;
    font-weight: 400;
}

.hero-links {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
}

.hero-links a {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-alt);
    color: var(--text-light);
    font-size: 1.05rem;
    transition: all var(--transition);
    border: 1px solid var(--border);
}

.hero-links a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Hero CTA Buttons */
.hero-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-primary-cta,
.btn-secondary-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius);
    font-size: 0.96rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
    cursor: pointer;
}

.btn-primary-cta {
    background: var(--primary);
    color: white;
    border: 2px solid var(--primary);
}

.btn-primary-cta:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary-cta:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

[data-theme="dark"] .btn-secondary-cta {
    color: var(--text-light);
    border-color: var(--border);
}

[data-theme="dark"] .btn-secondary-cta:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.hero-image { flex: 0 0 auto; }

.hero-image img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg);
    box-shadow: var(--shadow-md);
}

.hero-image-placeholder {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), #dbeafe);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--primary);
    border: 2px solid var(--border);
    opacity: 0.4;
}

.hero-image-placeholder i { font-size: 3rem; }
.hero-image-placeholder span { font-size: 0.75rem; font-weight: 500; display: none; }

.hero-news {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow-sm);
}

.hero-news-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.hero-news-title i {
    color: var(--primary);
    font-size: 0.8rem;
}

.hero-news-feed {
    max-width: none;
    margin: 10px 0 0;
}

.hero-news-item {
    padding: 10px 0;
}

.hero-news-item .news-date {
    flex: 0 0 62px;
    font-size: 0.7rem;
}

.hero-news-item .news-icon {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
}

.hero-news-item .news-icon i {
    font-size: 0.65rem;
}

.hero-news-item .news-body p {
    font-size: 0.94rem;
    line-height: 1.45;
}

.hero-news-more {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary);
}

.hero-news-more i {
    font-size: 0.72rem;
}

/* --- Section Styles --- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }

.section-title {
    font-family: var(--font-serif);
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    text-align: center;
}

/* --- About + News Shared Frame --- */
.about-news-frame {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
}

.about-news-panel {
    padding: 56px 44px;
    min-width: 0;
}

.about-news-panel-news {
    order: -1;
    border-right: 1px solid var(--border);
    border-left: none;
    background: var(--bg-alt);
}

.about-news-panel .about-content {
    margin-top: 24px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1rem;
    max-width: 560px;
    margin: 14px auto 44px;
    line-height: 1.6;
}

/* --- About Section --- */
.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 44px;
}

.about-text p {
    margin-bottom: 14px;
    font-size: 1.02rem;
    color: var(--text);
    line-height: 1.8;
}

.about-text strong {
    color: var(--text);
    font-weight: 600;
}

/* --- Metrics Bar --- */
.metrics-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg);
}

.metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
    border-right: 1px solid var(--border);
    transition: background var(--transition);
}

.metric:last-child { border-right: none; }
.metric:hover { background: var(--bg-alt); }

.metric-value {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    letter-spacing: -0.03em;
}

.metric-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 6px;
}

/* --- Highlight Cards --- */
.about-highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.highlight-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    transition: all var(--transition);
}

.highlight-card:hover {
    border-color: var(--primary);
}

.highlight-card i {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.highlight-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
    letter-spacing: -0.01em;
}

.highlight-card p {
    font-size: 0.84rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* --- Skills / Tech Stack --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.skill-category {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: border-color var(--transition);
}

.skill-category:hover {
    border-color: var(--primary);
}

.skill-category-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    display: inline-block;
    padding: 5px 14px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text);
    transition: all var(--transition);
}

.skill-tag:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

[data-theme="dark"] .skill-category {
    background: var(--bg-alt);
    border-color: var(--border);
}

[data-theme="dark"] .skill-tag {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border);
    color: var(--text-light);
}

[data-theme="dark"] .skill-tag:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

/* --- News Feed --- */
.news-feed {
    max-width: 720px;
    margin: 24px auto 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.news-item {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    transition: all var(--transition);
}

.news-item:first-child { padding-top: 0; }
.news-item:last-child { border-bottom: none; }
.news-item:hover { background: var(--bg-alt); margin: 0 -12px; padding-left: 12px; padding-right: 12px; border-radius: var(--radius-sm); }

.news-date {
    flex: 0 0 70px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
}

.news-icon {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-icon i {
    font-size: 0.75rem;
    color: var(--primary);
}

.news-body { flex: 1; min-width: 0; }

.news-body p {
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

.news-body strong { color: var(--text); font-weight: 600; }
.news-body a { color: var(--primary); font-weight: 500; }
.news-body a:hover { text-decoration: underline; }

/* --- Research Grid --- */
.research-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 0;
}

.research-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px 26px;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.research-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.research-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.research-icon i {
    font-size: 1.15rem;
    color: var(--primary);
}

.research-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
    letter-spacing: -0.01em;
}

.research-card p {
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.6;
    flex: 1;
}

.research-subtopics {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.research-subtopics li {
    font-size: 0.82rem;
    color: var(--text-light);
    padding-left: 16px;
    position: relative;
    line-height: 1.5;
}

.research-subtopics li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
}

/* --- Publications (Table-style) --- */
.publications-filter {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 7px 18px;
    font-size: 0.82rem;
    font-weight: 500;
    font-family: var(--font-sans);
    border: 1.5px solid var(--border);
    border-radius: 50px;
    background: var(--bg);
    color: var(--text-light);
    cursor: pointer;
    transition: all var(--transition);
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.publications-table {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pub-row {
    display: flex;
    gap: 0;
    border: 1px solid var(--border);
    border-bottom: none;
    background: var(--bg);
    transition: all var(--transition);
}

.pub-row:last-child { border-bottom: 1px solid var(--border); }

.pub-row:hover {
    box-shadow: var(--shadow);
    z-index: 1;
    position: relative;
}

.pub-row.hidden { display: none; }
.pub-row.pub-overflow { display: none; }

.pub-toggle-wrap {
    text-align: center;
    padding-top: 20px;
}

.pub-left {
    flex: 0 0 240px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--border);
    background: var(--bg-alt);
}

.pub-figure {
    width: 100%;
    position: relative;
    cursor: pointer;
}

.pub-figure img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: box-shadow 0.3s ease;
    display: block;
}

.pub-figure:hover img {
    box-shadow: var(--shadow-md);
}

.pub-figure-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}

.pub-figure-placeholder i {
    font-size: 2rem;
    color: var(--primary);
    opacity: 0.35;
}

/* Publication figure lightbox */
.pub-lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: zoom-out;
    padding: 40px;
    box-sizing: border-box;
}

.pub-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
}

.pub-lightbox img {
    max-width: 90%;
    max-height: 80vh;
    border-radius: var(--radius);
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
    object-fit: contain;
}

.pub-lightbox-title {
    color: #ddd;
    font-size: 0.95rem;
    text-align: center;
    max-width: 700px;
}

.pub-lightbox-close {
    position: absolute;
    top: 16px;
    right: 24px;
    color: #eee;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 1001;
    transition: color 0.2s;
}

.pub-lightbox-close:hover { color: #fff; }

.pub-right {
    flex: 1;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.pub-right .pub-authors {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.5;
}

.pub-right .pub-authors strong { color: var(--text); }

.pub-right .pub-title {
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.pub-right .pub-title a {
    color: var(--text);
    text-decoration: none;
    transition: color var(--transition);
}

.pub-right .pub-title a:hover {
    color: var(--primary);
}

/* Publication Role Badges */
.pub-role {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.pub-role-first-author {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.pub-role-senior-author {
    background: rgba(99, 102, 241, 0.12);
    color: #4f46e5;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.pub-role-corresponding {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

[data-theme="dark"] .pub-role-first-author {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .pub-role-senior-author {
    background: rgba(99, 102, 241, 0.18);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.3);
}

[data-theme="dark"] .pub-role-corresponding {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
}

.pub-right .pub-venue {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--primary);
}

.pub-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
}

.pub-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
}

.pub-links a {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-lighter);
    transition: color var(--transition);
}

.pub-links a:hover {
    color: var(--primary);
}

.pub-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
}

.pub-keyword {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--primary);
    background: var(--primary-light);
    padding: 2px 8px;
    border-radius: 3px;
    letter-spacing: 0.01em;
    line-height: 1.6;
}

/* --- Projects --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.project-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    position: relative;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.project-card.featured { border-left: 3px solid var(--primary); }

.project-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 2px 10px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--primary);
    color: white;
    border-radius: 50px;
}

.project-status {
    padding: 2px 10px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 50px;
    white-space: nowrap;
}

.status-ongoing {
    background: #dcfce7;
    color: #166534;
}

.status-completed {
    background: #f1f5f9;
    color: #475569;
}

.project-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.project-icon i { font-size: 1.15rem; color: var(--primary); }

.project-card h3 {
    font-size: 1.08rem;
    font-weight: 700;
    margin-bottom: 3px;
    color: var(--text);
    letter-spacing: -0.01em;
}

.project-tagline {
    font-size: 0.84rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 10px;
}

.project-card p {
    font-size: 0.87rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 14px;
    flex: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 14px;
}

.project-tech span {
    padding: 2px 10px;
    font-size: 0.72rem;
    font-weight: 500;
    background: var(--bg-alt);
    color: var(--text-light);
    border-radius: 50px;
    border: 1px solid var(--border);
}

.project-links {
    display: flex;
    gap: 14px;
}

.project-links a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primary);
    transition: all var(--transition);
}

.project-links a:hover { color: var(--primary-dark); }

/* Project Case Study Layout */
.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.project-case-study {
    margin: 16px 0 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.case-block {
    padding-left: 14px;
    border-left: 3px solid var(--border);
}

.case-label {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    margin-bottom: 4px;
}

.case-block p {
    font-size: 0.84rem;
    color: var(--text-light);
    line-height: 1.55;
    margin: 0;
}

.impact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
}

.impact-list li {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
}

.impact-list li i {
    font-size: 0.7rem;
    color: #10b981;
}

[data-theme="dark"] .case-block {
    border-left-color: var(--border);
}

[data-theme="dark"] .impact-list li i {
    color: #34d399;
}

/* --- Timeline (Experience) --- */
.timeline {
    position: relative;
    max-width: 680px;
    margin: 44px auto 0;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 36px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-marker {
    position: absolute;
    left: -36px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg);
    border: 3px solid var(--primary);
    z-index: 1;
}

.timeline-item.education .timeline-marker { border-color: var(--accent); }

.timeline-content {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 26px;
    transition: all var(--transition);
}

.timeline-content:hover {
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.timeline-date {
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    padding: 2px 12px;
    border-radius: 50px;
    margin-bottom: 8px;
}

.timeline-content h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 3px;
    letter-spacing: -0.01em;
}

.timeline-place {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 6px;
}

.timeline-place i { margin-right: 4px; color: var(--primary); }

.timeline-content p:last-child {
    font-size: 0.87rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* --- Timeline toggle (show more / less) --- */
.timeline-hidden { display: none; }
.section-overflow { display: none; }

.section-toggle-wrap {
    text-align: center;
    padding-top: 16px;
}

.timeline-toggle-wrap {
    text-align: center;
    padding-top: 8px;
}

.timeline-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 24px;
    font-size: 0.84rem;
    font-weight: 600;
    font-family: var(--font-sans);
    color: var(--primary);
    background: var(--primary-light);
    border: 1.5px solid var(--primary);
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition);
}

.timeline-toggle:hover {
    background: var(--primary);
    color: white;
}

.timeline-toggle i {
    font-size: 0.72rem;
    transition: transform var(--transition);
}

/* --- Student list (simple format) --- */
.student-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg);
}

.student-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
    gap: 14px;
    flex-wrap: wrap;
}

.student-list-item:last-child { border-bottom: none; }
.student-list-item:hover { background: var(--bg-alt); }

.student-list-main {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.student-list-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
}

.student-list-project {
    font-size: 0.83rem;
    color: var(--text-light);
    font-style: italic;
    text-align: right;
    flex: 1;
    min-width: 180px;
}

/* --- Students & Supervision --- */
.students-group {
    max-width: 820px;
    margin: 0 auto 48px;
}

.students-group:last-child { margin-bottom: 0; }

.students-group-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.students-group-title i {
    color: var(--primary);
    font-size: 1rem;
}

.students-summary {
    font-size: 0.92rem;
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.6;
    font-style: italic;
}

/* Student badges */
.student-degree {
    display: inline-block;
    padding: 2px 10px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 50px;
}

.badge-phd { background: #fef3c7; color: #b45309; }
.badge-master { background: var(--primary-light); color: var(--primary); }
.badge-bachelor { background: #d1fae5; color: #065f46; }
.badge-semester { background: #ede9fe; color: #6d28d9; }

/* --- Teaching List --- */
.teaching-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg);
}

.teaching-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 22px;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

.teaching-item:last-child { border-bottom: none; }
.teaching-item:hover { background: var(--bg-alt); }

.teaching-term {
    flex: 0 0 110px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    padding: 3px 12px;
    border-radius: 50px;
    text-align: center;
}

.teaching-details { flex: 1; }

.teaching-details strong {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
}

.teaching-level {
    font-size: 0.82rem;
    color: var(--text-light);
    margin-left: 8px;
}

.teaching-note {
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.teaching-note i { color: var(--primary); }

/* --- Talks & Awards & Service --- */
.talks-list,
.awards-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg);
}

.talk-item,
.award-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 22px;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

.talk-item:last-child,
.award-item:last-child { border-bottom: none; }

.talk-item:hover,
.award-item:hover { background: var(--bg-alt); }

.talk-date,
.award-year {
    flex: 0 0 90px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    padding: 3px 12px;
    border-radius: 50px;
    text-align: center;
}

.talk-details { flex: 1; }

.talk-details strong {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.talk-venue {
    font-size: 0.82rem;
    color: var(--text-light);
    font-style: italic;
    display: block;
    margin-top: 2px;
}

.award-item p {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

.award-item p strong { color: var(--text); }

/* --- Service badges --- */
.service-content p {
    font-size: 0.92rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 16px;
}

.service-content p strong { color: var(--text); }

.service-venues {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.service-badge {
    display: inline-block;
    padding: 5px 14px;
    font-size: 0.78rem;
    font-weight: 500;
    background: var(--bg);
    color: var(--text-light);
    border: 1px solid var(--border);
    border-radius: 50px;
    transition: all var(--transition);
}

.service-badge.ac {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
    border-color: var(--primary);
}

.service-badge:hover {
    border-color: var(--primary);
}

/* --- Contact Grid --- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 44px;
}

.contact-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    transition: all var(--transition);
    display: block;
    color: var(--text) !important;
}

.contact-card:hover {
    border-color: var(--primary);
    color: var(--text) !important;
}

.contact-card i {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.contact-card h3 {
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.contact-card p {
    font-size: 0.82rem;
    color: var(--text-light);
    word-break: break-word;
}

/* --- Footer --- */
footer {
    background: var(--bg-dark);
    color: var(--text-lighter);
    text-align: center;
    padding: 28px 24px;
}

footer p { font-size: 0.82rem; }

/* --- Back to Top --- */
#backToTop {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 0.95rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    box-shadow: var(--shadow-md);
    z-index: 999;
}

#backToTop.visible { opacity: 1; visibility: visible; }

#backToTop:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* --- Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 36px;
    }

    .hero-head {
        flex-direction: column;
        gap: 12px;
    }

    .hero-links { justify-content: center; }
    .hero-tagline { margin-left: auto; margin-right: auto; }

    .hero-image { display: flex; justify-content: center; }

    .hero-image img,
    .hero-image-placeholder {
        width: 150px;
        height: 150px;
    }

    .research-grid { grid-template-columns: repeat(2, 1fr); }
    .about-highlights { grid-template-columns: repeat(3, 1fr); }
    .skills-grid { grid-template-columns: repeat(2, 1fr); }
    .projects-grid { grid-template-columns: 1fr; }
    .pub-left { flex: 0 0 200px; }
    .metrics-bar { grid-template-columns: repeat(4, 1fr); }
    .contact-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg);
        flex-direction: column;
        padding: 16px 24px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
    }

    .nav-links.open { display: flex; }
    .nav-toggle { display: flex; }

    .section { padding: 64px 0; }
    .section-title { font-size: 1.5rem; }
    .about-news-panel { padding: 38px 20px; }
    .about-news-frame { grid-template-columns: 1fr; }
    .about-news-panel-news {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .research-grid { grid-template-columns: 1fr; }
    .about-highlights { grid-template-columns: 1fr; }
    .skills-grid { grid-template-columns: 1fr; }
    .hero-cta { justify-content: center; }
    .hero-news { text-align: left; }

    .metrics-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .metric { padding: 20px 12px; }
    .metric-value { font-size: 1.4rem; }

    .news-item { gap: 10px; }
    .news-date { flex: 0 0 60px; font-size: 0.72rem; }

    .teaching-item,
    .talk-item,
    .award-item {
        flex-direction: column;
        gap: 8px;
    }

    .student-list-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .student-list-project {
        text-align: left;
        min-width: 0;
    }

    .teaching-term,
    .talk-date,
    .award-year {
        align-self: flex-start;
    }

    .pub-row { flex-direction: column; }

    .pub-left {
        flex: none;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 14px;
    }

    .pub-right { padding: 16px; }

    .timeline { padding-left: 30px; }
    .timeline-marker { left: -26px; }

    .contact-grid { grid-template-columns: 1fr 1fr; }

    #hero {
        min-height: auto;
        padding: 110px 24px 60px;
    }
}

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

/* --- Gallery Section --- */

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--border);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.gallery-img-wrap {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--bg-alt);
}

.gallery-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.gallery-item:hover .gallery-img-wrap img {
    transform: scale(1.05);
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light), #dbeafe);
}

.gallery-placeholder i {
    font-size: 2.5rem;
    color: var(--primary);
    opacity: 0.3;
}

.gallery-caption {
    padding: 14px 16px;
}

.gallery-caption-text {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 6px;
}

.gallery-date {
    font-size: 0.75rem;
    color: var(--text-lighter);
}

.gallery-date i {
    margin-right: 4px;
    font-size: 0.7rem;
}

@media (max-width: 768px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

@media (max-width: 480px) {
    .gallery-grid { grid-template-columns: 1fr; gap: 12px; }
}

/* --- Lightbox --- */

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(8px);
}

.gallery-lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.gallery-lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: var(--radius);
    box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

.gallery-lightbox-caption {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    font-size: 0.95rem;
    max-width: 600px;
    line-height: 1.5;
}

.gallery-lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.gallery-lightbox-close:hover {
    opacity: 1;
}

/* --- Alternate view: Academic (minimal) --- */
[data-view="academic"] body {
    background: #ffffff;
}

[data-view="academic"] .hero-bg-pattern,
[data-view="academic"] .hero-cta,
[data-view="academic"] .metrics-bar,
[data-view="academic"] #skills,
[data-view="academic"] #projects,
[data-view="academic"] .publications-filter,
[data-view="academic"] #backToTop {
    display: none !important;
}

[data-view="academic"] .container,
[data-view="academic"] .nav-container {
    max-width: 960px;
}

[data-view="academic"] #navbar {
    background: rgba(255,255,255,0.96);
    border-bottom: 1px solid var(--border);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

[data-view="academic"] .nav-logo {
    font-family: var(--font-serif);
    letter-spacing: 0.02em;
}

[data-view="academic"] .nav-links a {
    font-size: 0.92rem;
}

[data-view="academic"] #hero {
    min-height: auto;
    padding: 96px 24px 40px;
}

[data-view="academic"] .hero-content {
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 28px;
    align-items: start;
}

[data-view="academic"] .hero-head {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

[data-view="academic"] .hero-image img,
[data-view="academic"] .hero-image-placeholder {
    width: 110px;
    height: 110px;
    border-radius: 8px;
}

[data-view="academic"] .hero-name {
    font-size: clamp(2rem, 3.1vw, 2.5rem);
    font-family: var(--font-serif);
}

[data-view="academic"] .hero-title {
    font-size: 1.03rem;
}

[data-view="academic"] .hero-affiliation,
[data-view="academic"] .hero-tagline {
    font-size: 0.98rem;
    color: var(--text-light);
}

[data-view="academic"] .hero-links a {
    width: 34px;
    height: 34px;
    border-radius: 6px;
}

[data-view="academic"] .hero-news {
    border-radius: 8px;
    box-shadow: none;
    border: 1px solid var(--border);
}

[data-view="academic"] .hero-news-title {
    font-family: var(--font-serif);
    font-size: 1.05rem;
}

[data-view="academic"] .section {
    padding: 56px 0;
}

[data-view="academic"] .section-title {
    text-align: left;
    font-size: 1.7rem;
}

[data-view="academic"] #about .about-content,
[data-view="academic"] #news .news-feed,
[data-view="academic"] #research .research-grid,
[data-view="academic"] #publications .publications-table,
[data-view="academic"] #experience .timeline,
[data-view="academic"] #teaching #teaching-content,
[data-view="academic"] #talks #talks-content {
    margin-top: 16px;
}

[data-view="academic"] .section-subtitle {
    text-align: left;
    margin: 10px 0 20px;
}

[data-view="academic"] .highlight-card,
[data-view="academic"] .research-card,
[data-view="academic"] .project-card,
[data-view="academic"] .pub-row,
[data-view="academic"] .timeline-content,
[data-view="academic"] .teaching-card,
[data-view="academic"] .talk-card {
    border-radius: 8px;
    box-shadow: none;
}

[data-view="academic"] .news-item {
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}

[data-view="academic"] .news-item:last-child {
    border-bottom: none;
}

@media (max-width: 900px) {
    [data-view="academic"] .hero-content {
        grid-template-columns: 1fr;
    }

    [data-view="academic"] .hero-head {
        grid-template-columns: 1fr;
        text-align: center;
    }

    [data-view="academic"] .section-title,
    [data-view="academic"] .section-subtitle {
        text-align: center;
    }
}

/* --- Print Styles --- */
@media print {
    #navbar, #backToTop, .hero-cta, .nav-toggle {
        display: none !important;
    }
    .section { padding: 28px 0; break-inside: avoid; }
    body { font-size: 11pt; }
}
