/**
 * header.css - Header Component Styles
 *
 * Sticky header with search and branding.
 */

/* -----------------------------------------------------------------------------
 * Header Base
 * -------------------------------------------------------------------------- */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-header);
    transition: all var(--transition-slow) var(--ease-out);
    border-bottom: 1px solid transparent;
    padding: var(--space-6) 0;
}

.header--scrolled {
    background-color: rgba(5, 5, 5, 0.9);
    border-bottom-color: var(--slate-800);
    backdrop-filter: blur(12px);
    padding: var(--space-3) 0;
}

.header__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* -----------------------------------------------------------------------------
 * Brand Section
 * -------------------------------------------------------------------------- */

.header__brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.header__logo {
    width: 32px;
    height: 32px;
    background-color: var(--orange-600);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow-orange);
}

.header__logo-text {
    font-family: "JetBrains Mono", monospace;
    font-weight: 700;
    font-size: 1.125rem;
    color: #000;
}

.header__title {
    font-family: "JetBrains Mono", monospace;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin: 0;
}

.header__title-light {
    color: var(--slate-500);
    font-weight: 300;
}

/* -----------------------------------------------------------------------------
 * Actions Section
 * -------------------------------------------------------------------------- */

.header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.header__search {
    position: relative;
}

.header__search-icon {
    position: absolute;
    left: var(--space-3);
    top: 50%;
    transform: translateY(-50%);
    color: var(--slate-500);
    pointer-events: none;
    transition: color var(--transition-base);
}

.header__search:focus-within .header__search-icon {
    color: var(--orange-500);
}

.header__search-input {
    background-color: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--slate-800);
    border-radius: var(--radius-full);
    padding: 0.375rem var(--space-4) 0.375rem var(--space-10);
    font-size: 0.875rem;
    color: var(--text-tertiary);
    font-family: "Inter", sans-serif;
    width: 10rem;
    min-width: 10rem;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    transition: all var(--transition-slow) var(--ease-out);
}

.header__search-input:focus {
    outline: none;
    border-color: rgba(234, 88, 12, 0.5);
    box-shadow: 0 0 0 1px rgba(234, 88, 12, 0.5);
    width: 16rem;
}

.header__search-input::placeholder {
    color: var(--slate-500);
}

.header__github {
    color: var(--slate-500);
    display: flex;
    align-items: center;
    transition: color var(--transition-base);
}

.header__github:hover {
    color: var(--text-primary);
}

/* -----------------------------------------------------------------------------
 * Responsive
 * -------------------------------------------------------------------------- */

@media (max-width: 640px) {
    .header__title {
        display: none;
    }

    .header__search-input {
        width: 8rem;
        min-width: 8rem;
    }

    .header__search-input:focus {
        width: 10rem;
    }
}
