/* Global Styles - Masculine & Professional */
:root {
    --primary-color: #1a73e8;
    --secondary-color: #0d47a1;
    --accent-color: #ff6b35;
    --dark-bg: #0a1929;
    --darker-bg: #050d18;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --bg-card: #ffffff;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
    background-color: var(--bg-light);
    padding-top: 70px;
}

/* Accessibility improvements - Better contrast */
.text-muted {
    color: #4b5563 !important; /* Darker gray for better contrast */
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.9) !important; /* Improved contrast */
}

/* Ensure sufficient contrast for links */
a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Footer heading styling */
.footer h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

code, pre {
    font-family: 'Fira Code', monospace;
}

/* Navigation - Bold & Professional */
.navbar {
    box-shadow: var(--shadow-md);
    background: var(--dark-bg) !important;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border-bottom: 2px solid var(--primary-color);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.6rem;
    color: white !important;
    letter-spacing: -0.5px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: 6px;
}

.nav-link:hover {
    color: white !important;
    background: rgba(26, 115, 232, 0.2);
    transform: translateY(-1px);
}

/* Hero Section - Engaging & Interactive */
.hero-section {
    background: linear-gradient(135deg, #0a1929 0%, #1e3a5f 50%, #0d47a1 100%);
    color: white;
    padding: 90px 0 60px;
    min-height: auto;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(26, 115, 232, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 107, 53, 0.1) 0%, transparent 50%);
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)" /></svg>');
    opacity: 0.3;
}

.hero-section h1 {
    font-size: 4.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease;
    letter-spacing: -2px;
    line-height: 1.1;
    position: relative;
    z-index: 1;
}

.hero-section .lead {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    animation: fadeInUp 1.2s ease;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-image {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid rgba(255, 255, 255, 0.9);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 20px rgba(26, 115, 232, 0.1);
    transition: all 0.5s ease;
    animation: float 6s ease-in-out infinite;
}

.hero-image:hover {
    transform: scale(1.05) translateY(-10px);
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.5),
        0 0 0 25px rgba(26, 115, 232, 0.2);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Cards - Interactive & Engaging */
.card {
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    background: var(--bg-card);
    position: relative;
}

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

.card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.12),
        0 0 0 1px var(--primary-color);
}

.card:hover::before {
    transform: scaleX(1);
}

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

/* Buttons - Interactive & Modern */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    padding: 16px 36px;
    font-weight: 700;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(26, 115, 232, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 15px 35px rgba(26, 115, 232, 0.5);
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.9);
    color: white;
    font-weight: 700;
    padding: 16px 36px;
    border-radius: 12px;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-outline-light::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: white;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn-outline-light:hover::before {
    width: 300px;
    height: 300px;
}

.btn-outline-light:hover {
    color: var(--dark-bg);
    border-color: white;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 15px 35px rgba(255, 255, 255, 0.3);
}

.btn-outline-light span {
    position: relative;
    z-index: 1;
}

/* Section */
.section {
    padding: 100px 0;
    background: var(--bg-light);
}

.section:nth-child(even) {
    background: white;
}

/* Section Titles - Eye-Catching */
.section-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 4rem;
    text-align: center;
    position: relative;
    padding-bottom: 2rem;
    letter-spacing: -2px;
    color: var(--text-dark);
    animation: fadeInUp 0.8s ease;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.3);
}

.section-title i {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-right: 0.5rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding: 20px 0;
}

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

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--secondary-color);
    border: 4px solid white;
    border-radius: 50%;
    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: auto;
}

/* Skills - Modern & Engaging */
.skill-item {
    margin-bottom: 2rem;
}

.skill-name {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.skill-bar {
    height: 14px;
    background: var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 0.75rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Blog */
.blog-card {
    margin-bottom: 2rem;
}

.blog-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.blog-meta i {
    margin-right: 0.3rem;
}

.blog-tags {
    margin-top: 1rem;
}

.tag {
    display: inline-block;
    background: var(--light-bg);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
}

/* Code Snippets */
.code-snippet {
    margin: 2rem 0;
    border-radius: 10px;
    overflow: hidden;
}

.code-header {
    background: #2d2d2d;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copy-btn {
    background: var(--secondary-color);
    border: none;
    color: white;
    padding: 5px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
}

pre[class*="language-"] {
    margin: 0;
    border-radius: 0;
}

/* Interactive Maps */
.map-container {
    margin: 2rem 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.map-container .leaflet-container {
    height: 400px;
    border-radius: 10px;
}

/* GitHub Repos */
.repo-card {
    border-left: 4px solid var(--secondary-color);
}

.repo-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.repo-stat {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.language-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    background: var(--light-bg);
    color: var(--text-color);
}

/* Research */
.research-card {
    border-left: 4px solid var(--accent-color);
}

.research-authors {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.doi-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

.doi-link:hover {
    text-decoration: underline;
}

/* Comments */
.comment {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.comment-author {
    font-weight: 600;
    color: var(--primary-color);
}

.comment-date {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Footer */
footer a {
    transition: opacity 0.3s ease;
}

footer a:hover {
    opacity: 0.7;
}

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

/* Animations - Smooth & Engaging */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scroll Reveal Animation */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up {
    animation: fadeInUp 0.6s ease;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--secondary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

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