/* --- 1. Variables & Base Styles --- */
:root {
    --primary-color: #007BFF;
    --primary-dark: #0a58ca;
    --primary-rgb: 0, 123, 255;
    --bg-light: #FFFFFF;
    --bg-dark: #0a192f;
    --card-light: #F8F9FA;
    --card-dark: #112240;
    --text-light: #495057;
    --text-dark: #ccd6f6;
    --heading-light: #212529;
    --heading-dark: #e6f1ff;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-light);
    background-color: var(--bg-light);
    transition: background-color 0.3s, color 0.3s;
}

html {
    scroll-behavior: smooth;
}

/* --- 2. Glassy Header & Buttons (New) --- */
.navbar-glass {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    /* Safari */
    background-color: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.dark-mode .navbar-glass {
    background-color: rgba(10, 25, 47, 0.9);
    border-bottom: 1px solid #1e2d3d;
}

.btn-glass-primary {
    background-color: rgba(var(--primary-rgb), 0.9);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.btn-glass-primary:hover {
    background-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.5);
    transform: translateY(-2px);
    color: white;
}

.btn-glass-outline {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid white;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.btn-glass-outline:hover {
    background-color: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.glass-limit-width {
    max-width: 700px;
}

/* --- 3. Dark Mode Overrides --- */
body.dark-mode {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

body.dark-mode .navbar-brand,
body.dark-mode .nav-link,
body.dark-mode .navbar-toggler-icon,
body.dark-mode .navbar-toggler {
    color: var(--heading-dark) !important;
}

body.dark-mode .navbar-toggler {
    border: 1px solid var(--heading-dark);
}

.navbar-toggler:focus {
    box-shadow: none;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: var(--heading-dark);
}

body.dark-mode .bg-card-custom,
body.dark-mode .experience-card,
body.dark-mode .contact-right-panel {
    background-color: var(--card-dark);
    border-color: #233554 !important;
}

body.dark-mode .card-shadow {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

body.dark-mode .project-card {
    background-color: #172a45 !important;
    border: 1px solid #233554 !important;
}

body.dark-mode .project-card .text-muted,
body.dark-mode .text-muted {
    color: #a8b2d1 !important;
}

body.dark-mode .contact-tile {
    background-color: var(--bg-dark);
    border-color: #233554;
}

body.dark-mode .contact-tile .text-body {
    color: var(--text-dark) !important;
}

body.dark-mode .badge.bg-light {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #ccd6f6 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .badge.bg-primary-subtle {
    background-color: rgba(13, 110, 253, 0.2) !important;
    color: #6ea8fe !important;
}

body.dark-mode .badge.bg-info-subtle {
    background-color: rgba(13, 202, 240, 0.2) !important;
    color: #3dd5f3 !important;
}

body.dark-mode .badge.bg-success-subtle {
    background-color: rgba(25, 135, 84, 0.2) !important;
    color: #75b798 !important;
}

/* --- 4. Section Styles --- */
.hero-bg {
    background: linear-gradient(135deg, #0056b3 0%, #007bff 100%);
    min-height: 100vh;
}

body.dark-mode .hero-bg {
    background: linear-gradient(135deg, #020c1b 0%, #0a192f 100%);
}

.contact-bg {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    min-height: 80vh;
}

body.dark-mode .contact-bg {
    background: linear-gradient(135deg, #0a192f 0%, #020c1b 100%);
}

.bg-card-custom {
    background-color: var(--card-light);
    transition: background-color 0.3s;
}

.section-divider {
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 0 auto 3rem auto;
}

.nav-link {
    font-weight: 500;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Skills */
.skill-card-creative {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-bottom: 4px solid transparent;
}

.skill-card-creative:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color) !important;
    background-color: var(--bg-light);
    box-shadow: 0 15px 30px rgba(0, 123, 255, 0.15);
}

body.dark-mode .skill-card-creative:hover {
    background-color: #172a45;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.skill-card-creative .icon-wrapper {
    width: 80px;
    height: 80px;
    background-color: #ffffff;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

body.dark-mode .skill-card-creative .icon-wrapper {
    background-color: #0a192f;
    border-color: #233554;
}

.skill-card-creative:hover .icon-wrapper {
    transform: scale(1.1) rotate(5deg);
    border-color: var(--primary-color);
}

.bg-radial-glow {
    background: radial-gradient(circle, rgba(0, 123, 255, 0.05) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

/* Projects */
.project-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.project-card .project-icon-box {
    transition: transform 0.3s ease;
    width: 64px;
    height: 64px;
}

.project-card:hover .project-icon-box {
    transform: scale(1.1);
}

.project-card .read-more .transition-icon {
    transition: transform 0.2s ease;
}

.project-card .read-more:hover .transition-icon {
    transform: translateX(5px);
}

.accent-bar-bottom {
    height: 4px;
}

/* Experience */
.timeline-line {
    width: 2px;
    left: 0;
}

.timeline-marker {
    width: 24px;
    height: 24px;
    left: -11px;
    top: 24px;
}

.experience-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.experience-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

body.dark-mode .timeline-marker {
    border-color: var(--bg-dark) !important;
}

body.dark-mode .bg-body {
    background-color: #0a192f !important;
    border-color: #233554 !important;
}

body.dark-mode .text-body {
    color: var(--heading-dark) !important;
}

.icon-box-lg {
    width: 60px;
    height: 60px;
}

.bg-primary-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.border-dashed {
    border-style: dashed !important;
}

/* Contact */
.pointer-events-none {
    pointer-events: none;
}

.blob {
    position: absolute;
    background-color: white;
    opacity: 0.1;
    border-radius: 50%;
}

.blob-1 {
    width: 300px;
    height: 300px;
    top: 0;
    right: 0;
    transform: translate(30%, -30%);
}

.blob-2 {
    width: 400px;
    height: 400px;
    bottom: 0;
    left: 0;
    transform: translate(-30%, 30%);
}

.glass-card-bg {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
}

.overlay-dark {
    opacity: 0.75;
}

.contact-tile {
    background-color: var(--card-light);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-tile:hover {
    transform: translateX(5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

body.dark-mode .contact-tile:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.opacity-10 {
    opacity: 0.1;
}

.opacity-50 {
    opacity: 0.5;
}

.icon-box {
    width: 60px;
    height: 60px;
}

/* --- 5. Mobile & Utility Fixes --- */

/* Fix for Contact Tile Overflow on Mobile */
.contact-tile .text-content {
    min-width: 0;
    /* Critical for text-truncate/break inside flex */
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .contact-tile {
        padding: 1rem !important;
        /* Reduce padding */
        gap: 0.75rem !important;
        /* Reduce gap */
    }

    .contact-tile .icon-box {
        width: 45px;
        height: 45px;
        padding: 0.5rem !important;
    }

    .contact-tile .icon-box .material-icons {
        font-size: 1.25rem !important;
    }

    .contact-tile h5 {
        font-size: 1rem;
    }

    .timeline-line,
    .timeline-marker {
        display: none;
        /* Hide timeline line on small screens */
    }
}