/* ===== 🎨 INTERACTIVE FEATURES STYLES ===== */

/* Cursor Trail */
.cursor-trail {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.6), transparent);
    pointer-events: none;
    z-index: 9998;
    animation: trailFade 0.8s ease-out forwards;
    transform: translate(-50%, -50%);
}

@keyframes trailFade {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0); }
}

/* Confetti */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    z-index: 9999;
    animation: confettiFall linear forwards;
    pointer-events: none;
}

@keyframes confettiFall {
    to {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Rainbow Animation for Konami Code */
@keyframes rainbow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* Achievement Popup */
.achievement-popup {
    position: fixed;
    top: 80px;
    right: -400px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    z-index: 10001;
    display: flex;
    gap: 16px;
    align-items: center;
    max-width: 350px;
    transition: right 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.achievement-popup.show {
    right: 20px;
}

.achievement-icon {
    font-size: 3rem;
    flex-shrink: 0;
    animation: achievementBounce 0.6s ease;
}

@keyframes achievementBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2) rotate(10deg); }
}

.achievement-content {
    flex: 1;
}

.achievement-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.achievement-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.achievement-desc {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Notification System */
.notification {
    position: fixed;
    top: 20px;
    right: -400px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 10002;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    transition: right 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.notification.show {
    right: 20px;
}

.notification i {
    font-size: 1.5rem;
}

.notification-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899);
    z-index: 10000;
    transition: width 0.1s ease;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
}

.dark-mode-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.6);
}

/* Dark Mode Styles */
body.dark-mode {
    background: #0f172a;
    color: #f1f5f9;
}

body.dark-mode .header {
    background: rgba(15, 23, 42, 0.95);
}

body.dark-mode .service-card,
body.dark-mode .portfolio-card,
body.dark-mode .team-card,
body.dark-mode .contact-form {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .service-card:hover,
body.dark-mode .portfolio-card:hover,
body.dark-mode .team-card:hover {
    background: #334155;
}

body.dark-mode .section-badge {
    background: rgba(99, 102, 241, 0.2);
}

body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark-mode .footer {
    background: #0f172a;
    border-top-color: #334155;
}

/* Click Particle Effect */
.click-particle {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle, #6366f1, #8b5cf6);
    pointer-events: none;
    z-index: 9999;
    animation: particleExplode 1s ease-out forwards;
}

@keyframes particleExplode {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* Typing Indicator for Chat */
.chat-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 18px;
    width: fit-content;
    margin-bottom: 12px;
}

.chat-typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6366f1;
    animation: typingDot 1.4s infinite;
}

.chat-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.chat-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Hover Glow Effects */
.service-card:hover,
.portfolio-card:hover,
.team-card:hover,
.btn:hover {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

/* Image Lazy Loading Blur */
img[data-src] {
    filter: blur(10px);
    transition: filter 0.3s ease;
}

img[data-src].loaded {
    filter: blur(0);
}

/* Pulse Animation for Important Elements */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Shake Animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease;
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

.bounce {
    animation: bounce 1s ease;
}

/* Rotate Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotate {
    animation: rotate 2s linear infinite;
}

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease;
}

/* Slide In Animation */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in {
    animation: slideIn 0.5s ease;
}

/* Zoom In Animation */
@keyframes zoomIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.zoom-in {
    animation: zoomIn 0.5s ease;
}

/* Flip Animation */
@keyframes flip {
    from {
        transform: perspective(400px) rotateY(0);
    }
    to {
        transform: perspective(400px) rotateY(360deg);
    }
}

.flip {
    animation: flip 1s ease;
}

/* Glow Effect */
.glow {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.6),
                0 0 40px rgba(99, 102, 241, 0.4),
                0 0 60px rgba(99, 102, 241, 0.2);
}

/* Gradient Text Animation */
@keyframes gradientText {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-text-animated {
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899, #6366f1);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientText 3s ease infinite;
}

/* Floating Animation */
@keyframes floating {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .achievement-popup,
    .notification {
        max-width: calc(100% - 32px);
        right: -100%;
    }
    
    .achievement-popup.show,
    .notification.show {
        right: 16px;
    }
    
    .cursor-trail {
        display: none;
    }
    
    .dark-mode-toggle {
        bottom: 80px;
        right: 16px;
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
    
    .achievement-icon {
        font-size: 2.5rem;
    }
    
    .achievement-name {
        font-size: 1rem;
    }
    
    .achievement-desc {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .achievement-popup {
        padding: 16px;
    }
    
    .achievement-icon {
        font-size: 2rem;
    }
    
    .notification {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .scroll-progress {
        height: 2px;
    }
}

/* Print Styles */
@media print {
    .cursor-trail,
    .confetti,
    .achievement-popup,
    .notification,
    .scroll-progress,
    .dark-mode-toggle,
    .click-particle,
    .floating-buttons,
    .chat-widget,
    .back-to-top {
        display: none !important;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .cursor-trail,
    .confetti,
    .click-particle {
        display: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .achievement-popup,
    .notification {
        border: 2px solid currentColor;
    }
    
    .scroll-progress {
        height: 4px;
    }
}

/* ===== CERTIFICATES SECTION STYLES ===== */
/* Modern, responsive certificate showcase with modal functionality */

/* Main Section */
.certificates-section {
    background: var(--bg-color);
}

/* Statistics Grid */
.certificates-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.certificate-stat {
    padding: 24px;
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s;
}

.certificate-stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.certificate-stat-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 12px;
    border-radius: var(--radius-lg);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
}

.certificate-stat-number {
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}

.certificate-stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Certificates Grid */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

/* Certificate Card */
.certificate-card {
    position: relative;
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.4s;
    cursor: pointer;
}

.certificate-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--main-color);
}

/* Certificate Image */
.certificate-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--hover-bg) 0%, var(--card-bg) 100%);
}

.certificate-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.certificate-card:hover .certificate-image img {
    transform: scale(1.1);
}

/* Certificate Badges */
.certificate-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    color: white;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: var(--shadow-lg);
}

.certificate-verified {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 32px;
    height: 32px;
    background: rgba(34, 197, 94, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    box-shadow: var(--shadow-lg);
}

/* Certificate Content */
.certificate-content {
    padding: 20px;
}

/* Certificate Issuer */
.certificate-issuer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.certificate-issuer-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: white;
    padding: 6px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.certificate-issuer-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.certificate-issuer-info {
    flex: 1;
}

.certificate-issuer-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.certificate-date {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Certificate Details */
.certificate-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.certificate-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 14px;
}

/* Certificate Skills */
.certificate-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.certificate-skill {
    padding: 4px 10px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-full);
    color: var(--main-color);
    font-size: 11px;
    font-weight: 500;
}

/* Certificate Footer */
.certificate-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.certificate-id {
    font-size: 11px;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
}

.certificate-actions {
    display: flex;
    gap: 8px;
}

/* Certificate Buttons */
.certificate-btn {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.certificate-btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.certificate-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===== CERTIFICATE MODAL ===== */
.certificate-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.certificate-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Content */
.certificate-modal-content {
    position: relative;
    max-width: 900px;
    width: 100%;
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

/* Modal Header */
.certificate-modal-header {
    padding: 20px 24px;
    background: var(--hover-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.certificate-modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.certificate-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--hover-bg);
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.certificate-modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Modal Body */
.certificate-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.certificate-modal-image {
    width: 100%;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

/* Modal Info Grid */
.certificate-modal-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.certificate-info-item {
    padding: 14px;
    background: var(--hover-bg);
    border-radius: var(--radius-lg);
}

.certificate-info-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.certificate-info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .certificates-grid {
        grid-template-columns: 1fr;
    }

    .certificate-modal-content {
        max-height: 95vh;
    }

    .certificate-modal-body {
        padding: 16px;
    }

    .certificate-modal-info {
        grid-template-columns: 1fr;
    }

    .certificates-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .certificate-stat {
        padding: 16px;
    }

    .certificate-stat-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .certificate-stat-number {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .certificates-stats {
        grid-template-columns: 1fr;
    }

    .certificate-card {
        min-width: 280px;
    }

    .certificate-modal {
        padding: 10px;
    }

    .certificate-modal-header {
        padding: 16px;
    }

    .certificate-modal-title {
        font-size: 1rem;
    }
}
