:root {
    /* Refined Color Palette */
    --bg-gradient-start: #f8fafc;
    --bg-gradient-end: #eef2f6;
    --bg-sidebar: #ffffff;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-tertiary: #9ca3af;
    --accent-primary: #0d9488;
    --accent-hover: #0f766e;
    --accent-light: #ccfbf1;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --card-bg: #ffffff;
    --card-hover: #fafbfc;

    /* Refined Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 10px 15px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.08), 0 10px 20px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.12);
    
    /* Typography */
    --font-heading: 'Crimson Pro', serif;
    --font-body: 'Inter', sans-serif;

    /* Layout scale */
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --content-max: 980px;
    --gutter: 90px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding: 24px;
}

/* Premium grain + border glow */
.page-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(15, 23, 42, 0.06) 1px, transparent 1px);
    background-size: 3px 3px;
    opacity: 0.28;
    pointer-events: none;
    mix-blend-mode: multiply;
}

.page-wrapper {
    border: 1px solid rgba(226, 232, 240, 0.95);
}

.page-wrapper::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-lg);
    pointer-events: none;
    background: linear-gradient(
        135deg,
        rgba(13, 148, 136, 0.25),
        rgba(56, 189, 248, 0.18),
        rgba(34, 197, 94, 0.14)
    );
    opacity: 0.55;
    filter: blur(20px);
    z-index: -1;
}

/* Scroll progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(15, 23, 42, 0.06);
    z-index: 60;
    pointer-events: none;
}

.scroll-progress__bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-primary), #22c55e, #38bdf8);
    box-shadow: 0 6px 16px rgba(13, 148, 136, 0.28);
    transition: width 0.12s ease-out;
}

/* Reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
                transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

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

/* Skip link */
.skip-link {
    position: absolute;
    left: 18px;
    top: 18px;
    padding: 10px 14px;
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    z-index: 50;
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: translateY(0);
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

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

a:focus-visible,
.nav-link:focus-visible,
.action-btn:focus-visible {
    outline: 3px solid rgba(13, 148, 136, 0.25);
    outline-offset: 3px;
    border-radius: 10px;
}

/* Layout */
.page-wrapper {
    display: flex;
    max-width: 1300px;
    margin: 0 auto;
    min-height: calc(100vh - 48px);
    background: var(--bg-sidebar);
    box-shadow: var(--shadow-xl);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

/* Sidebar */
.sidebar {
    width: 320px;
    background: var(--bg-sidebar);
    padding: 48px 32px;
    border-right: 1px solid var(--border-light);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: auto;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.profile-container {
    text-align: center;
    flex-grow: 1;
}

.profile-img-container {
    width: 180px;
    height: 180px;
    margin: 0 auto 32px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.profile-img-container::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-light));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s;
}

.profile-img-container:hover::before {
    opacity: 1;
}

.profile-img-container:hover {
    transform: translateY(-5px);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.name {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.role {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.institution {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.cv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid rgba(13, 148, 136, 0.55);
    background: linear-gradient(135deg, var(--accent-primary), #14b8a6);
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.7px;
    gap: 8px;
    text-transform: uppercase;
    margin-bottom: 28px;
    box-shadow: 0 10px 22px rgba(13, 148, 136, 0.35);
}

.cv-btn:hover {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent-hover), var(--accent-primary));
    border-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(13, 148, 136, 0.42);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap; /* keep icons round by preventing overflow-driven flex shrinking */
    margin-bottom: 40px;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 1.2rem;
    width: 45px;
    height: 45px;
    flex: 0 0 45px; /* prevent flexbox from shrinking (keeps circle aspect) */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(241, 245, 249, 0.8);
    border: 1px solid rgba(226, 232, 240, 0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
}

.social-links a:hover {
    color: var(--bg-sidebar);
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Sidebar Navigation */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 40px;
}

.nav-link {
    padding: 12px 20px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s;
    text-align: left;
}

.nav-link:hover {
    background: var(--border-light);
    color: var(--accent-primary);
    transform: translateX(5px);
}

.nav-link.active,
.nav-link[aria-current="true"] {
    background: rgba(13, 148, 136, 0.08);
    color: var(--accent-primary);
    border: 1px solid rgba(13, 148, 136, 0.18);
}

.nav-link:focus-visible {
    transform: none;
}

.sidebar-news {
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    text-align: left;
}

.sidebar-news-title {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.sidebar-news-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    margin: 0;
}

.sidebar-news-list li {
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

.sidebar-news-year {
    display: inline-block;
    min-width: 3.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.sidebar-media {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--border-light);
    text-align: left;
}

.sidebar-media-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    margin: 0;
}

.sidebar-media-list li {
    line-height: 1.4;
}

.sidebar-media-link {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(248, 250, 252, 0.85);
    color: inherit;
    box-shadow: var(--shadow-xs);
}

.sidebar-media-link:hover {
    border-color: rgba(13, 148, 136, 0.28);
    background: rgba(13, 148, 136, 0.05);
    transform: translateX(2px);
}

.sidebar-media-source {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--accent-primary);
}

.sidebar-media-text {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.sidebar-footer {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

/* Main Content */
.main-content {
    flex-grow: 1;
    padding: 70px var(--gutter);
    --mx: 50vw;
    --my: 20vh;
    background:
        radial-gradient(700px circle at var(--mx) var(--my), rgba(13, 148, 136, 0.14), transparent 55%),
        radial-gradient(900px circle at 80% 30%, rgba(56, 189, 248, 0.10), transparent 60%),
        linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
    position: relative;
    isolation: isolate;
}

.main-inner {
    max-width: var(--content-max);
    margin: 0 auto;
}

.main-content::before,
.main-content::after {
    content: '';
    position: absolute;
    z-index: -1;
    filter: blur(50px);
    opacity: 0.55;
    pointer-events: none;
}

.main-content::before {
    width: 420px;
    height: 420px;
    left: -120px;
    top: 140px;
    background: radial-gradient(circle at 30% 30%, rgba(13, 148, 136, 0.42), rgba(13, 148, 136, 0) 70%);
}

.main-content::after {
    width: 520px;
    height: 520px;
    right: -160px;
    top: 820px;
    background: radial-gradient(circle at 30% 30%, rgba(56, 189, 248, 0.42), rgba(56, 189, 248, 0) 70%);
}

.hero {
    margin-bottom: 70px;
    padding: 36px 34px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 55%, #ecfeff 100%);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.hero-topline {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1.3px;
    margin-bottom: 14px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(1.9rem, 2.3vw + 1.1rem, 3.05rem);
    line-height: 1.1;
    letter-spacing: -0.6px;
    margin-bottom: 14px;
    color: var(--text-primary);
}

.hero-subtitle {
    margin-bottom: 22px;
    font-size: 1.05rem;
    color: #334155;
    max-width: 70ch;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(255, 255, 255, 0.75);
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 600;
    transition: all 0.25s ease;
}

.cta-btn:hover {
    border-color: rgba(13, 148, 136, 0.35);
    background: rgba(13, 148, 136, 0.05);
    color: var(--accent-primary);
    transform: translateY(-1px);
}

.cta-btn.primary {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #ffffff;
}

.cta-btn.primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: var(--shadow-md);
}

.hero-cards {
    display: grid;
    /* Auto-fit so when only 2 mini-cards exist (e.g., Highlight + Focus),
       they expand to fill the available row width. */
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.mini-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius-sm);
    padding: 14px 14px;
}

.mini-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.mini-card-body {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.5;
}

.section {
    margin-bottom: 90px;
    padding: 34px 34px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    backdrop-filter: blur(8px);
}

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

.section-header {
    margin-bottom: 40px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.85rem, 1.7vw + 1.2rem, 2.65rem);
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    line-height: 1.15;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.awards-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.award-photo-card {
    margin: 0;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.award-photo {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.award-photo-card figcaption {
    padding: 10px 12px;
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.content-block {
    max-width: 750px;
}

.lead-text {
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 2rem;
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    color: #334155;
    line-height: 1.8;
}

/* Designer underline links in prose (but not buttons/nav) */
.content-block a,
.section-subtitle a,
.news-content a {
    color: var(--text-primary);
    font-weight: 600;
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0% 2px;
    background-repeat: no-repeat;
    background-position: 0% 100%;
    transition: background-size 0.25s ease, color 0.25s ease;
}

.content-block a:hover,
.section-subtitle a:hover,
.news-content a:hover {
    color: var(--accent-primary);
    background-size: 100% 2px;
}

/* Ensure prominent underline for key links in hero/lead prose. */
.lead-text a {
    background-size: 100% 2px;
}

/* Google Scholar (publications subtitle): clear link color + underline */
.section-subtitle a.scholar-link {
    color: var(--accent-primary);
    font-weight: 600;
    text-decoration: none;
    background-image: none;
    background-size: auto;
}

.section-subtitle a.scholar-link:hover {
    color: var(--accent-hover);
    text-decoration: none;
}

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

/* Sidebar "Digit Robotics" link styling */
.institution a.institution-link {
    color: var(--accent-primary);
    font-weight: 600;
    text-decoration: none;
    background-image: none;
    background-size: auto;
}

.institution a.institution-link:hover {
    color: var(--accent-hover);
    text-decoration: none;
}

/* Research Tags */
.research-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag {
    padding: 10px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s;
    cursor: default;
}

.tag:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
}

/* Publication List */
.publication-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.pub-load-error {
    color: var(--text-secondary);
    padding: 1rem 0;
    margin: 0;
}

.pub-item {
    display: flex;
    gap: 35px;
    padding: 35px;
    background: var(--card-bg);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.pub-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    background: var(--card-hover);
    border-color: rgba(13, 148, 136, 0.30);
}

.pub-item.featured {
    background: linear-gradient(135deg, #fef3c7 0%, #fef9e7 100%);
}

.pub-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    min-width: 176px; /* accommodate ~10% larger thumbnail */
    flex-shrink: 0;
}

.pub-image {
    width: 158px; /* ~10% bigger (from 144px) */
    height: 158px; /* keep thumbnails square */
    aspect-ratio: 1 / 1;
    border-radius: 8px; /* less round corners */
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--border-light);
}

.pub-image:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.pub-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pub-details {
    flex-grow: 1;
    position: relative;
}

.award-ribbon {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem; /* slightly smaller to stay on one line */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
    margin-left: 8px;
}

.pub-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
    line-height: 1.5;
}

.pub-authors {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.6;
}

.pub-venue {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.venue-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    white-space: nowrap; /* keep venues like "ACM MobileHCI 2016" on one line */
}

.venue-type {
    font-size: 0.75rem;
    padding: 3px 10px;
    background: var(--border-light);
    color: var(--text-secondary);
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

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

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    padding: 8px 16px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.7);
    transition: all 0.3s;
    font-weight: 500;
}

.action-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(13, 148, 136, 0.05);
}

.action-btn.primary {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

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

/* Video buttons (YouTube) */
.action-btn.video-btn {
    background: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
}

.action-btn.video-btn:hover {
    background: #dc2626;
    border-color: #dc2626;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* News Timeline */
.news-timeline {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.news-item {
    display: flex;
    gap: 25px;
    padding: 30px;
    background: var(--card-bg);
    border-radius: 12px;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.news-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(13, 148, 136, 0.30);
}

.news-badge {
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
    background: var(--accent-primary);
    padding: 8px 16px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    height: fit-content;
    white-space: nowrap;
}

.news-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.news-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding-top: 40px;
    margin-top: 80px;
}

.footer-content {
    text-align: center;
}

.footer-content p {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.footer-note {
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 1100px) {
    .main-content {
        padding: 56px 46px;
    }

    .hero-title {
        font-size: clamp(1.75rem, 2.0vw + 1.05rem, 2.6rem);
    }
}

@media (max-width: 900px) {
    body {
        padding: 14px;
    }

    .page-wrapper {
        flex-direction: column;
        border-radius: 18px;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 28px 22px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .profile-container {
        text-align: left;
        display: grid;
        grid-template-columns: 92px 1fr;
        gap: 16px;
        align-items: center;
    }

    .profile-img-container {
        width: 92px;
        height: 92px;
        margin: 0;
    }

    .profile-text {
        margin-top: 4px;
    }

    .name {
        font-size: 1.65rem;
        margin-bottom: 6px;
    }

    .institution {
        margin-bottom: 14px;
    }

    .cv-btn {
        margin-bottom: 16px;
    }

    .social-links {
        justify-content: flex-start;
        margin-bottom: 18px;
        grid-column: 1 / -1;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 14px;
        grid-column: 1 / -1;
    }

    .sidebar-news {
        grid-column: 1 / -1;
        margin-top: 4px;
        padding-top: 14px;
    }

    .sidebar-media {
        grid-column: 1 / -1;
        margin-top: 18px;
        padding-top: 14px;
    }

    .nav-link {
        text-align: center;
        padding: 10px 14px;
        border-radius: 999px;
        background: rgba(241, 245, 249, 0.65);
        border: 1px solid rgba(226, 232, 240, 0.85);
    }

    .nav-link:hover {
        transform: none;
    }

    .sidebar-footer {
        grid-column: 1 / -1;
        text-align: left;
        margin-top: 12px;
        padding-top: 14px;
    }
    
    .main-content {
        padding: 34px 22px;
    }

    .hero {
        padding: 24px 18px;
        margin-bottom: 44px;
    }

    .hero-cards {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 22px 18px;
        margin-bottom: 44px;
    }

    .awards-gallery-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .pub-item {
        flex-direction: column;
        gap: 20px;
        padding: 25px;
    }

    .pub-meta {
        flex-direction: row;
        justify-content: flex-start;
        width: 100%;
    }

    .pub-image {
        width: 132px;
        height: 132px; /* keep thumbnails square */
    }
}

@media (max-width: 600px) {
    .section-title {
        font-size: 2rem;
    }

    .lead-text {
        font-size: 1.1rem;
    }

    .pub-title {
        font-size: 1.15rem;
    }

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

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation: none !important; transition: none !important; }
}
