/* HEADER */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 30px;
    z-index: 99999;
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    background: transparent;
}

header.header-scrolled {
    margin: 10px 40px;
    width: calc(100% - 80px);
    padding: 5px 15px;
    /* background: rgba(255, 252, 248, 0.65); */
    /* Keeps its specific tint/opacity, maybe convert later if asked */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 10px;
    box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
    align-items: center;
}

.header-left {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    transition: gap 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

header.header-scrolled .header-left {
    gap: 12px;
}

.header-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transform: translateX(-15px);
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    white-space: nowrap;
}

header.header-scrolled .header-profile {
    opacity: 1;
    max-width: 200px;
    transform: translateX(0);
}

.header-dp {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.header-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

.header-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 24px;
}

.current-time {
    display: flex;
    gap: 4px;
}

.time-date {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: capitalize;
}

.time-val {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
}

.time-colon {
    animation: colonBlink 1s infinite;
}

@keyframes colonBlink {

    0%,
    49% {
        opacity: 1;
    }

    50%,
    100% {
        opacity: 0;
    }
}

.availability {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
}

.status-dot-container {
    position: relative;
    width: 8px;
    height: 8px;
    margin-top: -3px;
}

.status-dot {
    width: 100%;
    height: 100%;
    background-color: var(--accent-green);
    border-radius: 50%;
    animation: dotBlink 2s ease-in-out infinite;
}

.ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border: 2px solid var(--accent-green);
    border-radius: 50%;
    animation: radarRipple 2s cubic-bezier(0.0, 0, 0.2, 1) infinite;
}

@keyframes dotBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes radarRipple {
    0% {
        width: 8px;
        height: 8px;
        opacity: 1;
    }

    100% {
        width: 30px;
        height: 30px;
        opacity: 0;
    }
}

.lang-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-muted);
}

.lang-icon {
    width: 18px;
    height: 18px;
    margin-top: -4px;
}

/* DYNAMIC ISLAND */
.dynamic-island-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.dynamic-island {
    background: var(--island-bg);
    color: var(--color-white);
    padding: 8px 16px;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    cursor: pointer;
    width: 140px;
    height: 40px;
    position: relative;
}

.dynamic-island:hover {
    width: 420px;
}



.island-text {
    white-space: nowrap;
    font-weight: 500;
    font-size: 14px;
    transition: transform 0.3s;
    position: relative;
}

.island-text::before {
    left: -15px;
}

.island-text::after {
    right: -15px;
}

.dynamic-island:hover .island-text::before,
.dynamic-island:hover .island-text::after {
    opacity: 1;
}

.island-text:hover {
    transform: scale(1.05);
}

.island-link {
    color: var(--rgba-white-70);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s, opacity 0.3s, transform 0.3s;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    white-space: nowrap;
}

.island-link[href="#projects"] {
    left: 35px;
}

.island-link[href="#about-preview"] {
    right: 20px;
}

.dynamic-island:hover .island-link {
    opacity: 1;
    pointer-events: auto;
}

.island-link:hover {
    color: var(--color-white);
    transform: scale(1.05);
}

/* DARK KNIGHT MODE BUTTON */
.dark-knight-btn {
    padding: 0;
    width: 50px;
    height: 35px;
    margin-top: -5px;
    /* override explore-btn margin */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 50%;
    /* shape like explore-btn */
    background-color: var(--color-black) !important;
}

.dark-knight-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    /* slightly smaller to fit inside border */
}

.dark-knight-btn .tooltip {
    bottom: -45px;
    z-index: 100;
}

.dark-knight-btn:hover .tooltip {
    background-color: var(--color-black) !important;
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
}

.dark-knight-btn.active {
    background: var(--color-black);
    box-shadow: 0px 0px 0px var(--color-black);
    transform: translate(4px, 4px);
    border-color: var(--color-black);
}

/* Desktop hide states for mobile features */
.mobile-availability {
    display: none;
}

.hamburger-icon {
    display: none;
}

.island-content {
    display: none;
}

.island-link-mobile {
    display: none;
}

.mobile-island-container {
    display: none;
}

.mobile-text {
    display: none;
}

.desktop-text {
    display: inline;
}