/* ============================================
   Theme system
   ============================================ */

html[data-theme] body,
html[data-theme] .navbar,
html[data-theme] .section-alt,
html[data-theme] .info-card,
html[data-theme] .teaching-block,
html[data-theme] .service-block,
html[data-theme] .pub-link,
html[data-theme] .filter-btn,
html[data-theme] .tag,
html[data-theme] .theme-picker select {
    transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

/* Midnight: dark navy, warm gold, classic academic */
html[data-theme="midnight"] {
    color-scheme: dark;
    --primary: #f4c95d;
    --primary-light: #ffd97a;
    --accent: #e07a5f;
    --accent-light: #f2a38c;
    --text: #edf2f7;
    --text-light: #b8c4d6;
    --text-muted: #8292a8;
    --bg: #080e18;
    --bg-alt: #0d1624;
    --surface: #111d2f;
    --surface-alt: #0f1929;
    --surface-raised: #15243a;
    --border: #253750;
    --on-primary: #08111d;
    --navbar-bg: rgba(8, 14, 24, 0.86);
    --nav-mobile-bg: #0d1624;
    --hero-bg: radial-gradient(circle at 78% 20%, rgba(244, 201, 93, 0.15), transparent 28%), radial-gradient(circle at 18% 80%, rgba(224, 122, 95, 0.09), transparent 30%), linear-gradient(135deg, #0a1220 0%, #0d1728 55%, #07101b 100%);
    --footer-bg: #050a12;
    --footer-text: #edf2f7;
    --footer-muted: #a7b5c8;
    --footer-border: rgba(244, 201, 93, 0.2);
    --abstract-bg: rgba(17, 29, 47, 0.8);
    --hover-bg: rgba(244, 201, 93, 0.06);
    --photo-border: #f4c95d;
    --status-bg: #3a2f13;
    --status-text: #ffd97a;
    --award-bg: #3d2020;
    --theme-select-bg: #111d2f;
    --theme-select-text: #edf2f7;
    --theme-select-border: #334a69;
    --shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.45);
    --radius: 12px;
    --font-heading: 'Merriweather', Georgia, serif;
}

html[data-theme="midnight"] .section-title::after {
    content: '';
    display: block;
    width: 56px;
    height: 3px;
    margin-top: 0.75rem;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

html[data-theme="midnight"] .profile-photo {
    box-shadow: 0 0 0 7px rgba(244, 201, 93, 0.08), var(--shadow-lg);
}

/* Obsidian: near-black surfaces, electric blue and violet */
html[data-theme="obsidian"] {
    color-scheme: dark;
    --primary: #8ab4f8;
    --primary-light: #a9c8ff;
    --accent: #c792ea;
    --accent-light: #dbb5f5;
    --text: #e7eaf0;
    --text-light: #b8c0d0;
    --text-muted: #7f8a9e;
    --bg: #07080c;
    --bg-alt: #0b0d13;
    --surface: #11141c;
    --surface-alt: #0e1118;
    --surface-raised: #151923;
    --border: #252b38;
    --on-primary: #07080c;
    --navbar-bg: rgba(7, 8, 12, 0.9);
    --nav-mobile-bg: #0b0d13;
    --hero-bg: radial-gradient(circle at 75% 25%, rgba(138, 180, 248, 0.18), transparent 26%), radial-gradient(circle at 20% 75%, rgba(199, 146, 234, 0.12), transparent 28%), #07080c;
    --footer-bg: #05060a;
    --footer-text: #e7eaf0;
    --footer-muted: #8e98aa;
    --footer-border: rgba(138, 180, 248, 0.18);
    --abstract-bg: rgba(17, 20, 28, 0.85);
    --hover-bg: rgba(138, 180, 248, 0.06);
    --photo-border: #8ab4f8;
    --status-bg: #172438;
    --status-text: #a9c8ff;
    --award-bg: #241838;
    --theme-select-bg: #11141c;
    --theme-select-text: #e7eaf0;
    --theme-select-border: #2e3646;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 14px 34px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
    --radius: 4px;
    --control-radius: 3px;
    --font-heading: 'Space Grotesk', 'Inter', sans-serif;
}

html[data-theme="obsidian"] .profile-photo {
    border-width: 2px;
    border-radius: 24px;
    filter: grayscale(0.15) contrast(1.05);
}

html[data-theme="obsidian"] .section-title {
    letter-spacing: -0.03em;
}

/* Terminal: green phosphor, monospace, command-line academic */
html[data-theme="terminal"] {
    color-scheme: dark;
    --primary: #61ff9c;
    --primary-light: #9dffbf;
    --accent: #ffd166;
    --accent-light: #ffe3a3;
    --text: #c9ffd8;
    --text-light: #8fdfa8;
    --text-muted: #5fae78;
    --bg: #020604;
    --bg-alt: #04100a;
    --surface: #07160e;
    --surface-alt: #05120b;
    --surface-raised: #0a1e13;
    --border: #1b4d2e;
    --on-primary: #021007;
    --navbar-bg: rgba(2, 6, 4, 0.92);
    --nav-mobile-bg: #04100a;
    --hero-bg: linear-gradient(rgba(97, 255, 156, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(97, 255, 156, 0.035) 1px, transparent 1px), radial-gradient(circle at 75% 20%, rgba(97, 255, 156, 0.12), transparent 30%), #020604;
    --footer-bg: #010402;
    --footer-text: #c9ffd8;
    --footer-muted: #6fbd88;
    --footer-border: rgba(97, 255, 156, 0.24);
    --abstract-bg: rgba(7, 22, 14, 0.85);
    --hover-bg: rgba(97, 255, 156, 0.07);
    --photo-border: #61ff9c;
    --status-bg: #17351f;
    --status-text: #ffd166;
    --award-bg: #3a2212;
    --theme-select-bg: #07160e;
    --theme-select-text: #c9ffd8;
    --theme-select-border: #2a6b43;
    --shadow: 0 0 0 1px rgba(97, 255, 156, 0.08), 0 12px 34px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 0 36px rgba(97, 255, 156, 0.12), 0 22px 54px rgba(0, 0, 0, 0.55);
    --radius: 0;
    --control-radius: 0;
    --font-body: var(--font-mono);
    --font-heading: var(--font-mono);
}

html[data-theme="terminal"] body {
    background-image: repeating-linear-gradient(0deg, rgba(97, 255, 156, 0.03) 0, rgba(97, 255, 156, 0.03) 1px, transparent 1px, transparent 4px);
}

html[data-theme="terminal"] .hero {
    background-size: 32px 32px, 32px 32px, auto, auto;
}

html[data-theme="terminal"] .section-title {
    font-size: 1.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

html[data-theme="terminal"] .section-title::before {
    content: '> ';
    color: var(--accent);
}

html[data-theme="terminal"] .profile-photo {
    border-radius: 0;
    filter: grayscale(1) sepia(0.35) hue-rotate(65deg) saturate(2.1) brightness(0.92);
}

html[data-theme="terminal"] .btn,
html[data-theme="terminal"] .tag,
html[data-theme="terminal"] .filter-btn,
html[data-theme="terminal"] .pub-link {
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

html[data-theme="terminal"] .pub-item:hover {
    border-left: 2px solid var(--primary);
}

/* Blueprint: dark drafting table, grid lines, technical type */
html[data-theme="blueprint"] {
    color-scheme: dark;
    --primary: #7dd3fc;
    --primary-light: #bae6fd;
    --accent: #fbbf24;
    --accent-light: #fde68a;
    --text: #e6f3ff;
    --text-light: #b4d3ea;
    --text-muted: #7fa6c4;
    --bg: #07192a;
    --bg-alt: #0a2137;
    --surface: #0d2a44;
    --surface-alt: #0b243c;
    --surface-raised: #103351;
    --border: #1f527d;
    --on-primary: #061727;
    --navbar-bg: rgba(7, 25, 42, 0.88);
    --nav-mobile-bg: #0a2137;
    --hero-bg: radial-gradient(circle at 78% 22%, rgba(125, 211, 252, 0.16), transparent 28%), linear-gradient(rgba(125, 211, 252, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(125, 211, 252, 0.08) 1px, transparent 1px), #07192a;
    --footer-bg: #04101c;
    --footer-text: #e6f3ff;
    --footer-muted: #9fc2dc;
    --footer-border: rgba(125, 211, 252, 0.25);
    --abstract-bg: rgba(13, 42, 68, 0.82);
    --hover-bg: rgba(125, 211, 252, 0.07);
    --photo-border: #7dd3fc;
    --status-bg: #3c2d0b;
    --status-text: #fde68a;
    --award-bg: #3a1d26;
    --theme-select-bg: #0d2a44;
    --theme-select-text: #e6f3ff;
    --theme-select-border: #2b6491;
    --shadow: 0 0 0 1px rgba(125, 211, 252, 0.1), 0 12px 30px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 0 0 1px rgba(125, 211, 252, 0.15), 0 24px 58px rgba(0, 0, 0, 0.5);
    --radius: 2px;
    --control-radius: 2px;
    --font-heading: 'IBM Plex Mono', 'Courier New', monospace;
}

html[data-theme="blueprint"] body {
    background-image: linear-gradient(rgba(125, 211, 252, 0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(125, 211, 252, 0.055) 1px, transparent 1px);
    background-size: 32px 32px;
}

html[data-theme="blueprint"] .hero {
    background-size: auto, 64px 64px, 64px 64px, auto;
}

html[data-theme="blueprint"] .profile-photo {
    border: 2px dashed var(--primary);
    border-radius: 0;
    filter: saturate(0.8) contrast(1.05);
}

html[data-theme="blueprint"] .info-card,
html[data-theme="blueprint"] .teaching-block,
html[data-theme="blueprint"] .service-block {
    border-style: dashed;
}

html[data-theme="blueprint"] .section-title,
html[data-theme="blueprint"] .pub-category {
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

html[data-theme="blueprint"] .tag,
html[data-theme="blueprint"] .filter-btn,
html[data-theme="blueprint"] .pub-link {
    border-radius: 0;
}

/* Paper: warm off-white, quiet typography, bookish */
html[data-theme="paper"] {
    color-scheme: light;
    --primary: #4a3928;
    --primary-light: #6b543c;
    --accent: #a34a3a;
    --accent-light: #bd6554;
    --text: #2b2620;
    --text-light: #5f5548;
    --text-muted: #746755;
    --bg: #f4efe4;
    --bg-alt: #ece4d4;
    --surface: #fffdf8;
    --surface-alt: #f6f0e4;
    --surface-raised: #fffdf8;
    --border: #d6cbb8;
    --on-primary: #fffdf8;
    --navbar-bg: rgba(244, 239, 228, 0.9);
    --nav-mobile-bg: #ece4d4;
    --hero-bg: radial-gradient(circle at 80% 20%, rgba(163, 74, 58, 0.1), transparent 30%), radial-gradient(circle at 15% 80%, rgba(74, 57, 40, 0.06), transparent 28%), #f4efe4;
    --footer-bg: #3e3226;
    --footer-text: #f8f2e7;
    --footer-muted: #d6c9b4;
    --footer-border: rgba(248, 242, 231, 0.22);
    --abstract-bg: #f6f0e4;
    --hover-bg: rgba(74, 57, 40, 0.045);
    --photo-border: #fffdf8;
    --status-bg: #f1e2ba;
    --status-text: #6b4b13;
    --award-bg: #f0d9d3;
    --theme-select-bg: #fffdf8;
    --theme-select-text: #2b2620;
    --theme-select-border: #c9bba6;
    --shadow: 0 2px 0 rgba(74, 57, 40, 0.08), 0 8px 20px rgba(74, 57, 40, 0.08);
    --shadow-lg: 0 16px 36px rgba(74, 57, 40, 0.16);
    --radius: 6px;
    --font-heading: 'Merriweather', Georgia, serif;
}

html[data-theme="paper"] body {
    background-image: radial-gradient(rgba(74, 57, 40, 0.045) 0.6px, transparent 0.6px);
    background-size: 5px 5px;
}

html[data-theme="paper"] .profile-photo {
    box-shadow: 0 0 0 10px rgba(255, 253, 248, 0.55), var(--shadow-lg);
}

/* Swiss: white, black, one red accent, strict minimalism */
html[data-theme="swiss"] {
    color-scheme: light;
    --primary: #111111;
    --primary-light: #333333;
    --accent: #e30613;
    --accent-light: #ff2b36;
    --text: #111111;
    --text-light: #444444;
    --text-muted: #6b6b6b;
    --bg: #ffffff;
    --bg-alt: #f2f2f2;
    --surface: #ffffff;
    --surface-alt: #f7f7f7;
    --surface-raised: #ffffff;
    --border: #d7d7d7;
    --on-primary: #ffffff;
    --navbar-bg: rgba(255, 255, 255, 0.96);
    --nav-mobile-bg: #ffffff;
    --hero-bg: #ffffff;
    --footer-bg: #111111;
    --footer-text: #ffffff;
    --footer-muted: #bbbbbb;
    --footer-border: #333333;
    --abstract-bg: #f2f2f2;
    --hover-bg: #f7f7f7;
    --photo-border: #111111;
    --status-bg: #ffe8e8;
    --status-text: #9d0010;
    --award-bg: #f2f2f2;
    --theme-select-bg: #ffffff;
    --theme-select-text: #111111;
    --theme-select-border: #bbbbbb;
    --shadow: none;
    --shadow-lg: none;
    --radius: 0;
    --control-radius: 0;
    --font-heading: 'Space Grotesk', 'Inter', sans-serif;
}

html[data-theme="swiss"] .section-title {
    padding-bottom: 0.55rem;
    border-bottom: 6px solid var(--accent);
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

html[data-theme="swiss"] .pub-category,
html[data-theme="swiss"] .cv-content h3,
html[data-theme="swiss"] .talks-content h3 {
    border-bottom-width: 1px;
    border-bottom-color: var(--text);
    text-transform: uppercase;
}

html[data-theme="swiss"] .profile-photo {
    border-radius: 0;
    border-width: 2px;
    filter: grayscale(1) contrast(1.1);
}

html[data-theme="swiss"] .btn {
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

html[data-theme="swiss"] .info-card,
html[data-theme="swiss"] .teaching-block,
html[data-theme="swiss"] .service-block,
html[data-theme="swiss"] .tag,
html[data-theme="swiss"] .filter-btn,
html[data-theme="swiss"] .pub-link {
    border-radius: 0;
    box-shadow: none;
}

/* Dracula: purple night, pink and cyan */
html[data-theme="dracula"] {
    color-scheme: dark;
    --primary: #bd93f9;
    --primary-light: #d7b7ff;
    --accent: #ff79c6;
    --accent-light: #ff9ed8;
    --text: #f8f8f2;
    --text-light: #d7d9e6;
    --text-muted: #a6accd;
    --bg: #282a36;
    --bg-alt: #21222c;
    --surface: #343746;
    --surface-alt: #30323f;
    --surface-raised: #3d4052;
    --border: #44475a;
    --on-primary: #1e1f29;
    --navbar-bg: rgba(40, 42, 54, 0.9);
    --nav-mobile-bg: #21222c;
    --hero-bg: radial-gradient(circle at 78% 22%, rgba(189, 147, 249, 0.24), transparent 30%), radial-gradient(circle at 18% 78%, rgba(255, 121, 198, 0.16), transparent 28%), linear-gradient(135deg, #282a36, #21222c);
    --footer-bg: #191a21;
    --footer-text: #f8f8f2;
    --footer-muted: #a6accd;
    --footer-border: rgba(189, 147, 249, 0.28);
    --abstract-bg: rgba(52, 55, 70, 0.8);
    --hover-bg: rgba(189, 147, 249, 0.08);
    --photo-border: #ff79c6;
    --status-bg: #3d2f4a;
    --status-text: #8be9fd;
    --award-bg: #4a2636;
    --theme-select-bg: #343746;
    --theme-select-text: #f8f8f2;
    --theme-select-border: #555970;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 0 0 1px rgba(189, 147, 249, 0.1), 0 24px 60px rgba(0, 0, 0, 0.5);
    --radius: 8px;
    --font-heading: 'Space Grotesk', 'Inter', sans-serif;
}

html[data-theme="dracula"] .section-title {
    text-shadow: 0 0 20px rgba(189, 147, 249, 0.25);
}

html[data-theme="dracula"] .profile-photo {
    box-shadow: 0 0 0 5px rgba(255, 121, 198, 0.15), var(--shadow-lg);
}

/* Monokai: warm charcoal, acid green, hot pink */
html[data-theme="monokai"] {
    color-scheme: dark;
    --primary: #a6e22e;
    --primary-light: #c3f36a;
    --accent: #f92672;
    --accent-light: #ff6a9f;
    --text: #f8f8f2;
    --text-light: #d6d6cf;
    --text-muted: #a8a89f;
    --bg: #272822;
    --bg-alt: #1d1e19;
    --surface: #2f302a;
    --surface-alt: #292a24;
    --surface-raised: #383a31;
    --border: #49483e;
    --on-primary: #1b1c17;
    --navbar-bg: rgba(39, 40, 34, 0.92);
    --nav-mobile-bg: #1d1e19;
    --hero-bg: radial-gradient(circle at 78% 22%, rgba(166, 226, 46, 0.2), transparent 30%), radial-gradient(circle at 18% 78%, rgba(249, 38, 114, 0.15), transparent 28%), linear-gradient(135deg, #2f302a, #1d1e19);
    --footer-bg: #151610;
    --footer-text: #f8f8f2;
    --footer-muted: #a8a89f;
    --footer-border: rgba(166, 226, 46, 0.25);
    --abstract-bg: rgba(47, 48, 42, 0.82);
    --hover-bg: rgba(166, 226, 46, 0.08);
    --photo-border: #a6e22e;
    --status-bg: #343a1e;
    --status-text: #f1fa8c;
    --award-bg: #3c1d26;
    --theme-select-bg: #2f302a;
    --theme-select-text: #f8f8f2;
    --theme-select-border: #5c5b4e;
    --shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 22px 56px rgba(0, 0, 0, 0.5);
    --radius: 4px;
    --control-radius: 4px;
    --font-heading: 'Space Grotesk', 'Inter', sans-serif;
}

html[data-theme="monokai"] .profile-photo {
    border-radius: 4px;
    box-shadow: 0 0 0 4px rgba(166, 226, 46, 0.16), var(--shadow-lg);
}

html[data-theme="monokai"] .btn-primary {
    box-shadow: 0 0 16px rgba(166, 226, 46, 0.24);
}

/* Nord: arctic blue-gray, frost accents */
html[data-theme="nord"] {
    color-scheme: dark;
    --primary: #88c0d0;
    --primary-light: #8fbcbb;
    --accent: #ebcb8b;
    --accent-light: #f3dca6;
    --text: #eceff4;
    --text-light: #d8dee9;
    --text-muted: #a3abbc;
    --bg: #2e3440;
    --bg-alt: #242933;
    --surface: #3b4252;
    --surface-alt: #343b48;
    --surface-raised: #434c5e;
    --border: #4c566a;
    --on-primary: #1f2530;
    --navbar-bg: rgba(46, 52, 64, 0.9);
    --nav-mobile-bg: #242933;
    --hero-bg: radial-gradient(circle at 78% 20%, rgba(136, 192, 208, 0.2), transparent 30%), radial-gradient(circle at 18% 80%, rgba(180, 142, 173, 0.14), transparent 28%), linear-gradient(135deg, #2e3440, #242933);
    --footer-bg: #1f2530;
    --footer-text: #eceff4;
    --footer-muted: #b8c0cf;
    --footer-border: rgba(136, 192, 208, 0.25);
    --abstract-bg: rgba(59, 66, 82, 0.82);
    --hover-bg: rgba(136, 192, 208, 0.07);
    --photo-border: #88c0d0;
    --status-bg: #3a3d2d;
    --status-text: #ebcb8b;
    --award-bg: #3d2c35;
    --theme-select-bg: #3b4252;
    --theme-select-text: #eceff4;
    --theme-select-border: #5e6a80;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.42);
    --radius: 6px;
    --font-heading: 'Space Grotesk', 'Inter', sans-serif;
}

html[data-theme="nord"] .profile-photo {
    border-radius: 18px;
    box-shadow: 0 0 0 5px rgba(136, 192, 208, 0.12), var(--shadow-lg);
}

html[data-theme="nord"] .section-title {
    letter-spacing: -0.025em;
}

/* Gruvbox: retro warm charcoal, mustard and green */
html[data-theme="gruvbox"] {
    color-scheme: dark;
    --primary: #fabd2f;
    --primary-light: #ffd75f;
    --accent: #8ec07c;
    --accent-light: #b8e8a6;
    --text: #ebdbb2;
    --text-light: #d5c4a1;
    --text-muted: #a89984;
    --bg: #282828;
    --bg-alt: #1d2021;
    --surface: #32302f;
    --surface-alt: #2a2827;
    --surface-raised: #3c3836;
    --border: #504945;
    --on-primary: #1d2021;
    --navbar-bg: rgba(40, 40, 40, 0.92);
    --nav-mobile-bg: #1d2021;
    --hero-bg: radial-gradient(circle at 78% 22%, rgba(250, 189, 47, 0.2), transparent 30%), radial-gradient(circle at 18% 78%, rgba(142, 192, 124, 0.14), transparent 28%), linear-gradient(135deg, #32302f, #1d2021);
    --footer-bg: #1d2021;
    --footer-text: #ebdbb2;
    --footer-muted: #bdae93;
    --footer-border: rgba(250, 189, 47, 0.25);
    --abstract-bg: rgba(50, 48, 47, 0.85);
    --hover-bg: rgba(250, 189, 47, 0.07);
    --photo-border: #fabd2f;
    --status-bg: #3a341e;
    --status-text: #fabd2f;
    --award-bg: #3c2626;
    --theme-select-bg: #32302f;
    --theme-select-text: #ebdbb2;
    --theme-select-border: #665c54;
    --shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 22px 56px rgba(0, 0, 0, 0.5);
    --radius: 4px;
    --control-radius: 4px;
    --font-heading: 'Space Grotesk', 'Inter', sans-serif;
}

html[data-theme="gruvbox"] .profile-photo {
    border-radius: 8px;
    filter: sepia(0.12) saturate(0.95);
    box-shadow: 0 0 0 5px rgba(250, 189, 47, 0.13), var(--shadow-lg);
}

/* Catppuccin: Mocha mauve, soft pastels */
html[data-theme="catppuccin"] {
    color-scheme: dark;
    --primary: #cba6f7;
    --primary-light: #e0c7ff;
    --accent: #f5c2e7;
    --accent-light: #f9d6f0;
    --text: #cdd6f4;
    --text-light: #b4bdd9;
    --text-muted: #9399b2;
    --bg: #1e1e2e;
    --bg-alt: #181825;
    --surface: #313244;
    --surface-alt: #292a3c;
    --surface-raised: #3a3b4f;
    --border: #45475a;
    --on-primary: #11111b;
    --navbar-bg: rgba(30, 30, 46, 0.9);
    --nav-mobile-bg: #181825;
    --hero-bg: radial-gradient(circle at 78% 22%, rgba(203, 166, 247, 0.22), transparent 30%), radial-gradient(circle at 18% 78%, rgba(245, 194, 231, 0.15), transparent 28%), linear-gradient(135deg, #1e1e2e, #181825);
    --footer-bg: #11111b;
    --footer-text: #cdd6f4;
    --footer-muted: #a6adc8;
    --footer-border: rgba(203, 166, 247, 0.25);
    --abstract-bg: rgba(49, 50, 68, 0.82);
    --hover-bg: rgba(203, 166, 247, 0.08);
    --photo-border: #cba6f7;
    --status-bg: #3a3052;
    --status-text: #a6e3a1;
    --award-bg: #42283b;
    --theme-select-bg: #313244;
    --theme-select-text: #cdd6f4;
    --theme-select-border: #585b70;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.32);
    --shadow-lg: 0 0 0 1px rgba(203, 166, 247, 0.1), 0 24px 60px rgba(0, 0, 0, 0.5);
    --radius: 12px;
    --font-heading: 'Space Grotesk', 'Inter', sans-serif;
}

html[data-theme="catppuccin"] .profile-photo {
    box-shadow: 0 0 0 5px rgba(203, 166, 247, 0.13), var(--shadow-lg);
}

html[data-theme="catppuccin"] .section-title {
    letter-spacing: -0.02em;
}

/* Cyberpunk: black market neon, magenta + cyan */
html[data-theme="cyberpunk"] {
    color-scheme: dark;
    --primary: #ff2bd6;
    --primary-light: #ff7ae6;
    --accent: #00f5d4;
    --accent-light: #6ffff0;
    --text: #f3e9ff;
    --text-light: #c9b3e6;
    --text-muted: #957bb8;
    --bg: #06020c;
    --bg-alt: #0d0618;
    --surface: #140a24;
    --surface-alt: #10071f;
    --surface-raised: #1b0d2e;
    --border: #43226b;
    --on-primary: #0a0212;
    --navbar-bg: rgba(6, 2, 12, 0.9);
    --nav-mobile-bg: #0d0618;
    --hero-bg: radial-gradient(circle at 18% 20%, rgba(255, 43, 214, 0.25), transparent 30%), radial-gradient(circle at 82% 70%, rgba(0, 245, 212, 0.18), transparent 28%), linear-gradient(135deg, #0a0314 0%, #06020c 55%, #11061f 100%);
    --footer-bg: #040109;
    --footer-text: #f3e9ff;
    --footer-muted: #b299d1;
    --footer-border: rgba(255, 43, 214, 0.35);
    --abstract-bg: rgba(20, 10, 36, 0.85);
    --hover-bg: rgba(255, 43, 214, 0.08);
    --photo-border: #00f5d4;
    --status-bg: #2b1240;
    --status-text: #6ffff0;
    --award-bg: #351025;
    --theme-select-bg: #140a24;
    --theme-select-text: #f3e9ff;
    --theme-select-border: #5b2d8c;
    --shadow: 0 0 0 1px rgba(255, 43, 214, 0.15), 0 10px 40px rgba(255, 43, 214, 0.12);
    --shadow-lg: 0 0 40px rgba(0, 245, 212, 0.2), 0 20px 60px rgba(255, 43, 214, 0.2);
    --radius: 2px;
    --control-radius: 2px;
    --font-heading: 'Space Grotesk', 'Inter', sans-serif;
}

html[data-theme="cyberpunk"] body {
    background-image: linear-gradient(rgba(255, 43, 214, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 245, 212, 0.035) 1px, transparent 1px);
    background-size: 40px 40px;
}

html[data-theme="cyberpunk"] .section-title {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-shadow: 0 0 18px rgba(255, 43, 214, 0.5);
}

html[data-theme="cyberpunk"] .profile-photo {
    border-radius: 10px;
    border-width: 3px;
    box-shadow: 0 0 0 4px rgba(255, 43, 214, 0.25), 0 0 42px rgba(0, 245, 212, 0.3);
    filter: saturate(1.15) contrast(1.05);
}

html[data-theme="cyberpunk"] .btn-primary {
    box-shadow: 0 0 18px rgba(255, 43, 214, 0.35);
}

html[data-theme="cyberpunk"] .btn-secondary {
    border-color: var(--accent);
    color: var(--accent);
}

html[data-theme="cyberpunk"] .btn-secondary:hover {
    background: var(--accent);
    color: var(--on-primary);
}

html[data-theme="cyberpunk"] .tag,
html[data-theme="cyberpunk"] .filter-btn,
html[data-theme="cyberpunk"] .pub-link {
    border-radius: 0;
}

html[data-theme="cyberpunk"] .pub-link {
    font-family: var(--font-mono);
    text-transform: uppercase;
}

html[data-theme="cyberpunk"] .pub-item:hover {
    box-shadow: inset 3px 0 0 var(--primary);
}

/* Clippings: newsprint, cut-out cards, double rules */
html[data-theme="clippings"] {
    color-scheme: light;
    --primary: #1b1a17;
    --primary-light: #4a4236;
    --accent: #8a1c1c;
    --accent-light: #a92c2c;
    --text: #1b1a17;
    --text-light: #4b4438;
    --text-muted: #655c4d;
    --bg: #e8e1d1;
    --bg-alt: #ded5c2;
    --surface: #f7f1e5;
    --surface-alt: #e6ddca;
    --surface-raised: #fbf6ec;
    --border: #2b2720;
    --on-primary: #f8f2e7;
    --navbar-bg: rgba(232, 225, 209, 0.94);
    --nav-mobile-bg: #ded5c2;
    --hero-bg: radial-gradient(rgba(27, 26, 23, 0.08) 0.7px, transparent 0.7px), #e8e1d1;
    --footer-bg: #1b1a17;
    --footer-text: #f2ead9;
    --footer-muted: #c9bda8;
    --footer-border: #5b5245;
    --abstract-bg: #efe7d7;
    --hover-bg: #efe7d7;
    --photo-border: #1b1a17;
    --status-bg: #e4d7b5;
    --status-text: #5b4310;
    --award-bg: #ead2ce;
    --theme-select-bg: #f7f1e5;
    --theme-select-text: #1b1a17;
    --theme-select-border: #6e6251;
    --shadow: 3px 3px 0 rgba(27, 26, 23, 0.85);
    --shadow-lg: 6px 6px 0 rgba(27, 26, 23, 0.85);
    --radius: 0;
    --control-radius: 0;
    --font-heading: 'Merriweather', Georgia, serif;
}

html[data-theme="clippings"] body {
    background-image: radial-gradient(rgba(27, 26, 23, 0.055) 0.6px, transparent 0.6px);
    background-size: 4px 4px;
}

html[data-theme="clippings"] .section-title {
    padding: 0.5rem 0;
    border-top: 3px double var(--text);
    border-bottom: 1px solid var(--text);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

html[data-theme="clippings"] .pub-category {
    border-bottom: 3px double var(--primary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

html[data-theme="clippings"] .info-card,
html[data-theme="clippings"] .teaching-block,
html[data-theme="clippings"] .service-block {
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

html[data-theme="clippings"] .info-card:nth-child(odd) {
    transform: rotate(-0.35deg);
}

html[data-theme="clippings"] .info-card:nth-child(even) {
    transform: rotate(0.25deg);
}

html[data-theme="clippings"] .profile-photo {
    border-radius: 0;
    border-width: 3px;
    filter: grayscale(1) sepia(0.2) contrast(1.08);
}

html[data-theme="clippings"] .btn,
html[data-theme="clippings"] .tag,
html[data-theme="clippings"] .filter-btn,
html[data-theme="clippings"] .pub-link {
    border-radius: 0;
}

html[data-theme="clippings"] .btn {
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

html[data-theme="clippings"] .pub-item,
html[data-theme="clippings"] .talk-item,
html[data-theme="clippings"] .award-item,
html[data-theme="clippings"] .cv-entry {
    border-bottom: 1px dotted var(--border);
}

html[data-theme="clippings"] .hero-text h1 {
    text-shadow: 2px 2px 0 rgba(27, 26, 23, 0.15);
}

/* Bordeaux: dark wine, parchment text, literary */
html[data-theme="bordeaux"] {
    color-scheme: dark;
    --primary: #e9c9a3;
    --primary-light: #f3ddc0;
    --accent: #c25a6a;
    --accent-light: #e08a97;
    --text: #f6e9db;
    --text-light: #d7bfae;
    --text-muted: #a98b7c;
    --bg: #190b10;
    --bg-alt: #241018;
    --surface: #2b121b;
    --surface-alt: #220e16;
    --surface-raised: #351722;
    --border: #4c2632;
    --on-primary: #1a0a10;
    --navbar-bg: rgba(25, 11, 16, 0.88);
    --nav-mobile-bg: #241018;
    --hero-bg: radial-gradient(circle at 80% 20%, rgba(233, 201, 163, 0.16), transparent 30%), radial-gradient(circle at 15% 80%, rgba(194, 90, 106, 0.14), transparent 30%), linear-gradient(135deg, #1d0c12 0%, #12070b 100%);
    --footer-bg: #10060a;
    --footer-text: #f6e9db;
    --footer-muted: #c6a897;
    --footer-border: rgba(233, 201, 163, 0.2);
    --abstract-bg: rgba(43, 18, 27, 0.85);
    --hover-bg: rgba(233, 201, 163, 0.06);
    --photo-border: #e9c9a3;
    --status-bg: #43291a;
    --status-text: #f0d69f;
    --award-bg: #4a1f29;
    --theme-select-bg: #2b121b;
    --theme-select-text: #f6e9db;
    --theme-select-border: #63303f;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.45);
    --radius: 14px;
    --font-heading: 'Merriweather', Georgia, serif;
}

html[data-theme="bordeaux"] .section-title::after {
    content: '';
    display: block;
    width: 42px;
    height: 2px;
    margin-top: 0.7rem;
    background: var(--accent);
}

html[data-theme="bordeaux"] .profile-photo {
    border: 3px double var(--photo-border);
}

html[data-theme="bordeaux"] .info-card,
html[data-theme="bordeaux"] .teaching-block,
html[data-theme="bordeaux"] .service-block {
    border-top: 2px solid var(--primary);
}
