/* ==========================================================================
   Components
   Reusable UI components: navigation, buttons, tags
   ========================================================================== */

/* Navigation Pill
   ========================================================================== */

.nav-pill {
    position: fixed;
    top: var(--nav-top);
    left: var(--nav-side);
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 19px 27px;
    height: 55px;
    border-radius: 100px;
    background: var(--color-glass-bg);
    border: 1px solid var(--color-border);
    backdrop-filter: blur(12.5px);
    -webkit-backdrop-filter: blur(12.5px);
    z-index: 100;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-brand {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI Variable', 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--color-text-secondary);
    user-select: none;
    transition: color 0.3s ease;
}

.nav-link {
    position: relative;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI Variable', 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-link.active {
    font-weight: 600;
    color: var(--color-text-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 2.76px;
    height: 2.76px;
    border-radius: 50%;
    background-color: var(--color-text-primary);
    transition: background-color 0.3s ease;
}

.nav-link:hover:not(.active) {
    color: var(--color-text-primary);
}

/* View Toggle Button
   ========================================================================== */

.view-toggle-btn {
    position: fixed;
    top: var(--nav-top);
    right: var(--nav-side);
    width: 55px;
    height: 55px;
    border-radius: 100px;
    background: var(--color-glass-bg-alt);
    border: 1px solid var(--color-border);
    backdrop-filter: blur(12.5px);
    -webkit-backdrop-filter: blur(12.5px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: transform 0.2s ease, background 0.3s ease, border-color 0.3s ease;
}

.view-toggle-btn:hover {
    transform: scale(1.05);
}

.view-toggle-btn .icon-list,
.view-toggle-btn .icon-grid {
    transition: opacity 0.2s ease;
}

.view-toggle-btn .icon-list path,
.view-toggle-btn .icon-list circle,
.view-toggle-btn .icon-grid circle {
    fill: var(--color-text-secondary);
    transition: fill 0.3s ease;
}

/* Show list icon in gallery mode, grid icon in list mode */
.view-toggle-btn[data-view="gallery"] .icon-list {
    display: block;
}

.view-toggle-btn[data-view="gallery"] .icon-grid {
    display: none;
}

.view-toggle-btn[data-view="list"] .icon-list {
    display: none;
}

.view-toggle-btn[data-view="list"] .icon-grid {
    display: block;
}

/* Contact Button
   ========================================================================== */

.contact-btn {
    position: fixed;
    top: var(--nav-top);
    right: var(--nav-side);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
    height: 55px;
    border-radius: 100px;
    background: var(--color-bg-inverse);
    border: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI Variable', 'Segoe UI', sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: var(--color-text-inverse);
    text-decoration: none;
    cursor: pointer;
    z-index: 100;
    transition: transform 0.2s ease, background 0.3s ease, color 0.3s ease;
}

.contact-btn:hover {
    transform: scale(1.02);
}

.contact-btn svg {
    width: 16px;
    height: 16px;
}

.contact-btn svg path {
    fill: var(--color-text-inverse);
    transition: fill 0.3s ease;
}

/* Theme Toggle Button
   ========================================================================== */

.theme-toggle-btn {
    position: fixed;
    bottom: var(--nav-bottom);
    right: var(--nav-side);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: transform 0.2s ease;
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
}

.theme-toggle-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.theme-toggle-btn {
    color: var(--color-text-secondary);
}

/* Sun icon (shown in dark mode) */
.theme-toggle-btn .icon-sun {
    display: none;
}

/* Moon icon (shown in light mode) */
.theme-toggle-btn .icon-moon {
    display: block;
}

[data-theme="dark"] .theme-toggle-btn .icon-sun {
    display: block;
}

[data-theme="dark"] .theme-toggle-btn .icon-moon {
    display: none;
}

/* Project Tags
   ========================================================================== */

.project-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 20px;
    height: 33px;
    border-radius: 100px;
    background: var(--color-tag-bg);
    border: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI Variable', 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--color-text-secondary);
    transition: background 0.3s ease, color 0.3s ease;
}

/* ==========================================================================
   Responsive - Components
   ========================================================================== */

@media (max-width: 768px) {
    .nav-pill {
        padding: 16px 22px;
        height: 50px;
    }

    .nav-brand,
    .nav-link {
        font-size: 14px;
    }

    .view-toggle-btn {
        width: 50px;
        height: 50px;
    }

    .contact-btn {
        height: 50px;
        padding: 0 16px;
        font-size: 14px;
    }

    .project-tag {
        font-size: 13px;
        padding: 10px 16px;
        height: 38px;
    }
}

@media (max-width: 480px) {
    .nav-pill {
        padding: 14px 18px;
        height: 46px;
    }

    .nav-brand,
    .nav-link {
        font-size: 13px;
    }

    .view-toggle-btn {
        width: 46px;
        height: 46px;
    }

    .contact-btn {
        height: 46px;
        padding: 0 12px;
        font-size: 13px;
    }

    .contact-btn svg {
        display: none;
    }

    .theme-toggle-btn {
        width: 36px;
        height: 36px;
    }

    .theme-toggle-btn svg {
        width: 18px;
        height: 18px;
    }

    .project-tag {
        font-size: 11px;
        padding: 6px 12px;
        height: 26px;
    }
}
