/* ============================================
   ACADEMIC PORTFOLIO - DESIGN SYSTEM
   "Scholarly Elegance" - Refined minimalism
   ============================================ */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Source+Sans+3:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ============================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */
:root {
    /* Typography */
    --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Light Mode Colors */
    --ink: #1a2332;
    --ink-muted: #4a5568;
    --ink-subtle: #718096;
    --parchment: #faf9f7;
    --surface: #ffffff;
    --surface-elevated: #ffffff;
    --accent: #1e3a5f;
    --accent-hover: #2d4a6f;
    --accent-light: #3d5a80;
    --accent-subtle: rgba(30, 58, 95, 0.08);
    --gold: #b8860b;
    --gold-subtle: rgba(184, 134, 11, 0.12);
    --success: #0f766e;
    --warning: #b45309;
    --error: #dc2626;
    --border: rgba(26, 35, 50, 0.10);
    --border-strong: rgba(26, 35, 50, 0.18);
    --shadow-sm: 0 1px 2px rgba(26, 35, 50, 0.05);
    --shadow: 0 4px 12px rgba(26, 35, 50, 0.08);
    --shadow-lg: 0 12px 32px rgba(26, 35, 50, 0.12);

    /* Layout */
    --container: 1140px;
    --container-narrow: 860px;
    --measure: 72ch;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;

    /* Spacing Scale */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;
    --space-9: 96px;

    /* Typography Scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: clamp(1.75rem, 2.5vw, 2rem);
    --text-4xl: clamp(2rem, 3vw, 2.5rem);
    --text-5xl: clamp(2.5rem, 4vw, 3.25rem);

    /* Line Heights */
    --leading-tight: 1.2;
    --leading-snug: 1.35;
    --leading-normal: 1.6;
    --leading-relaxed: 1.7;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 250ms ease;
    --transition-slow: 400ms ease;
}

/* ============================================
   DARK MODE
   ============================================ */
@media (prefers-color-scheme: dark) {
    :root {
        --ink: #e8e6e3;
        --ink-muted: #a0aec0;
        --ink-subtle: #718096;
        --parchment: #0d1117;
        --surface: #161b22;
        --surface-elevated: #1c2128;
        --accent: #58a6ff;
        --accent-hover: #79b8ff;
        --accent-light: #79b8ff;
        --accent-subtle: rgba(88, 166, 255, 0.12);
        --gold: #d4a017;
        --gold-subtle: rgba(212, 160, 23, 0.15);
        --border: rgba(232, 230, 227, 0.08);
        --border-strong: rgba(232, 230, 227, 0.15);
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
        --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4);
    }
}

/* ============================================
   BASE RESET & ELEMENTS
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 400;
    line-height: var(--leading-relaxed);
    color: var(--ink);
    background: var(--parchment);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--accent);
    text-decoration: none;
    text-underline-offset: 3px;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

::selection {
    background: var(--accent-subtle);
    color: var(--ink);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: var(--leading-tight);
    margin: 0;
    color: var(--ink);
    letter-spacing: -0.02em;
}

h1 {
    font-size: var(--text-5xl);
    font-weight: 500;
    letter-spacing: -0.03em;
}

h2 {
    font-size: var(--text-4xl);
    font-weight: 600;
}

h3 {
    font-size: var(--text-3xl);
}

h4 {
    font-size: var(--text-2xl);
}

h5 {
    font-size: var(--text-xl);
    font-family: var(--font-body);
    font-weight: 600;
}

h6 {
    font-size: var(--text-lg);
    font-family: var(--font-body);
    font-weight: 600;
}

p {
    margin: 0;
}

.lead {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    color: var(--ink-muted);
}

.small {
    font-size: var(--text-sm);
}

.muted {
    color: var(--ink-muted);
}

.subtle {
    color: var(--ink-subtle);
}

.mono {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */
.container {
    width: min(100% - var(--space-5) * 2, var(--container));
    margin-inline: auto;
}

.container-narrow {
    width: min(100% - var(--space-5) * 2, var(--container-narrow));
    margin-inline: auto;
}

.measure {
    max-width: var(--measure);
}

.section {
    padding: var(--space-9) 0;
}

.section-tight {
    padding: var(--space-7) 0;
}

.section-hero {
    padding: var(--space-8) 0 var(--space-9);
}

/* Stack (vertical spacing) */
.stack > * + * {
    margin-top: var(--space-5);
}

.stack-sm > * + * {
    margin-top: var(--space-3);
}

.stack-lg > * + * {
    margin-top: var(--space-7);
}

/* Grid */
.grid {
    display: grid;
    gap: var(--space-5);
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Flex */
.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }

/* ============================================
   SITE HEADER
   ============================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--parchment) 85%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
    padding: var(--space-4) 0;
}

.brand {
    display: flex;
    align-items: baseline;
    gap: var(--space-3);
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.brand:hover {
    color: var(--ink);
    text-decoration: none;
}

.brand-subtitle {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--ink-muted);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.nav-links a {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--ink-muted);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-links a:hover {
    color: var(--ink);
    background: var(--accent-subtle);
    text-decoration: none;
}

.nav-links a.active {
    color: var(--ink);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    padding: var(--space-2);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ink);
}

@media (max-width: 900px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        padding: var(--space-4);
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        width: 100%;
        padding: var(--space-3) var(--space-4);
    }

    .menu-toggle {
        display: block;
    }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    padding: var(--space-8) 0 var(--space-7);
}

.hero-grid {
    display: grid;
    gap: var(--space-7);
    grid-template-columns: 1fr 320px;
    align-items: start;
}

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
}

.hero-content {
    max-width: var(--measure);
}

.hero-title {
    margin-bottom: var(--space-3);
    outline: none;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    font-weight: 500;
    color: var(--ink-muted);
    margin-bottom: var(--space-5);
}

.hero-intro {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-6);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.portrait {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.portrait img {
    aspect-ratio: 4 / 5;
    object-fit: cover;
    width: 100%;
}

.portrait-placeholder {
    aspect-ratio: 4 / 5;
    background: linear-gradient(135deg, var(--accent-subtle), var(--gold-subtle));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-subtle);
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.card:hover {
    box-shadow: var(--shadow);
    border-color: var(--border-strong);
}

.card-flat {
    box-shadow: none;
}

.card-featured {
    border-color: var(--gold);
    background: linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--gold-subtle) 30%, var(--surface)));
}

.card-header {
    margin-bottom: var(--space-4);
}

.card-title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-subtle);
    border-radius: var(--radius-sm);
    color: var(--accent);
    margin-bottom: var(--space-4);
    font-size: var(--text-xl);
}

.card-body {
    color: var(--ink-muted);
    line-height: var(--leading-relaxed);
}

.card-footer {
    margin-top: var(--space-5);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 85%, black));
    color: white;
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: linear-gradient(180deg, var(--accent-hover), var(--accent));
    color: white;
}

.btn-secondary {
    background: var(--surface);
    color: var(--ink);
    border-color: var(--border-strong);
}

.btn-secondary:hover {
    background: var(--accent-subtle);
    border-color: var(--accent);
    color: var(--accent);
}

.btn-ghost {
    background: transparent;
    color: var(--ink-muted);
    border-color: transparent;
}

.btn-ghost:hover {
    background: var(--accent-subtle);
    color: var(--accent);
}

.btn-sm {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
}

.btn-lg {
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-base);
}

/* ============================================
   BADGES & PILLS
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 999px;
    background: var(--accent-subtle);
    color: var(--accent);
}

.badge-featured {
    background: var(--gold-subtle);
    color: var(--gold);
}

.badge-success {
    background: color-mix(in srgb, var(--success) 15%, transparent);
    color: var(--success);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    font-weight: 500;
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-muted);
    border: 1px solid var(--border);
    transition: all var(--transition-fast);
}

.pill:hover {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}

.pill.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* ============================================
   KICKER (Section Label)
   ============================================ */
.kicker {
    display: inline-block;
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: var(--space-3);
}

/* ============================================
   PUBLICATION ITEM
   ============================================ */
.publication-item {
    padding: var(--space-5);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.publication-item:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
}

.publication-item.featured {
    border-left: 3px solid var(--gold);
}

.publication-title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-2);
    line-height: var(--leading-snug);
}

.publication-title a {
    color: var(--ink);
}

.publication-title a:hover {
    color: var(--accent);
}

.publication-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    color: var(--ink-muted);
    margin-bottom: var(--space-3);
}

.publication-authors {
    color: var(--ink-muted);
}

.publication-venue {
    font-style: italic;
}

.publication-abstract {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
    color: var(--ink-muted);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

.publication-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-4);
}

/* ============================================
   ACCORDION
   ============================================ */
.accordion {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
}

.accordion details {
    border-top: 1px solid var(--border);
}

.accordion details:first-child {
    border-top: 0;
}

.accordion summary {
    list-style: none;
    cursor: pointer;
    padding: var(--space-5);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    transition: background var(--transition-fast);
}

.accordion summary::-webkit-details-marker {
    display: none;
}

.accordion summary:hover {
    background: var(--accent-subtle);
}

.accordion summary::after {
    content: '+';
    font-size: var(--text-xl);
    font-weight: 400;
    color: var(--ink-muted);
    transition: transform var(--transition-fast);
}

.accordion details[open] summary::after {
    transform: rotate(45deg);
}

.accordion-content {
    padding: 0 var(--space-5) var(--space-5);
    color: var(--ink-muted);
    line-height: var(--leading-relaxed);
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline {
    position: relative;
    display: grid;
    gap: var(--space-4);
    padding-left: var(--space-7);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--border-strong);
    border-radius: 999px;
}

.timeline-item {
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: calc(-1 * var(--space-7) + 6px);
    top: 8px;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-subtle);
}

.timeline-item.upcoming::before {
    background: var(--gold);
    box-shadow: 0 0 0 4px var(--gold-subtle);
}

.timeline-date {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--ink-muted);
    margin-bottom: var(--space-1);
}

.timeline-title {
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.timeline-subtitle {
    font-size: var(--text-sm);
    color: var(--ink-muted);
}

.timeline-location {
    font-size: var(--text-sm);
    color: var(--ink-subtle);
}

/* ============================================
   FILTER BAR
   ============================================ */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
    padding: var(--space-4);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: var(--space-5);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.filter-label {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--ink-muted);
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.input,
select {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: var(--parchment);
    color: var(--ink);
    transition: all var(--transition-fast);
}

.input:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}

.input::placeholder {
    color: var(--ink-subtle);
}

.search-input {
    position: relative;
}

.search-input input {
    padding-left: var(--space-8);
    width: 100%;
    min-width: 240px;
}

.search-input svg {
    position: absolute;
    left: var(--space-3);
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-subtle);
}

/* ============================================
   TABLES
   ============================================ */
.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: var(--space-4);
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.table th {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--ink-muted);
    background: var(--surface);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background: var(--accent-subtle);
}

/* ============================================
   DIVIDERS
   ============================================ */
.hr {
    height: 1px;
    border: 0;
    background: var(--border);
    margin: var(--space-6) 0;
}

.hr-strong {
    background: var(--border-strong);
}

/* ============================================
   QUICK LINKS (Social/External)
   ============================================ */
.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.quick-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--ink-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.quick-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    text-decoration: none;
}

.quick-link svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   SITE FOOTER
   ============================================ */
.site-footer {
    border-top: 1px solid var(--border);
    padding: var(--space-8) 0;
    background: var(--surface);
}

.footer-grid {
    display: grid;
    gap: var(--space-6);
    grid-template-columns: 1.5fr 1fr;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-brand {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--ink);
    margin-bottom: var(--space-3);
}

.footer-text {
    color: var(--ink-muted);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-4);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
}

.footer-links a {
    font-size: var(--text-sm);
    color: var(--ink-muted);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-meta {
    font-size: var(--text-xs);
    color: var(--ink-subtle);
    margin-top: var(--space-5);
}

/* ============================================
   LANGUAGE SWITCHER
   ============================================ */
.lang-switch {
    display: inline-flex;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.lang-switch button {
    padding: var(--space-2) var(--space-3);
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 600;
    background: transparent;
    border: none;
    color: var(--ink-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lang-switch button:hover {
    background: var(--accent-subtle);
}

.lang-switch button.active {
    background: var(--accent);
    color: white;
}

/* ============================================
   COURSE CARDS
   ============================================ */
.course-card {
    padding: var(--space-5);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.course-semester {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--accent);
    margin-bottom: var(--space-2);
}

.course-title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-3);
}

.course-description {
    color: var(--ink-muted);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-4);
}

/* ============================================
   SEO & ACCESSIBILITY
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    padding: var(--space-3) var(--space-5);
    background: var(--accent);
    color: white;
    font-weight: 600;
    z-index: 1000;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 0;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .site-header,
    .site-footer,
    .nav-actions,
    .btn,
    .filter-bar,
    .lang-switch {
        display: none !important;
    }

    body {
        background: white;
        color: black;
        font-size: 11pt;
    }

    .card,
    .publication-item,
    .accordion {
        box-shadow: none;
        border-color: #ddd;
        break-inside: avoid;
    }

    a {
        color: inherit;
        text-decoration: underline;
    }

    a[href]::after {
        content: ' (' attr(href) ')';
        font-size: 9pt;
        color: #666;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in {
    animation: fadeIn var(--transition-slow) ease both;
}

.animate-fade-in-up {
    animation: fadeInUp var(--transition-slow) ease both;
}

.animate-slide-in {
    animation: slideIn var(--transition) ease both;
}

/* Staggered animation delays */
.stagger-1 { animation-delay: 100ms; }
.stagger-2 { animation-delay: 200ms; }
.stagger-3 { animation-delay: 300ms; }
.stagger-4 { animation-delay: 400ms; }

/* ============================================
   BLAZOR SPECIFIC
   ============================================ */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-4);
    background: var(--error);
    color: white;
    text-align: center;
    z-index: 1000;
}

#blazor-error-ui.show {
    display: block;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--success);
}

.invalid {
    outline: 1px solid var(--error);
}

.validation-message {
    color: var(--error);
    font-size: var(--text-sm);
    margin-top: var(--space-1);
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}
