/* =========================================================
   HARANATH RAKSHIT — ACADEMIC PORTFOLIO DESIGN SYSTEM
   ---------------------------------------------------------
   1. Design Tokens & Base Typography
   2. Sticky Institutional Header & Progress Hairline
   3. Hero Dossier Header
   4. Academic Sections (Profile, Journey, Teaching,
      Honors, Research Flowchart, Publications, Skills,
      Profiles, Contact, Footer, Quick-Jump Index, Toast)
   5. BibTeX Preview Modal (Native Top-Layer <dialog>)
   6. Executive Academic CV Studio Modal (A4 Typesetting)
   7. Responsive Breakpoints & Reduced Motion
   ========================================================= */
:root {
    --bg-canvas: #FFFFFF;
    --bg-surface: #F8FAFC;
    --bg-subtle: #F1F5F9;
    --text-ink: #0F172A;
    --text-muted: #475569;
    --text-subtle: #64748B;
    --accent-oxford: #1E3A8A;
    --accent-oxford-hover: #172554;
    --accent-oxford-tint: #EFF6FF;
    --accent-oxford-border: rgba(30, 58, 138, 0.22);
    --border-hairline: #E2E8F0;
    --border-strong: #CBD5E1;

    --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --max-dossier: 940px;

    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 2px 8px -2px rgba(15, 23, 42, 0.06), 0 1px 3px -1px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 10px 26px -6px rgba(15, 23, 42, 0.08), 0 4px 10px -4px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 22px 48px -12px rgba(15, 23, 42, 0.22);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg-canvas);
    color: var(--text-ink);
    font-family: var(--font-sans);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "kern" 1, "liga" 1;
    overflow-x: hidden;
}

body.modal-open {
    overflow: hidden;
}

::selection {
    background-color: var(--accent-oxford-tint);
    color: var(--accent-oxford);
}

a {
    color: var(--accent-oxford);
    text-decoration: none;
    transition: color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease, transform 0.16s var(--ease-out);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
pre:focus-visible {
    outline: 2px solid var(--accent-oxford);
    outline-offset: 2px;
}

.visually-hidden:where(:not(:focus-within, :active)) {
    position: absolute !important;
    clip-path: inset(50%) !important;
    overflow: hidden !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    white-space: nowrap !important;
}

.skip-link:focus {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 200;
    padding: 0.55rem 0.95rem;
    background-color: var(--accent-oxford);
    color: #FFFFFF;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow-md);
}

.container {
    width: 100%;
    max-width: var(--max-dossier);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.editorial-link {
    color: var(--accent-oxford);
    text-decoration: underline;
    text-decoration-color: rgba(30, 58, 138, 0.32);
    text-underline-offset: 3px;
}
button.editorial-link {
    font-size: inherit;
}
.editorial-link:hover {
    color: var(--accent-oxford-hover);
    text-decoration-color: var(--accent-oxford);
}

/* =========================================================
   STICKY INSTITUTIONAL HEADER & PROGRESS HAIRLINE
   ========================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-hairline);
    transition: box-shadow 0.22s ease, background-color 0.22s ease;
}

.site-header.is-scrolled {
    background-color: rgba(255, 255, 255, 0.96);
    box-shadow: 0 4px 20px -6px rgba(15, 23, 42, 0.08);
}

.scroll-progress-track {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: transparent;
    pointer-events: none;
    overflow: hidden;
}

.scroll-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-oxford), #3B82F6);
    transition: width 0.08s linear;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.82rem 0;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--text-ink);
    flex-shrink: 0;
}
.brand-mark:hover {
    color: var(--accent-oxford);
}

.monogram {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--accent-oxford-border);
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, #FFFFFF 0%, var(--accent-oxford-tint) 100%);
    font-family: var(--font-serif);
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--accent-oxford);
    letter-spacing: 0.02em;
    box-shadow: var(--shadow-xs);
}

.brand-name {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 1.05rem;
    font-size: 0.81rem;
    font-weight: 500;
    color: var(--text-muted);
}

.desktop-nav a {
    position: relative;
    color: var(--text-muted);
    padding: 0.32rem 0.1rem;
    white-space: nowrap;
}

.desktop-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1.5px;
    background-color: var(--accent-oxford);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s var(--ease-out);
}

.desktop-nav a:hover,
.desktop-nav a.active,
.desktop-nav a[aria-current="page"] {
    color: var(--accent-oxford);
}

.desktop-nav a[aria-current="page"] {
    font-weight: 600;
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after,
.desktop-nav a[aria-current="page"]::after {
    transform: scaleX(1);
}

.header-cv-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    height: 32px;
    padding: 0 0.72rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--accent-oxford);
    background-color: var(--accent-oxford-tint);
    border: 1px solid var(--accent-oxford-border);
    border-radius: var(--radius-sm);
    white-space: nowrap;
}
.header-cv-btn:hover {
    background-color: var(--accent-oxford);
    border-color: var(--accent-oxford);
    color: #FFFFFF;
}

.header-actions {
    display: none;
    align-items: center;
    gap: 0.45rem;
}

.mobile-cv-quick {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    height: 36px;
    padding: 0 0.72rem;
    font-family: var(--font-mono);
    font-size: 0.73rem;
    font-weight: 500;
    color: var(--accent-oxford);
    background-color: var(--accent-oxford-tint);
    border: 1px solid var(--accent-oxford-border);
    border-radius: var(--radius-sm);
}
.mobile-cv-quick:active {
    transform: scale(0.98);
}

.mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-sm);
    background-color: var(--bg-surface);
    color: var(--text-ink);
}
.mobile-toggle:active {
    background-color: var(--bg-subtle);
}

.mobile-drawer {
    display: none;
    border-top: 1px solid var(--border-hairline);
    background-color: rgba(255, 255, 255, 0.98);
    padding: 0.95rem 1.5rem 1.25rem;
    box-shadow: var(--shadow-md);
}
.mobile-drawer.open {
    display: block;
    animation: drawerFade 0.18s var(--ease-out);
}

@keyframes drawerFade {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.35rem 0.85rem;
    font-size: 0.86rem;
    font-weight: 500;
}
.mobile-grid a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-muted);
    padding: 0.48rem 0.55rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
}
.mobile-grid a:hover,
.mobile-grid a:active,
.mobile-grid a[aria-current="page"] {
    background-color: var(--accent-oxford-tint);
    color: var(--accent-oxford);
}
.mobile-grid a[aria-current="page"] {
    border-color: var(--accent-oxford-border);
    font-weight: 600;
}
.mobile-grid a span.m-num {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-subtle);
}

/* =========================================================
   HERO DOSSIER HEADER
   ========================================================= */
.hero-section {
    position: relative;
    padding: 3.5rem 0 3rem;
    border-bottom: 1px solid var(--border-hairline);
    background: radial-gradient(circle at 88% 12%, rgba(239, 246, 255, 0.68) 0%, rgba(255, 255, 255, 0) 56%);
}

.hero-layout {
    display: flex;
    align-items: flex-start;
    gap: 2.35rem;
}

.portrait-frame {
    flex-shrink: 0;
    width: 152px;
    height: 152px;
    padding: 5px;
    background-color: var(--bg-canvas);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.portrait-frame:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -8px rgba(15, 23, 42, 0.12);
}

.portrait-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 9px;
    display: block;
    background-color: var(--bg-subtle);
}

.hero-content {
    flex: 1;
    min-width: 0;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-oxford);
    margin-bottom: 0.45rem;
}

.hero-kicker::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent-oxford);
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2.05rem, 4.2vw, 2.75rem);
    font-weight: 500;
    line-height: 1.13;
    letter-spacing: -0.018em;
    color: var(--text-ink);
    margin-bottom: 0.45rem;
}

.hero-subtitle {
    font-size: 1.01rem;
    font-weight: 600;
    color: var(--text-ink);
    margin-bottom: 0.35rem;
}

.hero-affiliation {
    font-size: 0.93rem;
    color: var(--text-muted);
    margin-bottom: 1.35rem;
    max-width: 64ch;
}

.hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.48rem;
    min-height: 38px;
    padding: 0.48rem 0.95rem;
    font-size: 0.82rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-hairline);
    background-color: var(--bg-surface);
    color: var(--text-ink);
    box-shadow: var(--shadow-xs);
    transition: all 0.18s var(--ease-out);
}

.pill-btn:hover {
    border-color: var(--accent-oxford);
    color: var(--accent-oxford);
    background-color: var(--bg-canvas);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.pill-btn:active {
    transform: translateY(0);
}

.pill-btn.pill-accent {
    background-color: var(--accent-oxford);
    border-color: var(--accent-oxford);
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.22);
}
.pill-btn.pill-accent:hover {
    background-color: var(--accent-oxford-hover);
    border-color: var(--accent-oxford-hover);
    color: #FFFFFF;
    box-shadow: 0 6px 16px rgba(30, 58, 138, 0.28);
}

/* =========================================================
   ACADEMIC SECTIONS
   ========================================================= */
.dossier-section {
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-hairline);
    scroll-margin-top: 4.5rem;
}

.dossier-section:last-of-type {
    border-bottom: none;
}

.section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.65rem;
}

.section-number {
    font-family: var(--font-mono);
    font-size: 0.73rem;
    font-weight: 500;
    color: var(--accent-oxford);
    letter-spacing: 0.07em;
    display: block;
    margin-bottom: 0.22rem;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(1.48rem, 2.8vw, 1.72rem);
    font-weight: 500;
    letter-spacing: -0.012em;
    color: var(--text-ink);
    line-height: 1.22;
}

.prose-block p {
    font-size: 0.985rem;
    color: var(--text-ink);
    line-height: 1.8;
    margin-bottom: 1rem;
}
.prose-block p:last-child {
    margin-bottom: 0;
}

/* Native Inline Research Domain Pills & Typographic Paradigm Statement */
.profile-pills-row {
    margin-top: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.profile-topic-pill {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent-oxford);
    background-color: var(--accent-oxford-tint);
    border: 1px solid var(--accent-oxford-border);
    padding: 0.3rem 0.78rem;
    border-radius: 999px;
}

.compact-paradigm-line {
    margin-top: 1.15rem;
    padding: 0.85rem 1.05rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-left: 3px solid var(--accent-oxford);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.855rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.compact-paradigm-line strong {
    color: var(--text-ink);
    font-weight: 600;
    letter-spacing: 0.01em;
}

.compact-paradigm-line em {
    font-style: italic;
    color: var(--text-subtle);
}

/* Filter Tabs */
.filter-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    background-color: var(--bg-surface);
    padding: 0.28rem;
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-sm);
}

.filter-tab {
    padding: 0.38rem 0.76rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: 4px;
    white-space: nowrap;
    transition: all 0.16s ease;
}

.filter-tab:hover {
    color: var(--text-ink);
}

.filter-tab.active {
    background-color: var(--bg-canvas);
    color: var(--accent-oxford);
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--border-hairline);
}

/* Journey Timeline */
.journey-list {
    display: flex;
    flex-direction: column;
}

.journey-row {
    display: grid;
    grid-template-columns: 155px 1fr;
    gap: 1.25rem;
    padding: 1.12rem 0.5rem;
    border-bottom: 1px solid var(--border-hairline);
    border-radius: var(--radius-sm);
    transition: background-color 0.16s ease;
}

.journey-row:hover {
    background-color: rgba(248, 250, 252, 0.75);
}

.journey-row:first-child {
    padding-top: 0.35rem;
}

.journey-row:last-child {
    border-bottom: none;
    padding-bottom: 0.25rem;
}

.journey-row.hidden-item {
    display: none;
}

.journey-period {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--accent-oxford);
    padding-top: 0.14rem;
}

.journey-degree {
    font-size: 0.99rem;
    font-weight: 600;
    color: var(--text-ink);
    margin-bottom: 0.22rem;
}

.journey-inst {
    font-size: 0.89rem;
    color: var(--text-muted);
}

.journey-note {
    margin-top: 0.42rem;
    font-size: 0.825rem;
    color: var(--text-subtle);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-left: 2.5px solid var(--accent-oxford);
    padding: 0.35rem 0.7rem;
    display: inline-block;
    border-radius: 0 5px 5px 0;
    line-height: 1.5;
}

/* Compact Teaching Grid */
.teaching-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.teaching-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.25rem;
    box-shadow: var(--shadow-xs);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.teaching-card:hover {
    background-color: var(--bg-canvas);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
}

.teaching-session {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 500;
    color: var(--accent-oxford);
    margin-bottom: 0.65rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid var(--border-hairline);
}

.course-list {
    list-style: none;
    display: grid;
    gap: 0.62rem;
    font-size: 0.845rem;
    line-height: 1.48;
    color: var(--text-ink);
}

.course-code {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.71rem;
    font-weight: 500;
    color: var(--accent-oxford);
    background-color: var(--accent-oxford-tint);
    border: 1px solid rgba(30, 58, 138, 0.14);
    padding: 0.1rem 0.42rem;
    border-radius: 4px;
    margin-right: 0.32rem;
    vertical-align: baseline;
}

.course-sem {
    display: block;
    font-size: 0.765rem;
    color: var(--text-muted);
    margin-top: 0.14rem;
}

/* Institutional Outreach & Inter-Departmental Service */
.outreach-box {
    margin-top: 1.05rem;
    background-color: var(--bg-canvas);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.25rem;
    box-shadow: var(--shadow-xs);
}

.outreach-heading {
    font-family: var(--font-mono);
    font-size: 0.73rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-oxford);
    margin-bottom: 0.7rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid var(--border-hairline);
}

.outreach-grid {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    font-size: 0.845rem;
    line-height: 1.5;
    color: var(--text-ink);
}

.outreach-sub {
    display: block;
    font-size: 0.765rem;
    color: var(--text-muted);
    margin-top: 0.16rem;
}

/* Honors & Fellowships Grid */
.honors-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.honor-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.75rem;
    box-shadow: var(--shadow-xs);
    transition: transform 0.18s var(--ease-out), border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.honor-card:hover {
    transform: translateY(-2px);
    background-color: var(--bg-canvas);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
}

.honor-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}

.honor-emblem {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background-color: var(--accent-oxford-tint);
    border: 1px solid var(--accent-oxford-border);
    color: var(--accent-oxford);
}

.honor-year {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 500;
    color: var(--accent-oxford);
    background-color: var(--accent-oxford-tint);
    border: 1px solid rgba(30, 58, 138, 0.15);
    padding: 0.18rem 0.58rem;
    border-radius: 999px;
}

.honor-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--text-ink);
}

.honor-org {
    font-size: 0.81rem;
    color: var(--text-muted);
}

/* Sequential Flowchart Layout for Research Interests */
.research-flowchart {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.flow-step-card {
    background-color: var(--bg-canvas);
    border: 1px solid var(--border-hairline);
    border-left: 3px solid var(--accent-oxford);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.3rem;
    box-shadow: var(--shadow-xs);
    transition: transform 0.18s var(--ease-out), border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.flow-step-card:hover {
    transform: translateX(3px);
    border-color: var(--border-strong);
    border-left-color: var(--accent-oxford);
    background-color: var(--bg-surface);
    box-shadow: var(--shadow-sm);
}

.flow-step-header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.3rem;
}

.flow-step-badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--accent-oxford);
    background-color: var(--accent-oxford-tint);
    padding: 0.1rem 0.42rem;
    border-radius: 4px;
}

.flow-step-card h3 {
    font-size: 0.99rem;
    font-weight: 600;
    color: var(--text-ink);
}

.flow-step-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.flow-connector {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    user-select: none;
}

.flow-connector::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background-color: var(--border-strong);
    transform: translateX(-50%);
}

.flow-connector-node {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--bg-canvas);
    border: 1px solid var(--border-strong);
    color: var(--accent-oxford);
}

/* Scholarly Contributions */
.pub-group {
    margin-bottom: 1.85rem;
}
.pub-group:last-child {
    margin-bottom: 0;
}
.pub-group.hidden-group {
    display: none;
}

.pub-group-title {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-hairline);
    margin-bottom: 0.9rem;
}

.pub-item {
    padding: 1rem 1.15rem;
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    background-color: var(--bg-canvas);
    margin-bottom: 0.7rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: var(--shadow-xs);
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}
.pub-item:last-child {
    margin-bottom: 0;
}
.pub-item:hover {
    background-color: var(--bg-surface);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
}
.pub-item.hidden-pub {
    display: none;
}

.pub-main {
    flex: 1;
    min-width: 0;
}

.pub-badges-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
}

.pub-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--accent-oxford);
    background-color: var(--accent-oxford-tint);
    border: 1px solid rgba(30, 58, 138, 0.12);
    padding: 0.14rem 0.52rem;
    border-radius: 4px;
}

.pub-title {
    font-size: 0.955rem;
    font-weight: 600;
    color: var(--text-ink);
    line-height: 1.45;
    margin-bottom: 0.25rem;
}

.pub-authors {
    font-size: 0.835rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.pub-venue {
    font-size: 0.825rem;
    color: var(--text-subtle);
    font-style: italic;
}

.pub-links-inline {
    margin-top: 0.48rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.73rem;
}

.pub-actions {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
}

.bibtex-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 32px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.35rem 0.68rem;
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-sm);
    background-color: var(--bg-surface);
    color: var(--text-ink);
    transition: all 0.16s ease;
    white-space: nowrap;
}
.bibtex-btn:hover {
    border-color: var(--accent-oxford);
    color: var(--accent-oxford);
    background-color: var(--bg-canvas);
}
.bibtex-btn.copied {
    background-color: var(--accent-oxford);
    border-color: var(--accent-oxford);
    color: #FFFFFF;
}

/* Competencies Grid */
.competency-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.competency-box {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.3rem;
    box-shadow: var(--shadow-xs);
}

.competency-box--full {
    grid-column: 1 / -1;
}

.competency-box h3 {
    font-size: 0.93rem;
    font-weight: 600;
    color: var(--accent-oxford);
    margin-bottom: 0.8rem;
    padding-bottom: 0.48rem;
    border-bottom: 1px solid var(--border-hairline);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.48rem;
}

.skill-chip {
    font-size: 0.805rem;
    color: var(--text-ink);
    background-color: var(--bg-canvas);
    border: 1px solid var(--border-hairline);
    padding: 0.3rem 0.68rem;
    border-radius: 5px;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.skill-chip:hover {
    border-color: var(--border-strong);
    color: var(--accent-oxford);
}

.cert-list {
    list-style: none;
    display: grid;
    gap: 0.5rem;
    font-size: 0.855rem;
    color: var(--text-ink);
}
.cert-list li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.cert-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: var(--accent-oxford);
    flex-shrink: 0;
}

/* Scholarly & Professional Profiles Directory */
.profiles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.65rem;
}

.profile-tile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 0.65rem 0.9rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-sm);
    font-size: 0.83rem;
    font-weight: 500;
    color: var(--text-ink);
    box-shadow: var(--shadow-xs);
}
.profile-tile:hover {
    background-color: var(--bg-canvas);
    border-color: var(--accent-oxford);
    color: var(--accent-oxford);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.profile-arrow {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--text-subtle);
    transition: transform 0.16s ease, color 0.16s ease;
}
.profile-tile:hover .profile-arrow {
    color: var(--accent-oxford);
    transform: translate(1px, -1px);
}

/* Contact & Correspondence */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.contact-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    padding: 1.2rem 1.25rem;
    box-shadow: var(--shadow-xs);
}

.contact-card--wide {
    grid-column: span 2;
}

.contact-label {
    font-family: var(--font-mono);
    font-size: 0.71rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-subtle);
    margin-bottom: 0.35rem;
}

.contact-value {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-ink);
    line-height: 1.5;
    word-break: break-word;
}

.contact-email-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border-hairline);
    background-color: var(--bg-surface);
    padding: 2.1rem 0 calc(2.1rem + env(safe-area-inset-bottom));
    margin-top: 1rem;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem 1.25rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* Floating Quick-Jump & Back-to-Top Widget */
.floating-nav-widget {
    position: fixed;
    bottom: calc(1.25rem + env(safe-area-inset-bottom));
    right: 1.25rem;
    z-index: 45;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.toc-popover {
    display: none;
    width: 238px;
    background-color: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 0.7rem 0.8rem;
}
.toc-popover.open {
    display: block;
    animation: drawerFade 0.16s var(--ease-out);
}

.toc-popover-header {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--accent-oxford);
    padding-bottom: 0.42rem;
    margin-bottom: 0.42rem;
    border-bottom: 1px solid var(--border-hairline);
}

.toc-links {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.toc-links a {
    font-size: 0.79rem;
    color: var(--text-muted);
    padding: 0.32rem 0.45rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.toc-links a:hover {
    background-color: var(--accent-oxford-tint);
    color: var(--accent-oxford);
}
.toc-links a span.toc-num {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-subtle);
}

.floating-btn-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.float-pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.38rem;
    height: 38px;
    padding: 0 0.85rem;
    background-color: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    box-shadow: var(--shadow-md);
    font-family: var(--font-mono);
    font-size: 0.73rem;
    font-weight: 500;
    color: var(--text-ink);
    transition: all 0.18s var(--ease-out);
}
.float-pill-btn:hover {
    border-color: var(--accent-oxford);
    color: var(--accent-oxford);
    background-color: var(--bg-canvas);
}

.back-to-top-btn {
    width: 38px;
    padding: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
}
.back-to-top-btn.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: calc(4.5rem + env(safe-area-inset-bottom));
    right: 1.25rem;
    z-index: 120;
    background-color: var(--text-ink);
    color: #FFFFFF;
    padding: 0.72rem 1.1rem;
    border-radius: var(--radius-md);
    font-size: 0.825rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s var(--ease-out);
    max-width: calc(100vw - 2.5rem);
}
.toast.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================
   BIBTEX & CERTIFICATE PREVIEW MODALS (NATIVE <dialog>)
   ========================================================= */
.bibtex-modal-card,
.cert-modal-card {
    margin: auto;
    padding: 0;
    width: min(620px, calc(100vw - 2.5rem));
    max-width: 620px;
    max-height: calc(100dvh - 2.5rem);
    background-color: var(--bg-canvas);
    color: var(--text-ink);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.cert-modal-card {
    width: min(860px, calc(100vw - 2rem));
    max-width: 860px;
}
.bibtex-modal-card[open],
.cert-modal-card[open] {
    display: flex;
    flex-direction: column;
}
.bibtex-modal-card:modal,
.cert-modal-card:modal {
    overscroll-behavior: contain;
}
.bibtex-modal-card::backdrop,
.cert-modal-card::backdrop {
    background-color: rgba(15, 23, 42, 0.64);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    overflow: hidden;
    overscroll-behavior: contain;
}

.bibtex-modal-header {
    padding: 0.95rem 1.25rem;
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-hairline);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.bibtex-modal-title {
    font-family: var(--font-serif);
    font-size: 1.12rem;
    font-weight: 500;
    color: var(--text-ink);
}

.bibtex-modal-body {
    padding: 1.15rem 1.25rem;
    overflow-y: auto;
}

.bibtex-code-block {
    width: 100%;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-sm);
    padding: 0.95rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.775rem;
    line-height: 1.58;
    color: var(--text-ink);
    overflow-x: auto;
    white-space: pre;
}

.bibtex-modal-footer {
    padding: 0.85rem 1.25rem;
    border-top: 1px solid var(--border-hairline);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.cert-modal-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.cert-modal-img {
    display: block;
    max-width: 100%;
    max-height: calc(100dvh - 13.5rem);
    width: auto;
    height: auto;
    object-fit: contain;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.cert-modal-caption {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
}

.cert-modal-footer {
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.cert-modal-note {
    font-family: var(--font-mono);
    font-size: 0.71rem;
    color: var(--text-subtle);
}

/* =========================================================
   EXECUTIVE ACADEMIC CV STUDIO MODAL (A4 TYPESETTING)
   ========================================================= */
.cv-studio-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    background-color: rgba(15, 23, 42, 0.76);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: none;
    flex-direction: column;
    overscroll-behavior: contain;
}
.cv-studio-overlay.open {
    display: flex;
}

.cv-toolbar {
    background-color: #FFFFFF;
    border-bottom: 1px solid var(--border-hairline);
    padding: 0.7rem 1.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    z-index: 95;
}

.cv-toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.cv-studio-badge {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 500;
    color: var(--accent-oxford);
    background-color: var(--accent-oxford-tint);
    border: 1px solid var(--accent-oxford-border);
    padding: 0.25rem 0.62rem;
    border-radius: 4px;
}

.cv-toolbar-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.studio-ctrl-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    min-height: 34px;
    padding: 0.38rem 0.72rem;
    font-size: 0.78rem;
    font-weight: 500;
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-sm);
    background-color: var(--bg-surface);
    color: var(--text-ink);
    white-space: nowrap;
    transition: all 0.15s ease;
}
.studio-ctrl-btn:hover {
    border-color: var(--accent-oxford);
    color: var(--accent-oxford);
    background-color: #FFFFFF;
}
.studio-ctrl-btn.active-toggle {
    border-color: rgba(30, 58, 138, 0.35);
    background-color: var(--accent-oxford-tint);
    color: var(--accent-oxford);
}

.studio-print-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 34px;
    padding: 0.42rem 0.92rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    background-color: var(--accent-oxford);
    color: #FFFFFF;
    white-space: nowrap;
}
.studio-print-btn:hover {
    background-color: var(--accent-oxford-hover);
}

.studio-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 1rem;
    flex-shrink: 0;
}
.studio-close-btn:hover {
    color: var(--text-ink);
    border-color: var(--text-ink);
}

.cv-scroll-area {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 2rem 1.25rem 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.cv-page-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.71rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #E2E8F0;
    background-color: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 0.3rem 0.78rem;
    border-radius: 999px;
    margin-bottom: -1.25rem;
    z-index: 2;
    text-align: center;
}

.a4-paper {
    width: 100%;
    max-width: 210mm;
    min-height: 297mm;
    height: auto;
    background-color: #FFFFFF;
    color: #0F172A;
    padding: 15mm 17mm 16mm;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    border-radius: 2px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.a4-paper.theme-latex {
    font-family: var(--font-serif);
}

.a4-paper.theme-sans {
    font-family: var(--font-sans);
}

.cv-running-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.5rem;
    margin-bottom: 0.9rem;
    border-bottom: 1.5px solid #0F172A;
    font-size: 0.82rem;
    gap: 0.5rem;
}

.cv-running-header strong {
    font-family: var(--font-serif);
    font-size: 1rem;
    color: #0F172A;
}

.cv-running-header span {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: #475569;
}

.cv-doc-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1.5px solid #0F172A;
    margin-bottom: 0.95rem;
}

.cv-doc-title {
    font-family: var(--font-serif);
    font-size: 1.85rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #0F172A;
    line-height: 1.15;
    margin-bottom: 0.2rem;
}

.cv-doc-role {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1E3A8A;
    margin-bottom: 0.2rem;
}

.cv-doc-affil {
    font-size: 0.82rem;
    color: #334155;
    margin-bottom: 0.38rem;
}

.cv-doc-meta {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #475569;
    line-height: 1.55;
    word-break: break-word;
}

.cv-doc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.32rem;
    margin-top: 0.45rem;
}

.cv-doc-tag {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    padding: 0.08rem 0.4rem;
    border: 1px solid #CBD5E1;
    border-radius: 3px;
    color: #1E3A8A;
    background-color: #F8FAFC;
}

.cv-doc-photo {
    width: 84px;
    height: 84px;
    border-radius: 6px;
    object-fit: cover;
    object-position: center top;
    border: 1px solid #CBD5E1;
    flex-shrink: 0;
}

.cv-block {
    margin-bottom: 0.82rem;
    break-inside: avoid;
}

.cv-block-heading {
    font-family: var(--font-serif);
    font-size: 0.94rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #1E3A8A;
    border-bottom: 1px solid #CBD5E1;
    padding-bottom: 0.14rem;
    margin-bottom: 0.42rem;
}

.cv-summary-text {
    font-size: 0.825rem;
    line-height: 1.5;
    color: #1E293B;
}

.cv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.81rem;
}

.cv-table td {
    padding: 0.2rem 0;
    vertical-align: top;
    line-height: 1.4;
}

.cv-table td.cv-year {
    width: 115px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: #334155;
    padding-right: 0.65rem;
    white-space: nowrap;
}

.cv-list {
    padding-left: 1.15rem;
    font-size: 0.815rem;
    line-height: 1.45;
    color: #1E293B;
}

.cv-list li {
    margin-bottom: 0.22rem;
}

.cv-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.32rem 1.15rem;
    font-size: 0.8rem;
    line-height: 1.4;
}

.cv-declaration {
    font-size: 0.79rem;
    font-style: italic;
    color: #334155;
    background: #F8FAFC;
    border-left: 2.5px solid #1E3A8A;
    padding: 0.42rem 0.7rem;
}

.cv-doc-footer {
    margin-top: auto;
    padding-top: 0.6rem;
    border-top: 1px solid #CBD5E1;
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: #64748B;
}

/* =========================================================
   MULTI-PAGE BANNER, DOSSIER GATEWAY & PAGER
   ========================================================= */
.page-banner {
    padding: 2.35rem 0 1.85rem;
    background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-canvas) 100%);
    border-bottom: 1px solid var(--border-hairline);
}

.page-breadcrumb {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-subtle);
    margin-bottom: 0.65rem;
}

.page-title {
    font-family: var(--font-serif);
    font-size: clamp(1.75rem, 3.2vw, 2.35rem);
    font-weight: 500;
    line-height: 1.18;
    letter-spacing: -0.02em;
    color: var(--text-ink);
    margin: 0 0 0.55rem;
}

.page-lead {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-muted);
    max-width: 72ch;
    margin: 0;
}

.gateway-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.15rem;
}

.gateway-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.35rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-xs);
    transition: border-color 0.2s var(--ease-out), background-color 0.2s var(--ease-out), transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.gateway-card:hover,
.gateway-card:focus-visible {
    border-color: var(--accent-oxford-border);
    background: var(--bg-canvas);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.gateway-code {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-oxford);
    margin-bottom: 0.45rem;
}

.gateway-title {
    font-family: var(--font-serif);
    font-size: 1.24rem;
    font-weight: 500;
    color: var(--text-ink);
    margin: 0 0 0.45rem;
    line-height: 1.3;
}

.gateway-desc {
    font-size: 0.91rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
}

.gateway-link {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--accent-oxford);
}

.page-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2.25rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--border-hairline);
}

.pager-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.62rem 1.05rem;
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text-ink);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.pager-link:hover,
.pager-link:focus-visible {
    border-color: var(--accent-oxford);
    background: var(--accent-oxford-tint);
    color: var(--accent-oxford);
}

.pager-next {
    margin-left: auto;
    border-color: var(--accent-oxford-border);
    background: var(--accent-oxford-tint);
    color: var(--accent-oxford);
    font-weight: 600;
}

/* =========================================================
   RESPONSIVE BREAKPOINTS (TABLET & MOBILE)
   ========================================================= */
@media (max-width: 960px) {
    .desktop-nav {
        display: none;
    }
    .header-actions {
        display: flex;
    }
    .gateway-grid,
    .teaching-grid,
    .honors-grid {
        grid-template-columns: 1fr;
    }
    .profiles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .contact-card--wide {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .filter-tabs {
        display: flex;
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .filter-tabs::-webkit-scrollbar {
        display: none;
    }

    .cv-toolbar {
        padding: 0.6rem 0.9rem;
    }
    .cv-toolbar-controls {
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.15rem;
    }
    .cv-toolbar-controls::-webkit-scrollbar {
        display: none;
    }
    .cv-scroll-area {
        padding: 1.25rem 0.75rem 3rem;
        gap: 1.5rem;
    }
    .a4-paper {
        min-height: auto;
        padding: 1.35rem 1.15rem;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 1.1rem;
    }
    .hero-section {
        padding: 2.25rem 0 2.15rem;
    }
    .hero-layout {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.25rem;
    }
    .portrait-frame {
        width: 126px;
        height: 126px;
    }
    .hero-kicker {
        justify-content: center;
    }
    .hero-pills {
        width: 100%;
        flex-direction: column;
    }
    .hero-pills .pill-btn {
        width: 100%;
        min-height: 42px;
    }
    .dossier-section {
        padding: 2.25rem 0;
    }
    .journey-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
    .competency-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .contact-card--wide {
        grid-column: span 1;
    }
    .page-pager {
        flex-direction: column;
        align-items: stretch;
    }
    .pager-link {
        justify-content: center;
    }
    .pager-next {
        margin-left: 0;
    }
    .pub-item {
        flex-direction: column;
        padding: 0.95rem 1rem;
    }
    .pub-actions {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        padding-top: 0.35rem;
        border-top: 1px dashed var(--border-hairline);
    }
    .pub-actions .bibtex-btn {
        flex: 1;
        min-height: 36px;
    }
    .cv-doc-header {
        flex-direction: column-reverse;
    }
    .cv-table td.cv-year {
        width: 88px;
        font-size: 0.69rem;
    }
    .cv-two-col {
        grid-template-columns: 1fr;
    }
    .cv-running-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

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