/* ==========================================================================
   Professional Animations & Interactive Enhancements
   ========================================================================== */

/* Sleek Modern Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #09090b;
}
::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.4);
    border-radius: 5px;
    border: 2px solid #09090b;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.7);
}

/* Typing Effect in Hero */
.typing-container {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
}
.typing-text {
    background: linear-gradient(135deg, #F5D76E 0%, #D4AF37 50%, #E6CA65 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}
.typing-cursor {
    display: inline-block;
    color: #F5D76E;
    font-weight: 300;
    margin-left: 4px;
    animation: blinkCursor 0.85s infinite;
    -webkit-text-fill-color: #F5D76E;
}
@keyframes blinkCursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Stat Counter Enhancement */
.stat-box h3 {
    font-variant-numeric: tabular-nums;
    transition: transform 0.3s ease;
}
.stat-box:hover h3 {
    transform: scale(1.08);
    color: var(--light-gold, #F5D76E);
}

/* Card Glow & Glassmorphism Micro-Interactions */
.project-card, .skill-card, .service-card, .education-card {
    transition: transform 0.35s cubic-bezier(0.165, 0.84, 0.44, 1), 
                box-shadow 0.35s cubic-bezier(0.165, 0.84, 0.44, 1), 
                border-color 0.35s ease !important;
    position: relative;
    overflow: hidden;
}

.project-card::before, .service-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(212, 175, 55, 0.08), 
        transparent
    );
    transform: skewX(-25deg);
    transition: left 0.75s ease;
    pointer-events: none;
    z-index: 2;
}

.project-card:hover::before, .service-card:hover::before {
    left: 140%;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.015);
    box-shadow: 0 16px 35px rgba(212, 175, 55, 0.22), 0 0 15px rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.45) !important;
}

.skill-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.25);
    border-color: rgba(212, 175, 55, 0.5) !important;
}

/* Fallback badge for text-based projects (C++, Python, SQL) */
.project-fallback-icon {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #111111 0%, #1a1711 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    color: var(--primary, #D4AF37);
    gap: 12px;
}
.project-fallback-icon i {
    font-size: 52px;
    filter: drop-shadow(0 4px 10px rgba(212, 175, 55, 0.3));
}
.project-fallback-icon span {
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
    color: #dedede;
}

/* Category Filter Tabs & Search for Projects Page */
.projects-controls {
    margin: 40px auto 35px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    max-width: 1100px;
}

.search-box-wrapper {
    width: 100%;
    max-width: 500px;
    position: relative;
}

.search-box-wrapper input {
    width: 100%;
    padding: 14px 20px 14px 45px;
    background: #111111;
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 50px;
    color: #F5F5F5;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: 0.3s;
}

.search-box-wrapper input:focus {
    border-color: var(--primary, #D4AF37);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
    background: #161616;
}

.search-box-wrapper i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary, #D4AF37);
    font-size: 18px;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.filter-btn {
    padding: 10px 22px;
    background: #111111;
    border: 1px solid rgba(212, 175, 55, 0.2);
    color: #c0c0c0;
    border-radius: 40px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-btn:hover {
    color: #F5F5F5;
    border-color: var(--primary, #D4AF37);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary, #D4AF37);
    color: #050505;
    border-color: var(--primary, #D4AF37);
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
}

.filter-btn .count-badge {
    padding: 2px 8px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 20px;
    font-size: 11px;
}
.filter-btn.active .count-badge {
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
}

/* Admin Link Pill in Footer */
.admin-portal-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 25px;
    padding: 8px 18px;
    font-size: 13px;
    color: #777;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    transition: 0.3s ease;
    text-decoration: none;
}
.admin-portal-pill:hover {
    color: var(--light-gold, #F5D76E);
    border-color: rgba(212, 175, 55, 0.4);
    background: rgba(212, 175, 55, 0.08);
    transform: translateY(-2px);
}

/* Toast Notifications */
.portfolio-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #18181b;
    color: #f4f4f5;
    padding: 14px 26px;
    border-radius: 50px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 15px rgba(212, 175, 55, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
    pointer-events: none;
}
.portfolio-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.portfolio-toast i {
    color: #D4AF37;
    font-size: 20px;
}
