:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --dark-color: #212529;
    --light-gray: #f8f9fa;
    --text-gray: #6c757d;
}

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

body {
    font-family: 'Manrope', sans-serif;
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    background-color: rgba(33, 37, 41, 0.95) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--warning-color) !important;
}

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

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
}

/* Tech Icons */
.tech-icon {
    width: 60px;
    height: 60px;
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease, filter 0.3s ease;
}

.tech-icon:hover {
    transform: scale(1.2) rotate(5deg);
    filter: brightness(1) invert(0);
}

/* Contact Icons */
.contact-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.contact-icon-wrapper i {
    color: white !important;
}

.contact-icon-wrapper:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Hover Lift Effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15) !important;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    z-index: 1;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-video iframe {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.5) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding-top: 80px;
}

/* Ensure content sections are above hero */
section:not(.hero-section) {
    position: relative;
    z-index: 5;
    background: inherit;
}

.hero-section h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease-out;
}

.hero-section .lead {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease-out 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cards */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 15px;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.card-img-top {
    border-radius: 15px 15px 0 0;
    height: 200px;
    object-fit: cover;
}

/* Buttons */
.btn {
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-warning {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
    color: #000;
}

.btn-warning:hover {
    background-color: #ffb700;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4);
}

.btn-outline-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

/* Badges */
.badge {
    padding: 6px 12px;
    font-weight: 500;
    border-radius: 20px;
}

/* Skills Section */
.skill-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #0a58ca);
    color: white;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
}

/* Text utilities */
.text-light-gray {
    color: #adb5bd;
}

.display-1 {
    font-weight: 800;
}

.display-4 {
    font-weight: 700;
}

/* Sections */
section {
    padding: 60px 0;
}

/* Timeline (for experience page) */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
    transform: translateX(-50%);
}

.timeline-item {
    margin-bottom: 40px;
    position: relative;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 4px solid white;
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-content {
    width: 45%;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: 55%;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-right: 55%;
}

/* Responsive */
@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }
    
    .timeline-marker {
        left: 30px;
    }
    
    .timeline-content {
        width: calc(100% - 60px);
        margin-left: 60px !important;
        margin-right: 0 !important;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Footer */
footer {
    margin-top: auto;
}

footer a:hover {
    color: var(--warning-color) !important;
}

/* Project cards specific */
.project-card {
    height: 100%;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* Experience cards */
.experience-card {
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.experience-card:hover {
    border-left-color: var(--warning-color);
    transform: translateX(5px);
}

.experience-card.current {
    border-left-color: var(--success-color);
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.05) 0%, rgba(255, 255, 255, 1) 100%);
}

/* Social icons in nav */
.navbar .iconfont-wrapper,
.navbar a[href*="linkedin"],
.navbar a[href*="github"],
.navbar a[href*="mailto"] {
    transition: all 0.3s ease;
}

.navbar .iconfont-wrapper:hover,
.navbar a:hover i {
    transform: translateY(-2px);
    color: var(--warning-color) !important;
}

/* Utility classes */
.fw-800 {
    font-weight: 800;
}

/* Fix modal z-index and interaction */
.modal-backdrop {
    z-index: 1040 !important;
}

.modal-backdrop.show {
    z-index: 1040 !important;
}

.modal {
    z-index: 1050 !important;
}

.modal.show {
    z-index: 1050 !important;
}

.modal-dialog {
    z-index: auto;
    position: relative;
}

.modal-content {
    position: relative;
    z-index: auto;
    pointer-events: auto !important;
}

.modal-body,
.modal-header,
.modal-footer {
    pointer-events: auto !important;
}

/* Icon Circle for CV Page */
.icon-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* CV Stats Cards */
.stat-card-cv {
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.stat-card-cv:hover {
    transform: translateY(-5px);
}

/* Skills Grid Enhancement */
#skills-grid .card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    transition: all 0.3s ease;
}

#skills-grid .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Experience Timeline Enhancement */
.experience-card {
    position: relative;
    overflow: hidden;
}

.experience-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(to bottom, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.experience-card:hover::before {
    width: 8px;
}

.experience-card.current::before {
    background: linear-gradient(to bottom, #28a745, #20c997);
}

/* Timeline Layout */
#experience-timeline {
    position: relative;
    padding: 40px 0;
}

/* Central timeline line */
#experience-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, #667eea, #764ba2);
    z-index: 1;
}

.timeline-item {
    position: relative;
    margin-bottom: 60px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.timeline-left {
    justify-content: flex-start;
}

.timeline-right {
    justify-content: flex-end;
}

.timeline-left .experience-card {
    margin-right: calc(50% + 40px);
}

.timeline-right .experience-card {
    margin-left: calc(50% + 40px);
}

.timeline-item .experience-card {
    width: calc(50% - 40px);
    max-width: 600px;
}

/* Timeline dots */
.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 0 0 5px rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.timeline-dot.current {
    background: linear-gradient(135deg, #28a745, #20c997);
    box-shadow: 0 0 0 5px rgba(40, 167, 69, 0.2), 0 0 20px rgba(40, 167, 69, 0.4);
    animation: pulse 2s infinite;
}

.timeline-item:hover .timeline-dot {
    transform: translateX(-50%) scale(1.15);
    box-shadow: 0 0 0 8px rgba(102, 126, 234, 0.3);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 5px rgba(40, 167, 69, 0.2), 0 0 20px rgba(40, 167, 69, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0.1), 0 0 30px rgba(40, 167, 69, 0.6);
    }
}

/* Mobile responsiveness for timeline */
@media (max-width: 768px) {
    #experience-timeline::before {
        left: 30px;
    }
    
    .timeline-item,
    .timeline-left,
    .timeline-right {
        justify-content: flex-start;
        padding-left: 70px;
    }
    
    .timeline-left .experience-card,
    .timeline-right .experience-card {
        margin: 0;
        width: 100%;
    }
    
    .timeline-item .experience-card {
        width: 100%;
        max-width: 100%;
    }
    
    .timeline-dot {
        left: 30px;
    }
}

.letter-spacing-1 {
    letter-spacing: 1px;
}

.rounded-lg {
    border-radius: 15px !important;
}

/* Education Tabs */
#educationTabs .nav-link {
    color: #495057;
    border-radius: 25px;
    padding: 10px 20px;
    margin: 0 5px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

#educationTabs .nav-link:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
}

#educationTabs .nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Footer Styles */
footer .hover-link {
    transition: color 0.3s ease, padding-left 0.3s ease;
    display: inline-block;
}

footer .hover-link:hover {
    color: #667eea !important;
    padding-left: 5px;
}

footer .hover-lift:hover {
    transform: translateY(-3px);
    color: #667eea !important;
}

footer h5 {
    font-size: 1.1rem;
    color: #ffffff;
}

footer .text-muted {
    color: #adb5bd !important;
}

footer .text-muted a {
    color: #adb5bd !important;
}

footer .text-muted a:hover {
    color: #667eea !important;
}

footer .border-secondary {
    border-color: rgba(255, 255, 255, 0.1) !important;
}
