/* ================================================
   MAUVAS Portfolio - Base Styles (Modern Minimalist)
   ================================================
   Layer Structure:
   - z-index: -1  → Background canvas (disabled)
   - z-index: 1   → Content (.app)
   ================================================ */

/* ================================================
   Reset & Base
   ================================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background: var(--color-light-bg);
    color: var(--color-dark);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: var(--leading-normal);
}

/* ================================================
   Layer 1: Background Canvas (Disabled for minimalist design)
   ================================================ */
#bg-canvas {
    display: none;
    /* Hidden for modern minimalist design */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-background);
    pointer-events: none;
}

/* ================================================
   Layer 2: Content Container
   ================================================ */
.app {
    position: relative;
    z-index: var(--z-base);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ================================================
   Navbar - Modern Minimalist with Glassmorphism
   ================================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    padding: var(--space-4) var(--space-6);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-8);
}

/* Logo - Minimalist with Text */
.navbar-logo {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
}

.logo-minimalist {
    height: 40px;
    width: auto;
    transition: transform var(--transition-base);
}

.navbar-logo:hover .logo-minimalist {
    transform: scale(1.05);
}

.logo-text {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--color-dark);
    letter-spacing: -0.02em;
}

/* Navigation Links */
.navbar-nav {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.nav-link {
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-slate);
    text-decoration: none;
    padding: var(--space-2) 0;
    position: relative;
    transition: all var(--transition-base);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-lime);
    transition: width var(--transition-base);
}

.key-icon {
    width: 18px;
    height: 18px;
    color: var(--color-dark);
    /* Dark gray/black for visibility on white keys */
    transition: color var(--transition-base);
}

.nav-link:hover {
    color: var(--color-lime);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: var(--color-lime);
    font-weight: var(--font-semibold);
}

.nav-link.active::after {
    width: 100%;
}

/* Language Toggle - Modern Pill Design */
.navbar-actions {
    display: flex;
    align-items: center;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    background: var(--color-white);
    border: 2px solid var(--color-border-light);
    border-radius: var(--radius-full);
    padding: var(--space-2) var(--space-4);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.lang-toggle:hover {
    border-color: var(--color-lime);
    box-shadow: var(--shadow-md);
}

.lang-option {
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-gray-400);
    transition: all var(--transition-base);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-md);
}

.lang-option.active {
    color: var(--color-white);
    background: var(--color-lime);
}

.lang-divider {
    color: var(--color-gray-300);
    font-family: var(--font-primary);
    font-weight: var(--font-light);
}

/* Mobile menu button (hidden by default) */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
}

.mobile-menu-btn span {
    width: 25px;
    height: 2px;
    background: var(--color-lime);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

/* ================================================
   Main Content
   ================================================ */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ================================================
   Hero Section - Modern Minimalist
   ================================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem var(--space-6) var(--space-12);
    background: linear-gradient(135deg, var(--color-gray-50) 0%, var(--color-white) 50%, var(--color-lime-50) 100%);
}

.hero-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
}

/* Hero Content (Left side) */
.hero-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

/* Hero Name Container - holds all typing lines */
.hero-name {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: var(--font-extrabold);
    letter-spacing: -0.02em;
    line-height: var(--leading-tight);
    color: var(--color-dark);
    min-height: 1em;
    margin: 0;
}

/* Typing Effect Styles */
.typing-title {
    display: inline-block;
}

.typing-text {
    display: inline;
}

.typing-cursor {
    display: inline-block;
    color: var(--color-lime);
    font-weight: var(--font-extrabold);
    margin-left: 2px;
    animation: cursor-blink 1s step-end infinite;
}

.typing-cursor.fade-out {
    animation: cursor-fade 0.5s ease-out forwards;
}

@keyframes cursor-blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

@keyframes cursor-fade {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.typing-complete .typing-text {
    animation: title-settle 0.3s ease-out;
}

@keyframes title-settle {
    0% {
        opacity: 0.9;
    }

    100% {
        opacity: 1;
    }
}

.hero-subtitle {
    font-family: var(--font-primary);
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    font-weight: var(--font-medium);
    line-height: var(--leading-relaxed);
    color: var(--color-slate);
    min-height: 1em;
    margin: 0;
}

.hero-cta {
    display: flex;
    gap: var(--space-4);
    margin-top: var(--space-4);
    flex-wrap: wrap;
}

/* Modern Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    text-decoration: none;
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    outline: none;
}

/* Secondary button - outline style */
.btn-secondary {
    background: var(--color-white);
    color: var(--color-dark);
    border: 2px solid var(--color-border-light);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    border-color: var(--color-lime);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Primary button - filled style */
.btn-primary {
    background: var(--color-lime);
    color: var(--color-white);
    border: 2px solid var(--color-lime);
    box-shadow: var(--shadow-lime-md);
}

.btn-primary:hover {
    background: var(--color-lime-dark);
    border-color: var(--color-lime-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lime-lg);
}

.btn:active {
    transform: translateY(0) scale(0.98);
}

/* Hero Visual (Right side - Avatar Image) */
.hero-visual {
    position: relative;
    width: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Avatar Image/Video - Modern with Depth */
.avatar-neon {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    transition: transform var(--transition-slow);
}

.avatar-neon:hover {
    transform: scale(1.02);
}

/* Video-specific optimizations */
video.avatar-neon {
    display: block;
    background: transparent;
}

/* Video Play/Pause Button */
.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(50, 205, 50, 0.9);
    border: none;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-xl), 0 0 20px rgba(50, 205, 50, 0.4);
    z-index: 10;
}

.video-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: var(--color-lime);
    box-shadow: var(--shadow-2xl), 0 0 30px rgba(50, 205, 50, 0.6);
}

.video-play-btn:active {
    transform: translate(-50%, -50%) scale(0.95);
}

.video-play-btn svg {
    color: var(--color-white);
    width: 32px;
    height: 32px;
    transition: all var(--transition-base);
}

/* Hide play button when video is playing */
.video-playing .play-icon {
    display: none;
}

.video-playing .pause-icon {
    display: block !important;
}

/* Hide pause button when video is playing and NOT hovering */
.hero-visual.video-playing .video-play-btn {
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity var(--transition-base);
}

/* Show pause button on hover when video is playing */
.hero-visual.video-playing:hover .video-play-btn {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Always show play button when video is paused */
.hero-visual:not(.video-playing) .video-play-btn {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* ================================================
   Skills Section - Interactive Keyboard
   ================================================ */
.skills-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-20) var(--space-6);
    position: relative;
    background: var(--color-light-bg);
}

.skills-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* Section Title - Global */
.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: var(--font-extrabold);
    color: var(--color-lime);
    text-align: center;
    letter-spacing: -0.02em;
    margin: 0 0 var(--space-4) 0;
}

/* Side-by-side Layout for Desktop */
.skills-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 1rem;
    align-items: start;
    width: 100%;
}

.keyboard-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

/* Info Panel (Screen) - Modern White Card */
.keyboard-screen {
    position: relative;
    width: 100%;
    max-width: 700px;
    background: var(--color-white);
    border: 2px solid var(--color-border-light);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
}

/* Remove scanline effect for modern design */
.screen-scanlines {
    display: none;
}

.screen-content {
    position: relative;
    z-index: 1;
}

.screen-title {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--color-dark);
    margin: 0 0 var(--space-3) 0;
}

.screen-category {
    font-family: var(--font-primary);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 var(--space-4) 0;
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
}

/* Category-specific colors - Modern badges */
.screen-category.cat-frontend {
    color: var(--color-lime-dark);
    background: var(--color-lime-50);
    border: 1px solid var(--color-lime-100);
}

.screen-category.cat-backend {
    color: #0369a1;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
}

.screen-category.cat-database {
    color: #c2410c;
    background: #ffedd5;
    border: 1px solid #fed7aa;
}

.screen-category.cat-devops {
    color: #7c3aed;
    background: #ede9fe;
    border: 1px solid #ddd6fe;
}

.screen-description {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    color: var(--color-slate);
    line-height: var(--leading-relaxed);
    margin: 0 0 var(--space-6) 0;
}

.screen-level {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    color: var(--color-slate);
    margin-bottom: var(--space-4);
}

.level-bars {
    display: flex;
    gap: 4px;
}

.level-bar {
    width: 20px;
    height: 8px;
    background: var(--color-border-light);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
}

.level-bar.active {
    background: var(--color-lime);
    box-shadow: none;
}

.level-years {
    color: var(--color-slate);
}

.screen-projects {
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    color: var(--color-slate);
}

.projects-label {
    color: var(--color-slate);
}

/* Screen update animation */
.keyboard-screen.screen-updating .screen-content {
    opacity: 0.5;
    transform: translateY(2px);
}

.screen-content {
    transition: opacity 0.15s ease, transform 0.15s ease;
}

/* Keyboard Container - Modern Design */
.keyboard {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: var(--space-6);
    background: var(--color-white);
    border: 2px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 6px;
}

/* Individual Keys - Modern Buttons */
.keyboard-key {
    position: relative;
    min-width: 55px;
    height: 55px;
    padding: var(--space-2);
    background: var(--color-white);
    border: 2px solid var(--color-border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.key-label {
    font-family: var(--font-primary);
    font-size: 0.625rem;
    font-weight: var(--font-semibold);
    color: var(--color-dark);
    text-align: center;
    line-height: 1.2;
    word-break: break-word;
}

/* Level dots on keys */
.key-level {
    display: flex;
    gap: 2px;
}

.level-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--color-border-light);
}

.level-dot.active {
    background: var(--color-lime);
    box-shadow: none;
}

/* Key Hover State - Modern */
.keyboard-key:hover,
.keyboard-key.key-hover {
    transform: translateY(-2px);
    border-color: var(--color-lime);
    box-shadow: var(--shadow-md);
}

.keyboard-key:hover .key-label,
.keyboard-key.key-hover .key-label {
    color: var(--color-lime);
}

/* Key Selected State - Modern */
.keyboard-key.key-selected {
    background: var(--color-lime-50);
    border-color: var(--color-lime);
    box-shadow: var(--shadow-lime-md);
}

.keyboard-key.key-selected .key-label {
    color: var(--color-lime-dark);
    font-weight: var(--font-bold);
}

/* Key Active (pressed) State - Modern */
.keyboard-key:active {
    transform: translateY(0) scale(0.95);
    box-shadow: var(--shadow-sm);
}

/* Key Filtered (dimmed) State */
.keyboard-key.key-filtered {
    opacity: 0.3;
    transform: scale(0.95);
    pointer-events: none;
}

/* Category-specific key colors */
.keyboard-key.key-cat-frontend:hover,
.keyboard-key.key-cat-frontend.key-selected {
    border-color: #00ff66;
    box-shadow:
        0 4px 0 rgba(0, 0, 0, 0.3),
        0 0 20px rgba(0, 255, 102, 0.4);
}

.keyboard-key.key-cat-backend:hover,
.keyboard-key.key-cat-backend.key-selected {
    border-color: #00ccff;
    box-shadow:
        0 4px 0 rgba(0, 0, 0, 0.3),
        0 0 20px rgba(0, 204, 255, 0.4);
}

.keyboard-key.key-cat-backend:hover .key-label,
.keyboard-key.key-cat-backend.key-selected .key-label {
    color: #00ccff;
    text-shadow: 0 0 10px rgba(0, 204, 255, 0.5);
}

.keyboard-key.key-cat-database:hover,
.keyboard-key.key-cat-database.key-selected {
    border-color: #ff6600;
    box-shadow:
        0 4px 0 rgba(0, 0, 0, 0.3),
        0 0 20px rgba(255, 102, 0, 0.4);
}

.keyboard-key.key-cat-database:hover .key-label,
.keyboard-key.key-cat-database.key-selected .key-label {
    color: #ff6600;
    text-shadow: 0 0 10px rgba(255, 102, 0, 0.5);
}

.keyboard-key.key-cat-devops:hover,
.keyboard-key.key-cat-devops.key-selected {
    border-color: #cc66ff;
    box-shadow:
        0 4px 0 rgba(0, 0, 0, 0.3),
        0 0 20px rgba(204, 102, 255, 0.4);
}

.keyboard-key.key-cat-devops:hover .key-label,
.keyboard-key.key-cat-devops.key-selected .key-label {
    color: #cc66ff;
    text-shadow: 0 0 10px rgba(204, 102, 255, 0.5);
}

/* Special Keys */
.keyboard-key.key-special {
    background: linear-gradient(180deg, rgba(60, 70, 65, 0.9) 0%, rgba(40, 50, 45, 0.95) 100%);
    border-color: rgba(255, 255, 255, 0.2);
}

.keyboard-key.key-special:hover {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow:
        0 8px 0 rgba(0, 0, 0, 0.3),
        0 0 15px rgba(255, 255, 255, 0.2);
}

.keyboard-key.key-special .key-label {
    color: rgba(255, 255, 255, 0.7);
}

.keyboard-key.key-special:hover .key-label {
    color: #ffffff;
}

/* Key Icons */
.key-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    /* Removed white filter - icons now display in dark color for visibility */
    color: var(--color-dark);
    transition: all 0.2s ease;
}

.keyboard-key:hover .key-icon,
.keyboard-key.key-selected .key-icon {
    /* Lime green on hover/selected */
    color: var(--color-lime);
    filter: drop-shadow(0 0 6px rgba(50, 205, 50, 0.6));
}

/* Category-specific icon glow with colors */
.keyboard-key.key-cat-frontend:hover .key-icon,
.keyboard-key.key-cat-frontend.key-selected .key-icon {
    filter: brightness(0) saturate(100%) invert(72%) sepia(89%) saturate(471%) hue-rotate(85deg) brightness(105%) contrast(101%) drop-shadow(0 0 8px rgba(0, 255, 102, 1));
}

.keyboard-key.key-cat-backend:hover .key-icon,
.keyboard-key.key-cat-backend.key-selected .key-icon {
    filter: brightness(0) saturate(100%) invert(67%) sepia(100%) saturate(597%) hue-rotate(154deg) brightness(103%) contrast(101%) drop-shadow(0 0 8px rgba(0, 204, 255, 1));
}

.keyboard-key.key-cat-database:hover .key-icon,
.keyboard-key.key-cat-database.key-selected .key-icon {
    filter: brightness(0) saturate(100%) invert(52%) sepia(98%) saturate(2932%) hue-rotate(1deg) brightness(102%) contrast(106%) drop-shadow(0 0 8px rgba(255, 102, 0, 1));
}

.keyboard-key.key-cat-devops:hover .key-icon,
.keyboard-key.key-cat-devops.key-selected .key-icon {
    filter: brightness(0) saturate(100%) invert(63%) sepia(55%) saturate(1711%) hue-rotate(230deg) brightness(101%) contrast(101%) drop-shadow(0 0 8px rgba(204, 102, 255, 1));
}

/* Key Sizes - Realistic QWERTY Layout */
.keyboard-key.key-normal {
    min-width: 50px;
}

.keyboard-key.key-wide {
    min-width: 85px;
}

.keyboard-key.key-tab {
    min-width: 75px;
}

.keyboard-key.key-caps {
    min-width: 90px;
}

.keyboard-key.key-shift {
    min-width: 110px;
}

.keyboard-key.key-enter {
    min-width: 100px;
}

.keyboard-key.key-space {
    min-width: 280px;
}

.keyboard-key.key-ctrl {
    min-width: 70px;
}

.keyboard-key.key-alt {
    min-width: 60px;
}

/* Category Filters */
.keyboard-filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1rem;
}

.filter-btn {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-dark);
    /* Dark text for visibility */
    background: var(--color-white);
    border: 2px solid var(--color-border-light);
    border-radius: 4px;
    padding: 0.5rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    color: var(--color-lime);
    border-color: var(--color-lime);
    background: var(--color-white);
}

.filter-btn.active {
    color: var(--color-white);
    border-color: var(--color-lime);
    background: var(--color-lime);
    box-shadow: 0 0 15px rgba(50, 205, 50, 0.3);
}

/* ================================================
   Services Section
   ================================================ */
/* ================================================
   Services Section - Modern Minimalist
   ================================================ */
.services-section {
    padding: var(--space-20) var(--space-6);
    background: var(--color-white);
}

.services-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-subtitle {
    text-align: center;
    font-family: var(--font-primary);
    font-size: var(--text-lg);
    color: var(--color-slate);
    margin-top: var(--space-4);
    margin-bottom: var(--space-12);
    font-weight: var(--font-normal);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
    margin-top: var(--space-12);
}

/* Responsive grid breakpoints */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* Service Card - Modern White Design */
.service-card {
    position: relative;
    background: var(--color-white);
    border: 2px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    transition: all var(--transition-base);
    overflow: visible;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--color-lime);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-lime);
    box-shadow: var(--shadow-xl), var(--shadow-lime-md);
}

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

/* Service Header - Horizontal Layout */
.service-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-2);
    /* Reduced from --space-4 (1rem) to --space-2 (0.5rem) - 50% reduction */
}

/* Service Icon - Lime Green */
.service-icon {
    width: 56px;
    height: 56px;
    background: var(--color-lime-50);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    /* Removed bottom margin for horizontal layout */
    flex-shrink: 0;
}

.service-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--color-lime-dark);
    fill: none;
    stroke-width: 2;
}

/* Service Title */
.service-title {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--color-dark);
    margin: 0;
    line-height: 1.3;
}

/* Service Features  */
.service-features {
    list-style: none;
    padding: 0;
    margin: var(--space-3) 0 var(--space-6) 0;
    /* Top margin reduced from --space-6 (1.5rem) to --space-3 (0.75rem) - 50% reduction */
    flex-grow: 1;
}

.service-features li {
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    color: var(--color-slate);
    padding: var(--space-2) 0;
    padding-left: var(--space-6);
    position: relative;
    line-height: var(--leading-relaxed);
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-lime);
    font-size: var(--text-base);
    font-weight: var(--font-bold);
}

/* Service CTA Button - Improved Visibility */
.service-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Center text */
    gap: var(--space-2);
    margin-top: auto;
    padding: var(--space-3) var(--space-6);
    background: transparent;
    border: 2px solid var(--color-lime);
    /* Added visible border */
    border-radius: var(--radius-lg);
    color: var(--color-lime-dark);
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    text-decoration: none;
    text-align: center;
    transition: all var(--transition-base);
    cursor: pointer;
    align-self: flex-start;
}

.service-cta:hover {
    background: var(--color-lime);
    color: var(--color-white);
    border-color: var(--color-lime);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.service-cta svg {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-base);
}

\n\n.service-cta:hover svg {
    transform: translateX(4px);
}

/* Mobile Toggle Button - Improved Visibility */
.service-toggle-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--color-white) !important;
    /* White background */
    border: 2px solid var(--color-lime) !important;
    /* Visible lime border - overriding any old styles */
    border-radius: var(--radius-md);
    color: var(--color-dark) !important;
    /* BLACK text for visibility */
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: all var(--transition-base);
    margin-bottom: var(--space-3);
}

.service-toggle-btn:hover {
    background: var(--color-lime) !important;
    color: var(--color-white) !important;
    border-color: var(--color-lime) !important;
}

.service-toggle-btn svg {
    stroke: currentColor;
}

.service-toggle-btn .hide-text {
    display: none;
}

.service-toggle-btn.active .show-text {
    display: none;
}

.service-toggle-btn.active .hide-text {
    display: inline;
}

.toggle-arrow {
    transition: transform var(--transition-base);
}

.service-toggle-btn.active .toggle-arrow {
    transform: rotate(180deg);
}

/* Hide toggle button on desktop */
@media (min-width: 769px) {
    .service-toggle-btn {
        display: none;
    }
}

/* Additional Services Section */
.additional-services {
    margin-top: var(--space-16);
    padding-top: var(--space-12);
    border-top: 2px solid var(--color-border-light);
}

.additional-title {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--color-dark);
    text-align: center;
    margin-bottom: var(--space-8);
}

.additional-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
    justify-content: center;
    max-width: 1000px;
    margin: 0 auto;
}

/* Responsive para additional services */
@media (max-width: 900px) {
    .additional-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .additional-grid {
        grid-template-columns: 1fr;
    }
}

.additional-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) var(--space-5);
    background: var(--color-lime-50);
    border: 2px solid var(--color-lime-100);
    border-radius: var(--radius-full);
    color: var(--color-dark);
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    transition: all var(--transition-base);
    cursor: default;
}

.additional-tag:hover {
    background: var(--color-lime-100);
    border-color: var(--color-lime);
    color: var(--color-lime-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Improved Icon Sizing */
.service-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    color: #00ff66;
    filter: drop-shadow(0 0 12px rgba(0, 255, 102, 0.8));
}

/* ================================================
   Labs Section
   ================================================ */
.labs-section {
    padding: 6rem 2rem;
}

.labs-container {
    max-width: 1400px;
    margin: 0 auto;
}

.labs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

/* Lab Card */
.lab-card {
    position: relative;
    aspect-ratio: 1;
    background: rgba(10, 20, 15, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lab-card:hover {
    transform: scale(1.05);
    border-color: var(--lab-color);
    box-shadow:
        0 0 20px var(--lab-color),
        0 0 40px rgba(var(--lab-color-rgb, 0, 255, 102), 0.3);
}

/* Lab Canvas */
.lab-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lab-card:hover .lab-canvas,
.lab-card.active .lab-canvas {
    opacity: 1;
}

/* Lab Overlay */
.lab-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.85);
    transition: opacity 0.3s ease;
    z-index: 1;
}

.lab-card:hover .lab-overlay,
.lab-card.active .lab-overlay {
    opacity: 0;
    pointer-events: none;
}

/* Lab Icon */
.lab-icon {
    width: 120px;
    /* Doubled from 60px */
    height: 120px;
    /* Doubled from 60px */
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 8px var(--lab-color));
}

.lab-icon svg {
    width: 100%;
    height: 100%;
}

.lab-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--lab-color);
    margin-bottom: 0.3rem;
    text-align: center;
    text-shadow: 0 0 10px var(--lab-color);
}

.lab-desc {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

/* Responsive Labs Grid */
@media (max-width: 1200px) {
    .labs-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .labs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .labs-grid {
        grid-template-columns: 1fr;
    }

    .lab-card {
        width: 100%;
        /* CRITICAL: Prevents collapse to 2x2px */
        max-width: 400px;
        margin: 0 auto;
    }
}

/* ================================================
   Responsive
   ================================================ */
@media (max-width: 900px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-2);
        /* Minimal gap (~8px) for mobile - 70% reduction */
    }

    .hero-content {
        align-items: center;
    }

    .hero-visual {
        order: -1;
        max-width: 300px;
        margin: 0 auto;
    }

    /* Navbar responsive */
    .navbar-nav {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.8rem;
    }

    /* Reduce space between subtitle and buttons on mobile */
    .hero-cta {
        margin-top: var(--space-2);
        /* Reduced from --space-4 (1rem) to --space-2 (0.5rem) - 50% reduction */
    }

    /* Skills layout - stack on tablet */
    .skills-layout {
        grid-template-columns: 1fr;
    }

    .keyboard-screen {
        max-width: 100%;
        margin-bottom: 1.5rem;
    }

    /* Reorganizar teclado para móvil */
    .keyboard {
        transform: none;
        padding: 0.75rem;
        max-width: 100%;
    }

    /* Ocultar teclas especiales que no son esenciales en móvil */
    .keyboard-row:first-child,
    /* Fila ESC, LANG, MODE, etc */
    .keyboard-key.key-backspace,
    .keyboard-key.key-tab,
    .keyboard-key.key-caps,
    .keyboard-key.key-enter,
    .keyboard-key.key-shift,
    .keyboard-key.key-ctrl,
    .keyboard-key.key-alt,
    .keyboard-key.key-altgr,
    .keyboard-key.key-fn {
        display: none;
    }

    /* Reorganizar filas para mostrar solo 3-4 teclas por fila */
    .keyboard-row {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.4rem;
        margin-bottom: 0.4rem;
    }

    /* Todas las teclas del mismo tamaño en móvil para consistencia */
    .keyboard-key {
        min-width: 70px !important;
        max-width: 70px;
        height: 70px !important;
        flex: 0 0 70px;
        padding: 0.5rem;
    }

    /* Spacebar más ancha pero no tanto */
    .keyboard-key.key-space {
        min-width: 150px !important;
        max-width: 150px;
    }

    .key-icon {
        width: 28px;
        height: 28px;
    }

    .key-label {
        font-size: 0.55rem;
        margin-top: 0.2rem;
    }
}


@media (max-width: 768px) {
    .navbar-nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 2rem 0;
        gap: 1.5rem;
        transition: left 0.3s ease;
        z-index: 1000;
    }

    .nav-link {
        color: var(--color-dark);
        /* Dark text for light background */
        font-size: 1.1rem;
        padding: 0.75rem 1.5rem;
        width: 80%;
        text-align: center;
    }

    .navbar-nav.active {
        left: 0;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .navbar-container {
        gap: 1rem;
    }

    /* Skills section mobile */
    .skills-section {
        padding: 3rem 1rem;
    }

    .keyboard-screen {
        padding: 1rem;
    }

    .screen-title {
        font-size: 0.8rem;
    }

    .screen-description {
        font-size: 1rem;
    }

    .keyboard-row {
        gap: 4px;
        flex-wrap: wrap;
    }

    .keyboard-key {
        min-width: 38px;
        height: 42px;
    }

    .key-label {
        font-size: 0.45rem;
    }

    .keyboard-key.key-wide {
        min-width: 70px;
    }

    .keyboard-key.key-extrawide {
        min-width: 120px;
    }

    .key-level {
        display: none;
    }
}

@media (max-width: 600px) {
    .navbar {
        padding: 0.75rem 1rem;
    }

    .hero {
        padding: 5rem 1rem 1rem;
    }

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

    .logo-neon {
        height: 35px;
    }

    .lang-toggle {
        padding: 0.4rem 0.8rem;
    }

    .lang-option {
        font-size: 0.8rem;
    }

    /* Keyboard extra small */
    .keyboard {
        padding: 0.75rem;
        gap: 5px;
    }

    .keyboard-row {
        gap: 3px;
    }

    .keyboard-key {
        min-width: 32px;
        height: 36px;
        padding: 0.25rem;
        border-width: 1px;
    }

    .key-label {
        font-size: 0.4rem;
    }

    .keyboard-key.key-wide {
        min-width: 60px;
    }

    .keyboard-key.key-extrawide {
        min-width: 100px;
    }

    .filter-btn {
        font-size: 0.8rem;
        padding: 0.4rem 1rem;
    }
}