/* Root variables for theming - Light Teal theme */
:root {
    --primary-color: #0D9488;
    --primary-hover: #0F766E;
    --secondary-color: #334E68;
    --accent-color: #14B8A6;
    --success-color: #14B8A6;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
    --light-color: #F0FDFA;
    --dark-color: #134E4A;
    --bg-color: #ffffff;
    --text-color: #134E4A;
    --border-color: #CCFBF1;
    --shadow-light: 0 2px 4px rgba(13, 148, 136, 0.1);
    --shadow-medium: 0 4px 8px rgba(13, 148, 136, 0.12);
    --shadow-heavy: 0 8px 32px rgba(13, 148, 136, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
}

/* Dark mode variables - Professional Teal theme */
[data-theme="dark"] {
    --primary-color: #2DD4BF;
    --primary-hover: #14B8A6;
    --accent-color: #5EEAD4;
    --bg-color: #0f1419;
    --bg-card: #151d24;
    --bg-elevated: #1c262f;
    --text-color: #f0fdfa;
    --text-secondary: #94a3b8;
    --border-color: rgba(45, 212, 191, 0.12);
    --light-color: #1c262f;
    --dark-color: #f0fdfa;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-heavy: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 4px 20px rgba(45, 212, 191, 0.15);
}

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

html {
    height: 100%;
    scroll-behavior: smooth;
    overflow-y: scroll; /* Always show scrollbar to prevent jumping */
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: var(--transition);
}

.container {
    flex: 1;
}

/* Enhanced typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-color);
    opacity: 0.9;
}

/* Simple navbar - let Bootstrap handle responsiveness */
.navbar {
    background: var(--bg-color) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.navbar-nav .nav-link {
    margin-right: 10px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-item.active .nav-link {
    background-color: var(--primary-color);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.navbar-nav .nav-link:hover {
    background-color: var(--primary-hover);
}

/* Theme toggle button */
.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: var(--transition);
    margin-left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
}

.theme-toggle:hover {
    border-color: var(--primary-hover);
    background-color: var(--primary-hover);
    color: white;
    transform: rotate(180deg);
}

/* Social media icons spacing */
.navbar-nav .nav-link i {
    font-size: 1.1rem;
}

/* Navbar toggler (hamburger menu) */
.navbar-toggler {
    border-color: var(--text-color) !important;
    padding: 0.5rem;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23000000' stroke-linecap='round' stroke-miterlimit='10' stroke-width='3' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    width: 1.5em;
    height: 1.5em;
}

[data-theme="dark"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-miterlimit='10' stroke-width='3' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Mobile navbar improvements */
@media (max-width: 991px) {
    .navbar-collapse {
        background: var(--bg-color);
        border-radius: 8px;
        margin-top: 1rem;
        padding: 1rem;
        box-shadow: var(--shadow-medium);
    }
    
    .navbar-nav {
        align-items: stretch;
    }
    
    .navbar-nav .nav-item {
        margin: 0.25rem 0;
    }
    
    .navbar-nav .nav-link {
        margin-right: 0;
        padding: 0.75rem 1rem;
    }
    
    .theme-toggle {
        margin: 0.5rem auto;
        width: 45px;
        height: 45px;
    }
}

/* Hero section */
.hero-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary-color)10, var(--accent-color)10);
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="grad" cx="50%" cy="50%" r="50%"><stop offset="0%" style="stop-color:rgba(0,123,255,0.1);stop-opacity:1" /><stop offset="100%" style="stop-color:rgba(0,123,255,0);stop-opacity:0" /></radialGradient></defs><circle cx="500" cy="500" r="400" fill="url(%23grad)"/></svg>') center/cover;
    opacity: 0.3;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Button hover states */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
}

/* Navbar background override - always white */
.navbar.bg-primary {
    background-color: white !important;
    border-bottom: 1px solid #E5E5E5;
}

[data-theme="dark"] .navbar.bg-primary {
    background-color: white !important;
    border-bottom: 1px solid #E5E5E5;
}

/* Navbar text colors for white background */
.navbar-brand {
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link {
    color: #1A1A1A !important;
}

/* ============================================
   PROFESSIONAL DARK MODE ENHANCEMENTS
   ============================================ */

/* Dark mode - glassmorphism cards */
[data-theme="dark"] .reference,
[data-theme="dark"] .content-card {
    background: rgba(21, 29, 36, 0.7) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(45, 212, 191, 0.1) !important;
}

[data-theme="dark"] .reference:hover,
[data-theme="dark"] .content-card:hover {
    border-color: rgba(45, 212, 191, 0.3) !important;
    box-shadow: var(--shadow-glow);
}

/* Dark mode - accent left border on hover */
[data-theme="dark"] .reference {
    border-left: 3px solid transparent !important;
}

[data-theme="dark"] .reference:hover {
    border-left-color: var(--primary-color) !important;
}

/* Dark mode - lighter color for secondary text */
[data-theme="dark"] .reference .title {
    color: var(--accent-color) !important;
}

[data-theme="dark"] .col-md-2 a {
    color: var(--text-secondary) !important;
}

/* Dark mode - buttons with subtle glow */
[data-theme="dark"] .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover)) !important;
    border: none !important;
    color: #0f1419 !important;
    font-weight: 600;
    box-shadow: var(--shadow-glow);
}

[data-theme="dark"] .btn-primary:hover,
[data-theme="dark"] .btn-primary:focus,
[data-theme="dark"] .btn-primary:active {
    box-shadow: 0 6px 24px rgba(45, 212, 191, 0.3) !important;
    transform: translateY(-1px);
}

/* Dark mode - navbar with glassmorphism */
[data-theme="dark"] .navbar.bg-primary {
    background: rgba(15, 20, 25, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(45, 212, 191, 0.1) !important;
}

[data-theme="dark"] .navbar-brand {
    color: var(--primary-color) !important;
}

[data-theme="dark"] .navbar-nav .nav-link {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .navbar-nav .nav-link:hover,
[data-theme="dark"] .navbar-nav .nav-item.active .nav-link {
    background-color: var(--bg-elevated) !important;
    color: var(--text-color) !important;
}

/* Dark mode - theme toggle button */
[data-theme="dark"] .theme-toggle {
    border-color: rgba(45, 212, 191, 0.2) !important;
    color: var(--text-secondary) !important;
    background: var(--bg-elevated) !important;
}

[data-theme="dark"] .theme-toggle:hover {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 16px rgba(45, 212, 191, 0.2);
    color: var(--primary-color) !important;
}

/* Dark mode - links with subtle glow on hover */
[data-theme="dark"] .col-md-10 a {
    color: var(--primary-color) !important;
    transition: all 0.2s ease;
}

[data-theme="dark"] .col-md-10 a:hover {
    text-shadow: 0 0 12px rgba(45, 212, 191, 0.4);
}

/* Dark mode - arxiv/publication links */
[data-theme="dark"] .arxiv-link {
    background: var(--bg-elevated) !important;
    color: var(--primary-color) !important;
    border: 1px solid rgba(45, 212, 191, 0.2);
}

[data-theme="dark"] .arxiv-link:hover {
    background: var(--primary-color) !important;
    color: #0f1419 !important;
    box-shadow: var(--shadow-glow);
}

/* Dark mode - award date badges */
[data-theme="dark"] .award-date {
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.15), rgba(20, 184, 166, 0.1)) !important;
    color: var(--primary-color) !important;
    border: 1px solid rgba(45, 212, 191, 0.2);
}

/* Dark mode - logo banner with glassmorphism */
[data-theme="dark"] .logo-banner {
    background: rgba(21, 29, 36, 0.8) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-medium) !important;
    border: 1px solid rgba(45, 212, 191, 0.1) !important;
}

/* Dark mode - invert Tesla logo colors */
[data-theme="dark"] .logo-banner img[alt="Tesla"] {
    filter: invert(1) brightness(2);
}

/* Dark mode - Volkswagen logo white outline */
[data-theme="dark"] .logo-banner img[alt="Volkswagen"] {
    filter: drop-shadow(0 0 1px white) drop-shadow(0 0 1px white);
}

/* Dark mode - section heading underline */
[data-theme="dark"] section h2::after {
    background: linear-gradient(90deg, var(--primary-color), transparent);
}

/* Dark mode - reference card accent */
[data-theme="dark"] .reference::before {
    background: var(--primary-color);
}

/* Dark mode - content card accent */
[data-theme="dark"] .content-card::before {
    background: linear-gradient(180deg, var(--primary-color), var(--primary-hover));
}

/* Dark mode - skill tags */
[data-theme="dark"] .skill-tag {
    background: var(--bg-elevated);
    color: var(--primary-color);
    border: 1px solid rgba(45, 212, 191, 0.15);
}

[data-theme="dark"] .skill-tag:hover {
    background: var(--primary-color);
    color: #0f1419;
}

/* Dark mode - timeline dot */
[data-theme="dark"] .timeline-item::before {
    background: var(--primary-color);
    box-shadow: 0 0 12px rgba(45, 212, 191, 0.4);
}

/* Dark mode - footer */
[data-theme="dark"] footer {
    background: var(--bg-card) !important;
    border-top: 1px solid rgba(45, 212, 191, 0.1);
}

[data-theme="dark"] footer a:hover {
    color: var(--primary-color) !important;
    text-shadow: 0 0 8px rgba(45, 212, 191, 0.3);
}

/* Dark mode - profile picture glow */
[data-theme="dark"] .profile-pic {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 40px rgba(45, 212, 191, 0.15);
    border-color: var(--bg-card);
}

[data-theme="dark"] .profile-pic:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 60px rgba(45, 212, 191, 0.25);
}

/* Dark mode - custom scrollbar */
[data-theme="dark"]::-webkit-scrollbar {
    width: 10px;
}

[data-theme="dark"]::-webkit-scrollbar-track {
    background: var(--bg-color);
}

[data-theme="dark"]::-webkit-scrollbar-thumb {
    background: var(--bg-elevated);
    border-radius: 5px;
    border: 2px solid var(--bg-color);
}

[data-theme="dark"]::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Dark mode - text selection */
[data-theme="dark"] ::selection {
    background: rgba(45, 212, 191, 0.3);
    color: var(--text-color);
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 2rem;
}

/* Enhanced profile picture */
.profile-pic {
    max-width: 250px;
    max-height: 250px;
    width: 100%;
    height: auto;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: var(--shadow-heavy);
    transition: var(--transition);
    border: 4px solid var(--bg-color);
}

.profile-pic:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0,123,255,0.3);
}

/* Animated background */
#particles-js {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    opacity: 0.7;
}

/* Enhanced sections */
section {
    margin-bottom: 4rem;
    padding: 2rem 0;
}

section h2 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

/* Card-based layout for content */
.content-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

/* Enhanced reference/publication cards */
.reference {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.reference::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: var(--transition);
}

.reference:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.reference:hover::before {
    transform: scaleY(1);
}

.author {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.title {
    font-style: italic;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.journal {
    font-style: italic;
    font-size: 0.9rem;
    opacity: 0.8;
}

.arxiv-link {
    display: inline-block;
    background: var(--primary-color);
    color: white !important;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
    margin-left: 1rem;
}

.arxiv-link:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    text-decoration: none;
    color: white !important;
}

.award-date {
    background: var(--light-color);
    color: var(--text-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    float: right;
}

/* Skills/Technology tags */
.skill-tag {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    margin: 0.25rem;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.skill-tag:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* Timeline styles */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 0.5rem;
    width: 1rem;
    height: 1rem;
    background: var(--primary-color);
    border-radius: 50%;
    border: 3px solid var(--bg-color);
    box-shadow: var(--shadow-light);
}

/* Enhanced buttons */
.btn-custom {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-light);
}

.btn-custom:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
    color: white;
}

/* Loading animation */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fade-in animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced footer */
footer {
    background: var(--dark-color) !important;
    color: var(--light-color) !important;
    padding: 2rem 0;
    margin-top: 4rem;
}

footer a {
    color: var(--light-color) !important;
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-color) !important;
    text-decoration: none;
}

/* Simple responsive design - only for content */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .profile-pic {
        max-width: 200px;
        max-height: 200px;
    }
    
    .content-card {
        padding: 1.5rem;
    }
    
    .reference {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    section {
        padding: 1rem 0;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
}
