/* ==========================================================================
   THEME DESIGN DESIGN SYSTEM VARIABLES & CORE
   ========================================================================== */
:root {
    --primary-color: #2563EB;
    --secondary-color: #0F172A;
    --accent-color: #06B6D4;
    --bg-color: #F8FAFC;
    --text-color: #1E293B;
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(226, 232, 240, 0.8);
    --navbar-bg: rgba(248, 250, 252, 0.85);
    --border-light: #E2E8F0;
    --gradient-primary: linear-gradient(135deg, #2563EB 0%, #06B6D4 100%);
    --success-soft: rgba(34, 197, 94, 0.15);
}

[data-theme="dark"] {
    --primary-color: #3B82F6;
    --secondary-color: #F8FAFC;
    --accent-color: #22D3EE;
    --bg-color: #0B0F19;
    --text-color: #CBD5E1;
    --card-bg: rgba(15, 23, 42, 0.6);
    --card-border: rgba(51, 65, 85, 0.5);
    --navbar-bg: rgba(11, 15, 25, 0.85);
    --border-light: #1E293B;
    --success-soft: rgba(34, 197, 94, 0.25);
}

/* Base Configuration */
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.section-padding { padding: 100px 0; }
.section-bg { background-color: rgba(0, 0, 0, 0.02); }
.max-w-500 { max-width: 500px; }
.max-w-600 { max-width: 600px; }
.max-w-800 { max-width: 800px; }
.tracking-widest { letter-spacing: 0.15em; }
.tracking-wider { letter-spacing: 0.1em; }
.text-accent { color: var(--accent-color); }
.text-secondary-custom { color: var(--secondary-color); }
.bg-success-soft { background-color: var(--success-soft); }
.border-top-custom { border-top: 1px solid var(--border-light); }
.border-light-custom { border-color: var(--border-light); }
.inline-block { display: inline-block; }

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--secondary-color);
    position: relative;
    padding-bottom: 12px;
}

/* Glassmorphism Structural Definition */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ==========================================================================
   NAVIGATION DESIGNS
   ========================================================================== */
.navbar {
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
    transition: padding 0.3s ease, background 0.4s ease;
}

.navbar-brand {
    font-weight: 700;
    color: var(--secondary-color) !important;
    letter-spacing: -0.5px;
}
.navbar-brand span { color: var(--primary-color); }

.navbar-nav .nav-link {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: color 0.3s, background-color 0.3s;
}
.navbar-nav .nav-link.active, .navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.btn-icon-toggle {
    background: var(--card-border);
    border: none;
    color: var(--secondary-color);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.alignment-center {
    align-items: center;
}

/* ==========================================================================
   HERO CORE LAYOUTS
   ========================================================================== */
.hero-section {
    min-vh: 100vh;
    padding-top: 80px;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glow-bg {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(37,99,233,0.15) 0%, rgba(6,182,212,0) 70%);
    top: -100px;
    right: -100px;
    z-index: -1;
}

/* Button Optimization Engine */
.custom-btn {
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    box-shadow: 0 4px 14px rgba(37, 99, 233, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 233, 0.4);
    opacity: 0.95;
}
.btn-light-glass {
    background: rgba(255,255,255,0.15);
    border: 1px solid var(--card-border);
    color: var(--text-color);
}
.btn-light-glass:hover {
    background: rgba(255,255,255,0.25);
    color: var(--secondary-color);
}

/* Placeholder Styling System */
.profile-placeholder {
    width: 320px;
    height: 320px;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: var(--gradient-primary);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 35px rgba(37, 99, 233, 0.25);
    animation: morphAnimation 8s ease-in-out infinite alternate;
}
.text-primary-custom { color: var(--primary-color) !important; }

/* Typing Text Mechanics */
.dynamic-txt-box { display: inline-block; }
.cursor { animation: blink 0.8s infinite; color: var(--primary-color); }

/* ==========================================================================
   SKILLS & PROGRESS ARCHITECTURES
   ========================================================================== */
.custom-progress {
    height: 8px;
    background-color: var(--border-light);
    border-radius: 4px;
    overflow: visible;
}
.custom-progress .progress-bar {
    width: 0;
    height: 100%;
    border-radius: 4px;
    background: var(--gradient-primary);
    transition: width 1.5s cubic-bezier(0.1, 1, 0.1, 1);
}

/* ==========================================================================
   SERVICE CARD ARCHITECTURE
   ========================================================================== */
.service-card {
    position: relative;
    top: 0;
}
.service-card:hover {
    top: -8px;
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
}
.icon-box {
    width: 55px;
    height: 55px;
    background: var(--gradient-primary);
    color: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto;
}
.text-orange { color: #f97316 !important; }

/* ==========================================================================
   PORTFOLIO ARCHITECTURAL CONTAINERS
   ========================================================================== */
.portfolio-img-container {
    height: 190px;
    background: linear-gradient(135deg, var(--border-light) 0%, rgba(0,0,0,0.05) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.portfolio-placeholder-img {
    opacity: 0.4;
    text-align: center;
}
.card-body-height { height: calc(100% - 190px); }

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}
.tech-badges .badge {
    font-weight: 500;
    background: var(--border-light) !important;
    color: var(--text-color) !important;
    margin-right: 4px;
}

/* ==========================================================================
   CHRONOLOGICAL TIMELINE ENGINE
   ========================================================================== */
.timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--border-light);
    top: 0;
    bottom: 0;
    left: 20px;
}
.timeline-item {
    padding-left: 20px;
}
.timeline-marker {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    left: 13px;
    top: 28px;
    border: 3px solid var(--bg-color);
    z-index: 2;
}

/* ==========================================================================
   TESTIMONIAL INTERFACES
   ========================================================================== */
.circle-nav-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   INPUT DESIGN PATTERNS & FORMS
   ========================================================================== */
.input-custom {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--card-border);
    color: var(--text-color);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    transition: all 0.3s;
}
.input-custom:focus {
    background: transparent;
    border-color: var(--primary-color);
    color: var(--text-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 233, 0.15);
}
.social-link-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s;
}
.social-link-btn:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
}
.card-contact-item {
    border-radius: 12px;
}
.contact-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   FOOTER UTILITIES
   ========================================================================== */
.footer-links li { margin-bottom: 10px; }
.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--primary-color); }
.footer-socials a {
    font-size: 1.2rem;
    transition: color 0.2s;
}
.footer-socials a:hover { color: var(--primary-color); }

/* ==========================================================================
   ANIMATIONS & MEDIA DRIVEN RESPONSIVENESS
   ========================================================================== */
@keyframes morphAnimation {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}
@keyframes blink { 50% { opacity: 0; } }

.animate-bounce {
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@media(min-width: 992px) {
    .timeline::before { left: 50%; transform: translateX(-50%); }
    .timeline-item { width: 50%; }
    .timeline-item:nth-child(even) { margin-left: auto; padding-left: 40px; }
    .timeline-item:nth-child(even) .timeline-marker { left: -8px; }
    .timeline-item:nth-child(odd) { padding-right: 40px; padding-left: 0; text-align: right; }
    .timeline-item:nth-child(odd) .timeline-marker { right: -8px; left: auto; }
    .timeline-item:nth-child(odd) .glass-card { margin-right: 24px; margin-left: 0; }
}

@media(max-width: 991.98px) {
    .section-padding { padding: 60px 0; }
    .navbar-collapse {
        background: var(--bg-color);
        padding: 1.5rem;
        border-radius: 12px;
        margin-top: 10px;
        border: 1px solid var(--card-border);
    }
    .navbar-nav {
        align-items: flex-start !important;
    }
    #theme-toggle {
        margin-top: 1rem;
    }
}