/* Portfolio OS Section */
.portfolio-os-section {
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.portfolio-os-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(94, 234, 212, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.os-demo-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.os-demo-text {
    max-width: 480px;
}

.os-demo-text h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.os-demo-text h3 .accent {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.os-demo-text p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.os-demo-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.os-feature-tag {
    padding: 0.4rem 0.8rem;
    background: rgba(94, 234, 212, 0.1);
    border: 1px solid rgba(94, 234, 212, 0.2);
    border-radius: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent);
}

.os-launch-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--gradient-1);
    border: none;
    border-radius: 8px;
    color: var(--bg-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.os-launch-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(94, 234, 212, 0.3);
}

/* Mini OS Window Demo */
.os-window-demo {
    position: relative;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.os-window-demo:hover {
    transform: scale(1.02) translateY(-5px);
}

.os-window-demo:hover .os-window {
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 40px rgba(94, 234, 212, 0.15);
}

.os-window {
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.os-titlebar {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: linear-gradient(180deg, #2a2a3e 0%, #1f1f30 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.os-window-controls {
    display: flex;
    gap: 8px;
}

.os-window-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.os-window-btn.close {
    background: #ff5f57;
}

.os-window-btn.minimize {
    background: #ffbd2e;
}

.os-window-btn.maximize {
    background: #28ca42;
}

.os-window-title {
    flex: 1;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.os-desktop {
    height: 280px;
    padding: 1.5rem;
    background: linear-gradient(135deg, #0a0a14 0%, #12121f 50%, #0a0a14 100%);
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    align-content: start;
}

.os-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.os-icon:hover {
    background: rgba(255, 255, 255, 0.08);
}

.os-icon-img {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    position: relative;
}

.os-icon-img svg {
    width: 26px;
    height: 26px;
}

.icon-folder {
    background: linear-gradient(180deg, #6b7fd4 0%, #5468c4 50%, #4558b4 100%);
    box-shadow: 0 2px 8px rgba(84, 104, 196, 0.4);
}

.icon-file {
    background: linear-gradient(180deg, #f5f5f5 0%, #e0e0e0 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.icon-file svg {
    color: #dc2626;
}

.icon-games {
    background: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
}

.icon-terminal {
    background: linear-gradient(180deg, #1f1f1f 0%, #0a0a0a 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.icon-browser {
    background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.icon-settings {
    background: linear-gradient(180deg, #6b7280 0%, #4b5563 100%);
    box-shadow: 0 2px 8px rgba(75, 85, 99, 0.4);
}

.icon-music {
    background: linear-gradient(135deg, #f472b6 0%, #ec4899 50%, #db2777 100%);
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.4);
}

.icon-contact {
    background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.icon-home {
    background: linear-gradient(180deg, #f97316 0%, #ea580c 100%);
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.4);
}

.os-icon-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: var(--text-secondary);
    text-align: center;
}

.os-taskbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background: rgba(20, 20, 35, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.os-taskbar-apps {
    display: flex;
    gap: 0.5rem;
}

.os-taskbar-app {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.os-taskbar-app.active {
    background: rgba(94, 234, 212, 0.2);
    border-bottom: 2px solid var(--accent);
}

.os-taskbar-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.os-click-hint {
    position: absolute;
    bottom: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.7;
}

.os-click-hint::before {
    content: '';
    width: 8px;
    height: 8px;
    border: 2px solid var(--accent);
    border-top: none;
    border-right: none;
    transform: rotate(-45deg);
    animation: clickBounce 1.5s ease-in-out infinite;
}

@keyframes clickBounce {

    0%,
    100% {
        transform: rotate(-45deg) translateY(0);
    }

    50% {
        transform: rotate(-45deg) translateY(-4px);
    }
}

@media (max-width: 900px) {
    .os-demo-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .os-demo-text {
        text-align: center;
        max-width: 100%;
    }

    .os-demo-features {
        justify-content: center;
    }

    .os-demo-text h3 {
        font-size: 1.5rem;
    }
}
