/* ============================================================
   PORTFOLIO APP — GLOBAL CSS
   ============================================================ */

/* ── Fonts & Root ─────────────────────────────────────────── */
:root {
    --font-sans: 'Inter', system-ui, sans-serif;
    --font-mono: 'Fira Code', 'Courier New', monospace;

    /* Brand palette */
    --accent:        #6c63ff;
    --accent-light:  #8b85ff;
    --accent-dark:   #4c46e0;
    --accent-glow:   rgba(108, 99, 255, 0.25);

    --success:       #22c55e;
    --warning:       #f59e0b;
    --danger:        #ef4444;

    /* Light theme */
    --bg-primary:    #f8f9ff;
    --bg-secondary:  #ffffff;
    --bg-card:       #ffffff;
    --text-primary:  #0f172a;
    --text-secondary:#475569;
    --text-muted:    #94a3b8;
    --border-color:  #e2e8f0;
    --shadow-sm:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md:     0 4px 16px rgba(0,0,0,.10);
    --shadow-lg:     0 10px 40px rgba(0,0,0,.12);
    --shadow-accent: 0 8px 32px rgba(108, 99, 255, 0.22);
    --radius:        14px;
    --radius-sm:     8px;
    --radius-lg:     20px;
    --transition:    0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-bs-theme="dark"] {
    --bg-primary:    #0a0b14;
    --bg-secondary:  #111827;
    --bg-card:       #1a1f2e;
    --text-primary:  #f1f5f9;
    --text-secondary:#94a3b8;
    --text-muted:    #64748b;
    --border-color:  #1e2d3d;
    --shadow-sm:     0 1px 3px rgba(0,0,0,.4);
    --shadow-md:     0 4px 16px rgba(0,0,0,.5);
    --shadow-lg:     0 10px 40px rgba(0,0,0,.6);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    transition: background var(--transition), color var(--transition);
    min-height: 100vh;
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.font-mono { font-family: var(--font-mono); }

/* ── Links ────────────────────────────────────────────────── */
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-light); }

/* ── Cards ────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-body { padding: 1.75rem; }

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
    background: rgba(var(--bg-secondary-rgb, 255,255,255), 0.85) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.875rem 0;
    position: sticky;
    top: 0;
    z-index: 1040;
    transition: background var(--transition);
}

[data-bs-theme="dark"] .navbar {
    background: rgba(17, 24, 39, 0.88) !important;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.35rem;
    background: linear-gradient(135deg, var(--accent), #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
}

.nav-link {
    font-weight: 500;
    font-size: 0.92rem;
    color: var(--text-secondary) !important;
    padding: 0.5rem 0.9rem !important;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%; right: 50%;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: left var(--transition), right var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--accent) !important;
    background: var(--accent-glow);
}

.nav-link.active::after, .nav-link:hover::after { left: 10%; right: 10%; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    padding: 0.65rem 1.6rem;
    box-shadow: var(--shadow-accent);
    transition: all var(--transition);
}
.btn-accent:hover {
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    box-shadow: 0 12px 36px rgba(108,99,255,.35);
    transform: translateY(-2px);
    color: #fff;
}

.btn-outline-accent {
    border: 2px solid var(--accent);
    color: var(--accent);
    background: transparent;
    border-radius: var(--radius-sm);
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    transition: all var(--transition);
}
.btn-outline-accent:hover {
    background: var(--accent);
    color: #fff;
    box-shadow: var(--shadow-accent);
    transform: translateY(-2px);
}

/* ── Hero Section ─────────────────────────────────────────── */
.hero-section {
    min-height: 92vh;
    display: flex;
    align-items: center;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    top: -100px; right: -100px;
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(167,139,250,.15) 0%, transparent 70%);
    bottom: -80px; left: -60px;
    pointer-events: none;
}

.hero-avatar {
    width: 260px; height: 260px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent);
    box-shadow: 0 0 0 8px var(--accent-glow), var(--shadow-lg);
    transition: transform var(--transition);
}
.hero-avatar:hover { transform: scale(1.03); }

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--accent);
    font-weight: 600;
    font-family: var(--font-mono);
}

.hero-bio {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 540px;
    line-height: 1.8;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: all var(--transition);
    text-decoration: none;
}
.social-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: var(--shadow-accent);
}

/* ── Section Headings ─────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: 4rem; }
.section-tag {
    display: inline-block;
    background: var(--accent-glow);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    margin-bottom: 1rem;
    border: 1px solid rgba(108,99,255,.25);
}
.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}
.section-divider {
    width: 60px; height: 4px;
    background: linear-gradient(90deg, var(--accent), #a78bfa);
    border-radius: 4px;
    margin: 0.75rem auto 1rem;
}
.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
}

/* ── Skill Progress Bars ──────────────────────────────────── */
.skill-bar-track {
    background: var(--border-color);
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
}
.skill-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), #a78bfa);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px var(--accent-glow);
}

/* ── Timeline (Experience) ────────────────────────────────── */
.timeline { position: relative; }
.timeline::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    border-radius: 2px;
}
.timeline-item { padding-left: 64px; position: relative; margin-bottom: 2.5rem; }
.timeline-dot {
    position: absolute;
    left: 12px; top: 6px;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
    z-index: 1;
}
.timeline-dot.active {
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(34,197,94,.25);
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%,100% { box-shadow: 0 0 0 3px rgba(34,197,94,.25); }
    50%      { box-shadow: 0 0 0 8px rgba(34,197,94,.1); }
}

/* ── Qualification Cards ──────────────────────────────────── */
.qual-card {
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
}
.qual-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius-sm);
    background: var(--accent-glow);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; color: var(--accent);
    flex-shrink: 0;
}

/* ── Project Cards ────────────────────────────────────────── */
.project-card {
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.project-card .card-body { flex: 1; display: flex; flex-direction: column; }
.project-card .tech-tag {
    display: inline-block;
    background: var(--accent-glow);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(108,99,255,.2);
    margin: 2px;
}
.project-img {
    width: 100%; height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--accent-glow), rgba(167,139,250,.15));
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; color: var(--accent);
}
.featured-badge {
    position: absolute;
    top: 12px; right: 12px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    letter-spacing: 0.05em;
}

/* ── Skill Category Cards ─────────────────────────────────── */
.skill-category-header {
    display: flex; align-items: center; gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.skill-cat-icon {
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent), #a78bfa);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.1rem;
}

/* ── Contact Form ─────────────────────────────────────────── */
.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
}
.form-control, .form-select {
    background: var(--bg-primary);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    transition: all var(--transition);
}
.form-control:focus, .form-select:focus {
    background: var(--bg-card);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    color: var(--text-primary);
}
.form-label { font-weight: 500; font-size: 0.92rem; color: var(--text-secondary); margin-bottom: 0.4rem; }

/* ── Admin Sidebar ────────────────────────────────────────── */
.admin-sidebar {
    width: 260px;
    min-height: 100vh;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem 1rem;
    position: sticky;
    top: 0;
}
.admin-nav-link {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.7rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.92rem;
    transition: all var(--transition);
    text-decoration: none;
    margin-bottom: 2px;
}
.admin-nav-link:hover, .admin-nav-link.active {
    background: var(--accent-glow);
    color: var(--accent);
}
.admin-main { flex: 1; padding: 2rem; background: var(--bg-primary); min-height: 100vh; }

/* ── Page Hero Banner ─────────────────────────────────────── */
.page-hero {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    border-bottom: 1px solid var(--border-color);
    padding: 4rem 0 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
    top: -200px; right: -100px;
    pointer-events: none;
}

/* ── CV Page ──────────────────────────────────────────────── */
.cv-section-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.25rem;
}
.cv-print-area {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 3rem;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
}

/* ── Stats / Counters ─────────────────────────────────────── */
.stat-card {
    text-align: center;
    padding: 2rem 1rem;
}
.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.25rem;
}
.stat-label { color: var(--text-secondary); font-size: 0.9rem; font-weight: 500; }

/* ── Footer ───────────────────────────────────────────────── */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0;
    margin-top: auto;
}

/* ── Dark mode toggle ─────────────────────────────────────── */
.dark-toggle {
    background: none; border: none;
    cursor: pointer;
    font-size: 1.3rem;
    color: var(--text-secondary);
    transition: color var(--transition), transform var(--transition);
    padding: 0.4rem;
    border-radius: var(--radius-sm);
}
.dark-toggle:hover { color: var(--accent); transform: rotate(20deg); }

/* ── Loading spinner ──────────────────────────────────────── */
.loading-spinner {
    display: flex; align-items: center; justify-content: center;
    padding: 4rem;
    color: var(--text-muted);
}

/* ── Badge colors ─────────────────────────────────────────── */
.badge-accent { background: var(--accent); color: #fff; }

/* ── Utilities ────────────────────────────────────────────── */
.section-py { padding: 5rem 0; }
.gap-xs { gap: 0.5rem; }
.text-accent { color: var(--accent) !important; }
.bg-accent-soft { background: var(--accent-glow) !important; }
.rounded-xl { border-radius: var(--radius) !important; }
.rounded-2xl { border-radius: var(--radius-lg) !important; }

/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.55s ease-out both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero-section { text-align: center; padding: 3rem 0; min-height: auto; }
    .hero-avatar { width: 180px; height: 180px; }
    .hero-bio { max-width: 100%; }
    .section-py { padding: 3.5rem 0; }
    .timeline::before { left: 16px; }
    .timeline-item { padding-left: 48px; }
    .timeline-dot { left: 4px; }
    .admin-sidebar { width: 100%; min-height: auto; position: relative; }
    .cv-print-area { padding: 1.5rem; }
}

@media print {
    .navbar, footer, .btn, .dark-toggle { display: none !important; }
    .cv-print-area { border: none; box-shadow: none; padding: 0; }
    body { background: white; color: black; }
}
