/* Base Styling & Variables */
:root {
    --primary-color: #0d6efd;
    --transition-speed: 0.4s;
    --glow-color: rgba(13, 110, 253, 0.6);
}

[data-bs-theme="dark"] {
    --bg-color: #121212;
    --text-color: #f8f9fa;
    --card-bg: #1e1e1e;
    --timeline-border: #333;
}

[data-bs-theme="light"] {
    --bg-color: #f8f9fa;
    --text-color: #212529;
    --card-bg: #ffffff;
    --timeline-border: #dee2e6;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    overflow-x: hidden;
}

/* Theme Toggle Button (Lumos) */
.theme-toggle-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1050;
}

#themeToggle {
    width: 60px;
    height: 60px;
    font-size: 24px;
    transition: all var(--transition-speed) ease;
    background: var(--bg-color);
    color: var(--text-color);
    border: 2px solid var(--text-color);
}

#themeToggle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--glow-color);
}

/* Lumos Effect */
.lumos-flash {
    animation: flashEffect 1s ease-out;
}

@keyframes flashEffect {
    0% { background-color: #fff; opacity: 1; }
    100% { background-color: transparent; opacity: 0; display: none; }
}

#lumos-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 9999;
    pointer-events: none;
    display: none;
}

/* Hero Section */
.masthead {
    position: relative;
    padding-top: 10rem;
    padding-bottom: calc(10rem - 4.5rem);
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4)), url('https://images.unsplash.com/photo-1550439062-609e1531270e?q=80&w=2070&auto=format&fit=crop') no-repeat center center scroll;
    background-size: cover;
    height: 100vh;
    color: white;
}

.glow-text {
    text-shadow: 0 0 15px var(--glow-color), 0 0 30px var(--glow-color);
}

/* Typography and Headings */
.section-heading {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.divider {
    max-width: 50px;
    border-width: 3px;
    border-color: var(--primary-color);
    margin: 1.5rem auto;
    opacity: 1;
}

/* Page Section */
.page-section {
    padding: 6rem 0;
}

/* Navbar */
.navbar {
    transition: background-color 0.3s ease, padding 0.3s ease;
}

.navbar-scrolled {
    background-color: var(--bg-color) !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.navbar-scrolled .nav-link,
.navbar-scrolled .navbar-brand {
    color: var(--text-color) !important;
}

/* Timeline */
.timeline {
    position: relative;
    padding: 0;
    list-style: none;
}

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

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    padding-left: 90px;
}

.timeline-icon {
    position: absolute;
    left: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    z-index: 10;
}

.timeline-content {
    transition: transform 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
}

/* Cards */
.project-card, .skill-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover, .skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
}

/* Contact Icons */
.contact-icon div {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-icon div:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--primary-color) !important;
}

@media (max-width: 992px) {
    .timeline::before {
        left: 20px;
    }
    .timeline-item {
        padding-left: 60px;
    }
    .timeline-icon {
        left: 0;
    }
}

/* New UI Enhancements (Certifications & Research) */
.glass-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
}
[data-bs-theme="dark"] .glass-card {
    background: rgba(30, 30, 30, 0.7);
}
[data-bs-theme="light"] .glass-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.cert-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    background: var(--card-bg);
}
.cert-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(13, 110, 253, 0.15) !important;
}
.cert-card .cert-icon-wrapper i {
    transition: transform 0.4s ease;
}
.cert-card:hover .cert-icon-wrapper i {
    transform: scale(1.2) rotate(5deg);
}
