/*
   New Design System - Reeni Inspiration
   Aesthetics: Soft UI, Purple Accents, Modern Typography
*/

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

:root {
    --primary: #6c5ce7;
    --primary-light: #a29bfe;
    --primary-dark: #4834d4;
    --accent: #f39c12;
    --text-dark: #1d1d1d;
    --text-muted: #636e72;
    --bg-white: #ffffff;
    --bg-light: #f9f9f9;
    --bg-overlay: rgba(255, 255, 255, 0.85);
    --radius-lg: 30px;
    --radius-md: 15px;
    --shadow-soft: 0 10px 30px rgba(108, 92, 231, 0.1);
    --shadow-mature: 0 20px 50px rgba(0, 0, 0, 0.05);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --glass: rgba(255, 255, 255, 0.7);
    --border-color: rgba(0, 0, 0, 0.05);
    /* Brand Colors */
    --brand-900: #0f172a;
    --brand-footer: #090e1a;
    --brand-muted: #94a3b8;
}

.dark {
    --text-dark: #f0f0f0;
    --text-muted: #a0a0a0;
    --bg-white: #121212;
    --bg-light: #1e1e1e;
    --bg-overlay: rgba(18, 18, 18, 0.85);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-mature: 0 20px 50px rgba(0, 0, 0, 0.5);
    --brand-900: #0f172a;
    --brand-footer: #090e1a;
    --brand-muted: #94a3b8;
    --glass: rgba(30, 30, 30, 0.7);
    --border-color: rgba(255, 255, 255, 0.05);
}

.bg-brand-footer { background-color: var(--brand-footer) !important; color: white !important; padding-top: 100px !important; padding-bottom: 60px !important; }
.bg-brand-footer .text-brand-muted { color: var(--brand-muted) !important; }
.bg-brand-footer h3, .bg-brand-footer h4 { color: white !important; }

.bg-brand-900 { background-color: var(--brand-900) !important; }

/* Global Utility Overrides for Theme Awareness */
.bg-white { background-color: var(--bg-white) !important; transition: var(--transition); }
.bg-light { background-color: var(--bg-light) !important; transition: var(--transition); }
.text-dark { color: var(--text-dark) !important; }
.text-muted { color: var(--text-muted) !important; }
.border-b, .border-t, .border { border-color: var(--border-color) !important; }

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.8; /* More breathable line-height */
    background-color: var(--bg-white);
    background-image: radial-gradient(var(--primary) 0.5px, transparent 0.5px);
    background-size: 40px 40px;
    background-attachment: fixed;
    opacity: 0.99;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800; /* Bolder headers */
    color: var(--text-dark);
    letter-spacing: -0.01em;
}

/* Layout Utilities */
.section-padding { padding: 140px 0; } /* More gapping between sections */
@media (max-width: 768px) { .section-padding { padding: 80px 0; } }

.container-custom {
    max-width: 1320px; /* Slightly wider for modern feel */
    margin: 0 auto;
    padding: 0 25px;
}

/* Rounded Cards & Containers */
.soft-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 50px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.dark .soft-card {
    background: var(--bg-light);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.soft-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 40px 80px rgba(108, 92, 231, 0.15);
}

.dark .soft-card:hover {
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
    background: #252525;
}

/* Modern Pill Buttons */
.btn-modern {
    display: inline-flex;
    align-items: center;
    padding: 14px 30px;
    background-color: var(--primary);
    color: white !important;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    gap: 10px;
}

.btn-modern:hover {
    background-color: var(--primary-dark);
    transform: scale(1.05);
}

.btn-modern i {
    transition: var(--transition);
}

.btn-modern:hover i {
    transform: translateX(5px);
}

/* Header & Nav */
.header-modern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--bg-overlay);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.header-modern.scrolled {
    padding: 10px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.nav-link-modern {
    font-weight: 500;
    color: var(--text-dark);
    margin: 0 15px;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: var(--transition);
}

.nav-link-modern:hover, .nav-link-modern.active {
    background-color: var(--primary);
    color: white !important;
}

.header-nav-list {
    display: none;
}
@media (min-width: 992px) {
    .header-nav-list {
        display: flex;
    }
}

/* Hero Section */
#typed-text {
    min-height: 1.2em;
    display: inline-block;
}

.hero-text h1 {
    font-size: 55px; /* Larger for impact */
    line-height: 1.1;
    margin-bottom: 25px;
    letter-spacing: -0.03em;
}

@media (max-width: 1200px) {
    .hero-text h1 { font-size: 4rem; }
}

@media (max-width: 768px) {
    .hero-text h1 { font-size: 3rem; }
}

.hero-text .typed-cursor {
    color: var(--primary);
    margin-left: 5px;
    opacity: 0.8;
}

/* Typewriter colors */
.text-primary-color { color: var(--primary); }

/* Glow Effects */
.btn-modern {
    position: relative;
    overflow: hidden;
}

.dark .btn-modern:hover {
    box-shadow: 0 0 30px rgba(108, 92, 231, 0.4);
}

.glass-effect {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.3);
}

.dark .glass-effect {
    background: rgba(40, 40, 40, 0.7);
    border: 1px solid rgba(255,255,255,0.1);
}

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

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

@keyframes float-delayed {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(20px) rotate(-2deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.animate-up {
    animation: fadeInUp 0.8s ease forwards;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 8s ease-in-out infinite;
}

/* Fix for Hero Overlap */
#home {
    padding-top: 120px !important;
    min-height: 800px;
}

@media (min-width: 1024px) {
    #home {
        padding-top: 100px !important;
        min-height: 100vh;
    }
}

.container-custom {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
}

@media (max-width: 640px) {
    .container-custom { padding: 0 20px; }
}

/* Fallback Responsive Grid Utilities */
.flex-side-by-side {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

@media (min-width: 1024px) {
    .flex-side-by-side {
        flex-direction: row;
        align-items: center;
    }
    .w-lg-50 { width: 50%; }
    .w-lg-60 { width: 60%; }
    .w-lg-45 { width: 45%; }
    .w-lg-55 { width: 55%; }
    .w-lg-40 { width: 40%; }
}

.grid-fallback {
    display: flex;
    flex-wrap: wrap;
    gap: 60px;
    align-items: stretch;
}

.section-margin-y {
    margin-top: 120px !important;
    margin-bottom: 120px !important;
}

@media (max-width: 768px) {
    .section-margin-y {
        margin-top: 60px !important;
        margin-bottom: 60px !important;
    }
}

.grid-fallback.items-start {
    align-items: flex-start;
}

.grid-fallback > * {
    width: 100%;
}

@media (min-width: 768px) {
    .grid-fallback-2 > *,
    .md\:grid-fallback-2 > * {
        width: calc(50% - 30px);
    }
    .grid-fallback-3 > *,
    .md\:grid-fallback-3 > * {
        width: calc(33.333% - 40px);
    }
    .md\:grid-fallback-2 > * {
        width: calc(50% - 30px);
    }
}

@media (min-width: 1024px) {
    .lg\:grid-fallback-2 > * {
        width: calc(50% - 30px);
    }
    .lg\:grid-fallback-3 > * {
        width: calc(33.333% - 40px);
    }
    .grid-fallback-4 > *,
    .lg\:grid-fallback-4 > * {
        width: calc(25% - 45px);
    }
}

/* Social Buttons Shadow Logic */
.bg-white, .btn-modern, .soft-card {
    transition: var(--transition);
}

.dark .bg-white {
    background-color: var(--bg-white) !important;
}

/* Social Icon Fix for Dark Mode */
.dark .fa-facebook-f, .dark .fa-twitter, .dark .fa-linkedin-in, .dark .fa-instagram {
    color: white;
}

.dark a[class*="bg-white"] {
    background-color: var(--bg-light) !important;
    border-color: var(--border-color) !important;
}

/* Hero Slider Styles */
.heroSwiper {
    width: 100%;
    height: 100%;
}

.heroSwiper .swiper-slide {
    opacity: 0 !important;
    transition: opacity 1s ease-in-out;
}

.heroSwiper .swiper-slide-active {
    opacity: 1 !important;
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: var(--primary) !important;
    opacity: 0.3 !important;
    transition: var(--transition);
}

.swiper-pagination-bullet-active {
    opacity: 1 !important;
    width: 30px;
    border-radius: 6px;
}

.swiper-button-next, .swiper-button-prev {
    color: var(--primary) !important;
    background: var(--bg-white);
    width: 60px !important;
    height: 60px !important;
    border-radius: 50%;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.dark .swiper-button-next, .dark .swiper-button-prev {
    background: var(--bg-light);
}

.swiper-button-next:after, .swiper-button-prev:after {
    font-size: 20px !important;
    font-weight: 900;
}

.swiper-button-next:hover, .swiper-button-prev:hover {
    background: var(--primary);
    color: white !important;
    transform: scale(1.1);
}

/* Background Patterns */
.bg-pattern-dots {
    background-image: radial-gradient(var(--primary) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.1;
}

/* Glassmorphism */
.glass-effect {
    background: var(--glass);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.2);
}

/* Responsive Fixes */
@media (max-width: 991px) {
    .hero-text h1 { font-size: 3rem; }
    .profile-card img { height: 450px !important; }
}

@media (max-width: 767px) {
    .container-custom { padding: 0 15px; }
    .hero-text h1 { font-size: 2.2rem; }
    .profile-card img {
        height: 300px !important;
        border-radius: 20px !important;
    }
    .section-padding { padding: 40px 0; }
}

/* Life Elements */
.shape-blob {
    position: absolute;
    filter: blur(40px);
    z-index: -1;
    border-radius: 50%;
    opacity: 0.15;
}

/* Fix Experience Timeline Overlap */
#resume .relative.pl-12 {
    padding-left: 3.5rem !important;
}

#resume .absolute.-left-\[89px\] {
    left: -100px !important;
}

@media (min-width: 768px) {
    #resume .absolute.-left-\[89px\] {
        left: -105px !important;
    }
}

/* Lightbox Styles */
.lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(9, 14, 26, 0.95);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 40px;
}

.lightbox-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    transform: scale(0.9);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 20px;
    box-shadow: 0 50px 100px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.lightbox-modal.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 40px;
    right: 40px;
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.1);
}

.lightbox-close:hover {
    background: var(--primary);
    transform: rotate(90deg);
}
