/* Custom Styles for Hazrien Nazman Portfolio */
/* Retro Gaming + IoT Tech Theme */

/* ====================================
   RETRO TYPOGRAPHY
   ==================================== */

/* Section Headings - Retro Gaming Font */
h2, .section-heading, #about-headline {
    font-family: 'VT323', monospace !important;
    letter-spacing: 0.08em;
    text-shadow: 3px 3px 0px rgba(147, 51, 234, 0.2);
    text-transform: uppercase;
}

/* Stats and Tech Elements - Monospace */
.stat-number, .tech-text, .led-text {
    font-family: 'Fira Code', monospace !important;
    font-weight: 500;
}

/* ====================================
   ACCESSIBILITY STYLES
   ==================================== */

/* Screen Reader Only - Visually Hidden but accessible to screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Show on focus - for skip links */
.focus\:not-sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Enhanced Focus Indicators */
*:focus {
    outline: 2px solid #9333ea;
    outline-offset: 2px;
}

/* Focus visible for keyboard navigation only */
*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: 2px solid #9333ea;
    outline-offset: 2px;
}

/* Focus styles for interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #9333ea;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(147, 51, 234, 0.1);
}

/* Skip to content link styling */
a[href="#main-content"]:focus {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 9999;
}

/* ====================================
   END ACCESSIBILITY STYLES
   ==================================== */

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #9333ea; /* purple-600 */
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #7e22ce; /* purple-700 */
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #9333ea, #7e22ce);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Button Hover Effects */
button,
a.bg-purple-600,
a.border-purple-600 {
    transition: all 0.3s ease;
}

/* Profile Image Placeholder */
.profile-placeholder {
    background: linear-gradient(135deg, #e9d5ff, #c4b5fd);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #9333ea;
    font-weight: bold;
}

/* Card Hover Effects */
.shadow-lg {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.shadow-lg:hover {
    transform: translateY(-5px);
}

/* Section Padding Responsiveness */
@media (max-width: 768px) {
    section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

/* Form Input Focus Effects */
input:focus,
textarea:focus {
    border-color: #9333ea;
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

/* Mobile Menu Animation */
#mobile-menu {
    transition: all 0.3s ease;
}

/* Navbar Shadow on Scroll */
nav {
    transition: box-shadow 0.3s ease;
}

/* ====================================
   SKILLS SECTION - ARCADE STYLE
   ==================================== */

/* Skill Category Cards */
.skill-category-card {
    background: white;
    border: 3px solid;
    border-radius: 8px;
    padding: 1.5rem;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        5px 5px 0px rgba(0, 0, 0, 0.15),
        inset -2px -2px 0px rgba(0, 0, 0, 0.1),
        inset 2px 2px 0px rgba(255, 255, 255, 0.8);
}

/* Category-specific border colors */
.skill-category-card.iot-firmware {
    border-color: #10b981; /* green */
}

.skill-category-card.backend-dev {
    border-color: #06b6d4; /* cyan */
}

.skill-category-card.homelab-infra {
    border-color: #f59e0b; /* amber */
}

.skill-category-card.frontend-dev {
    border-color: #9333ea; /* purple */
}

/* Hover Effects */
.skill-category-card:hover {
    transform: translateY(-8px);
    box-shadow:
        8px 8px 0px rgba(0, 0, 0, 0.2),
        inset -2px -2px 0px rgba(0, 0, 0, 0.1),
        inset 2px 2px 0px rgba(255, 255, 255, 0.8);
}

.skill-category-card.iot-firmware:hover {
    box-shadow:
        8px 8px 0px rgba(16, 185, 129, 0.3),
        0 0 20px rgba(16, 185, 129, 0.4),
        inset -2px -2px 0px rgba(0, 0, 0, 0.1),
        inset 2px 2px 0px rgba(255, 255, 255, 0.8);
}

.skill-category-card.backend-dev:hover {
    box-shadow:
        8px 8px 0px rgba(6, 182, 212, 0.3),
        0 0 20px rgba(6, 182, 212, 0.4),
        inset -2px -2px 0px rgba(0, 0, 0, 0.1),
        inset 2px 2px 0px rgba(255, 255, 255, 0.8);
}

.skill-category-card.homelab-infra:hover {
    box-shadow:
        8px 8px 0px rgba(245, 158, 11, 0.3),
        0 0 20px rgba(245, 158, 11, 0.4),
        inset -2px -2px 0px rgba(0, 0, 0, 0.1),
        inset 2px 2px 0px rgba(255, 255, 255, 0.8);
}

.skill-category-card.frontend-dev:hover {
    box-shadow:
        8px 8px 0px rgba(147, 51, 234, 0.3),
        0 0 20px rgba(147, 51, 234, 0.4),
        inset -2px -2px 0px rgba(0, 0, 0, 0.1),
        inset 2px 2px 0px rgba(255, 255, 255, 0.8);
}

/* Scanline overlay on hover */
.skill-category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0) 0px,
        rgba(0, 0, 0, 0.03) 1px,
        rgba(0, 0, 0, 0) 2px
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 6px;
}

.skill-category-card:hover::before {
    opacity: 1;
}

/* Category Header */
.skill-category-header {
    font-family: 'VT323', monospace;
    font-size: 1.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.skill-category-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: inline-block;
    margin-right: 0.5rem;
    animation: float-icon 3s ease-in-out infinite;
    position: relative;
}

/* Category-specific icon glow effects */
.skill-category-card.iot-firmware .skill-category-icon {
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.4));
    animation: float-icon 3s ease-in-out infinite, glow-green 3s ease-in-out infinite;
}

.skill-category-card.backend-dev .skill-category-icon {
    filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.4));
    animation: float-icon 3s ease-in-out infinite, glow-cyan 3s ease-in-out infinite;
}

.skill-category-card.homelab-infra .skill-category-icon {
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.4));
    animation: float-icon 3s ease-in-out infinite, glow-amber 3s ease-in-out infinite;
}

.skill-category-card.frontend-dev .skill-category-icon {
    filter: drop-shadow(0 0 8px rgba(147, 51, 234, 0.4));
    animation: float-icon 3s ease-in-out infinite, glow-purple 3s ease-in-out infinite;
}

/* Floating animation for icons */
@keyframes float-icon {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-6px);
    }
}

/* Glow animations for each category color */
@keyframes glow-green {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 12px rgba(16, 185, 129, 0.6));
    }
}

@keyframes glow-cyan {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 12px rgba(6, 182, 212, 0.6));
    }
}

@keyframes glow-amber {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.6));
    }
}

@keyframes glow-purple {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(147, 51, 234, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 12px rgba(147, 51, 234, 0.6));
    }
}

/* Individual Skill Item */
.skill-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.skill-item:last-child {
    border-bottom: none;
}

.skill-item:hover {
    padding-left: 0.5rem;
    background: rgba(147, 51, 234, 0.02);
    border-radius: 4px;
}

.skill-name {
    font-family: 'Fira Code', monospace;
    font-size: 0.95rem;
    color: #374151;
    font-weight: 500;
}

/* LED Indicator Dots */
.led-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.led-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Unlit LED */
.led-dot.off {
    background: #e5e7eb;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Lit LED - Category Colors */
.led-dot.on.green {
    background: #10b981;
    border-color: #059669;
    box-shadow:
        0 0 8px rgba(16, 185, 129, 0.6),
        0 0 12px rgba(16, 185, 129, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.5);
    animation: led-pulse-green 2s ease-in-out infinite;
}

.led-dot.on.cyan {
    background: #06b6d4;
    border-color: #0891b2;
    box-shadow:
        0 0 8px rgba(6, 182, 212, 0.6),
        0 0 12px rgba(6, 182, 212, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.5);
    animation: led-pulse-cyan 2s ease-in-out infinite;
}

.led-dot.on.amber {
    background: #f59e0b;
    border-color: #d97706;
    box-shadow:
        0 0 8px rgba(245, 158, 11, 0.6),
        0 0 12px rgba(245, 158, 11, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.5);
    animation: led-pulse-amber 2s ease-in-out infinite;
}

.led-dot.on.purple {
    background: #9333ea;
    border-color: #7e22ce;
    box-shadow:
        0 0 8px rgba(147, 51, 234, 0.6),
        0 0 12px rgba(147, 51, 234, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.5);
    animation: led-pulse-purple 2s ease-in-out infinite;
}

/* LED Pulse Animations */
@keyframes led-pulse-green {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow:
            0 0 8px rgba(16, 185, 129, 0.6),
            0 0 12px rgba(16, 185, 129, 0.4),
            inset 0 1px 2px rgba(255, 255, 255, 0.5);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.95);
        box-shadow:
            0 0 4px rgba(16, 185, 129, 0.4),
            0 0 6px rgba(16, 185, 129, 0.2),
            inset 0 1px 2px rgba(255, 255, 255, 0.3);
    }
}

@keyframes led-pulse-cyan {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow:
            0 0 8px rgba(6, 182, 212, 0.6),
            0 0 12px rgba(6, 182, 212, 0.4),
            inset 0 1px 2px rgba(255, 255, 255, 0.5);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.95);
        box-shadow:
            0 0 4px rgba(6, 182, 212, 0.4),
            0 0 6px rgba(6, 182, 212, 0.2),
            inset 0 1px 2px rgba(255, 255, 255, 0.3);
    }
}

@keyframes led-pulse-amber {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow:
            0 0 8px rgba(245, 158, 11, 0.6),
            0 0 12px rgba(245, 158, 11, 0.4),
            inset 0 1px 2px rgba(255, 255, 255, 0.5);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.95);
        box-shadow:
            0 0 4px rgba(245, 158, 11, 0.4),
            0 0 6px rgba(245, 158, 11, 0.2),
            inset 0 1px 2px rgba(255, 255, 255, 0.3);
    }
}

@keyframes led-pulse-purple {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow:
            0 0 8px rgba(147, 51, 234, 0.6),
            0 0 12px rgba(147, 51, 234, 0.4),
            inset 0 1px 2px rgba(255, 255, 255, 0.5);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.95);
        box-shadow:
            0 0 4px rgba(147, 51, 234, 0.4),
            0 0 6px rgba(147, 51, 234, 0.2),
            inset 0 1px 2px rgba(255, 255, 255, 0.3);
    }
}

/* Skills Grid Responsiveness */
@media (max-width: 640px) {
    #skills-container > div {
        text-align: center;
    }

    .skill-category-card {
        box-shadow:
            3px 3px 0px rgba(0, 0, 0, 0.15),
            inset -1px -1px 0px rgba(0, 0, 0, 0.1),
            inset 1px 1px 0px rgba(255, 255, 255, 0.8);
    }

    .skill-category-card:hover {
        transform: translateY(-4px);
        box-shadow:
            5px 5px 0px rgba(0, 0, 0, 0.2),
            inset -1px -1px 0px rgba(0, 0, 0, 0.1),
            inset 1px 1px 0px rgba(255, 255, 255, 0.8);
    }

    .skill-category-header {
        font-size: 1.5rem;
        justify-content: center;
    }
}

/* Mobile Accordion Styles (< 768px) */
@media (max-width: 767px) {
    /* Make category header clickable on mobile */
    .skill-category-header {
        cursor: pointer;
        user-select: none;
        position: relative;
        padding-right: 2.5rem;
        transition: all 0.3s ease;
    }

    .skill-category-header:active {
        opacity: 0.7;
    }

    /* Expand/Collapse Icon */
    .accordion-icon {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        font-size: 1.5rem;
        transition: transform 0.3s ease;
        display: inline-block;
    }

    .accordion-icon.expanded {
        transform: translateY(-50%) rotate(180deg);
    }

    /* Skill List Container - Collapsible */
    .skill-list-container {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .skill-list-container.expanded {
        max-height: 1000px; /* Large enough to fit all skills */
        transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Reduce card padding when collapsed */
    .skill-category-card:not(.accordion-expanded) {
        padding: 1rem 1.5rem;
    }

    .skill-category-card.accordion-expanded {
        padding: 1.5rem;
    }

    /* Add visual feedback for collapsed state */
    .skill-category-card:not(.accordion-expanded)::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 40%;
        height: 2px;
        background: currentColor;
        opacity: 0.2;
    }
}

/* Desktop: No accordion behavior, keep normal layout */
@media (min-width: 768px) {
    .accordion-icon {
        display: none !important;
    }

    .skill-list-container {
        max-height: none !important;
        overflow: visible !important;
    }
}

/* Typography Enhancement */
h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.025em;
}

/* Link Underline Animation */
a {
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #9333ea;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* Loading State */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Smooth Transitions */
* {
    transition: color 0.2s ease, background-color 0.2s ease;
}

/* Country Code Dropdown */
#country-code-dropdown {
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.country-option {
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
}

.country-option:last-child {
    border-bottom: none;
}

.country-option:hover {
    background-color: #f9fafb;
}

#country-list::-webkit-scrollbar {
    width: 6px;
}

#country-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#country-list::-webkit-scrollbar-thumb {
    background: #9333ea;
    border-radius: 3px;
}

/* Responsive adjustments for phone input */
@media (max-width: 640px) {
    #country-code-dropdown {
        width: 100%;
        left: 0;
    }
}

/* Flag Icon Styling */
.fi {
    display: inline-block;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#selected-country-flag {
    width: 24px !important;
    height: 18px !important;
    display: inline-block !important;
    flex-shrink: 0;
}

.country-option .fi {
    width: 32px !important;
    height: 24px !important;
    flex-shrink: 0;
}

/* Toast Notifications */
.toast {
    min-width: 300px;
    max-width: 400px;
    padding: 16px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast.info {
    border-left: 4px solid #3b82f6;
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: #10b981;
}

.toast.error .toast-icon {
    color: #ef4444;
}

.toast.info .toast-icon {
    color: #3b82f6;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 14px;
    color: #6b7280;
}

.toast-close {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    cursor: pointer;
    color: #9ca3af;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #4b5563;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast.removing {
    animation: slideOut 0.3s ease-out forwards;
}

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(147, 51, 234, 0.3);
    border-top-color: #9333ea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Button Loading State */
button.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Mobile Toast Adjustments */
@media (max-width: 640px) {
    #toast-container {
        left: 1rem;
        right: 1rem;
        top: 1rem;
    }

    .toast {
        min-width: 100%;
    }
}

/* Line Clamp Utilities */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-6 {
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-7 {
    display: -webkit-box;
    -webkit-line-clamp: 7;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Testimonial Section Background */
#testimonials {
    position: relative;
}

#testimonials::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(243, 232, 255, 0.3) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

/* Testimonial Grouped Deck */
.testimonial-group {
    min-width: 0;
}

.testimonial-deck-card {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform, opacity;
}

.testimonial-deck-card:hover {
    box-shadow: 0 20px 40px rgba(147, 51, 234, 0.2);
    border-color: #a855f7;
}

.testimonial-deck-card:hover:not(:first-child) {
    transform: translateY(-4px) !important;
}

/* Custom scrollbar for testimonial cards */
.testimonial-deck-card .overflow-y-auto::-webkit-scrollbar {
    width: 6px;
}

.testimonial-deck-card .overflow-y-auto::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.testimonial-deck-card .overflow-y-auto::-webkit-scrollbar-thumb {
    background: #c4b5fd;
    border-radius: 3px;
}

.testimonial-deck-card .overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: #a78bfa;
}

/* Read More Button */
.read-more-btn {
    align-self: flex-start;
}

.read-more-btn:hover {
    transform: translateX(4px);
}

/* Smooth transition for text expansion */
.testimonial-text-desktop {
    transition: all 0.3s ease;
}

/* About Section - Stat Cards */
.stat-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.05) !important;
}

/* Mobile tap feedback */
.stat-card:active {
    transform: scale(0.98) !important;
}

@media (max-width: 640px) {
    .stat-card:active {
        background-color: #faf5ff !important;
        border-color: #c084fc !important;
    }
}

.stat-icon-container {
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon-container {
    background: linear-gradient(135deg, #9333ea, #7e22ce);
}

.stat-card:hover .stat-icon-container svg {
    color: white;
}

/* Mobile: also apply gradient on active state */
.stat-card.active .stat-icon-container {
    background: linear-gradient(135deg, #9333ea, #7e22ce);
}

.stat-card.active .stat-icon-container svg {
    color: white;
}

.stat-tooltip {
    z-index: 50;
    animation: tooltip-fade-in 0.2s ease-out;
}

/* Mobile tooltip visibility */
.stat-tooltip.show-mobile {
    display: block !important;
}

@keyframes tooltip-fade-in {
    from {
        opacity: 0;
        transform: translate(-50%, -5px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Responsive text in about section */
#about-text-container p {
    transition: font-size 0.3s ease;
}

/* 2D Sprite Styling */
.sprite-container {
    position: relative;
    animation: float 4s ease-in-out infinite;
}

.sprite-container::before {
    content: '';
    position: absolute;
    inset: -30px;
    background: radial-gradient(circle, rgba(243, 232, 255, 0.5) 0%, rgba(147, 51, 234, 0.1) 40%, transparent 70%);
    z-index: -1;
    border-radius: 50%;
    animation: pulse-glow 4s ease-in-out infinite;
}

.sprite-image {
    filter: drop-shadow(0 15px 30px rgba(147, 51, 234, 0.25));
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sprite-image:hover {
    transform: scale(1.08) rotate(3deg);
    filter: drop-shadow(0 20px 40px rgba(147, 51, 234, 0.35));
}

/* Floating animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* Glow pulse animation */
@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* Mobile: reduce animation intensity */
@media (max-width: 640px) {
    .sprite-container {
        animation: float 5s ease-in-out infinite;
    }

    @keyframes float {
        0%, 100% {
            transform: translateY(0px);
        }
        50% {
            transform: translateY(-10px);
        }
    }

    .sprite-image:hover {
        transform: scale(1.05) rotate(2deg);
    }
}

/* Hero Sprite (Mobile Only) */
.sprite-container-hero {
    position: relative;
    animation: float-hero 3s ease-in-out infinite;
}

.sprite-image-hero {
    filter: drop-shadow(0 8px 16px rgba(147, 51, 234, 0.2));
    transition: transform 0.3s ease;
}

.sprite-image-hero:active {
    transform: scale(1.1) rotate(5deg);
}

/* Subtle float for hero sprite */
@keyframes float-hero {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Hero Profile Sprite (Desktop) */
.hero-profile-sprite {
    animation: float-hero 4s ease-in-out infinite, glow-purple-hero 4s ease-in-out infinite;
    filter: drop-shadow(0 0 12px rgba(147, 51, 234, 0.4));
}

@keyframes glow-purple-hero {
    0%, 100% {
        filter: drop-shadow(0 0 12px rgba(147, 51, 234, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(147, 51, 234, 0.6));
    }
}

/* Form Validation Styles */
.error-message {
    font-size: 0.875rem;
    color: #ef4444;
    margin-top: 0.25rem;
}

.field-error {
    border-color: #ef4444 !important;
}

.field-error:focus {
    ring-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.field-success {
    border-color: #10b981 !important;
}

.field-success:focus {
    ring-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* ====================================
   RETRO GAMING GLOBAL ELEMENTS
   ==================================== */

/* Retro Button Styles */
.bg-purple-600, a.bg-purple-600, button.bg-purple-600 {
    font-family: 'VT323', monospace;
    font-size: 1.35rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    box-shadow:
        4px 4px 0px rgba(0, 0, 0, 0.2),
        inset -2px -2px 0px rgba(0, 0, 0, 0.2),
        inset 2px 2px 0px rgba(255, 255, 255, 0.2);
    transition: all 0.1s ease;
    border: 2px solid rgba(124, 58, 237, 1);
}

.bg-purple-600:hover, a.bg-purple-600:hover, button.bg-purple-600:hover {
    transform: translate(1px, 1px);
    box-shadow:
        3px 3px 0px rgba(0, 0, 0, 0.2),
        inset -2px -2px 0px rgba(0, 0, 0, 0.2),
        inset 2px 2px 0px rgba(255, 255, 255, 0.2);
}

.bg-purple-600:active, a.bg-purple-600:active, button.bg-purple-600:active {
    transform: translate(4px, 4px);
    box-shadow:
        0px 0px 0px rgba(0, 0, 0, 0.2),
        inset -1px -1px 0px rgba(0, 0, 0, 0.3),
        inset 1px 1px 0px rgba(255, 255, 255, 0.1);
}

/* Border-only Retro Buttons */
.border-purple-600, a.border-purple-600 {
    font-family: 'VT323', monospace;
    font-size: 1.35rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    box-shadow:
        4px 4px 0px rgba(147, 51, 234, 0.2);
    transition: all 0.1s ease;
}

.border-purple-600:hover, a.border-purple-600:hover {
    transform: translate(2px, 2px);
    box-shadow:
        2px 2px 0px rgba(147, 51, 234, 0.2);
}

/* Pixel Borders for Cards */
.stat-card, .testimonial-deck-card {
    border-width: 2px;
    border-style: solid;
    image-rendering: pixelated;
    position: relative;
}

.stat-card::after, .testimonial-deck-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid rgba(147, 51, 234, 0.1);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::after, .testimonial-deck-card:hover::after {
    opacity: 1;
}

/* Subtle Scanline Overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0) 0px,
        rgba(0, 0, 0, 0.02) 1px,
        rgba(0, 0, 0, 0) 2px
    );
    pointer-events: none;
    z-index: 9999;
    opacity: 0.3;
}

/* WiFi Indicator */
.wifi-indicator {
    width: 24px;
    height: 24px;
    color: #9333ea; /* purple-600 */
    filter: drop-shadow(0 0 4px rgba(147, 51, 234, 0.5));
}

.led-indicator.amber {
    background: #f59e0b;
    box-shadow:
        0 0 8px #f59e0b,
        0 0 12px rgba(245, 158, 11, 0.5);
}

.led-indicator.cyan {
    background: #06b6d4;
    box-shadow:
        0 0 8px #06b6d4,
        0 0 12px rgba(6, 182, 212, 0.5);
}

@keyframes led-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(0.95);
    }
}

/* Circuit Pattern Background */
.circuit-pattern {
    background-image:
        radial-gradient(circle at 2px 2px, rgba(147, 51, 234, 0.15) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* Glitch Text Effect */
.glitch-text {
    position: relative;
    display: inline-block;
}

.glitch-text:hover {
    animation: glitch 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes glitch {
    0%, 100% {
        transform: translate(0);
        text-shadow: 3px 3px 0px rgba(147, 51, 234, 0.2);
    }
    10% {
        transform: translate(-2px, 2px);
        text-shadow: -2px -2px 0px rgba(6, 182, 212, 0.5), 2px 2px 0px rgba(245, 158, 11, 0.5);
    }
    20% {
        transform: translate(2px, -2px);
        text-shadow: 2px -2px 0px rgba(6, 182, 212, 0.5), -2px 2px 0px rgba(245, 158, 11, 0.5);
    }
    30% {
        transform: translate(-2px, -2px);
    }
    40% {
        transform: translate(2px, 2px);
    }
    50% {
        transform: translate(0);
    }
}

/* Pixel Corner Brackets */
.pixel-brackets::before,
.pixel-brackets::after {
    font-family: 'VT323', monospace;
    font-size: 1.5em;
    color: rgba(147, 51, 234, 0.4);
}

.pixel-brackets::before {
    content: '[ ';
    margin-right: 0.2em;
}

.pixel-brackets::after {
    content: ' ]';
    margin-left: 0.2em;
}

/* Tech Accent Colors */
.text-tech-cyan {
    color: #06b6d4;
}

.text-tech-green {
    color: #10b981;
}

.text-tech-amber {
    color: #f59e0b;
}

.bg-tech-cyan {
    background-color: #06b6d4;
}

.bg-tech-green {
    background-color: #10b981;
}

.bg-tech-amber {
    background-color: #f59e0b;
}

/* Responsive: Reduce effects on mobile */
@media (max-width: 640px) {
    h2, .section-heading {
        text-shadow: 2px 2px 0px rgba(147, 51, 234, 0.2);
    }

    .bg-purple-600, a.bg-purple-600, button.bg-purple-600 {
        font-size: 1.15rem;
        box-shadow:
            3px 3px 0px rgba(0, 0, 0, 0.2),
            inset -1px -1px 0px rgba(0, 0, 0, 0.2),
            inset 1px 1px 0px rgba(255, 255, 255, 0.2);
    }

    body::after {
        opacity: 0.2;
    }
}

/* ====================================
   FEATURED PROJECTS - RETRO ARCADE STYLE
   ==================================== */

/* Project Card - Arcade 3D Style */
.project-card {
    background: white;
    border: 3px solid;
    border-radius: 8px;
    padding: 1.5rem;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        5px 5px 0px rgba(0, 0, 0, 0.15),
        inset -2px -2px 0px rgba(0, 0, 0, 0.1),
        inset 2px 2px 0px rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

/* Category-specific border colors for projects */
.project-card.project-iot {
    border-color: #10b981; /* green - IoT/Firmware focused */
}

.project-card.project-fullstack {
    border-color: #9333ea; /* purple - Full Stack/Frontend focused */
}

.project-card.project-backend {
    border-color: #06b6d4; /* cyan - Backend focused */
}

.project-card.project-homelab {
    border-color: #f59e0b; /* amber - Homelab/Infrastructure */
}

.project-card.project-hardware {
    border-color: #ea580c; /* red-orange - Hardware/Electronics */
}

/* Hover Effects - Lift and Glow */
.project-card:hover {
    transform: translateY(-8px);
    box-shadow:
        8px 8px 0px rgba(0, 0, 0, 0.2),
        inset -2px -2px 0px rgba(0, 0, 0, 0.1),
        inset 2px 2px 0px rgba(255, 255, 255, 0.8);
}

.project-card.project-iot:hover {
    box-shadow:
        8px 8px 0px rgba(16, 185, 129, 0.3),
        0 0 20px rgba(16, 185, 129, 0.4),
        inset -2px -2px 0px rgba(0, 0, 0, 0.1),
        inset 2px 2px 0px rgba(255, 255, 255, 0.8);
}

.project-card.project-fullstack:hover {
    box-shadow:
        8px 8px 0px rgba(147, 51, 234, 0.3),
        0 0 20px rgba(147, 51, 234, 0.4),
        inset -2px -2px 0px rgba(0, 0, 0, 0.1),
        inset 2px 2px 0px rgba(255, 255, 255, 0.8);
}

.project-card.project-backend:hover {
    box-shadow:
        8px 8px 0px rgba(6, 182, 212, 0.3),
        0 0 20px rgba(6, 182, 212, 0.4),
        inset -2px -2px 0px rgba(0, 0, 0, 0.1),
        inset 2px 2px 0px rgba(255, 255, 255, 0.8);
}

.project-card.project-homelab:hover {
    box-shadow:
        8px 8px 0px rgba(245, 158, 11, 0.3),
        0 0 20px rgba(245, 158, 11, 0.4),
        inset -2px -2px 0px rgba(0, 0, 0, 0.1),
        inset 2px 2px 0px rgba(255, 255, 255, 0.8);
}

.project-card.project-hardware:hover {
    box-shadow:
        8px 8px 0px rgba(234, 88, 12, 0.3),
        0 0 20px rgba(234, 88, 12, 0.4),
        inset -2px -2px 0px rgba(0, 0, 0, 0.1),
        inset 2px 2px 0px rgba(255, 255, 255, 0.8);
}

/* CRT Scanline Overlay on Hover */
.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0) 0px,
        rgba(0, 0, 0, 0.03) 1px,
        rgba(0, 0, 0, 0) 2px
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 6px;
    z-index: 1;
}

.project-card:hover::before {
    opacity: 1;
}

/* Project Header Container */
.project-header {
    position: relative;
    margin-bottom: 1rem;
    margin-top: 2rem;
    z-index: 2;
}

/* Project Title - Retro Font */
.project-title {
    font-family: 'VT323', monospace;
    font-size: 1.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #1f2937;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 0px rgba(147, 51, 234, 0.15);
    position: relative;
    z-index: 2;
}

/* Project Timeline */
.project-timeline {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    position: relative;
    z-index: 2;
}

.project-timeline::before {
    content: '📅';
    font-size: 0.9rem;
}

/* Project Emoji Icon */
.project-emoji-icon {
    font-size: 3rem;
    display: inline-block;
    margin-bottom: 1rem;
    animation: float-project-icon 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
    position: relative;
    z-index: 2;
}

/* Category-specific glow for emoji icons */
.project-card.project-iot .project-emoji-icon {
    animation: float-project-icon 3s ease-in-out infinite, glow-green-project 3s ease-in-out infinite;
}

.project-card.project-fullstack .project-emoji-icon {
    animation: float-project-icon 3s ease-in-out infinite, glow-purple-project 3s ease-in-out infinite;
}

.project-card.project-backend .project-emoji-icon {
    animation: float-project-icon 3s ease-in-out infinite, glow-cyan-project 3s ease-in-out infinite;
}

.project-card.project-homelab .project-emoji-icon {
    animation: float-project-icon 3s ease-in-out infinite, glow-amber-project 3s ease-in-out infinite;
}

/* Floating Animation for Project Icons */
@keyframes float-project-icon {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Glow Animations for Project Icons */
@keyframes glow-green-project {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(16, 185, 129, 0.6));
    }
}

@keyframes glow-purple-project {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(147, 51, 234, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(147, 51, 234, 0.6));
    }
}

@keyframes glow-cyan-project {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(6, 182, 212, 0.6));
    }
}

@keyframes glow-amber-project {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(245, 158, 11, 0.6));
    }
}

/* Retro Status Badge (top-right) */
.project-status-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    z-index: 3;
    box-shadow:
        2px 2px 0px rgba(0, 0, 0, 0.15),
        inset -1px -1px 0px rgba(0, 0, 0, 0.1),
        inset 1px 1px 0px rgba(255, 255, 255, 0.5);
}

/* Project Type Badge (top-left) */
.project-type-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 0.3rem 0.65rem;
    border-radius: 4px;
    z-index: 3;
    text-transform: uppercase;
    box-shadow:
        2px 2px 0px rgba(0, 0, 0, 0.15),
        inset -1px -1px 0px rgba(0, 0, 0, 0.1),
        inset 1px 1px 0px rgba(255, 255, 255, 0.5);
}

/* Project Type - Company */
.project-type-badge.type-company {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    border: 2px solid #4338ca;
}

/* Project Type - Freelance */
.project-type-badge.type-freelance {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: white;
    border: 2px solid #be185d;
}

/* Project Type - Personal */
.project-type-badge.type-personal {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    color: white;
    border: 2px solid #0f766e;
}

/* Status Badge - LIVE */
.project-status-badge.status-live {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: 2px solid #047857;
    animation: status-pulse-live 2s ease-in-out infinite;
}

/* Status Badge - WIP */
.project-status-badge.status-wip {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: 2px solid #b45309;
    animation: status-pulse-wip 2s ease-in-out infinite;
}

/* Status Badge - COMPLETED */
.project-status-badge.status-completed {
    background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
    color: white;
    border: 2px solid #6b21a8;
    animation: status-pulse-completed 2s ease-in-out infinite;
}

/* Status Indicator Dot */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    box-shadow:
        0 0 6px rgba(255, 255, 255, 0.8),
        0 0 10px currentColor;
}

/* Status Badge Pulse Animations */
@keyframes status-pulse-live {
    0%, 100% {
        box-shadow:
            2px 2px 0px rgba(0, 0, 0, 0.15),
            0 0 8px rgba(16, 185, 129, 0.4),
            inset -1px -1px 0px rgba(0, 0, 0, 0.1),
            inset 1px 1px 0px rgba(255, 255, 255, 0.5);
    }
    50% {
        box-shadow:
            2px 2px 0px rgba(0, 0, 0, 0.15),
            0 0 15px rgba(16, 185, 129, 0.6),
            inset -1px -1px 0px rgba(0, 0, 0, 0.1),
            inset 1px 1px 0px rgba(255, 255, 255, 0.5);
    }
}

@keyframes status-pulse-wip {
    0%, 100% {
        box-shadow:
            2px 2px 0px rgba(0, 0, 0, 0.15),
            0 0 8px rgba(245, 158, 11, 0.4),
            inset -1px -1px 0px rgba(0, 0, 0, 0.1),
            inset 1px 1px 0px rgba(255, 255, 255, 0.5);
    }
    50% {
        box-shadow:
            2px 2px 0px rgba(0, 0, 0, 0.15),
            0 0 15px rgba(245, 158, 11, 0.6),
            inset -1px -1px 0px rgba(0, 0, 0, 0.1),
            inset 1px 1px 0px rgba(255, 255, 255, 0.5);
    }
}

@keyframes status-pulse-completed {
    0%, 100% {
        box-shadow:
            2px 2px 0px rgba(0, 0, 0, 0.15),
            0 0 8px rgba(147, 51, 234, 0.4),
            inset -1px -1px 0px rgba(0, 0, 0, 0.1),
            inset 1px 1px 0px rgba(255, 255, 255, 0.5);
    }
    50% {
        box-shadow:
            2px 2px 0px rgba(0, 0, 0, 0.15),
            0 0 15px rgba(147, 51, 234, 0.6),
            inset -1px -1px 0px rgba(0, 0, 0, 0.1),
            inset 1px 1px 0px rgba(255, 255, 255, 0.5);
    }
}

/* Project Tags Container */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

/* Standard Project Tags */
.project-tag {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    background: rgba(147, 51, 234, 0.1);
    color: #7e22ce;
    border: 1px solid rgba(147, 51, 234, 0.2);
    font-weight: 500;
    transition: all 0.2s ease;
}

.project-tag:hover {
    background: rgba(147, 51, 234, 0.15);
    border-color: rgba(147, 51, 234, 0.3);
    transform: translateY(-2px);
}

/* Component Tags (for NIoTMS with color-coding) */
.component-tag {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    border-radius: 3px;
    border: 2px solid;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: all 0.2s ease;
    box-shadow:
        2px 2px 0px rgba(0, 0, 0, 0.1),
        inset -1px -1px 0px rgba(0, 0, 0, 0.05),
        inset 1px 1px 0px rgba(255, 255, 255, 0.5);
}

/* Component Tag Colors */
.component-tag.tag-firmware {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
    color: #047857;
    border-color: #10b981;
}

.component-tag.tag-backend {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(6, 182, 212, 0.05) 100%);
    color: #0e7490;
    border-color: #06b6d4;
}

.component-tag.tag-frontend {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.15) 0%, rgba(147, 51, 234, 0.05) 100%);
    color: #6b21a8;
    border-color: #9333ea;
}

.component-tag.tag-infrastructure {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%);
    color: #92400e;
    border-color: #f59e0b;
}

.component-tag.tag-integration {
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.15) 0%, rgba(234, 88, 12, 0.05) 100%);
    color: #7c2d12;
    border-color: #ea580c;
}

.component-tag.tag-hardware {
    background: linear-gradient(135deg, rgba(100, 116, 139, 0.15) 0%, rgba(100, 116, 139, 0.05) 100%);
    color: #334155;
    border-color: #64748b;
}

.component-tag:hover {
    transform: translateY(-2px);
    box-shadow:
        3px 3px 0px rgba(0, 0, 0, 0.15),
        inset -1px -1px 0px rgba(0, 0, 0, 0.05),
        inset 1px 1px 0px rgba(255, 255, 255, 0.5);
}

/* Project Description */
.project-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #4b5563;
    margin-bottom: 1rem;
    flex-grow: 1;
    position: relative;
    z-index: 2;
}

/* Project Buttons Container */
.project-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
    position: relative;
    z-index: 2;
}

/* Retro Project Buttons */
.project-btn {
    flex: 1;
    font-family: 'VT323', monospace;
    font-size: 1.25rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.65rem 1.25rem;
    border-radius: 6px;
    text-align: center;
    font-weight: normal;
    transition: all 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

/* Primary Button (View Project) */
.project-btn-primary {
    background: #9333ea;
    color: white;
    border: 2px solid #7e22ce;
    box-shadow:
        4px 4px 0px rgba(0, 0, 0, 0.2),
        inset -2px -2px 0px rgba(0, 0, 0, 0.2),
        inset 2px 2px 0px rgba(255, 255, 255, 0.2);
}

.project-btn-primary:hover {
    transform: translate(1px, 1px);
    box-shadow:
        3px 3px 0px rgba(0, 0, 0, 0.2),
        inset -2px -2px 0px rgba(0, 0, 0, 0.2),
        inset 2px 2px 0px rgba(255, 255, 255, 0.2);
}

.project-btn-primary:active {
    transform: translate(4px, 4px);
    box-shadow:
        0px 0px 0px rgba(0, 0, 0, 0.2),
        inset -1px -1px 0px rgba(0, 0, 0, 0.3),
        inset 1px 1px 0px rgba(255, 255, 255, 0.1);
}

/* Secondary Button (GitHub) */
.project-btn-secondary {
    background: white;
    color: #9333ea;
    border: 2px solid #9333ea;
    box-shadow:
        4px 4px 0px rgba(147, 51, 234, 0.2);
}

.project-btn-secondary:hover {
    transform: translate(2px, 2px);
    background: rgba(147, 51, 234, 0.05);
    box-shadow:
        2px 2px 0px rgba(147, 51, 234, 0.2);
}

.project-btn-secondary:active {
    transform: translate(4px, 4px);
    box-shadow:
        0px 0px 0px rgba(147, 51, 234, 0.2);
}

/* GitHub Icon */
.project-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Projects Section Background Enhancement */
#projects {
    position: relative;
}

/* Staggered Reveal Animation */
.project-card {
    opacity: 0;
    animation: project-reveal 0.6s ease-out forwards;
}

.project-card:nth-child(1) {
    animation-delay: 0.1s;
}

.project-card:nth-child(2) {
    animation-delay: 0.2s;
}

.project-card:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes project-reveal {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .project-card {
        min-height: 350px;
        box-shadow:
            3px 3px 0px rgba(0, 0, 0, 0.15),
            inset -1px -1px 0px rgba(0, 0, 0, 0.1),
            inset 1px 1px 0px rgba(255, 255, 255, 0.8);
    }

    .project-card:hover {
        transform: translateY(-4px);
        box-shadow:
            5px 5px 0px rgba(0, 0, 0, 0.2),
            inset -1px -1px 0px rgba(0, 0, 0, 0.1),
            inset 1px 1px 0px rgba(255, 255, 255, 0.8);
    }

    .project-title {
        font-size: 1.5rem;
    }

    .project-emoji-icon {
        font-size: 2.5rem;
    }

    .project-type-badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }

    .project-status-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    .project-btn {
        font-size: 1.1rem;
        padding: 0.6rem 1rem;
    }

    .project-buttons {
        flex-direction: column;
    }

    .project-btn {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .component-tag {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }

    .project-tag {
        font-size: 0.7rem;
        padding: 0.3rem 0.55rem;
    }
}

/* ====================================
   MOBILE PROJECT ACCORDION (< 768px)
   ==================================== */

@media (max-width: 767px) {
    /* Project Group Container */
    .project-group {
        margin-bottom: 1.5rem;
        border-radius: 8px;
        overflow: hidden;
    }

    /* Project Group Header - Clickable */
    .project-group-header {
        background: white;
        border: 3px solid;
        border-radius: 8px;
        padding: 1rem 1.5rem;
        cursor: pointer;
        user-select: none;
        position: relative;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow:
            4px 4px 0px rgba(0, 0, 0, 0.15),
            inset -2px -2px 0px rgba(0, 0, 0, 0.1),
            inset 2px 2px 0px rgba(255, 255, 255, 0.8);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }

    .project-group-header:active {
        opacity: 0.7;
        transform: translate(2px, 2px);
        box-shadow:
            2px 2px 0px rgba(0, 0, 0, 0.15),
            inset -2px -2px 0px rgba(0, 0, 0, 0.1),
            inset 2px 2px 0px rgba(255, 255, 255, 0.8);
    }

    /* Group Type Colors */
    .project-group-header.group-company {
        border-color: #6366f1; /* indigo */
    }

    .project-group-header.group-freelance {
        border-color: #ec4899; /* pink */
    }

    .project-group-header.group-personal {
        border-color: #14b8a6; /* teal */
    }

    /* Group Header Title */
    .project-group-title {
        font-family: 'VT323', monospace;
        font-size: 1.5rem;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex: 1;
        margin: 0;
    }

    .project-group-title-icon {
        font-size: 1.75rem;
    }

    /* Company */
    .group-company .project-group-title {
        color: #4338ca;
    }

    /* Freelance */
    .group-freelance .project-group-title {
        color: #be185d;
    }

    /* Personal */
    .group-personal .project-group-title {
        color: #0f766e;
    }

    /* Project Count Badge */
    .project-count-badge {
        font-family: 'Fira Code', monospace;
        font-size: 0.75rem;
        font-weight: 600;
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        background: rgba(147, 51, 234, 0.1);
        color: #7e22ce;
        border: 1px solid rgba(147, 51, 234, 0.2);
    }

    /* Expand/Collapse Icon */
    .project-accordion-icon {
        font-size: 1.5rem;
        transition: transform 0.3s ease;
        display: inline-block;
        color: #6b7280;
    }

    .project-accordion-icon.expanded {
        transform: rotate(180deg);
    }

    /* Project Group Content - Collapsible */
    .project-group-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .project-group-content.expanded {
        max-height: 10000px; /* Large enough to fit all projects */
        transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Projects Container inside accordion */
    .project-group-projects {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding-top: 1rem;
    }

    /* Hide project type badges on mobile (already shown in group header) */
    .project-card .project-type-badge {
        display: none;
    }
}

/* Desktop: No project groups, keep normal grid layout */
@media (min-width: 768px) {
    .project-group {
        display: none !important;
    }

    .project-accordion-icon {
        display: none !important;
    }

    .project-group-content {
        max-height: none !important;
        overflow: visible !important;
    }
}

/* ====================================
   BUY ME A COFFEE MODAL
   ==================================== */

/* Modal overlay - hidden by default */
#coffee-modal {
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

#coffee-modal.hidden {
    display: none !important;
}

/* Modal content animation */
#coffee-modal > div {
    animation: slideUp 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

/* Close button hover effect */
#close-modal {
    transition: all 0.2s ease;
}

#close-modal:hover {
    transform: rotate(90deg);
    color: #ef4444;
}

/* QR Code image styling */
#coffee-modal img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Buy Coffee Button Animation */
#buy-coffee-btn {
    position: relative;
    overflow: hidden;
}

#buy-coffee-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

#buy-coffee-btn:hover::before {
    width: 300px;
    height: 300px;
}

#buy-coffee-btn:active {
    transform: scale(0.98);
}

/* Responsive adjustments for modal */
@media (max-width: 640px) {
    #coffee-modal > div {
        margin: 1rem;
        padding: 1.5rem;
    }

    #coffee-modal h3 {
        font-size: 1.5rem;
    }
}
