/* ========================================
   MYKOLA STARYI - ACADEMIC PORTFOLIO
   Premium Design System
   ======================================== */

/* CSS Custom Properties */
:root {
    /* Color Palette - Deep Academic Elegance (Dark Theme - Default) */
    --color-bg-primary: #0a0a0f;
    --color-bg-secondary: #12121a;
    --color-bg-tertiary: #1a1a25;
    --color-bg-card: rgba(26, 26, 37, 0.6);
    
    --color-text-primary: #f5f5f7;
    --color-text-secondary: #a1a1aa;
    --color-text-muted: #71717a;
    
    --color-accent-primary: #c9a962;
    --color-accent-secondary: #8b7355;
    --color-accent-glow: rgba(201, 169, 98, 0.3);
    
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-hover: rgba(201, 169, 98, 0.3);
    
    /* Typography */
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px var(--color-accent-glow);
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

/* Light Theme */
[data-theme="light"] {
    --color-bg-primary: #fafafa;
    --color-bg-secondary: #f0f0f2;
    --color-bg-tertiary: #e8e8ec;
    --color-bg-card: rgba(255, 255, 255, 0.8);
    
    --color-text-primary: #1a1a2e;
    --color-text-secondary: #4a4a5e;
    --color-text-muted: #6b6b7a;
    
    --color-accent-primary: #a17d3a;
    --color-accent-secondary: #6b5a42;
    --color-accent-glow: rgba(161, 125, 58, 0.25);
    
    --color-border: rgba(0, 0, 0, 0.08);
    --color-border-hover: rgba(161, 125, 58, 0.3);
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* ========================================
   BASE STYLES
   ======================================== */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--color-accent-primary);
    color: var(--color-bg-primary);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========================================
   CURSOR GLOW EFFECT
   ======================================== */

.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    pointer-events: none;
    background: radial-gradient(circle, var(--color-accent-glow) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    z-index: 9999;
    opacity: 0;
    transition: opacity var(--transition-slow);
    mix-blend-mode: screen;
}

body:hover .cursor-glow {
    opacity: 0.5;
}

[data-theme="light"] .cursor-glow {
    mix-blend-mode: multiply;
}

/* ========================================
   ANIMATED BACKGROUND
   ======================================== */

.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.math-symbols {
    position: absolute;
    width: 100%;
    height: 100%;
}

.symbol {
    position: absolute;
    font-size: 2rem;
    color: var(--color-accent-primary);
    opacity: 0.03;
    animation: float 20s infinite ease-in-out;
}

[data-theme="light"] .symbol {
    opacity: 0.08;
}

.symbol-1 { top: 10%; left: 5%; animation-delay: 0s; font-size: 3rem; }
.symbol-2 { top: 20%; left: 85%; animation-delay: 2s; font-size: 2.5rem; }
.symbol-3 { top: 40%; left: 15%; animation-delay: 4s; }
.symbol-4 { top: 60%; left: 90%; animation-delay: 6s; font-size: 4rem; }
.symbol-5 { top: 80%; left: 10%; animation-delay: 8s; font-size: 2.5rem; }
.symbol-6 { top: 30%; left: 70%; animation-delay: 10s; }
.symbol-7 { top: 70%; left: 75%; animation-delay: 12s; font-size: 3rem; }
.symbol-8 { top: 15%; left: 45%; animation-delay: 14s; }
.symbol-9 { top: 85%; left: 55%; animation-delay: 16s; font-size: 2.5rem; }
.symbol-10 { top: 50%; left: 25%; animation-delay: 18s; }
.symbol-11 { top: 35%; left: 95%; animation-delay: 1s; font-size: 2rem; }
.symbol-12 { top: 90%; left: 35%; animation-delay: 3s; font-size: 3rem; }

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.03;
    }
    25% {
        transform: translateY(-20px) rotate(5deg);
        opacity: 0.06;
    }
    50% {
        transform: translateY(-10px) rotate(-3deg);
        opacity: 0.04;
    }
    75% {
        transform: translateY(-30px) rotate(8deg);
        opacity: 0.05;
    }
}

/* ========================================
   NAVIGATION
   ======================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--space-lg) 0;
    transition: all var(--transition-base);
    backdrop-filter: blur(0px);
}

.navbar.scrolled {
    padding: var(--space-md) 0;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
}

[data-theme="light"] .navbar.scrolled {
    background: rgba(250, 250, 250, 0.9);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 2px;
}

.logo-text {
    color: var(--color-text-primary);
    transition: color var(--transition-fast);
}

.logo-dot {
    color: var(--color-accent-primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--space-xl);
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    position: relative;
    padding: var(--space-sm) 0;
    letter-spacing: 0.02em;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-accent-primary);
    transition: width var(--transition-base);
}

.nav-link:hover {
    color: var(--color-text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* Theme Toggle */
.theme-toggle {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-base);
    overflow: hidden;
}

.theme-toggle:hover {
    border-color: var(--color-accent-primary);
    transform: scale(1.05);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
    position: absolute;
    color: var(--color-text-primary);
    transition: all var(--transition-base);
}

/* Dark theme (default) - show moon, hide sun */
.theme-toggle .sun-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

.theme-toggle .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Light theme - show sun, hide moon */
[data-theme="light"] .theme-toggle .sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="light"] .theme-toggle .moon-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-text-primary);
    transition: all var(--transition-fast);
}

/* ========================================
   CONTAINER
   ======================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: var(--space-4xl) var(--space-xl);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(201, 169, 98, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(139, 115, 85, 0.06) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 80%, rgba(201, 169, 98, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: 1400px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-accent-primary);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: var(--space-lg);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 500;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
}

.title-line {
    display: block;
}

.title-accent {
    color: var(--color-accent-primary);
    font-style: italic;
}

.hero-role {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-2xl);
}

.tag {
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
}

.tag:hover {
    border-color: var(--color-accent-primary);
    color: var(--color-accent-primary);
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--color-accent-primary);
    color: var(--color-bg-primary);
}

.btn-primary:hover {
    background: var(--color-text-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    border-color: var(--color-accent-primary);
    color: var(--color-accent-primary);
}

.btn-outline {
    background: transparent;
    color: var(--color-accent-primary);
    border: 1px solid var(--color-accent-primary);
}

.btn-outline:hover {
    background: var(--color-accent-primary);
    color: var(--color-bg-primary);
}

/* Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.mentor-link {
    color: var(--color-accent); /* Or your preferred theme color */
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.mentor-link:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.portrait-container {
    position: relative;
}

/* Hero Visual size adjustments */
.portrait-frame {
    position: relative;
    width: 200px;  /* Reduced from 350px */
    height: 240px; /* Reduced from 420px */
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: linear-gradient(145deg, var(--color-bg-secondary), var(--color-bg-tertiary));
    border: 1px solid var(--color-border);
}

/* Optional: Shrink the ORCID badge slightly to match the smaller photo */
.orcid-badge {
    position: absolute;
    bottom: -10px;
    right: -10px;
    background: var(--color-bg-secondary);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
}

.orcid-badge a {
    font-size: 0.75rem; /* Slightly smaller text */
}

/* Align text to the left when photo is on the left */
.hero-text {
    text-align: left;
}

.portrait-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--color-bg-tertiary), var(--color-bg-secondary));
}

.initials {
    font-family: var(--font-display);
    font-size: 6rem;
    font-weight: 500;
    color: var(--color-accent-primary);
    opacity: 0.3;
}

.portrait-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform var(--transition-slow);
}

.portrait-frame:hover .portrait-image {
    transform: scale(1.05);
}

.portrait-glow {
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, var(--color-accent-primary), transparent, var(--color-accent-secondary));
    border-radius: var(--radius-xl);
    z-index: -1;
    opacity: 0.5;
    filter: blur(20px);
    animation: glow-rotate 10s linear infinite;
}

/* ========================================
   SCIENTIFIC PUBLICATIONS
   ======================================== */
.pub-entry {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 40px;
    padding: 40px 0;
    transition: all 0.4s ease;
    border-bottom: 1px solid var(--color-border);
}

.pub-entry:hover {
    transform: translateX(10px);
}

.pub-year {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-text-primary);
    opacity: 0.15; 
}

.pub-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-accent-primary);
    opacity: 0.8;
}

.pub-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 12px;
    color: var(--color-text-primary);
}

.pub-authors {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-bottom: 5px;
}

.pub-journal {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    font-style: italic;
    margin-bottom: 20px;
}

.pub-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    margin-right: 10px;
}

.pub-btn:hover {
    background: var(--color-accent-primary);
    color: var(--color-bg-primary);
    border-color: var(--color-accent-primary);
}
@keyframes glow-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.orcid-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--color-bg-secondary);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
}

.orcid-badge:hover {
    transform: translateY(-3px);
    border-color: var(--color-accent-primary);
}

.orcid-badge a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-accent-primary);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-2xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--color-accent-primary), transparent);
    animation: scroll-bounce 2s infinite;
}

@keyframes scroll-bounce {
    0%, 100% { transform: scaleY(1); opacity: 1; }
    50% { transform: scaleY(0.5); opacity: 0.5; }
}

/* ========================================
   REVEAL ANIMATIONS
   ======================================== */

.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    animation: reveal-up 0.8s ease forwards;
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    animation: reveal-scale 0.8s ease forwards;
    animation-delay: 0.6s;
}

@keyframes reveal-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes reveal-scale {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========================================
   SECTIONS
   ======================================== */

.section {
    padding: var(--space-4xl) 0;
    position: relative;
    z-index: 1;
}

.section-header {
    margin-bottom: var(--space-3xl);
    display: flex;
    align-items: baseline;
    gap: var(--space-lg);
}

.section-number {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--color-accent-primary);
    font-weight: 500;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 500;
    color: var(--color-text-primary);
}

/* ========================================
   ABOUT SECTION
   ======================================== */

.about {
    background: linear-gradient(180deg, var(--color-bg-primary) 0%, var(--color-bg-secondary) 100%);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-4xl);
    align-items: start;
}

.about-text p {
    margin-bottom: var(--space-lg);
    color: var(--color-text-secondary);
}

.about-text .lead {
    font-size: 1.25rem;
    color: var(--color-text-primary);
    line-height: 1.7;
}

.about-text strong {
    color: var(--color-accent-primary);
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.stat-card {
    padding: var(--space-xl);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition-base);
}

.stat-card:hover {
    border-color: var(--color-accent-primary);
    transform: translateX(10px);
}

.stat-number {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 600;
    color: var(--color-accent-primary);
    display: block;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ========================================
   RESEARCH SECTION
   ======================================== */

.research {
    background: var(--color-bg-secondary);
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.research-card {
    padding: var(--space-2xl);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.research-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-accent-primary);
    box-shadow: var(--shadow-xl);
}

.research-card:hover .card-hover-line {
    transform: scaleX(1);
}

.card-icon {
    width: 80px;
    height: 80px;
    margin-bottom: var(--space-xl);
    color: var(--color-accent-primary);
}

.icon-svg {
    width: 100%;
    height: 100%;
}

.research-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: var(--space-md);
    color: var(--color-text-primary);
}

.research-card p {
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.card-hover-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent-primary), var(--color-accent-secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

/* ========================================
   EDUCATION SECTION
   ======================================== */

.education {
    background: linear-gradient(180deg, var(--color-bg-secondary) 0%, var(--color-bg-primary) 100%);
}

.timeline {
    position: relative;
    padding-left: var(--space-3xl);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--color-accent-primary), var(--color-border), transparent);
}

.timeline-item {
    position: relative;
    padding-bottom: var(--space-3xl);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: calc(-1 * var(--space-3xl));
    width: 60px;
    transform: translateX(-50%);
}

.timeline-marker .year {
    display: block;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-accent-primary);
    background: var(--color-bg-primary);
    padding: var(--space-xs) var(--space-sm);
    text-align: center;
    transition: background var(--transition-base);
}

.timeline-content {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all var(--transition-base);
}

.timeline-content:hover {
    border-color: var(--color-accent-primary);
    transform: translateX(10px);
}

.timeline-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: rgba(201, 169, 98, 0.1);
    color: var(--color-accent-primary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-md);
}

.timeline-content h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: var(--space-sm);
}

.timeline-content .institution {
    color: var(--color-accent-primary);
    font-weight: 500;
    margin-bottom: var(--space-sm);
}

.timeline-content .supervisor {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
}

.timeline-content .description {
    color: var(--color-text-muted);
    line-height: 1.7;
}

.cv-download {
    margin-top: var(--space-3xl);
    text-align: center;
}

/* ========================================
   CONFERENCES & TALKS CARD SYSTEM
   ======================================== */

.conferences-grid, .talks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.conference-card, .talk-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.4s ease, 
                border-color 0.4s ease;
    height: 100%;
    backdrop-filter: blur(10px); /* Adds a premium glass feel in dark mode */
}

.conference-card:hover, .talk-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-accent-primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* The Header (Date Block) */
.card-header-date {
    padding: 25px 20px;
    background: var(--color-bg-tertiary);
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

.card-header-date .day {
    display: block;
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--color-accent-primary);
    line-height: 1;
}

.card-header-date .month-year {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--color-text-secondary);
    margin-top: 8px;
    font-weight: 500;
}

/* Content Area */
.conference-content, .talk-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.conference-type, .talk-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-accent-primary);
    margin-bottom: 12px;
    font-weight: 700;
    opacity: 0.9;
}

.conference-content h3, .talk-content h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    line-height: 1.3;
    margin-bottom: 20px;
    color: var(--color-text-primary);
}

.location, .organizer, .event-name {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Abstract Link Button */
.abstract-link {
    margin-top: auto;
    padding: 15px;
    background: var(--color-bg-tertiary);
    border-top: 1px solid var(--color-border);
    color: var(--color-text-primary);
    text-align: center;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.abstract-link:hover {
    background: var(--color-accent-primary);
    color: var(--color-bg-primary);
}

/* ========================================
   CONTACT SECTION
   ======================================== */

.contact {
    background: linear-gradient(180deg, var(--color-bg-primary) 0%, var(--color-bg-secondary) 100%);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-4xl);
    align-items: start;
}

.contact-intro {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2xl);
    line-height: 1.7;
}

.contact-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.contact-card {
    display: flex;
    gap: var(--space-lg);
    padding: var(--space-xl);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.contact-card:hover {
    border-color: var(--color-accent-primary);
    transform: translateX(10px);
}

.contact-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(201, 169, 98, 0.1);
    border-radius: var(--radius-md);
    color: var(--color-accent-primary);
    flex-shrink: 0;
}

.contact-details h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: var(--space-sm);
}

.contact-details a,
.contact-details address {
    display: block;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    font-style: normal;
    line-height: 1.6;
    transition: color var(--transition-fast);
}

.contact-details a:hover {
    color: var(--color-accent-primary);
}

/* Map Placeholder */
.contact-visual {
    height: 100%;
    min-height: 400px;
}

.map-container {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: border-color var(--transition-base);
}

.map-container:hover {
    border-color: var(--color-accent-primary);
}

.map-container iframe {
    display: block;
}

.map-placeholder {
    width: 100%;
    height: 100%;
    min-height: 400px;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    position: relative;
    overflow: hidden;
}

.map-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(90deg, var(--color-border) 1px, transparent 1px),
        linear-gradient(var(--color-border) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.3;
}

.map-pin {
    color: var(--color-accent-primary);
    animation: bounce 2s infinite;
    z-index: 1;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.map-label {
    font-size: 1rem;
    color: var(--color-text-secondary);
    z-index: 1;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
}

.footer-brand {
    text-align: left;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-text-primary);
}

.footer-brand p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
}

.footer-links a {
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-accent-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

.footer-bottom p {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .hero-tags {
        justify-content: center;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        flex-direction: row;
    }
    
    .research-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .conferences-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--color-bg-secondary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--space-xl);
        transition: right var(--transition-base);
        border-left: 1px solid var(--color-border);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .hero {
        padding-top: 120px;
    }
    
    .portrait-frame {
        width: 280px;
        height: 340px;
    }
    
    .research-grid,
    .conferences-grid {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        flex-direction: column;
    }
    
    .timeline {
        padding-left: var(--space-xl);
    }
    
    .timeline-marker {
        left: calc(-1 * var(--space-xl));
        width: 50px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: var(--space-lg);
        text-align: center;
    }
}

@media (max-width: 480px) {
    :root {
        --space-xl: 1.5rem;
        --space-2xl: 2rem;
        --space-3xl: 3rem;
        --space-4xl: 4rem;
    }
    
    .btn {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.85rem;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .talk-card {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-card {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-icon {
        margin: 0 auto;
    }
}

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

:focus-visible {
    outline: 2px solid var(--color-accent-primary);
    outline-offset: 3px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--color-accent-primary);
    color: var(--color-bg-primary);
    padding: var(--space-md);
    z-index: 9999;
}

.skip-link:focus {
    top: 0;
}

/* ========================================
   THEME TRANSITION
   ======================================== */

html {
    transition: background-color var(--transition-base);
}

body,
.navbar,
.navbar.scrolled,
.portrait-frame,
.portrait-placeholder,
.orcid-badge,
.stat-card,
.research-card,
.timeline-content,
.conference-card,
.conference-date,
.talk-card,
.contact-card,
.map-placeholder,
.footer,
.theme-toggle {
    transition: 
        background var(--transition-base),
        background-color var(--transition-base),
        border-color var(--transition-base),
        color var(--transition-base),
        box-shadow var(--transition-base);
}

/* Light theme specific adjustments */
[data-theme="light"] .hero::before {
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(161, 125, 58, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(107, 90, 66, 0.08) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 80%, rgba(161, 125, 58, 0.06) 0%, transparent 50%);
}

[data-theme="light"] .portrait-glow {
    opacity: 0.3;
}

[data-theme="light"] .initials {
    opacity: 0.2;
}

[data-theme="light"] .timeline-badge {
    background: rgba(161, 125, 58, 0.15);
}

[data-theme="light"] .talk-icon,
[data-theme="light"] .contact-icon {
    background: rgba(161, 125, 58, 0.12);
}

[data-theme="light"] .conference-card.featured {
    background: linear-gradient(145deg, rgba(161, 125, 58, 0.08), transparent);
}

[data-theme="light"] .abstract-id {
    background: var(--color-bg-secondary);
}

[data-theme="light"] .nav-menu {
    background: var(--color-bg-secondary);
}

[data-theme="light"] .pub-year {
    opacity: 0.1;
}

/* --- Light Mode Card Specifics --- */
[data-theme="light"] .conference-card, 
[data-theme="light"] .talk-card {
    background: #ffffff; 
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .conference-card:hover, 
[data-theme="light"] .talk-card:hover {
    box-shadow: 0 20px 40px rgba(161, 125, 58, 0.1);
    border-color: var(--color-accent-primary);
}

[data-theme="light"] .card-header-date {
    background: #fcfcfd;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .abstract-link {
    background: #fcfcfd;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    color: var(--color-text-primary);
}

[data-theme="light"] .abstract-link:hover {
    background: var(--color-accent-primary);
    color: #ffffff;
}

/* This makes the "Day" number pop in Light Mode */
[data-theme="light"] .card-header-date .day {
    color: var(--color-accent-primary);
    text-shadow: none;
}

/* Theme toggle animation */
.theme-toggle.theme-switching {
    animation: theme-switch-pulse 0.3s ease;
}

@keyframes theme-switch-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

