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

:root {
    /* Colors - Warm Neutral Theme */
    --bg-primary: #F3F1EC;
    --bg-secondary: #EBE8E1;
    --bg-tertiary: #E2DED5;
    --text-primary: #1A1A1A;
    --text-secondary: #5A5A5A;
    --text-tertiary: #6E6E6E;
    --accent: #1A1A1A;
    --accent-secondary: #2d2d2d;
    --accent-highlight: #404040;
    --border-color: #CFCBC2;
    --border-light: #DDD9D0;
    --pub-abstract-border: #000000;
    
    /* Glass Effect - Refined */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    
    /* Shadows - Enhanced Depth */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
    
    /* Spacing System - Consistent Scale */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;
    
    /* Typography Scale */
    --font-primary: 'Domine', 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --font-display: 'Domine', 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --font-mono: 'SF Mono', 'Monaco', 'Cascadia Code', 'Fira Code', Consolas, monospace;
    
    /* Swift Transitions */
    --swift-out: cubic-bezier(0.25, 0.1, 0.25, 1);
    --swift-in-out: cubic-bezier(0.45, 0, 0.15, 1);
    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-fast: 0.2s var(--swift-out);
    --transition-medium: 0.4s var(--swift-in-out);
    --transition-slow: 0.6s var(--swift-in-out);
    /* Button text that contrasts with --accent */
    --btn-text: #FFFFFF;
}

/* Dark Mode - Black Theme High Contrast */
[data-theme="dark"] {
    --bg-primary: #1A1A1A;
    --bg-secondary: #242424;
    --bg-tertiary: #2E2E2E;
    --text-primary: #E8E8E8;
    --text-secondary: #A0A0A0;
    --text-tertiary: #C0C0C0;
    --accent: #F5F5F5;
    --accent-secondary: #D8D8D8;
    --accent-highlight: #FFFFFF;
    --border-color: #3A3A3A;
    --border-light: #2F2F2F;
    --pub-abstract-border: #A0A0A0;
    --glass-bg: rgba(22, 27, 34, 0.08);
    --glass-border: rgba(255, 255, 255, 0.18);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.7);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.8);

    /* In dark theme, buttons that use --accent (light) should use dark text */
    --btn-text: var(--bg-primary);
}

/* ==========================================================================
   Keyframe Animations
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.5s var(--swift-in-out), transform 0.5s var(--swift-in-out);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-delay-1 { transition-delay: 0.05s; }
.animate-delay-2 { transition-delay: 0.05s; }
.animate-delay-3 { transition-delay: 0.05s; }
.animate-delay-4 { transition-delay: 0.05s; }
.animate-delay-5 { transition-delay: 0.05s; }

/* Announcements Banner */
.announcements-banner {
    background: rgba(250, 249, 246, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(26, 26, 26, 0.15);
    padding: 10px 0;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    z-index: 9998;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(26, 26, 26, 0.04);
}

[data-theme="dark"] .announcements-banner {
    background: rgba(26, 26, 26, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.announcements-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.announcements-icon {
    width: 18px;
    height: 18px;
    color: var(--accent);
    flex-shrink: 0;
}

.announcements-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

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

.announcement-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: opacity var(--transition-fast);
}

.announcement-link:hover {
    opacity: 0.8;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    scrollbar-width: thin;
    scrollbar-color: var(--text-secondary) transparent;
    transition: background-color 0.3s ease, color 0.3s ease;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-secondary);
    border-radius: 4px;
}

/* Suppress the default up/down arrow buttons Windows adds to custom scrollbars */
::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    font-weight: 400;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-size: 17px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

@media (min-width: 768px) {
    body {
        font-size: 18px;
    }
}

@media (min-width: 1024px) {
    body {
        font-size: 19px;
    }
}

body.theme-transition,
body.theme-transition .navbar-minimal,
body.theme-transition .mobile-menu-overlay,
body.theme-transition .dropdown-menu,
body.theme-transition .theme-toggle,
body.theme-transition .wk-card,
body.theme-transition .wk-gh,
body.theme-transition .pub-entry,
body.theme-transition .pub-abstract,
body.theme-transition .footer-minimal,
body.theme-transition .back-to-top {
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

body.theme-transition a,
body.theme-transition button,
body.theme-transition svg {
    transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, fill 0.18s ease, stroke 0.18s ease;
}

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

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

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

/* ==========================================================================
   Navigation - Academic Style
   ========================================================================== */

.navbar-minimal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    padding: 0 20px;
    height: 44px;
    display: flex;
    align-items: center;
}

[data-theme="dark"] .navbar-minimal {
    background: var(--bg-primary);
    border-bottom-color: var(--border-color);
}

.navbar-minimal.scrolled {
    box-shadow: var(--shadow-sm);
    box-shadow: var(--shadow-sm);
}

.navbar-minimal .container-minimal {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

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

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    padding: 8px;
    margin-right: 12px;
    color: var(--text-secondary);
}

.theme-toggle:hover {
    color: var(--text-primary);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.theme-toggle::before {
    display: none;
}

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

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

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

/* Light mode: show sun icon (click to go dark) */
.theme-toggle .sun-icon {
    display: block;
}

.theme-toggle .moon-icon {
    display: none;
}

/* Dark mode: show moon icon (click to go light) */
[data-theme="dark"] .theme-toggle .sun-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    display: block;
}

.nav-center {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-xl);
    height: 56px;
    flex: 1;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #1A1A1A;
    color: #FAF9F6;
    border: 1px solid #333333;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

[data-theme="dark"] .dropdown-toggle {
    background: #F5F3EE;
    color: #1A1A1A;
    border-color: #C9C6BF;
}

.dropdown-toggle:hover {
    background: #2d2d2d;
    border-color: #404040;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .dropdown-toggle:hover {
    background: #EDEAE3;
    color: #1A1A1A;
    border-color: #B0ADA6;
}

.dropdown-toggle:active {
    transform: translateY(0) scale(0.97);
}

.dropdown-toggle svg {
    width: 14px;
    height: 14px;
    transition: transform var(--transition-fast);
    stroke: currentColor;
}

.dropdown.active .dropdown-toggle svg {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-primary);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-medium);
    z-index: 10000;
    overflow: hidden;
}

.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: all var(--transition-fast);
    border-bottom: none;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: var(--bg-secondary);
}

.dropdown-menu svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

.nav-link-minimal {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: -0.01em;
    transition: all var(--transition-fast);
    position: relative;
    padding: 0 8px;
    opacity: 0.8;
}

.nav-link-minimal::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 8px;
    right: 8px;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
    margin: 0 auto;
}

.nav-link-minimal:hover {
    opacity: 1;
}

.nav-link-minimal:hover::after {
    width: calc(100% - 16px);
}

.nav-link-minimal.active {
    opacity: 1;
    font-weight: 500;
}

.nav-link-minimal.active::after {
    width: calc(100% - 16px);
}

.nav-toggle-minimal {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    position: absolute;
    right: 22px;
    gap: 5px;
}

.nav-toggle-minimal span {
    width: 18px;
    height: 1.5px;
    background: var(--text-primary);
    transition: all var(--transition-fast);
    border-radius: 1px;
}

/* ==========================================================================
   Homepage Navigation - Academic Style
   ========================================================================== */

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

.social-icons-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.social-icons-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.social-icons-nav a:hover {
    color: var(--text-primary);
}

.social-icons-nav svg {
    width: 18px;
    height: 18px;
}

.nav-right-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links .nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: color 0.2s ease;
    text-transform: lowercase;
}

.nav-links .nav-link:hover,
.nav-links .nav-link.active {
    color: var(--text-primary);
}

/* ==========================================================================
   Mobile Menu Overlay
   ========================================================================== */

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9998;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

html.mobile-menu-open,
body.mobile-menu-open,
html.lightbox-open,
body.lightbox-open {
    overflow: hidden !important;
    overscroll-behavior: none;
}

body.mobile-menu-open,
body.lightbox-open {
    position: fixed;
    right: 0;
    left: 0;
    width: 100%;
}

.mobile-menu-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.mobile-nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 24px;
    font-weight: 400;
    text-transform: lowercase;
    transition: opacity 0.2s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    opacity: 0.7;
}

/* Mobile Menu Social Icons (Homepage only) */
.mobile-social-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s ease;
}

.mobile-social-icons a:hover {
    color: #fff;
}

.mobile-social-icons svg {
    width: 22px;
    height: 22px;
}

/* ==========================================================================
   Non-Homepage Navigation (Name on left, links + toggle on right)
   ========================================================================== */

body:not(.homepage) .nav-container {
    justify-content: space-between;
}

body:not(.homepage) .nav-left {
    display: flex;
    align-items: center;
}

body:not(.homepage) .nav-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.01em;
}

body:not(.homepage) .nav-name:hover {
    color: var(--text-secondary);
}

body:not(.homepage) .nav-right-group {
    display: flex;
    align-items: center;
    gap: 20px;
}

body:not(.homepage) .nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

body:not(.homepage) .theme-toggle {
    position: relative;
    right: auto;
}

body:not(.homepage) .nav-toggle-minimal {
    right: 24px;
}

/* ==========================================================================
   Homepage Main Content
   ========================================================================== */

.homepage .main-content {
    padding-top: 60px;
}

.content-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Profile Section */
.profile-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 60px;
    margin-bottom: 32px;
}

/* Hero Profile Section - Homepage layout */
.hero-profile-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 48px;
    margin-bottom: 32px;
}

.hero-text-content {
    flex: 1;
    order: 2;
}

.hero-text-content .name {
    font-size: 48px;
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.hero-text-content .name .name-bold {
    font-weight: 700;
}

.hero-text-content .tagline {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0 0 24px 0;
    font-style: italic;
}

.hero-text-content .about-content {
    margin-top: 0;
}

.hero-text-content .about-content p {
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    text-align: justify;
}

.hero-text-content .about-content p:last-child {
    margin-bottom: 0;
}

.hero-text-content .about-content a {
    color: var(--text-primary);
    text-decoration: underline;
    text-decoration-color: var(--text-secondary);
    text-underline-offset: 2px;
}

.hero-text-content .about-content a:hover {
    text-decoration-color: var(--text-primary);
}

.hero-image-wrapper {
    flex-shrink: 0;
    text-align: center;
    order: 1;
    margin-top: 88px;
}

.hero-image-wrapper .profile-img {
    width: 220px;
    height: 286px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: var(--shadow-md);
}

.hero-image-wrapper .profile-location {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 10px;
    line-height: 1.5;
}

.hero-image-wrapper .profile-email {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.profile-text {
    flex: 1;
    order: 1;
}

.profile-text .name {
    font-size: 48px;
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.profile-text .name .name-bold {
    font-weight: 700;
}

.profile-text .tagline {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
    font-style: italic;
}

.profile-image-wrapper {
    flex-shrink: 0;
    text-align: center;
    order: 2;
}

.profile-image-wrapper .profile-img {
    width: 200px;
    height: 260px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: var(--shadow-md);
}

.profile-location {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 10px;
    line-height: 1.5;
}

/* About Section */
.about-section {
    margin-bottom: 28px;
}

.about-section p {
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    text-align: justify;
}

.about-section p:last-child {
    margin-bottom: 0;
}

.about-section a {
    color: var(--text-primary);
    text-decoration: underline;
    text-decoration-color: var(--text-secondary);
    text-underline-offset: 2px;
}

.about-section a:hover {
    text-decoration-color: var(--text-primary);
}

/* News Section */
.news-section {
    margin-bottom: 28px;
}

.news-section h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
    text-transform: none;
}

.news-container {
    max-height: 220px;
    overflow-y: auto;
    padding-right: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--text-tertiary) var(--bg-tertiary);
}

.news-container::-webkit-scrollbar {
    width: 8px;
}

.news-container::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.news-container::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: 4px;
}

.news-row {
    display: flex;
    gap: 16px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.news-row.visible {
    opacity: 1;
    transform: translateY(0);
}

.news-row:last-child {
    border-bottom: none;
}

.news-date {
    flex-shrink: 0;
    width: 90px;
    color: var(--text-secondary);
    font-size: 13px;
}

.news-text {
    color: var(--text-primary);
    line-height: 1.5;
}

.news-text a {
    color: var(--text-primary);
    text-decoration: underline;
    text-decoration-color: var(--text-secondary);
    text-underline-offset: 2px;
}

.news-text a:hover {
    text-decoration-color: var(--text-primary);
}

/* Selected Publications Section */
.publications-home-section {
    margin-bottom: 28px;
}

.publications-home-section h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
    text-transform: none;
}

/* ==========================================================================
   Work Page Styles (Combined Publications & Projects)
   ========================================================================== */

.work-content {
    padding: 40px 0 80px;
}

.work-section {
    margin-bottom: 60px;
}

.work-section:last-child {
    margin-bottom: 0;
}

.work-section-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 32px;
    color: var(--text-primary);
    text-transform: none;
    letter-spacing: -0.02em;
}

.work-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.work-item {
    padding: 24px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.work-item-content h3 {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.work-item-content h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.work-item-content h3 a:hover {
    color: var(--text-secondary);
}

.work-meta {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 4px 0;
}

.work-venue {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
}

.work-description {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 12px 0;
}

.work-links {
    display: flex;
    gap: 12px;
}

.work-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    padding: 4px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.work-link:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

.work-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

/* ==========================================================================
   Experiences Page Styles
   ========================================================================== */

.experiences-content {
    padding: 40px 0 80px;
}

.exp-section {
    margin-bottom: 60px;
}

.exp-section:last-child {
    margin-bottom: 0;
}

.exp-section-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
    text-transform: none;
    letter-spacing: -0.02em;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 12px;
}

/* TL;DR Section */
.exp-tldr {
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
}

.exp-subsection-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    text-transform: none;
}

.exp-subsection-title:not(:first-child) {
    margin-top: 24px;
}

.exp-tldr-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.exp-tldr-list li {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 8px;
    padding-left: 0;
}

.exp-tldr-list li:last-child {
    margin-bottom: 0;
}

.exp-tldr-role {
    font-weight: 500;
    color: var(--text-primary);
}

.exp-tldr-list a {
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.exp-tldr-list a:hover {
    color: var(--text-primary);
}

/* Experience List */
.exp-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.exp-item {
    padding: 24px 0;
    border-bottom: 1px solid var(--border-light);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.exp-item.visible {
    opacity: 1;
    transform: translateY(0);
}

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

.exp-item-header {
    margin-bottom: 12px;
}

.exp-item-header h3 {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.exp-item-header h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.exp-item-header h3 a:hover {
    color: var(--text-secondary);
}

.exp-item-header h4 {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-secondary);
    margin: 0 0 8px 0;
}

.exp-date {
    font-size: 14px;
    color: var(--text-tertiary);
    margin: 0;
}

.exp-details {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
}

.exp-details li {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 6px;
}

.exp-details li:last-child {
    margin-bottom: 0;
}

/* Responsive for experiences page */
@media (max-width: 768px) {
    .experiences-content {
        padding: 30px 0 60px;
    }
    
    .exp-section {
        margin-bottom: 40px;
    }
    
    .exp-section-title {
        font-size: 20px;
    }
    
    .exp-tldr {
        padding: 20px;
    }
    
    .exp-item {
        padding: 20px 0;
    }
    
    .exp-item-header h3 {
        font-size: 17px;
    }

    .hero-profile-section {
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
    }

    .hero-profile-section,
    .hero-text-content,
    .hero-image-wrapper {
        min-width: 0;
        width: 100%;
    }

    .hero-image-wrapper {
        margin-top: 0;
        text-align: center;
        order: 2;
    }

    .hero-image-wrapper .profile-img {
        width: 100%;
        max-width: 280px;
        height: auto;
        margin: 0 auto;
    }

    .hero-text-content {
        order: 1;
    }
}

.pub-entry {
    margin-bottom: 20px;
    padding-bottom: 16px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.pub-entry.visible {
    opacity: 1;
    transform: translateY(0);
}

.pub-entry:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

.pub-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    line-height: 1.4;
}

.pub-authors {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 2px 0;
}

.pub-venue {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 8px 0;
}

.pub-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 0;
}

.pub-btn {
    display: inline-block;
    padding: 3px 10px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.pub-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-secondary);
}

/* Active state for ABS button when abstract is showing */
.pub-btn.active {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

.pub-abstract {
    display: grid;
    grid-template-rows: 0fr;
    margin-top: 0;
    padding: 0 16px;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-4px);
    background-color: transparent;
    background-image:
        repeating-linear-gradient(to right, var(--pub-abstract-border) 0 1px, transparent 1px 4px),
        repeating-linear-gradient(to bottom, var(--pub-abstract-border) 0 1px, transparent 1px 4px),
        repeating-linear-gradient(to right, var(--pub-abstract-border) 0 1px, transparent 1px 4px),
        repeating-linear-gradient(to bottom, var(--pub-abstract-border) 0 1px, transparent 1px 4px);
    background-position:
        top left,
        top right,
        bottom left,
        top left;
    background-size:
        0 1px,
        1px 0,
        0 1px,
        1px 0;
    background-repeat: no-repeat;
    background-origin: border-box;
    background-clip: border-box;
    border: 1px solid transparent;
    border-width: 0;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-primary);
    pointer-events: none;
    transition:
        grid-template-rows 0.34s var(--swift-in-out),
        margin-top 0.34s var(--swift-in-out),
        padding-top 0.34s var(--swift-in-out),
        padding-bottom 0.34s var(--swift-in-out),
        border-width 0.34s var(--swift-in-out),
        background-size 0.34s var(--swift-in-out),
        opacity 0.22s ease,
        transform 0.34s var(--swift-in-out),
        visibility 0s linear 0.34s;
}

.pub-abstract > * {
    min-height: 0;
    overflow: hidden;
}

.pub-abstract.active {
    grid-template-rows: 1fr;
    margin-top: 12px;
    padding: 16px;
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    background-size:
        100% 1px,
        1px 100%,
        100% 1px,
        1px 100%;
    border-width: 1px;
    pointer-events: auto;
    transition:
        grid-template-rows 0.34s var(--swift-in-out),
        margin-top 0.34s var(--swift-in-out),
        padding-top 0.34s var(--swift-in-out),
        padding-bottom 0.34s var(--swift-in-out),
        border-width 0.34s var(--swift-in-out),
        background-size 0.34s var(--swift-in-out),
        opacity 0.24s ease 0.06s,
        transform 0.34s var(--swift-in-out),
        visibility 0s linear 0s;
}

/* View All Publications Link */
.view-all-publications {
    text-align: center;
    margin-top: 24px;
    padding-top: 16px;
}

.view-all-link {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    border: none;
    background: none;
    transition: color 0.2s ease;
}

.view-all-link:hover {
    color: var(--text-primary);
}

/* Footer Minimal */
.footer-minimal {
    padding: 20px;
    text-align: center;
    border-top: 1px solid var(--border-light);
    margin-top: 40px;
}

.footer-minimal .footer-content p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}

/* ==========================================================================
   Hero Section - Academic Style
   ========================================================================== */

.hero-section {
    padding: 60px 22px 40px;
    background: var(--bg-primary);
    max-width: 1100px;
    margin: 0 auto;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
    align-items: start;
}

.hero-left {
    padding-top: 0;
}

.hero-name {
    font-size: 48px;
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.hero-name .name-bold {
    font-weight: 700;
}

.hero-tagline {
    font-size: 17px;
    color: var(--text-secondary);
    margin: 0 0 24px 0;
    font-style: italic;
}

.hero-about {
    max-width: 720px;
}

.hero-about p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    text-align: justify;
}

.hero-about p:last-child {
    margin-bottom: 0;
}

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

.hero-right {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-image-box {
    width: 100%;
    text-align: center;
}

.profile-img {
    width: 100%;
    height: auto;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: var(--shadow-md);
    margin-bottom: 12px;
}

.profile-caption {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
    text-align: center;
}

/* Content Container */
.content-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 22px;
}

/* Section Heading */
.section-heading {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 20px 0;
    color: var(--text-primary);
    text-transform: lowercase;
}

/* ==========================================================================
   News Section
   ========================================================================== */

.news-updates-section {
    padding: 40px 0 30px;
    background: var(--bg-primary);
}

.news-scroll-container {
    max-height: 280px;
    overflow-y: auto;
    padding-right: 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.news-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.news-scroll-container::-webkit-scrollbar-track {
    background: transparent;
}

.news-scroll-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.news-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

.news-item {
    margin-bottom: 16px;
    line-height: 1.6;
    font-size: 15px;
}

.news-item:last-child {
    margin-bottom: 0;
}

.news-date-inline {
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 8px;
    white-space: nowrap;
}

.news-text {
    color: var(--text-secondary);
}

.news-text a {
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: border-color var(--transition-fast);
}

.news-text a:hover {
    border-bottom-color: var(--text-primary);
}

/* ==========================================================================
   Skills Section
   ========================================================================== */

.skills-section {
    padding: 40px 0 30px;
    background: var(--bg-primary);
}

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

.skill-item {
    padding: 0;
}

.skill-item h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    letter-spacing: -0.01em;
}

.skill-item p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

/* ==========================================================================
   Publications Section
   ========================================================================== */

.publications-section {
    padding: 40px 0 60px;
    background: var(--bg-primary);
}

.publications-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.pub-item {
    padding: 0;
}

.pub-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
    margin: 0;
    text-align: justify;
}

.pub-text strong {
    font-weight: 600;
}

.pub-text em {
    font-style: italic;
}

.pub-link {
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: border-color var(--transition-fast);
    margin-left: 4px;
}

.pub-link:hover {
    border-bottom-color: var(--text-primary);
}

.view-all {
    margin: 20px 0 0 0;
    font-size: 15px;
}

.view-all a {
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: border-color var(--transition-fast);
}

.view-all a:hover {
    border-bottom-color: var(--text-primary);
}

/* CV Link in Navigation */
.cv-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.01em;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all var(--transition-fast);
    display: inline-block;
}

.cv-link:hover {
    background: var(--bg-secondary);
    border-color: var(--text-primary);
}

.cta-buttons-minimal {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 40px;
    flex-wrap: wrap;
    animation: fadeInUp 1s var(--swift-in-out) 0.6s both;
}

.btn-minimal {
    padding: 14px 28px;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    color: var(--btn-text);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.01em;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.btn-minimal:hover {
    background: var(--accent-highlight);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-minimal:active {
    transform: translateY(0) scale(0.97);
}

.btn-minimal.btn-secondary {
    background: transparent;
    color: var(--accent);
    padding: 12px 0;
    position: relative;
}

.btn-minimal.btn-secondary::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.btn-minimal.btn-secondary:hover {
    transform: none;
    box-shadow: none;
}

.btn-minimal.btn-secondary:hover::after {
    width: 100%;
}

/* ==========================================================================
   Glass Card Component - Apple Style
   ========================================================================== */

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    padding: var(--space-2xl);
    transition: all var(--transition-medium);
}

.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--border-color);
}

/* ==========================================================================
   Section Styles
   ========================================================================== */

.section-minimal {
    padding: 25px 0;
}

@media (min-width: 768px) {
    .section-minimal {
        padding: 35px 0;
    }
}

.page-header {
    padding: 114px 0 30px;
    text-align: center;
    background: transparent;
}

.page-header h1 {
    font-size: clamp(32px, 6vw, 42px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 10px;
    animation: fadeInUp 0.8s var(--swift-in-out) both;
}

.page-header p {
    font-size: 17px;
    color: var(--text-secondary);
    font-weight: 400;
    animation: fadeInUp 0.8s var(--swift-in-out) 0.1s both;
}

.section-title-minimal {
    font-size: clamp(28px, 5vw, 40px);
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: -0.025em;
}

.divider-line {
    display: none;
}

.section-intro {
    text-align: center;
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   Timeline - Experience & Projects
   ========================================================================== */

.timeline-section {
    padding: 50px 0;
    background: var(--bg-primary);
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 0;
}

/* Timeline center line */
.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 40px;
    bottom: 40px;
    width: 2px;
    background: var(--border-light);
}

[data-theme="dark"] .timeline::before {
    background: rgba(255, 255, 255, 0.1);
}

.timeline-item {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    position: relative;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.5s var(--swift-in-out);
    padding-left: 80px;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

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

/* Timeline marker */
.timeline-marker {
    display: none;
}

/* Timeline logo container - bar for experiences, logo for education */
.timeline-logo {
    width: 2px;
    height: 60px;
    flex-shrink: 0;
    position: absolute;
    left: 18px;
    top: 10px;
    z-index: 2;
    border-radius: 2px;
    background: var(--accent);
    transition: all var(--transition-medium);
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .timeline-logo {
    background: #606060;
}

.timeline-item:hover .timeline-logo {
    width: 8px;
    left: 16px;
    background: var(--accent);
}

[data-theme="dark"] .timeline-item:hover .timeline-logo {
    background: #FFFFFF;
}

.timeline-logo::after {
    display: none;
}

/* Experience timeline - show logos on bars */
.experience-timeline .timeline-logo img {
    position: absolute;
    width: 56px;
    height: 56px;
    object-fit: cover;
    background: var(--bg-primary);
    border-radius: 50%;
    padding: 4px;
    border: 2px solid var(--accent);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    transition: all var(--transition-medium);
}

[data-theme="dark"] .experience-timeline .timeline-logo img {
    background: #0F0F0F;
    border-color: #606060;
}

.experience-timeline .timeline-item:hover .timeline-logo img {
    width: 64px;
    height: 64px;
    border-color: var(--accent);
}

[data-theme="dark"] .experience-timeline .timeline-item:hover .timeline-logo img {
    border-color: #FFFFFF;
}

/* Education timeline - only show logos, no bar */
.education-timeline .timeline-logo {
    width: 64px;
    height: 64px;
    left: -12px;
    top: 10px;
    background: transparent;
    border-radius: 50%;
}

.education-timeline .timeline-item:hover .timeline-logo {
    width: 72px;
    height: 72px;
    left: -16px;
    background: transparent;
}

.education-timeline .timeline-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--bg-primary);
    border-radius: 50%;
    padding: 8px;
    border: 2px solid var(--border-light);
    transition: all var(--transition-medium);
}

[data-theme="dark"] .education-timeline .timeline-logo img {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.education-timeline .timeline-item:hover .timeline-logo img {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

/* Timeline image container */
.timeline-image {
    width: 200px;
    height: 140px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    margin-left: 24px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-medium);
}

.timeline-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-medium);
}

.timeline-item:hover .timeline-image {
    box-shadow: var(--shadow-md);
}

.timeline-item:hover .timeline-image img {
    transform: scale(1.05);
}

.education-timeline .timeline-image {
    display: none;
}

/* Timeline content card */
.timeline-content {
    flex: 1;
    background: transparent;
    border-radius: 0;
    border: none;
    padding: 28px 32px;
    box-shadow: none;
    transition: all var(--transition-medium);
    max-width: calc(100% - 280px);
    min-width: 0;
}

.education-timeline .timeline-content {
    max-width: 100%;
}

[data-theme="dark"] .timeline-content {
    background: transparent;
    border-color: transparent;
}

.timeline-item:hover .timeline-content {
    box-shadow: none;
    transform: translateX(8px);
    border-color: transparent;
}

.timeline-date {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}

.timeline-content h3 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.timeline-content h4 {
    font-size: 17px;
    font-weight: 500;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.timeline-content .location {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.timeline-content .achievements {
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.timeline-content .achievements li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 15px;
    color: var(--text-tertiary);
    line-height: 1.5;
}

.timeline-content .achievements li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background: var(--text-secondary);
    border-radius: 50%;
}

.timeline-content .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.timeline-content .tag,
.tag {
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: none;
    display: inline-block;
    cursor: default;
}

/* ==========================================================================
   Projects Grid - Apple Tile Style
   ========================================================================== */

.projects-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.filter-section {
    padding: 40px 0 0;
    background: var(--bg-secondary);
}

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

.filter-btn {
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-radius: 980px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.filter-btn.active {
    background: var(--accent);
    color: var(--bg-primary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.project-card {
    background: var(--bg-primary);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-medium);
    opacity: 0;
    transform: translateY(40px);
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: inherit;
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--border-color);
}

.project-image {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.project-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all var(--transition-slow);
}

.project-card:hover .project-image img {
    transform: scale(1.08);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.4) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 20px;
    opacity: 0;
    transition: all var(--transition-medium);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.view-details {
    padding: 10px 20px;
    background: rgba(26, 26, 26, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(26, 26, 26, 0.2);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #1A1A1A;
    cursor: pointer;
    transition: all var(--transition-fast);
}

[data-theme="dark"] .view-details {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    color: #E8E8E8;
}

.view-details:hover {
    background: rgba(26, 26, 26, 0.25);
    border-color: rgba(26, 26, 26, 0.3);
    transform: scale(1.05);
}

[data-theme="dark"] .view-details:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    color: #FFFFFF;
}

.project-info {
    padding: 24px;
}

.project-info h3 {
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.project-type {
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 12px;
}

.project-description {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.project-info .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ==========================================================================
   Publications
   ========================================================================== */

.publications-minimal {
    margin-top: 48px;
}

.pub-item {
    display: flex;
    gap: var(--space-xl);
    padding: var(--space-2xl);
    margin-bottom: var(--space-md);
    background: var(--bg-primary);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    transition: all var(--transition-medium);
    opacity: 0;
    transform: translateY(30px);
    cursor: pointer;
}

.pub-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.pub-item:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(-6px);
    border-color: var(--border-color);
    background: var(--bg-secondary);
}

.pub-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--bg-secondary);
    -webkit-text-stroke: 1px var(--border-color);
    line-height: 1;
    flex-shrink: 0;
    width: 60px;
}

.pub-content {
    flex: 1;
}

.pub-content h4 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.4;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.pub-authors {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.pub-authors strong {
    color: var(--text-primary);
    font-weight: 500;
}

.pub-journal {
    font-size: 15px;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 16px;
}

.pub-links {
    display: flex;
    gap: 16px;
}

.pub-link-minimal {
    font-size: 16px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.pub-link-minimal:hover {
    text-decoration: underline;
}

/* ==========================================================================
   About Page - Education & Skills
   ========================================================================== */

.intro-text {
    text-align: center;
    font-size: 21px;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 60px;
}

.strengths-weakness {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 80px;
}

.column-half {
    background: transparent;
    border-radius: 0;
    padding: 32px;
    border: none;
    transition: all var(--transition-medium);
}

.column-half:hover {
    box-shadow: none;
    border-color: transparent;
}

.column-half h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.list-minimal {
    list-style: none;
    padding: 0;
}

.list-minimal li {
    padding: 14px 0;
    padding-left: 24px;
    color: var(--text-secondary);
    position: relative;
    border-bottom: none;
    font-size: 15px;
}

.list-minimal li:last-child {
    border-bottom: none;
}

.list-minimal li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 500;
}

.education-minimal {
    margin: 80px 0;
}

.subtitle-minimal {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 32px;
    letter-spacing: -0.02em;
}

.edu-item {
    display: flex;
    gap: 40px;
    padding: 28px 32px;
    margin-bottom: 16px;
    background: transparent;
    border-radius: 0;
    border: none;
    transition: all var(--transition-medium);
    opacity: 0;
    transform: translateY(30px);
}

.edu-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.edu-item:hover {
    box-shadow: none;
    transform: translateX(8px);
    border-color: transparent;
}

.edu-years {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 120px;
    flex-shrink: 0;
}

.edu-details strong {
    display: block;
    font-size: 19px;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.edu-details p {
    color: var(--text-secondary);
    font-size: 15px;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */

.contact-content-minimal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 48px;
    margin-top: 48px;
}

.contact-text {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 32px;
}

.contact-details-minimal {
    margin-bottom: 32px;
}

.contact-details-minimal p {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 15px;
}

.contact-details-minimal p:last-child {
    border-bottom: none;
}

.contact-details-minimal strong {
    color: var(--text-primary);
    font-weight: 500;
    display: inline-block;
    min-width: 80px;
}

.contact-details-minimal a {
    color: var(--accent);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.contact-details-minimal a:hover {
    text-decoration: underline;
}

.social-links-minimal {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.social-links-minimal a {
    padding: 12px 24px;
    background: var(--accent);
    border-radius: 980px;
    color: var(--bg-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.social-links-minimal a:hover {
    background: var(--accent-secondary);
    transform: scale(1.02);
}

.hobbies-minimal {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 32px;
    border: 1px solid var(--border-light);
}

.hobbies-minimal h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hobbies-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hobby-tag {
    padding: 10px 20px;
    background: var(--bg-secondary);
    border-radius: 980px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.hobby-tag:hover {
    background: var(--accent);
    color: var(--bg-primary);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer,
.footer-minimal {
    padding: 24px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.footer-minimal .footer-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer p,
.footer-minimal p {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 0;
}

/* Footer Social Icons (non-homepage, desktop only) */
.footer-social-icons {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.footer-social-icons a:hover {
    color: var(--text-primary);
}

.footer-social-icons svg {
    width: 18px;
    height: 18px;
}

/* Hide footer socials on mobile */
@media (max-width: 768px) {
    .footer-social-icons {
        display: none;
    }
    
    .footer-minimal .footer-content {
        justify-content: center;
    }
}

.footer .social-links {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 0;
}

.footer .social-links a {
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    text-decoration: none;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer .social-links a svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.footer .social-links a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    /* Homepage Navigation Mobile */
    .homepage .social-icons-nav {
        display: none;
    }

    .homepage .nav-links {
        display: none;
    }

    .homepage .nav-right-group {
        position: absolute;
        right: 50px;
    }

    .nav-toggle-minimal {
        display: flex;
        z-index: 10001;
    }

    /* Profile Section Mobile */
    .profile-section {
        flex-direction: column-reverse;
        gap: 20px;
        text-align: center;
    }

    .profile-image-wrapper {
        margin: 0 auto;
    }

    .profile-text {
        text-align: center;
    }

    .profile-text .name {
        font-size: 32px;
    }

    /* About Section Mobile */
    .about-section p {
        text-align: left;
        font-size: 14px;
    }

    /* News Section Mobile */
    .news-row {
        flex-direction: column;
        gap: 4px;
    }

    .news-date {
        width: auto;
    }

    /* Publications Mobile */
    .pub-title {
        font-size: 14px;
    }

    .content-wrapper {
        padding: 0 16px;
    }

    .nav-center {
        position: fixed;
        top: 48px;
        left: 0;
        right: 0;
        bottom: 0;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        padding: 48px 22px;
        gap: 0;
        justify-content: flex-start;
        transform: translateX(-100%);
        transition: transform var(--transition-medium);
        z-index: 999;
    }

    [data-theme="dark"] .nav-center {
        background: rgba(15, 15, 15, 0.95);
    }

    .nav-center.active {
        transform: translateX(0);
    }

    .nav-link-minimal {
        font-size: 24px;
        font-weight: 600;
        padding: 16px 0;
        letter-spacing: -0.02em;
        width: 100%;
    }

    .nav-toggle-minimal {
        display: flex;
    }

    .nav-right {
        position: absolute;
        right: 60px;
        top: 50%;
        transform: translateY(-50%);
    }

    .cv-link {
        padding: 6px 12px;
        font-size: 11px;
    }

    .publication-card {
        flex-direction: column;
        gap: 20px;
        padding: 24px;
    }

    .publication-card-image {
        width: 100%;
        height: 180px;
    }

    .publication-number {
        font-size: 40px;
        min-width: auto;
    }

    .modal-content {
        max-height: 90vh;
        margin: 0 16px;
    }

    .modal-header,
    .modal-body {
        padding: 24px;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    /* Hero Section Mobile */
    .hero-section {
        padding: 40px 16px 30px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .hero-name {
        font-size: 36px;
    }

    .hero-tagline {
        font-size: 15px;
    }

    .hero-about p {
        font-size: 15px;
        text-align: left;
    }

    .hero-right {
        order: -1;
    }

    .profile-image-box {
        max-width: 240px;
        margin: 0 auto;
    }

    /* Content Container Mobile */
    .content-container {
        padding: 0 16px;
    }

    .section-heading {
        font-size: 24px;
        margin-bottom: 16px;
    }

    /* News Section Mobile */
    .news-updates-section {
        padding: 30px 0 20px;
    }

    .news-scroll-container {
        max-height: 240px;
    }

    .news-item {
        font-size: 14px;
        margin-bottom: 14px;
    }

    .news-date-inline {
        display: block;
        margin-bottom: 4px;
    }

    /* Skills Section Mobile */
    .skills-section {
        padding: 30px 0 20px;
    }

    .skills-horizontal {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .skill-item h3 {
        font-size: 15px;
    }

    .skill-item p {
        font-size: 13px;
    }

    /* Publications Section Mobile */
    .publications-section {
        padding: 30px 0 40px;
    }

    .pub-text {
        font-size: 14px;
        text-align: left;
    }

    .view-all {
        font-size: 14px;
    }

    .page-header {
        padding: 100px 22px 40px;
    }

    .page-header h1 {
        font-size: 32px;
    }

    .page-header p {
        font-size: 17px;
    }

    .section-minimal {
        padding: 60px 0;
    }

    .timeline::before {
        left: 40px;
    }

    .timeline-item {
        flex-direction: column;
        gap: 16px;
        margin-left: 60px;
        margin-bottom: 32px;
    }

    .timeline-logo {
        width: 60px;
        height: 60px;
        position: absolute;
        left: -60px;
    }

    .timeline-content {
        padding: 20px 24px;
    }

    .timeline-content h3 {
        font-size: 20px;
    }

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

    .pub-item {
        flex-direction: column;
        gap: 16px;
    }

    .pub-number {
        font-size: 32px;
    }

    .edu-item {
        flex-direction: column;
        gap: 8px;
    }

    .strengths-weakness {
        grid-template-columns: 1fr;
    }

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

    .cta-buttons-minimal {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        padding: 0 22px;
    }

    .btn-minimal {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container,
    .container-minimal,
    .container-wide {
        padding: 0 16px;
    }

    .timeline::before {
        display: none;
    }

    .timeline-item {
        margin-left: 0;
    }

    .timeline-logo {
        position: relative;
        left: 0;
        margin-bottom: 16px;
    }

    .timeline-logo::after {
        display: none;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .navbar-minimal,
    .footer,
    .footer-minimal,
    .cta-buttons-minimal,
    .view-details {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .glass-card,
    .timeline-content,
    .project-card,
    .pub-item,
    .edu-item {
        background: white;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Footer Responsive */
@media (max-width: 768px) {
    .footer .container {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .footer .social-links {
        order: -1;
    }
}

/* ==========================================================================
   Publications Page - Apple Style
   ========================================================================== */

.publications-section {
    padding: 80px 0;
    background: var(--bg-primary);
}

.stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.publications-list {
    max-width: 800px;
    margin: 0 auto;
}

.publication-card {
    display: flex;
    gap: 32px;
    padding: 40px;
    margin-bottom: 24px;
    background: transparent;
    border-radius: 0;
    border: none;
    transition: all var(--transition-medium);
    opacity: 0;
    transform: translateY(30px);
    cursor: pointer;
}

.publication-card-image {
    width: 200px;
    height: 140px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: transparent;
}

.publication-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-medium);
}

.publication-card:hover .publication-card-image img {
    transform: scale(1.05);
}

.publication-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.publication-card:hover {
    box-shadow: none;
    transform: translateY(-4px);
    border-color: transparent;
}

.publication-number {
    font-size: 56px;
    font-weight: 700;
    color: var(--bg-secondary);
    -webkit-text-stroke: 1.5px var(--border-color);
    line-height: 1;
    flex-shrink: 0;
    min-width: 80px;
}

.publication-content {
    flex: 1;
}

.publication-content h3 {
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    color: var(--text-primary);
    line-height: 1.4;
}

.publication-content .authors {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.publication-content .authors strong {
    color: var(--text-primary);
    font-weight: 500;
}

.publication-content .journal {
    font-size: 14px;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 16px;
}

.publication-content .abstract {
    font-size: 15px;
    color: var(--text-tertiary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.publication-links {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.pub-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-secondary);
    border-radius: 980px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.pub-link:hover {
    background: var(--accent);
    color: var(--bg-primary);
}

.pub-link svg {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   Publication Modal - Apple Style
   ========================================================================== */

.publication-modal {
    position: fixed;
    inset: 0;
    background: rgba(13, 17, 23, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-medium);
}

.publication-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-primary);
    backdrop-filter: saturate(180%) blur(30px);
    -webkit-backdrop-filter: saturate(180%) blur(30px);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: all var(--transition-medium);
    position: relative;
}

.publication-modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 32px 32px 24px;
    border-bottom: none;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: rgba(128, 128, 128, 0.3);
    border: 1px solid transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    backdrop-filter: blur(4px);
}

.modal-close:hover {
    background: rgba(128, 128, 128, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: scale(1.05);
}

[data-theme="dark"] .modal-close {
    background: rgba(200, 200, 200, 0.2);
    color: var(--text-primary);
}

[data-theme="dark"] .modal-close:hover {
    background: rgba(200, 200, 200, 0.35);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.modal-close svg {
    width: 16px;
    height: 16px;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    padding-right: 40px;
}

.modal-header .authors {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.modal-header .journal {
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
}

.modal-body {
    padding: 32px;
}

.modal-section {
    margin-bottom: 32px;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section h3 {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-section h3 svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.modal-section p {
    font-size: 15px;
    color: var(--text-tertiary);
    line-height: 1.7;
}

.modal-section ul {
    list-style: none;
    padding: 0;
}

.modal-section ul li {
    padding: 10px 0;
    padding-left: 24px;
    position: relative;
    font-size: 15px;
    color: var(--text-tertiary);
    line-height: 1.6;
}

.modal-section ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 500;
}

/* BibTeX Export Section */
.bibtex-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.bibtex-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bibtex-container {
    position: relative;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
}

.bibtex-code {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-secondary);
    padding: 16px;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 200px;
    overflow-y: auto;
}

.bibtex-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.bibtex-copy-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-primary);
}

.bibtex-copy-btn.copied {
    background: #22c55e;
    border-color: #22c55e;
    color: white;
}

.bibtex-copy-btn svg {
    flex-shrink: 0;
}

[data-theme="dark"] .bibtex-container {
    background: var(--bg-secondary);
}

[data-theme="dark"] .bibtex-code {
    color: var(--text-secondary);
}

/* ==========================================================================
   Contact Page - Apple Style
   ========================================================================== */

.contact-content {
    padding: 40px 0 80px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info {
    padding: 0;
}

.contact-info h2 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.contact-info > p {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 40px;
}

.contact-items {
    margin-bottom: 40px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 24px 0;
    border-bottom: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s var(--swift-in-out);
}

.contact-item.visible {
    opacity: 1;
    transform: translateY(0);
}

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

.contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 0;
    flex-shrink: 0;
    color: var(--text-primary);
}

.contact-icon svg {
    width: 24px;
    height: 24px;
}

.contact-details h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.contact-details a,
.contact-details p {
    font-size: 17px;
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
    margin: 0;
}

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

/* Social Links */
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: var(--bg-secondary);
    border-radius: 980px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.social-btn:hover {
    background: var(--accent);
    color: var(--bg-primary);
    transform: scale(1.02);
}

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

/* Contact Form */
.contact-form-wrapper {
    background: transparent;
    border-radius: 0;
    padding: 40px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 8px; /* tightened vertical spacing between fields */
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px; /* slightly smaller gap for denser layout */
}

.form-group label {
    font-size: 16px; /* increased label size */
    font-weight: 600;
    color: var(--text-primary); /* match theme (black/white) */
}

.form-group input,
.form-group textarea {
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    font-size: 18px; /* slightly larger inputs for better readability */
    font-family: inherit;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    outline: none;
}

/* Email live validity indicator */
.email-validity {
    display: none; /* hidden by default, shown when validation runs */
    align-items: center;
    gap: 8px;
    margin-top: 2px; /* reduced spacing to sit closer to input */
    font-size: 13px;
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.05);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.form-group textarea {
    min-height: 150px;
    max-height: 300px;
    resize: vertical;
    max-width: 100%;
}

.field-error {
    color: #b91c1c;
    font-size: 13px;
    margin-top: 6px;
}

/* Email live validity indicator */
.email-validity {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.email-valid-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-weight: 700;
    border-radius: 50%;
    font-size: 12px;
    line-height: 1;
}

.email-valid-icon.valid {
    color: #065f46;
    background: rgba(6,95,70,0.06);
    border: 1px solid rgba(6,95,70,0.12);
}

.email-valid-icon.invalid {
    color: #7f1d1d;
    background: rgba(127,29,29,0.04);
    border: 1px solid rgba(127,29,29,0.08);
}

.email-valid-text {
    color: var(--text-primary);
}

.form-group input.valid {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(16,163,127,0.06);
}

.form-group input.invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220,38,38,0.04);
}

.form-group input {
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
} 

.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--accent);
    border: none;
    border-radius: 980px;
    font-size: 17px;
    font-weight: 500;
    color: var(--bg-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-top: 8px;
}

.submit-btn:hover {
    background: var(--accent-secondary);
    transform: scale(1.02);
}

.submit-btn svg {
    width: 18px;
    height: 18px;
}

/* Honeypot: visually hidden but present for bots */
.hp-field {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Form messages */
.form-message {
    display: none;
    font-size: 15px;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 12px;
    line-height: 1.4;
    word-break: break-word;
    overflow: visible;
    max-width: 100%;
    z-index: 10;
}

.form-message.success {
    display: block;
    color: var(--text-primary);
    background: rgba(6,95,70,0.08);
    border: 1px solid rgba(6,95,70,0.14);
}

.form-message.error {
    display: block;
    color: var(--text-primary);
    background: rgba(127,29,29,0.06);
    border: 1px solid rgba(127,29,29,0.12);
}

/* Dark theme tweaks for higher contrast */
[data-theme="dark"] .form-message.success {
    background: rgba(6,95,70,0.12);
    border: 1px solid rgba(6,95,70,0.22);
}

[data-theme="dark"] .form-message.error {
    background: rgba(127,29,29,0.12);
    border: 1px solid rgba(127,29,29,0.18);
}

/* Slide + Fade animation for form messages */
@keyframes slideFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideFadeInSmall {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.form-message.show {
    will-change: transform, opacity;
    animation: slideFadeInSmall 300ms var(--spring) both;
}

@media (min-width: 768px) {
    .form-message.show {
        animation: slideFadeIn 360ms var(--spring) both;
    }
}

/* Submit button loading state */
.submit-btn.loading {
    opacity: 0.9;
    pointer-events: none;
}

/* Map Section */
.map-section {
    padding: 60px 0;
    background: var(--bg-secondary);
}

.map-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background: var(--bg-primary);
    border-radius: 20px;
    border: 1px solid var(--border-light);
    text-align: center;
}

.map-placeholder svg {
    width: 48px;
    height: 48px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.map-placeholder p {
    font-size: 17px;
    color: var(--text-secondary);
}

/* Contact Page Responsive */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .contact-info .contact-items {
        margin-bottom: 0;
    }

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

    .contact-form-wrapper {
        padding: 8px 0 0;
    }

    .social-links {
        flex-direction: column;
    }

    .social-btn {
        justify-content: center;
    }

    .stats {
        flex-direction: column;
        gap: 24px;
    }

    .publication-card {
        flex-direction: column;
        gap: 20px;
        padding: 28px;
    }

    .publication-number {
        font-size: 40px;
    }
}

/* ==========================================================================
   Project Detail Page
   ========================================================================== */

.project-hero {
    padding: 128px 0 44px;
    background: var(--bg-secondary);
}

.project-breadcrumb {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.project-breadcrumb a {
    color: var(--accent);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.project-breadcrumb a:hover {
    text-decoration: underline;
}

.project-hero-title {
    max-width: 980px;
    font-size: clamp(38px, 5.5vw, 56px);
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 16px;
    animation: fadeInUp 0.8s var(--swift-in-out) both;
}

.project-hero-subtitle {
    max-width: 920px;
    font-size: 19px;
    line-height: 1.55;
    color: var(--text-secondary);
    margin-bottom: 32px;
    animation: fadeInUp 0.8s var(--swift-in-out) 0.1s both;
}

.project-meta {
    display: flex;
    gap: 32px 40px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s var(--swift-in-out) 0.2s both;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.meta-value {
    font-size: 17px;
    font-weight: 500;
    color: var(--text-primary);
}

.project-hero-image {
    padding: 0 0 56px;
    background: var(--bg-secondary);
}

.project-hero-image .container-wide {
    max-width: 1040px;
}

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

.project-hero-image img {
    width: auto;
    max-width: 100%;
    max-height: 420px;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.8s var(--swift-in-out) 0.3s both;
    border: 1px solid var(--border-light);
    background: #FFFFFF;
    cursor: zoom-in;
}

.project-hero-image .project-hero-photo {
    width: auto;
    max-width: 100%;
    max-height: 420px;
    display: block;
    margin: 0 auto;
    object-fit: contain;
    background: #0e1728;
}

.project-hero-image img.project-diagram-image {
    width: 100%;
}

.project-section {
    padding: 72px 0;
    background: var(--bg-primary);
}

.project-content-grid {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 64px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-sidebar {
    position: sticky;
    top: 88px;
    height: fit-content;
}

.sidebar-section {
    min-width: 0;
    margin-bottom: 28px;
}

.sidebar-section h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.project-sidebar .tag {
    max-width: 100%;
    padding: 5px 8px;
    font-size: 11.5px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    color: var(--accent);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.sidebar-link:hover {
    color: var(--accent-secondary);
    transform: translateX(4px);
}

.sidebar-link svg {
    width: 18px;
    height: 18px;
}

.project-main {
    max-width: 780px;
}

.content-block {
    margin-bottom: 48px;
}

.content-block h2 {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.content-block h3 {
    font-size: 21px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
    margin: 32px 0 14px;
    color: var(--text-primary);
}

.content-block p {
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.evidence-label {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin-right: 7px;
    padding: 3px 9px;
    border: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);
    border-radius: 999px;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 8%, var(--bg-primary));
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    vertical-align: 0.12em;
    white-space: nowrap;
}

.project-list {
    list-style: none;
    padding: 0;
    margin: 24px 0;
}

.project-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.project-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 500;
}

.project-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 48px 0;
}

.project-image-grid img {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    box-sizing: border-box;
    object-fit: contain;
    padding: 12px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-medium);
    border: 1px solid var(--border-light);
    background: #FFFFFF;
    cursor: zoom-in;
}

.project-image-grid img:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.project-image-full {
    margin: 48px 0;
}

.project-image-full img {
    width: 100%;
    max-width: 900px;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    background: #FFFFFF;
    cursor: zoom-in;
}

.project-hero-image img:focus-visible,
.project-main img:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

/* Preserve full architecture diagrams inside fixed-ratio project cards. */
.project-diagram-image {
    object-fit: contain !important;
    background: #fbf8f1 !important;
}

.project-media {
    margin: 48px 0;
}

.project-media--portrait {
    max-width: 460px;
    margin-right: auto;
    margin-left: auto;
}

.project-media--portrait .project-video {
    max-width: 420px;
    max-height: 720px;
}

.project-media--portrait .media-caption {
    max-width: 420px;
}

.project-video {
    display: block;
    width: 100%;
    max-width: 900px;
    height: auto;
    margin: 0 auto;
    border: 1px solid var(--border-light);
    border-radius: 14px;
    background: #161616;
    box-shadow: var(--shadow-md);
}

.project-video:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

.media-caption {
    max-width: 760px;
    margin: 13px auto 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.55;
}

.project-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    border: 1px solid var(--border-light);
    transition: all var(--transition-medium);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-color);
}

.stat-number {
    font-size: 40px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.more-projects-section {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.more-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin: 48px 0;
}

.more-project-card {
    background: var(--bg-primary);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    text-decoration: none;
    transition: all var(--transition-medium);
    display: block;
}

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

.more-project-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.more-project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-medium);
}

.more-project-card:hover .more-project-image img {
    transform: scale(1.08);
}

.more-project-info {
    padding: 24px;
}

.more-project-info h3 {
    font-size: 19px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.more-project-info p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.back-to-projects {
    text-align: center;
    margin-top: 48px;
}

/* Project Detail Responsive */
@media (max-width: 768px) {
    .project-content-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .project-sidebar {
        position: relative;
        top: 0;
        order: 2;
        padding-top: 32px;
        border-top: 1px solid var(--border-light);
    }

    .project-main {
        order: 1;
    }

    .project-hero {
        padding: 92px 0 32px;
    }

    .project-hero-title {
        font-size: clamp(34px, 10vw, 44px);
    }

    .project-hero-subtitle {
        font-size: 17px;
        margin-bottom: 28px;
    }

    .project-hero-image {
        padding-bottom: 36px;
    }

    .project-hero-image img,
    .project-hero-image .project-hero-photo {
        max-height: 300px;
        border-radius: 10px;
    }

    .project-section {
        padding: 52px 0;
    }

    .project-meta {
        gap: 24px;
    }

    .project-stats {
        grid-template-columns: 1fr;
    }

    .project-image-grid {
        grid-template-columns: 1fr;
    }

    .content-block h2 {
        font-size: 27px;
    }

    .content-block h3 {
        font-size: 19px;
    }

    .project-video {
        border-radius: 10px;
    }

    .more-projects-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Accessibility & Focus States - Perplexity-inspired
   ========================================================================== */

/* Focus visible for better keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Remove outline for mouse users, keep for keyboard users */
:focus:not(:focus-visible) {
    outline: none;
}

/* Better focus for interactive elements */
.btn-minimal:focus-visible,
.dropdown-toggle:focus-visible,
.nav-link-minimal:focus-visible,
.project-card:focus-visible,
.pub-item:focus-visible {
    outline: 2px solid var(--btn-text);
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --border-light: #333333;
    }
    
    [data-theme="dark"] {
        --border-color: #FFFFFF;
        --border-light: #CCCCCC;
    }
}

/* Print styles */
@media print {
    .navbar-minimal,
    .theme-toggle,
    .dropdown,
    .nav-toggle-minimal,
    .cta-buttons-minimal {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .hero-minimal {
        min-height: auto;
        padding: 20px 0;
    }
    
    .section-minimal {
        padding: 40px 0;
    }
}

/* ==========================================================================
   Mobile Social Header (Homepage only - like reference site)
   ========================================================================== */

.mobile-social-header {
    display: none;
}

@media (max-width: 768px) {
    .homepage .social-icons-nav {
        display: none;
    }
    
    .homepage .mobile-social-header {
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .mobile-social-header a {
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-secondary);
        transition: color 0.2s ease;
    }
    
    .mobile-social-header a:hover {
        color: var(--text-primary);
    }
    
    .mobile-social-header svg {
        width: 18px;
        height: 18px;
    }
}

/* ==========================================================================
   Work Page - Card Grid with Images
   ========================================================================== */

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.work-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    cursor: pointer;
}

.work-card.visible {
    opacity: 1;
    transform: translateY(0);
}

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

.work-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.work-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.work-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.work-card:hover .work-card-image img {
    transform: scale(1.05);
}

.work-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.work-card:hover .work-card-overlay {
    opacity: 1;
}

.view-details-btn {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 20px;
    border: 1px solid #fff;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.work-card:hover .view-details-btn {
    background: #fff;
    color: #000;
}

.work-card-content {
    padding: 16px;
}

.work-card-content h3 {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.work-card-content .work-meta {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 4px 0;
}

.work-card-content .work-venue {
    font-size: 13px;
    color: var(--text-tertiary);
    margin: 0;
}

.work-card-content .work-tags {
    margin-top: 8px;
}

/* ==========================================================================
   Publication Modal
   ========================================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: 12px;
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 32px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-content h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    line-height: 1.3;
    padding-right: 30px;
}

.modal-authors {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 24px 0;
}

.modal-section {
    margin-bottom: 20px;
}

.modal-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.modal-section p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.modal-links {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

/* ==========================================================================
   Responsive Work Grid
   ========================================================================== */

@media (max-width: 768px) {
    .work-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .work-card-image {
        height: 180px;
    }
    
    .modal-content {
        padding: 24px;
        max-height: 90vh;
    }
    
    .modal-content h2 {
        font-size: 18px;
    }
}

/* ==========================================================================
   Mobile Navigation Fixes - Sticky header with name on non-homepage
   ========================================================================== */

@media (max-width: 768px) {
    /* Ensure navbar is always fixed/sticky on mobile */
    .navbar-minimal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
    }
    
    /* Non-homepage mobile: show name on left */
    body:not(.homepage) .nav-left {
        display: flex;
    }
    
    body:not(.homepage) .nav-name {
        display: block;
        font-size: 14px;
    }
    
    body:not(.homepage) .nav-links {
        display: none;
    }
    
    body:not(.homepage) .nav-right-group {
        position: absolute;
        right: 50px;
    }
    
    /* Homepage mobile: hide name, show socials */
    .homepage .nav-name {
        display: none;
    }
    
    /* Hero Profile Section - Mobile Layout */
    .hero-profile-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 24px;
    }
    
    .hero-text-content {
        order: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-text-content .name {
        font-size: 36px;
        text-align: center;
    }
    
    .hero-text-content .tagline {
        text-align: center;
        margin-bottom: 0;
    }
    
    .hero-text-content .about-content {
        display: block;
        margin-top: 20px;
        text-align: left;
    }

    .hero-image-wrapper {
        order: 2;
        margin-top: 0; /* Reset margin on mobile */
    }

    /* No separate mobile-only about section exists yet */
    .homepage .about-section.additional-info {
        display: none !important;
    }

    .homepage .about-section.additional-info p {
        text-align: left;
    }
}

/* ==========================================================================
   Reading Progress Bar - Attached to Navbar Bottom
   ========================================================================== */

.reading-progress-container {
    position: fixed;
    top: 44px; /* Navbar height */
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--border-light);
    z-index: 9998;
    overflow: hidden;
}

.reading-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-secondary) 100%);
    transition: width 0.1s ease-out;
    border-radius: 0 2px 2px 0;
}

[data-theme="dark"] .reading-progress-container {
    background: var(--border-color);
}

[data-theme="dark"] .reading-progress-bar {
    background: linear-gradient(90deg, var(--accent-highlight) 0%, var(--accent) 100%);
}

/* ==========================================================================
   Back to Top Button
   ========================================================================== */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-fast);
    z-index: 999;
    box-shadow: var(--shadow-md);
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Only apply hover styles on devices that support hover */
@media (hover: hover) and (pointer: fine) {
    .back-to-top:hover {
        background: var(--accent);
        border-color: var(--accent);
        transform: translateY(-3px);
        box-shadow: var(--shadow-lg);
    }
    
    .back-to-top:hover svg {
        color: var(--bg-primary);
    }
}

.back-to-top:active,
.back-to-top:focus {
    outline: none;
    background: var(--bg-tertiary) !important;
    border-color: var(--border-color) !important;
    transform: translateY(0) !important;
}

.back-to-top:active svg,
.back-to-top:focus svg {
    color: var(--text-secondary) !important;
}

.back-to-top svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

[data-theme="dark"] .back-to-top {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

[data-theme="dark"] .back-to-top:active,
[data-theme="dark"] .back-to-top:focus {
    background: var(--bg-tertiary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .back-to-top:active svg,
[data-theme="dark"] .back-to-top:focus svg {
    color: var(--text-secondary) !important;
}

@media (hover: hover) and (pointer: fine) {
    [data-theme="dark"] .back-to-top:hover {
        background: var(--accent);
        border-color: var(--accent);
    }

    [data-theme="dark"] .back-to-top:hover svg {
        color: var(--bg-primary);
    }
}

/* ==========================================================================
   Page Transitions
   ========================================================================== */

.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s var(--swift-out);
}

.page-transition-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Page fade-in animation on load */
.page-content {
    animation: pageEnter 0.4s var(--swift-out) forwards;
}

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile responsiveness for back to top */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }

    .back-to-top svg {
        width: 18px;
        height: 18px;
    }
}

/* ==========================================================================
   CV / Resume Page
   ========================================================================== */

.cv-content {
    padding: 32px 0 80px;
}

.cv-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.cv-toolbar .cv-hint {
    margin-left: auto;
    font-size: 13px;
    color: var(--text-secondary);
}

.cv-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
}

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

.cv-btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
}

.cv-btn-primary:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.cv-btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.cv-btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-secondary);
}

.cv-viewer {
    width: 100%;
    height: min(1100px, calc(100vh - 230px));
    min-height: 520px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}

.cv-viewer object,
.cv-viewer iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.cv-viewer iframe[hidden],
.cv-viewer-placeholder[hidden] {
    display: none;
}

.cv-viewer-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    padding: clamp(28px, 6vw, 72px);
    text-align: center;
}

.cv-viewer-placeholder-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 520px;
}

.cv-viewer-label {
    margin-bottom: 14px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.cv-viewer-placeholder h2 {
    margin: 0 0 12px;
    color: var(--text-primary);
    font-size: clamp(24px, 4vw, 36px);
}

.cv-viewer-placeholder p {
    margin: 0 0 24px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.cv-viewer-placeholder .cv-btn {
    background: var(--bg-primary);
}

.cv-fallback {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.cv-fallback a {
    color: var(--accent);
    font-weight: 500;
}

@media (max-width: 768px) {
    .cv-viewer {
        height: calc(100vh - 200px);
        min-height: 420px;
        border-radius: 8px;
    }

    .cv-toolbar .cv-hint {
        margin-left: 0;
        width: 100%;
    }
}

/* ==========================================================================
   Experiences Page - Entry layout: large org name, then three columns
   (dates | label-value meta | description), photo strip below.
   Single site font throughout; reuses existing theme variables so both
   light and dark modes stay coherent with the rest of the site.
   ========================================================================== */

.experiences-content .exp-item {
    padding: 40px 0;
}

/* Entry header: logo tile + large organization name */
.exp-entry-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 26px;
}

.exp-logo {
    width: clamp(96px, 12vw, 132px);
    height: 52px;
    border-radius: 11px;
    border: 1px solid var(--border-color);
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.exp-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 7px;
    filter: none;
    opacity: 1;
    transition: filter 0.3s var(--swift-out), opacity 0.3s var(--swift-out);
}

.exp-item:hover .exp-logo img {
    filter: none;
    opacity: 1;
}

/* Monogram fallback shown when the logo image is missing */
.exp-logo--fallback::after {
    content: attr(data-monogram);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
}

.exp-org-name {
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0;
}

.exp-org-name a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.exp-org-name a:hover {
    color: var(--text-secondary);
}

/* Three-column body: dates | meta | description */
.exp-entry-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.15fr) minmax(0, 1.5fr);
    gap: 24px 48px;
    align-items: start;
}

.experiences-content .exp-date {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
}

/* Meta list: label on the left, value on the right of each row */
.exp-meta {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.exp-meta > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
}

.exp-meta dt {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.exp-meta dd {
    margin: 0;
    font-size: 15px;
    color: var(--text-primary);
    text-align: right;
    line-height: 1.4;
    min-width: 0;
    overflow-wrap: anywhere;
}

.exp-meta dd a {
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.exp-meta dd a:hover {
    color: var(--text-secondary);
    border-bottom-color: var(--text-secondary);
}

/* Description column */
.exp-desc .exp-details {
    margin: 0;
}

.exp-related {
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-tertiary);
}

.exp-related-link {
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.exp-related-link:hover {
    color: var(--text-secondary);
    border-bottom-color: var(--text-secondary);
}

/* Photo strip below each entry; hides itself if no images loaded */
.exp-photos {
    display: flex;
    gap: 14px;
    margin-top: 28px;
    flex-wrap: wrap;
    justify-content: center;
}

.exp-photos:not(:has(img)) {
    display: none;
}

.exp-photos img {
    flex: 1 1 200px;
    min-width: 0;
    max-width: 280px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    background: var(--bg-secondary);
    cursor: zoom-in;
    transition: transform 0.25s var(--swift-out), box-shadow 0.25s ease;
}

.exp-photos img:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-md);
}

/* Photo placeholders stay visible until the matching real image is supplied. */
.exp-photos img[src*="photo-placeholder"] {
    cursor: default;
}

.exp-photos img[src*="photo-placeholder"]:hover {
    transform: none;
    box-shadow: none;
}

/* Certifications: clean rows matching the entry format */
.cert-list {
    display: flex;
    flex-direction: column;
}

.cert-row {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto;
    gap: 12px 32px;
    align-items: baseline;
    padding: 18px 0;
    border-bottom: 1px solid var(--border-light);
}

.cert-row:last-child {
    border-bottom: none;
}

.cert-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
    text-align: left;
}

.cert-issuer {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    text-align: left;
}

.cert-date {
    font-size: 14px;
    color: var(--text-tertiary);
    text-align: right;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 860px) {
    .exp-entry-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .exp-meta dd {
        text-align: right;
    }

    .experiences-content .exp-item {
        padding: 30px 0;
    }

    .exp-entry-head {
        margin-bottom: 18px;
    }

    .cert-row {
        grid-template-columns: 1fr auto;
        gap: 4px 16px;
    }

    /* Explicit placement: name + date on the first line, issuer below,
       everything left-aligned regardless of inherited alignment. */
    .cert-name {
        grid-column: 1;
        grid-row: 1;
    }

    .cert-date {
        grid-column: 2;
        grid-row: 1;
    }

    .cert-issuer {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

/* ==========================================================================
   Photo Lightbox (opened by clicking a photo-strip image)
   ========================================================================== */

.exp-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(10, 10, 10, 0.78);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.exp-lightbox.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease;
}

.exp-lightbox-figure {
    position: relative;
    margin: 0;
    width: fit-content;
    max-width: min(1120px, 94vw);
    max-height: 94vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.96);
    transition: transform 0.25s var(--swift-out);
}

.exp-lightbox.active .exp-lightbox-figure {
    transform: scale(1);
}

.exp-lightbox-media {
    position: relative;
    display: flex;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
}

.exp-lightbox-figure img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100vh - 148px);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    background: #FFFFFF;
    object-fit: contain;
}

/* SVG files without intrinsic width/height collapse inside the fit-content
   lightbox wrapper. Give vector diagrams a responsive rendered width while
   preserving their viewBox aspect ratio and the shared height limit. */
.exp-lightbox-figure img.exp-lightbox-vector {
    width: min(1120px, 94vw);
}

.exp-lightbox-figure figcaption {
    width: min(900px, 100%);
    max-width: 100%;
    margin: 14px auto 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    line-height: 1.5;
    text-align: center;
}

.exp-lightbox-close {
    position: absolute;
    top: -48px;
    right: 0;
    z-index: 2;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    background: rgba(20, 20, 20, 0.55);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: #FFFFFF;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s var(--swift-out);
}

.exp-lightbox-close:hover {
    background: rgba(60, 60, 60, 0.8);
    transform: scale(1.08);
}

/* Captions stay visible in the page, then repeat in the lightbox on expand. */
.inline-image-figure {
    margin: 0;
    min-width: 0;
}

.project-grid-figure {
    display: flex;
    flex-direction: column;
}

.inline-image-caption {
    width: min(760px, 100%);
    margin: 12px auto 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.inline-image-caption--hero {
    padding: 0 16px;
}

.exp-photo-figure {
    flex: 1 1 200px;
    max-width: 280px;
}

.exp-photo-figure img {
    width: 100%;
    max-width: none;
    display: block;
}

/* ==========================================================================
   Liquid glass surfaces (navbar + back-to-top)
   The rgba values track --bg-primary of each theme; update together.
   ========================================================================== */

.navbar-minimal {
    background: rgba(243, 241, 236, 0.72);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    backdrop-filter: blur(18px) saturate(180%);
}

[data-theme="dark"] .navbar-minimal {
    background: rgba(26, 26, 26, 0.65);
}

.back-to-top {
    background: rgba(243, 241, 236, 0.6);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
}

[data-theme="dark"] .back-to-top {
    background: rgba(46, 46, 46, 0.55);
}

/* Solid fallback where backdrop-filter is unsupported */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .navbar-minimal,
    [data-theme="dark"] .navbar-minimal {
        background: var(--bg-primary);
    }

    .back-to-top,
    [data-theme="dark"] .back-to-top {
        background: var(--bg-tertiary);
    }
}

/* ==========================================================================
   Mobile refinements
   ========================================================================== */

/* Never allow sideways scrolling of the page itself */
html,
body {
    overflow-x: hidden;
    overflow-x: clip;
}

@media (max-width: 860px) {
    .exp-photos {
        gap: 10px;
    }

    .exp-photo-figure {
        flex: 1 1 45%;
        min-width: 0;
        max-width: calc(50% - 5px);
    }
}

@media (max-width: 520px) {
    .exp-photo-figure {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .exp-lightbox {
        padding: 12px;
    }

    .exp-lightbox-close {
        top: -44px;
        right: 0;
    }

    .exp-lightbox-figure img {
        max-height: calc(100vh - 210px);
    }
}

/* ==========================================================================
   Grouped roles under one organization (Experiences page).
   LinkedIn-style: a dot beside each role title, connected by a vertical
   hairline that stops at the last role's dot.
   ========================================================================== */

.exp-roles {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 36px;
    padding-left: 30px;
}

.exp-role {
    position: relative;
}

/* Dot beside the role title */
.exp-role::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 7px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--text-tertiary);
}

/* Connector from this dot down to the next role's dot */
.exp-role:not(:last-child)::after {
    content: '';
    position: absolute;
    left: -26.5px;
    top: 22px;
    bottom: -40px;
    width: 2px;
    background: var(--border-color);
}

.exp-role-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    margin: 0 0 14px;
    text-align: left;
}

.exp-role .exp-photos {
    margin-top: 22px;
}

@media (max-width: 860px) {
    .exp-roles {
        padding-left: 24px;
        gap: 30px;
    }

    .exp-role::before {
        left: -24px;
    }

    .exp-role:not(:last-child)::after {
        left: -20.5px;
        bottom: -34px;
    }
}

/* ==========================================================================
   Contribution-calendar ramp (sequential, warm grey; one hue light-to-dark)
   ========================================================================== */

:root {
    /* Steps chosen for visible contrast against the --bg-secondary card */
    --cal-0: #DBD5C6;
    --cal-1: #BAB09A;
    --cal-2: #93866A;
    --cal-3: #645A45;
    --cal-4: #332F26;
}

[data-theme="dark"] {
    --cal-0: #262626;
    --cal-1: #3E3B35;
    --cal-2: #5C574C;
    --cal-3: #8A8272;
    --cal-4: #C9C2B2;
}

/* ==========================================================================
   Homepage: hero availability line + Download CV + Skills section
   ========================================================================== */

.profile-availability {
    margin: 8px 0 0;
    font-size: 14px;
}

.profile-availability a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.profile-availability a:hover {
    color: var(--text-primary);
}

.avail-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34A853;
    flex-shrink: 0;
}

.profile-cv-btn {
    margin-top: 12px;
}

.skills-section {
    margin-top: 0;
    margin-bottom: 28px;
}

.skills-section h2 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 12px;
    margin-bottom: 20px;
}

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

.skill-group h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px;
}

.skill-group p {
    font-size: 14.5px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

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

/* ==========================================================================
   Work page (wk-*): impact band, filters, publication rows,
   project grid/list, GitHub contribution calendar.
   ========================================================================== */

.wk-hide {
    display: none !important;
}

.wk-sec {
    margin-bottom: 56px;
}

.wk-sec-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 12px;
}

.wk-sec-head h2 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0;
}

.wk-sec-stat {
    color: var(--text-tertiary);
    font-size: 14px;
}

/* Filter chips */
.wk-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin: 20px 0 4px;
    scrollbar-width: none;
}

.wk-chips::-webkit-scrollbar {
    display: none;
}

.wk-chip {
    font-family: inherit;
    font-size: 14px;
    padding: 6px 15px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.wk-chip small {
    color: var(--text-tertiary);
    font-size: 12.5px;
}

.wk-chip:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.wk-chip.active {
    color: var(--bg-primary);
    background: var(--accent);
    border-color: var(--accent);
}

.wk-chip.active small {
    color: var(--bg-primary);
    opacity: 0.7;
}

/* Publication rows */
.wk-year {
    margin: 30px 0 0;
    font-size: 14px;
    color: var(--text-tertiary);
    letter-spacing: 0.04em;
}

.wk-sub {
    margin: 44px 0 0;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.01em;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 10px;
}

.wk-pub {
    padding: 22px 0;
    border-bottom: 1px solid var(--border-light);
}

.wk-pub-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 20px;
}

.wk-pub-title {
    font-size: 17.5px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
    max-width: 62ch;
}

.wk-present-type {
    flex-shrink: 0;
    font-size: 12.5px;
    padding: 3px 11px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-secondary);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.wk-byline {
    margin: 6px 0 10px;
    color: var(--text-secondary);
    font-size: 14.5px;
    line-height: 1.55;
}

.wk-byline b {
    color: var(--text-primary);
    font-weight: 600;
}

/* Anchor styled like the existing .pub-btn pills */
a.pub-btn {
    text-decoration: none;
    display: inline-block;
}

/* Projects toolbar */
.wk-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 22px 0 26px;
}

.wk-toolbar .wk-chips {
    margin: 0;
}

.wk-views {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.wk-view-btn {
    background: none;
    border: none;
    padding: 7px 11px;
    cursor: pointer;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    transition: color 0.2s ease, background 0.2s ease;
}

.wk-view-btn + .wk-view-btn {
    border-left: 1px solid var(--border-color);
}

.wk-view-btn.active {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.wk-view-btn svg {
    width: 15px;
    height: 15px;
    display: block;
}

/* Projects: grid view */
.wk-works.wk-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.wk-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-secondary);
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s var(--swift-out), border-color 0.2s ease, box-shadow 0.25s ease;
}

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

.wk-tile {
    position: relative;
    aspect-ratio: 4 / 3;
    background:
        repeating-linear-gradient(-45deg, transparent 0 9px, rgba(127, 127, 127, 0.055) 9px 10px),
        linear-gradient(150deg, var(--bg-tertiary), var(--bg-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-light);
    overflow: hidden;
}

/* Real project image, when present, covers the placeholder */
.wk-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.wk-tile em {
    font-size: 84px;
    font-style: italic;
    font-weight: 500;
    color: var(--text-primary);
    opacity: 0.13;
    transition: opacity 0.3s ease;
    user-select: none;
}

.wk-card:hover .wk-tile em {
    opacity: 0.24;
}

.wk-tile span {
    position: absolute;
    left: 10px;
    bottom: 8px;
    font-size: 10.5px;
    color: var(--text-tertiary);
    opacity: 0.75;
}

.wk-card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.wk-card-body h3 {
    font-size: 16.5px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
}

.wk-card-body p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

.wk-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.wk-tag {
    font-size: 12px;
    padding: 2px 9px;
    border: 1px solid var(--border-light);
    border-radius: 999px;
    color: var(--text-tertiary);
}

.wk-go {
    display: inline-flex;
    align-items: center;
    position: relative;
    width: max-content;
    margin-top: 4px;
    padding: 12px 0;
    font-size: 14px;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.wk-go::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.wk-card:hover .wk-go {
    color: var(--accent);
}

.wk-card:hover .wk-go::after {
    width: 100%;
}

/* Projects: list view */
.wk-works.wk-list {
    display: block;
}

.wk-works.wk-list .wk-card {
    flex-direction: row;
    align-items: center;
    gap: 20px;
    border: none;
    border-radius: 0;
    border-bottom: 1px solid var(--border-light);
    background: none;
    padding: 18px 2px;
    box-shadow: none;
}

.wk-works.wk-list .wk-card:hover {
    transform: none;
}

.wk-works.wk-list .wk-card:last-child {
    border-bottom: none;
}

.wk-works.wk-list .wk-tile {
    display: none;
}

.wk-works.wk-list .wk-card-body {
    flex-direction: row;
    align-items: baseline;
    gap: 18px;
    padding: 0;
    width: 100%;
}

.wk-works.wk-list .wk-card-body h3 {
    flex-shrink: 0;
    width: 34%;
}

.wk-works.wk-list .wk-card-body p {
    flex: 1;
}

.wk-works.wk-list .wk-tags {
    flex-shrink: 0;
}

.wk-works.wk-list .wk-go {
    margin: 0;
    flex-shrink: 0;
}

/* GitHub contribution calendar */
.wk-gh {
    --wk-cal-cell: 11px;
    --wk-cal-gap: 3px;
    margin-top: 24px;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    background: var(--bg-secondary);
    padding: 22px 24px;
}

.wk-gh-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.wk-gh-line {
    font-size: 15px;
}

.wk-gh-line b {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.wk-gh-link {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.wk-gh-link:hover {
    color: var(--text-primary);
    border-bottom-color: var(--text-secondary);
}

.wk-cal-scroll {
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.wk-cal-scroll::-webkit-scrollbar {
    height: 8px;
}

.wk-cal-scroll::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 999px;
}

.wk-cal-months {
    position: relative;
    height: 15px;
    font-size: 11.5px;
    color: var(--text-tertiary);
    margin-bottom: 6px;
    flex: 0 0 auto;
}

.wk-cal-months span {
    position: absolute;
    top: 0;
    line-height: 1;
    white-space: nowrap;
    transform: translateX(-1px);
    pointer-events: none;
}

.wk-cal {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: var(--wk-cal-cell);
    grid-template-rows: repeat(7, var(--wk-cal-cell));
    gap: var(--wk-cal-gap);
    flex: 0 0 auto;
}

.wk-cal i,
.wk-cal-legend i {
    width: var(--wk-cal-cell);
    height: var(--wk-cal-cell);
    border-radius: 2.5px;
    background: var(--cal-0);
    display: inline-block;
}

.wk-cal i.l1, .wk-cal-legend i.l1 { background: var(--cal-1); }
.wk-cal i.l2, .wk-cal-legend i.l2 { background: var(--cal-2); }
.wk-cal i.l3, .wk-cal-legend i.l3 { background: var(--cal-3); }
.wk-cal i.l4, .wk-cal-legend i.l4 { background: var(--cal-4); }

.wk-cal i:hover {
    outline: 1px solid var(--text-secondary);
}

.wk-cal-legend {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-end;
    margin-top: 10px;
    font-size: 11.5px;
    color: var(--text-tertiary);
}

/* Responsive */
@media (max-width: 900px) {
    .wk-works.wk-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 760px) {
    .wk-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .wk-views {
        align-self: flex-end;
    }

    .wk-works.wk-list .wk-card-body {
        flex-direction: column;
        gap: 8px;
    }

    .wk-works.wk-list .wk-card-body h3 {
        width: auto;
    }
}

@media (max-width: 560px) {
    .wk-gh {
        padding: 18px 16px;
    }

    .wk-gh-top {
        gap: 10px;
        margin-bottom: 16px;
    }

    .wk-cal-scroll {
        margin-inline: -2px;
        padding-bottom: 12px;
    }

    .wk-cal-months {
        font-size: 11px;
    }

    .wk-works.wk-grid {
        grid-template-columns: 1fr;
    }

    .wk-pub-top {
        flex-direction: column;
        gap: 6px;
    }

}

/* ==========================================================================
   Homepage hierarchy
   ========================================================================== */

.homepage .skills-section h2,
.homepage .news-section h2,
.homepage .publications-home-section h2 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.home-subhead {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 26px 0 14px;
}

.home-subhead::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-light);
}

.home-section-link {
    display: flex;
    justify-content: center;
    margin: -8px 0 28px;
}

.home-section-note {
    margin: -4px 0 16px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.home-pub-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.home-pub-head .pub-title {
    margin-bottom: 6px;
}

@media (max-width: 640px) {
    .homepage .hero-text-content .about-content p {
        text-align: left;
    }

    .homepage .skills-section h2,
    .homepage .news-section h2,
    .homepage .publications-home-section h2 {
        font-size: 22px;
    }

    .home-pub-head {
        display: block;
    }

}

/* Justified case-study paragraphs retain left alignment on narrow screens,
   where full justification would create distracting word spacing. */
@media (min-width: 641px) {
    .project-main .content-block > p {
        text-align: justify;
        text-justify: inter-word;
        hyphens: auto;
    }
}

/* ==========================================================================
   Page-section navigation: right rail on desktop, in-flow strip on mobile
   ========================================================================== */

.page-nav-target {
    scroll-margin-top: 112px;
}

.page-section-nav {
    position: fixed;
    top: 50%;
    right: 16px;
    z-index: 850;
    transform: translateY(-50%);
}

.page-section-nav-title {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.page-section-nav-list {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    margin: 0;
    padding: 10px 4px;
    list-style: none;
    border: 0;
    border-radius: 0;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
}

.page-section-nav-list li {
    margin: 0;
    padding: 0;
}

.page-section-nav a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 30px;
    height: 14px;
    color: var(--text-secondary);
    text-decoration: none;
}

.page-section-nav-marker {
    display: block;
    width: 8px;
    height: 2px;
    border-radius: 999px;
    background: var(--text-tertiary);
    transition: width 0.2s var(--swift-out), height 0.2s ease, background 0.2s ease;
}

.page-section-nav a:hover .page-section-nav-marker,
.page-section-nav a:focus-visible .page-section-nav-marker {
    width: 20px;
    background: var(--text-secondary);
}

.page-section-nav a.active .page-section-nav-marker {
    width: 28px;
    height: 3px;
    background: var(--text-primary);
}

.page-section-nav-label {
    position: absolute;
    top: 50%;
    right: calc(100% + 10px);
    padding: 5px 9px;
    border: 1px solid var(--border-light);
    border-radius: 7px;
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    color: var(--text-primary);
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translate(5px, -50%);
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s linear 0.16s;
}

.page-section-nav a:hover .page-section-nav-label,
.page-section-nav a:focus-visible .page-section-nav-label {
    opacity: 1;
    visibility: visible;
    transform: translate(0, -50%);
    transition-delay: 0s;
}

@media (max-width: 900px) {
    .page-nav-target {
        scroll-margin-top: 80px;
    }

    .page-section-nav {
        display: none;
    }
}

.wk-cal i.pad {
    background: transparent;
}

/* Homepage: selected projects mini-grid */
.home-subhead {
    font-size: 19px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 26px 0 14px;
}

.home-projects {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.home-proj {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 14px 16px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: var(--bg-secondary);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s var(--swift-out), box-shadow 0.2s ease;
}

.home-proj-image {
    width: calc(100% + 32px);
    aspect-ratio: 16 / 7;
    object-fit: cover;
    margin: -14px -16px 8px;
    border-bottom: 1px solid var(--border-light);
}

.home-proj:hover {
    border-color: var(--border-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.home-proj h4 {
    font-size: 15.5px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.home-proj p {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

.home-proj span {
    display: inline-flex;
    align-items: center;
    position: relative;
    width: max-content;
    padding: 12px 0;
    font-size: 13px;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.home-proj span::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.home-proj:hover span {
    color: var(--accent);
}

.home-proj:hover span::after {
    width: 100%;
}

@media (max-width: 640px) {
    .home-subhead {
        font-size: 18px;
    }

    .home-projects {
        grid-template-columns: 1fr;
    }
}

/* Work page: jump nav between Projects / Publications / Open Source.
   Projects leads the page now (see work.html reorder), so this gives
   a one-click path to the other two sections without a long scroll. */
.wk-jumpnav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 36px;
}

.wk-jump-link {
    font-family: var(--font-primary);
    font-size: 14px;
    padding: 7px 18px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-secondary);
    text-decoration: none;
    background: var(--bg-primary);
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s var(--swift-out);
}

.wk-jump-link:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
    transform: translateY(-1px);
}

@media (max-width: 560px) {
    .wk-jumpnav {
        gap: 8px;
        margin-bottom: 28px;
    }

    .wk-jump-link {
        font-size: 13px;
        padding: 6px 14px;
    }
}

/* ==========================================================================
   Academic profile and publication treatment
   ========================================================================== */

/* The portrait is a deliberate circular crop: it keeps the face prominent
   while removing the rectangular-photo feel from the profile header. */
.hero-image-wrapper,
.profile-image-wrapper {
    margin-top: 34px;
}

.hero-image-wrapper .profile-img,
.profile-image-wrapper .profile-img {
    width: 232px;
    height: 232px;
    aspect-ratio: 1;
    object-fit: cover;
    object-position: 50% 27%;
    border: 1px solid var(--border-light);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
}

/* Recruiter-facing availability note: a quiet callout that reads like part
   of the page instead of a detached button or status badge. */
.profile-availability {
    display: flex;
    justify-content: center;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: 22px 0 0;
    padding: 13px 16px 13px 18px;
    border-left: 3px solid var(--accent);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.55;
    text-align: center;
}

.profile-availability p {
    flex: 1 1 380px;
    margin: 0;
    text-align: center;
}

.profile-availability p strong {
    font-weight: 700;
}

.profile-availability .availability-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.profile-availability .availability-link:hover {
    color: var(--text-secondary);
}

/* Publication lists borrow the strongest part of the reference layout:
   readable academic rows separated by rules, with no nested card chrome. */
.homepage .publications-home-section h2,
#wk-publications .wk-sec-head h2 {
    font-size: 27px;
}

.research-area-filter {
    margin: -4px 0 20px;
}

/* Give the publication section heading a little more breathing room before
   the research-area label. The divider stays visually attached to the heading
   while sitting slightly higher than the label below it. */
#wk-publications .wk-sec-head {
    position: relative;
    border-bottom: 0;
    padding-bottom: 8px;
}

#wk-publications .wk-sec-head::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 10px;
    left: 0;
    height: 1px;
    background: var(--border-light);
}

#wk-publications .research-area-filter {
    margin-top: 0;
}

.research-area-label {
    display: block;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.research-area-filter .wk-chips {
    margin: 8px 0 0;
}

.home-research-areas {
    max-width: 90ch;
    margin: -4px 0 20px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.home-research-areas strong {
    color: var(--text-primary);
    font-weight: 600;
}

.publications-home-section .pub-entry {
    margin: 0;
    padding: 20px 0;
    border-top: 1px solid var(--border-light);
    opacity: 1;
    transform: none;
    transition: none;
}

.publications-home-section .pub-entry:last-of-type {
    border-bottom: 1px solid var(--border-light);
}

.publications-home-section .pub-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.publications-home-section .pub-authors {
    font-size: 14px;
    line-height: 1.55;
}

.publications-home-section .pub-venue {
    margin-bottom: 10px;
    font-size: 13.5px;
}

.publications-home-section .pub-buttons,
#wk-publications .pub-buttons {
    gap: 16px;
}

.publications-home-section .pub-btn,
#wk-publications .pub-btn {
    padding: 2px 0;
    border: 0;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    background: none;
    font-size: 12px;
    letter-spacing: 0.04em;
}

/* Keep the ABS control readable after its abstract is opened. The compact
   publication treatment intentionally uses a transparent background, so the
   generic active-state foreground must not inherit the page background color. */
.publications-home-section .pub-btn.active,
#wk-publications .pub-btn.active {
    color: var(--text-primary);
    background: none;
    border-bottom-color: var(--text-primary);
}

#wk-publications .wk-pub {
    padding: 24px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 0;
}

#wk-publications .wk-pub:last-of-type {
    border-bottom: 1px solid var(--border-light);
}

#wk-publications .wk-pub-title {
    font-size: 20px;
    line-height: 1.4;
}

#wk-publications .wk-byline {
    margin: 8px 0 10px;
    font-size: 14px;
    line-height: 1.6;
}

#wk-publications .wk-present-type {
    padding: 3px 9px;
    border: 0;
    border-radius: 0;
    background: var(--bg-secondary);
}

@media (max-width: 768px) {
    .hero-image-wrapper,
    .profile-image-wrapper {
        margin-top: 22px;
    }

    .hero-image-wrapper .profile-img,
    .profile-image-wrapper .profile-img {
        width: 190px;
        height: 190px;
    }
}

@media (max-width: 640px) {
    .profile-availability {
        display: block;
        text-align: center;
    }

    .profile-availability .availability-link {
        margin-top: 8px;
    }

    .homepage .publications-home-section h2,
    #wk-publications .wk-sec-head h2 {
        font-size: 23px;
    }

    .publications-home-section .pub-title {
        font-size: 17px;
    }

    #wk-publications .wk-pub-top {
        display: block;
    }

    #wk-publications .wk-present-type {
        display: inline-flex;
        margin-top: 7px;
    }
}

/* Publication media follows the reference academic layout: a compact,
   source-backed figure sits to the left of each citation row. */
.publications-home-section .pub-entry,
#wk-publications .wk-pub {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    column-gap: 28px;
    align-items: start;
}

.publications-home-section .home-pub-media,
#wk-publications .wk-pub-media {
    grid-column: 1;
    grid-row: 1 / span 10;
    width: 220px;
    min-height: 138px;
    border: 1px solid var(--border-light);
    border-radius: 7px;
    background: var(--bg-secondary);
    overflow: hidden;
}

.publications-home-section .home-pub-media img,
#wk-publications .wk-pub-media img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: contain;
    background: #f5f2ec;
}

.publications-home-section .pub-entry > :not(.home-pub-media),
#wk-publications .wk-pub > :not(.wk-pub-media) {
    grid-column: 2;
    min-width: 0;
}

@media (max-width: 640px) {
    .publications-home-section .pub-entry,
    #wk-publications .wk-pub {
        display: block;
    }

    .publications-home-section .home-pub-media,
    #wk-publications .wk-pub-media {
        width: min(100%, 300px);
        min-height: 0;
        margin-bottom: 14px;
    }
}
