/* macOS-style menu bar with traffic light buttons - taskbar on top of content */

.menu-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.02);
    border-radius: 24px 24px 0 0;
    flex-shrink: 0;
}

body.dark-mode .menu-bar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.traffic-lights {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0;
    background: transparent;
    border-radius: 0;
    backdrop-filter: none;
    border: none;
    box-shadow: none;
}

body.dark-mode .traffic-lights {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.traffic-light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}

.traffic-light-icon {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transition: all 0.2s ease;
}

/* Red traffic light (About) */
.traffic-light-red {
    background: #ff5f57;
    box-shadow: 0 0 0 0 rgba(255, 95, 87, 0.4);
}

.traffic-light-red .traffic-light-icon {
    background: #ff5f57;
}

.traffic-light-red:hover {
    background: #ff3b30;
    box-shadow: 0 0 0 4px rgba(255, 95, 87, 0.2);
    transform: scale(1.1);
}

.traffic-light-red:hover .traffic-light-icon {
    background: #ff3b30;
}

/* Yellow traffic light (About/Projects) */
.traffic-light-yellow {
    background: #ffbd2e;
    box-shadow: 0 0 0 0 rgba(255, 189, 46, 0.4);
}

.traffic-light-yellow .traffic-light-icon {
    background: #ffbd2e;
}

.traffic-light-yellow:hover {
    background: #ffcc02;
    box-shadow: 0 0 0 4px rgba(255, 189, 46, 0.2);
    transform: scale(1.1);
}

.traffic-light-yellow:hover .traffic-light-icon {
    background: #ffcc02;
}

/* Green traffic light (Contact) */
.traffic-light-green {
    background: #28ca42;
    box-shadow: 0 0 0 0 rgba(40, 202, 66, 0.4);
}

.traffic-light-green .traffic-light-icon {
    background: #28ca42;
}

.traffic-light-green:hover {
    background: #20d046;
    box-shadow: 0 0 0 4px rgba(40, 202, 66, 0.2);
    transform: scale(1.1);
}

.traffic-light-green:hover .traffic-light-icon {
    background: #20d046;
}

.traffic-light:active {
    transform: scale(0.95);
}

/* Active state for traffic lights */
.traffic-light.active {
    opacity: 1;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

body.dark-mode .traffic-light.active {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.traffic-light:not(.active) {
    opacity: 0.7;
}

/* Tooltip on hover */
.traffic-light::after {
    content: attr(title);
    position: absolute;
    bottom: -2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
}

body.dark-mode .traffic-light::after {
    background: rgba(255, 255, 255, 0.9);
    color: #000;
}

.traffic-light:hover::after {
    opacity: 1;
}

/* Responsive nav adjustments */
@media (max-width: 600px) {
    .menu-bar {
        width: 100%;
        justify-content: flex-start;
    }
    
    .traffic-lights {
        padding: 0.375rem;
        gap: 0.375rem;
    }
    
    .traffic-light {
        width: 10px;
        height: 10px;
    }
}
