/* Theme Switcher - Hide by default, can show with .visible class */
.theme-switcher {
    display: none;
}

.theme-switcher.visible {
    display: block;
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(10, 10, 30, 0.95);
    backdrop-filter: blur(20px);
    padding: 15px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Theme-Specific Layout Variations */

/* DEFAULT THEME - Clean, Professional */
[data-theme="default"] .hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
}

[data-theme="default"] .services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

[data-theme="default"] .portfolio-grid {
    display: grid;
    gap: 40px;
}

[data-theme="default"] .navbar {
    backdrop-filter: blur(10px);
}

/* NEON THEME - Cyberpunk Grid Layout */
[data-theme="neon"] {
    --neon-pink: #FF00FF;
    --neon-cyan: #00FFFF;
    --neon-yellow: #FFFF00;
}

[data-theme="neon"] body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 255, 0.03) 2px,
            rgba(0, 255, 255, 0.03) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(255, 0, 255, 0.03) 2px,
            rgba(255, 0, 255, 0.03) 4px
        );
    pointer-events: none;
    z-index: 1;
}

[data-theme="neon"] .hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    min-height: 100vh;
    position: relative;
}

[data-theme="neon"] .hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    animation: neon-scan 3s linear infinite;
}

@keyframes neon-scan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

[data-theme="neon"] .services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    background: var(--neon-cyan);
    padding: 2px;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

[data-theme="neon"] .service-card {
    background: #000;
    border: none;
    border-radius: 0;
    clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
    position: relative;
    overflow: visible;
}

[data-theme="neon"] .service-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-pink));
    clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

[data-theme="neon"] .service-card:hover::before {
    opacity: 1;
    animation: neon-glow 1.5s ease-in-out infinite;
}

@keyframes neon-glow {
    0%, 100% { filter: blur(2px) brightness(1); }
    50% { filter: blur(4px) brightness(1.5); }
}

[data-theme="neon"] .portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    transform: perspective(1000px) rotateX(5deg);
}

[data-theme="neon"] .portfolio-item {
    border: 1px solid var(--neon-cyan);
    border-radius: 0;
    position: relative;
    overflow: hidden;
}

[data-theme="neon"] .portfolio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-pink), transparent);
    animation: scan-line 3s linear infinite;
}

@keyframes scan-line {
    0% { left: -100%; }
    100% { left: 100%; }
}

[data-theme="neon"] .navbar {
    background: rgba(0, 0, 0, 0.95);
    border-bottom: 2px solid var(--neon-cyan);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 50px) 100%, 0 100%);
}

[data-theme="neon"] .nav-links {
    gap: 60px;
}

[data-theme="neon"] .nav-link {
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

[data-theme="neon"] .nav-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--neon-cyan);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s;
}

[data-theme="neon"] .nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* AURORA THEME - Flowing, Organic Layout */
[data-theme="aurora"] body {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 25%, #334155 50%, #475569 75%, #64748B 100%);
    background-attachment: fixed;
}

[data-theme="aurora"] body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at top left, rgba(139, 92, 246, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at top right, rgba(236, 72, 153, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(6, 182, 212, 0.3) 0%, transparent 50%);
    animation: aurora-flow 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes aurora-flow {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.1); }
    50% { transform: rotate(180deg) scale(1); }
    75% { transform: rotate(270deg) scale(0.9); }
}

[data-theme="aurora"] .hero {
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

[data-theme="aurora"] .hero-content {
    max-width: 900px;
}

[data-theme="aurora"] .hero-visual {
    margin-top: 60px;
    width: 100%;
}

[data-theme="aurora"] .floating-cards {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

[data-theme="aurora"] .float-card {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 30px;
    min-width: 200px;
}

[data-theme="aurora"] .services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
}

[data-theme="aurora"] .service-card {
    flex: 0 1 calc(33% - 40px);
    min-width: 300px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    overflow: hidden;
    position: relative;
}

[data-theme="aurora"] .service-card::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(139, 92, 246, 0.1) 50%,
        transparent 70%
    );
    animation: aurora-sweep 6s linear infinite;
}

@keyframes aurora-sweep {
    0% { transform: translate(-30%, -30%) rotate(0deg); }
    100% { transform: translate(30%, 30%) rotate(360deg); }
}

[data-theme="aurora"] .portfolio-grid {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

[data-theme="aurora"] .portfolio-item {
    display: flex;
    align-items: center;
    gap: 40px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 40px;
    padding: 40px;
    overflow: hidden;
}

[data-theme="aurora"] .portfolio-item:nth-child(even) {
    flex-direction: row-reverse;
}

[data-theme="aurora"] .portfolio-image {
    flex: 0 0 40%;
    height: 300px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2));
}

[data-theme="aurora"] .portfolio-content {
    flex: 1;
    padding: 0;
}

[data-theme="aurora"] .navbar {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="aurora"] .approach-timeline {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 100%;
}

[data-theme="aurora"] .timeline-item {
    flex: 0 1 calc(25% - 40px);
    min-width: 250px;
    text-align: center;
}

[data-theme="aurora"] .timeline-number {
    position: relative;
    margin: 0 auto 30px;
}

[data-theme="aurora"] .approach-timeline::before {
    display: none;
}

/* MATRIX THEME - Terminal-Style Layout */
[data-theme="matrix"] {
    font-family: 'Courier New', monospace;
}

[data-theme="matrix"] body {
    background: #000;
    color: #00FF41;
}

[data-theme="matrix"] body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 65, 0.03) 2px,
        rgba(0, 255, 65, 0.03) 4px
    );
    pointer-events: none;
    z-index: 1;
}

[data-theme="matrix"] .hero {
    display: block;
    padding: 120px 20px 80px;
    min-height: 100vh;
}

[data-theme="matrix"] .hero-content {
    max-width: 100%;
    font-family: 'Courier New', monospace;
}

[data-theme="matrix"] .hero-title {
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 40px;
}

[data-theme="matrix"] .hero-title::before {
    content: '> ';
    color: #00FF41;
}

[data-theme="matrix"] .hero-subtitle {
    font-family: 'Courier New', monospace;
    border-left: 3px solid #00FF41;
    padding-left: 20px;
    margin: 30px 0;
}

[data-theme="matrix"] .hero-visual {
    display: none;
}

[data-theme="matrix"] .services-grid {
    display: block;
}

[data-theme="matrix"] .service-card {
    margin-bottom: 30px;
    background: rgba(0, 17, 0, 0.9);
    border: 1px solid #00FF41;
    border-radius: 0;
    position: relative;
    padding-left: 60px;
}

[data-theme="matrix"] .service-card::before {
    content: attr(data-index);
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: #00FF41;
    opacity: 0.3;
    font-weight: bold;
}

[data-theme="matrix"] .service-card:nth-child(1)::before { content: '01'; }
[data-theme="matrix"] .service-card:nth-child(2)::before { content: '02'; }
[data-theme="matrix"] .service-card:nth-child(3)::before { content: '03'; }
[data-theme="matrix"] .service-card:nth-child(4)::before { content: '04'; }
[data-theme="matrix"] .service-card:nth-child(5)::before { content: '05'; }
[data-theme="matrix"] .service-card:nth-child(6)::before { content: '06'; }

[data-theme="matrix"] .portfolio-grid {
    display: block;
    counter-reset: portfolio;
}

[data-theme="matrix"] .portfolio-item {
    counter-increment: portfolio;
    margin-bottom: 40px;
    background: #001100;
    border: 1px solid #00FF41;
    border-radius: 0;
    position: relative;
}

[data-theme="matrix"] .portfolio-item::before {
    content: '[' counter(portfolio, decimal-leading-zero) ']';
    position: absolute;
    top: 20px;
    left: 20px;
    color: #00FF41;
    font-weight: bold;
    font-size: 1.2rem;
}

[data-theme="matrix"] .portfolio-image {
    display: none;
}

[data-theme="matrix"] .portfolio-content {
    padding-top: 60px;
}

[data-theme="matrix"] .navbar {
    background: #000;
    border-bottom: 1px solid #00FF41;
    font-family: 'Courier New', monospace;
}

[data-theme="matrix"] .nav-link {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
}

[data-theme="matrix"] .nav-link::before {
    content: '[ ';
}

[data-theme="matrix"] .nav-link::after {
    content: ' ]';
}

[data-theme="matrix"] .btn,
[data-theme="matrix"] .liquid-button {
    background: transparent;
    border: 1px solid #00FF41;
    color: #00FF41;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 0;
    font-family: 'Courier New', monospace;
    position: relative;
    overflow: hidden;
}

[data-theme="matrix"] .btn::before,
[data-theme="matrix"] .liquid-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #00FF41;
    transition: left 0.3s;
    z-index: -1;
}

[data-theme="matrix"] .btn:hover,
[data-theme="matrix"] .liquid-button:hover {
    color: #000;
}

[data-theme="matrix"] .btn:hover::before,
[data-theme="matrix"] .liquid-button:hover::before {
    left: 0;
}

[data-theme="matrix"] .section-title {
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
    padding-left: 20px;
}

[data-theme="matrix"] .section-title::before {
    content: '>';
    position: absolute;
    left: 0;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

[data-theme="matrix"] .approach-timeline {
    display: block;
    border-left: 2px solid #00FF41;
    padding-left: 40px;
    max-width: 800px;
}

[data-theme="matrix"] .timeline-item {
    margin-bottom: 40px;
    position: relative;
}

[data-theme="matrix"] .timeline-number {
    position: absolute;
    left: -50px;
    top: 0;
    width: 30px;
    height: 30px;
    background: #00FF41;
    color: #000;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="matrix"] .timeline-content {
    background: rgba(0, 17, 0, 0.9);
    border: 1px solid #00FF41;
    width: 100%;
}

[data-theme="matrix"] table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Courier New', monospace;
}

[data-theme="matrix"] th,
[data-theme="matrix"] td {
    border: 1px solid #00FF41;
    padding: 10px;
    text-align: left;
}

[data-theme="matrix"] th {
    background: #00FF41;
    color: #000;
}

/* Responsive Theme Adjustments */
@media (max-width: 768px) {
    [data-theme="neon"] .services-grid {
        grid-template-columns: 1fr;
    }

    [data-theme="neon"] .portfolio-grid {
        grid-template-columns: 1fr;
        transform: none;
    }

    [data-theme="aurora"] .portfolio-item,
    [data-theme="aurora"] .portfolio-item:nth-child(even) {
        flex-direction: column;
    }

    [data-theme="aurora"] .portfolio-image {
        width: 100%;
        flex: none;
    }

    [data-theme="aurora"] .service-card {
        flex: 1 1 100%;
    }

    [data-theme="aurora"] .approach-timeline {
        flex-direction: column;
    }

    [data-theme="matrix"] .service-card {
        padding-left: 40px;
    }

    [data-theme="matrix"] .timeline-number {
        left: -45px;
    }
}