/* custom.css - Modern Dark/Light Theme with Glassmorphism */

/* ========== CSS Variables (Dark Theme - Default) ========== */
:root,
[data-theme="dark"] {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(30, 30, 50, 0.7);
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-blue: #667eea;
    --accent-purple: #764ba2;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --glass-blur: 20px;
    --border-glass: rgba(255, 255, 255, 0.1);
}

/* ========== Light Theme ========== */
[data-theme="light"] {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.9);
    --text-primary: #1a1a2e;
    --text-secondary: #555566;
    --border-glass: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] body::before {
    background:
        radial-gradient(circle at 20% 20%, rgba(102, 126, 234, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.08) 0%, transparent 50%);
}

[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .card {
    background: var(--bg-card) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .social-btn {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

[data-theme="light"] h1 {
    -webkit-text-fill-color: unset;
    color: var(--accent-blue) !important;
}

/* ========== Global Styles ========== */
body {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Background gradient overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 20%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.15) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    transition: background 0.3s ease;
}

/* ========== Typography ========== */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary) !important;
    font-weight: 700 !important;
    margin-bottom: 1.5rem !important;
}

h1 {
    font-size: 2.5rem !important;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

p {
    color: var(--text-secondary) !important;
    line-height: 1.7 !important;
}

/* ========== Navbar ========== */
.navbar {
    background: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border-glass) !important;
    backdrop-filter: blur(var(--glass-blur)) !important;
    -webkit-backdrop-filter: blur(var(--glass-blur)) !important;
    padding: 1rem 2rem !important;
    transition: background 0.3s ease;
}

.navbar-brand {
    font-weight: 700 !important;
    font-size: 1.5rem !important;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    padding: 0.5rem 1rem !important;
    border-radius: 8px !important;
    margin: 0 0.25rem !important;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary) !important;
    background: rgba(102, 126, 234, 0.2) !important;
}

.theme-toggle {
    border-radius: 50% !important;
    width: 38px;
    height: 38px;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== Cards - Glassmorphism ========== */
.card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-glass) !important;
    border-radius: 16px !important;
    backdrop-filter: blur(var(--glass-blur)) !important;
    -webkit-backdrop-filter: blur(var(--glass-blur)) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2) !important;
    border-color: rgba(102, 126, 234, 0.3) !important;
}

.card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--border-glass) !important;
    font-weight: 600 !important;
    font-size: 1.1rem !important;
    color: var(--text-primary) !important;
    padding: 1.25rem !important;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body {
    padding: 1.25rem !important;
}

.card-body p {
    font-size: 0.95rem !important;
    margin-bottom: 1rem !important;
}

/* Project card title */
.card-title-text {
    flex: 1;
    margin-right: 0.5rem;
}

/* Project tags */
.project-tag {
    display: inline-block;
    background: rgba(102, 126, 234, 0.2);
    color: var(--accent-blue);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* ========== Buttons ========== */
.btn {
    border-radius: 10px !important;
    padding: 0.6rem 1.5rem !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    border: none !important;
}

.btn-info {
    background: var(--accent-gradient) !important;
    color: white !important;
}

.btn-info:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4) !important;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
}

.btn-success:hover {
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4) !important;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: white !important;
}

.btn-danger:hover {
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.4) !important;
}

/* ========== Featured Badge ========== */
.featured-badge {
    display: inline-block;
    background: var(--accent-gradient);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ========== Skill Badges ========== */
.skill-badge {
    display: inline-block;
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: var(--accent-blue);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    margin: 0.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.skill-badge:hover {
    background: var(--accent-gradient);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.skill-badge.python {
    border-color: #3776ab;
    color: #3776ab;
    background: rgba(55, 118, 171, 0.15);
}

.skill-badge.js {
    border-color: #f7df1e;
    color: #f7df1e;
    background: rgba(247, 223, 30, 0.15);
}

.skill-badge.cloud {
    border-color: #10b981;
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
}

.skill-badge.ai {
    border-color: #a855f7;
    color: #a855f7;
    background: rgba(168, 85, 247, 0.15);
}

/* ========== Interactive Particle Canvas ========== */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* ========== Hero Section with Animation ========== */
.hero-section {
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: visible;
}

.hero-title {
    font-size: 3.5rem !important;
    margin-bottom: 1rem !important;
    animation: slideInDown 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Typing animation container */
.typing-text {
    display: inline-block;
    color: var(--accent-blue);
    font-weight: 600;
    min-width: 200px;
}

.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1.2em;
    background: var(--accent-blue);
    margin-left: 2px;
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating particles */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--accent-gradient);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 15s infinite ease-in-out;
}

.particle:nth-child(1) {
    left: 10%;
    top: 20%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.particle:nth-child(2) {
    left: 20%;
    top: 80%;
    animation-delay: 2s;
    animation-duration: 18s;
}

.particle:nth-child(3) {
    left: 30%;
    top: 40%;
    animation-delay: 4s;
    animation-duration: 14s;
}

.particle:nth-child(4) {
    left: 50%;
    top: 60%;
    animation-delay: 1s;
    animation-duration: 16s;
}

.particle:nth-child(5) {
    left: 70%;
    top: 30%;
    animation-delay: 3s;
    animation-duration: 13s;
}

.particle:nth-child(6) {
    left: 80%;
    top: 70%;
    animation-delay: 5s;
    animation-duration: 17s;
}

.particle:nth-child(7) {
    left: 90%;
    top: 50%;
    animation-delay: 2.5s;
    animation-duration: 15s;
}

.particle:nth-child(8) {
    left: 40%;
    top: 10%;
    animation-delay: 1.5s;
    animation-duration: 19s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.3;
    }

    25% {
        transform: translateY(-20px) rotate(90deg);
        opacity: 0.5;
    }

    50% {
        transform: translateY(0) rotate(180deg);
        opacity: 0.3;
    }

    75% {
        transform: translateY(20px) rotate(270deg);
        opacity: 0.5;
    }
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    margin: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-btn:hover {
    background: var(--accent-gradient);
    color: white;
    transform: translateY(-3px);
}

/* ========== Blog Styles ========== */
.blog-card {
    cursor: pointer;
}

.blog-date {
    color: var(--accent-blue);
    font-size: 0.85rem;
    font-weight: 500;
}

.blog-tag {
    display: inline-block;
    background: rgba(102, 126, 234, 0.15);
    color: var(--accent-blue);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-right: 0.5rem;
}

.blog-content {
    line-height: 1.8;
}

.blog-content h2,
.blog-content h3 {
    margin-top: 2rem;
}

.blog-content code {
    background: rgba(102, 126, 234, 0.15);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.blog-content pre {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
}

/* ========== List Groups ========== */
.list-group-item {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-glass) !important;
    color: var(--text-secondary) !important;
    padding: 1rem 1.25rem !important;
}

/* ========== Animations ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Staggered animation for cards */
.card {
    animation: fadeInUp 0.6s ease forwards;
}

.row>div:nth-child(1) .card {
    animation-delay: 0.1s;
}

.row>div:nth-child(2) .card {
    animation-delay: 0.2s;
}

.row>div:nth-child(3) .card {
    animation-delay: 0.3s;
}

.row>div:nth-child(4) .card {
    animation-delay: 0.4s;
}

.row>div:nth-child(5) .card {
    animation-delay: 0.5s;
}

.row>div:nth-child(6) .card {
    animation-delay: 0.6s;
}

/* ========== Container ========== */
.container,
.container-fluid {
    background: transparent !important;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem !important;
    }

    h1 {
        font-size: 1.8rem !important;
    }

    .navbar {
        padding: 0.75rem 1rem !important;
    }

    .particle {
        display: none;
    }
}