/* =========================================================================
   1. SYSTEM VARIABLES & GLOBAL THEME CONFIGURATION (CSS VARIABLES)
   ========================================================================= */
:root {
    --accent-color: #ef4444;
    --accent-rgb: 239, 68, 68;
    --font-main: 'Inter', sans-serif;
    --font-code: 'Fira Code', monospace;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode Colors (Integrated with Bootstrap 5.3 Theme Attributes) */
[data-bs-theme="dark"] {
    --card-bg: #1e293b;
    --terminal-bg: #0f172a;
    --body-bg-gradient: radial-gradient(circle at 50% 50%, #111827 0%, #030712 100%);
    --text-muted-custom: #94a3b8;
}

/* Light Mode Colors */
[data-bs-theme="light"] {
    --card-bg: #ffffff;
    --terminal-bg: #f1f5f9;
    --body-bg-gradient: radial-gradient(circle at 50% 50%, #f8fafc 0%, #e2e8f0 100%);
    --text-muted-custom: #64748b;
}

/* =========================================================================
   2. GLOBAL STYLES & DEFAULTS
   ========================================================================= */
body {
    font-family: var(--font-main);
    background: var(--body-bg-gradient);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    transition: background 0.5s ease, color 0.3s ease;
}

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

/* Custom Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

/* Utility Color Classes */
.text-accent { 
    color: var(--accent-color) !important; 
}
.bg-accent { 
    background-color: var(--accent-color) !important; 
}

/* Primary Accent Button */
.btn-accent {
    background-color: var(--accent-color);
    color: #ffffff;
    border: none;
    transition: var(--transition-smooth);
}
.btn-accent:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}

/* Outline Accent Button */
.btn-outline-accent {
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    background: transparent;
    transition: var(--transition-smooth);
}
.btn-outline-accent:hover {
    background-color: var(--accent-color);
    color: #ffffff;
    transform: translateY(-2px);
}

/* =========================================================================
   3. NAVIGATION BAR (NAVBAR)
   ========================================================================= */
.navbar-custom {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--accent-color);
    transition: var(--transition-smooth);
}

.navbar-brand-code {
    font-family: var(--font-code);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--accent-color) !important;
    letter-spacing: -0.5px;
}

.nav-link-custom {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    margin: 0 0.2rem;
    border-radius: 8px;
    transition: var(--transition-smooth);
}
.nav-link-custom:hover, .nav-link-custom.active {
    color: var(--accent-color) !important;
    background-color: rgba(239, 68, 68, 0.08);
}

/* Theme Toggle Button */
.theme-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    background: rgba(var(--accent-rgb), 0.05);
    color: var(--accent-color);
    transition: var(--transition-smooth);
}
.theme-btn:hover {
    background: var(--accent-color);
    color: #ffffff;
    transform: rotate(15deg);
}

/* =========================================================================
   4. HERO SECTION & INTERACTIVE TERMINAL
   ========================================================================= */
.hero-section {
    padding: 8rem 0 5rem 0;
    position: relative;
}

.hero-badge {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1.5rem;
}

/* Typewriter Blinking Cursor Effect */
.typewriter-cursor {
    font-weight: 700;
    animation: blink 0.8s infinite;
    color: var(--accent-color);
}

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

/* Mock IDE Terminal Styling */
.mock-terminal {
    background-color: var(--terminal-bg);
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    font-family: var(--font-code);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.terminal-header {
    background: rgba(148, 163, 184, 0.05);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.terminal-dots span {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.terminal-body {
    padding: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* =========================================================================
   5. SCROLL REVEAL ANIMATIONS
   ========================================================================= */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================================
   6. PROJECT CARDS
   ========================================================================= */
.project-card {
    background-color: var(--card-bg);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 16px;
    overflow: hidden;
    height: 100%;
    transition: var(--transition-smooth);
    position: relative;
}
.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-color);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.project-img-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}
.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}
.project-card:hover .project-img {
    transform: scale(1.05);
}

/* =========================================================================
   7. ABOUT ME & TECHNICAL SKILLS
   ========================================================================= */
.skill-badge {
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.15);
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-weight: 500;
    transition: var(--transition-smooth);
    cursor: default;
}
.skill-badge:hover {
    border-color: var(--accent-color);
    background: rgba(239, 68, 68, 0.05);
    transform: translateY(-3px);
    color: var(--accent-color);
}

.about-img-frame {
    position: relative;
    display: inline-block;
}
.about-img-frame::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: -15px;
    bottom: -15px;
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    z-index: -1;
    transition: var(--transition-smooth);
}
.about-img-frame:hover::after {
    top: 8px;
    left: 8px;
    right: -8px;
    bottom: -8px;
}

.profile-avatar {
    width: 260px;
    height: 260px;
    object-fit: cover;
    border-radius: 50%;
    border: 6px solid var(--card-bg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* =========================================================================
   8. CONTACT CARDS & FOOTER ANIMATIONS
   ========================================================================= */
.contact-card {
    background-color: var(--card-bg);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 14px;
    padding: 1.5rem;
    transition: var(--transition-smooth);
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.contact-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
    color: inherit;
}
.contact-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Heartbeat Animation for the Footer Coffee Icon */
@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.1); }
    28% { transform: scale(1); }
    42% { transform: scale(1.1); }
    70% { transform: scale(1); }
}
.animate-beat {
    display: inline-block;
    animation: heartBeat 1.5s infinite ease-in-out;
}