/* ===================================================================
   SOCIAL-TOGGLES.CSS
   Quick-contact dock (desktop only). Adapts to the surface beneath it:
   script.js adds .on-light while a light section is behind the dock.
   =================================================================== */

.social-toggles {
    position: fixed;
    right: 1.6rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: var(--z-dock, 150);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.6rem;
    background: rgba(24, 24, 27, 0.78);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 9999px;
    box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.6);
    /* Hidden over the hero composition; appears once the visitor scrolls */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

body.is-scrolled .social-toggles {
    opacity: 1;
    pointer-events: auto;
}

.social-toggle {
    --brand: #ededed;
    position: relative;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d4d4d8;
    text-decoration: none;
    transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.social-toggle i {
    font-size: 1.7rem;
}

.social-toggle.whatsapp { --brand: #25d366; }
.social-toggle.linkedin { --brand: #3b8fd9; }
.social-toggle.upwork { --brand: #14a800; }
.social-toggle.github { --brand: #ffffff; }

.social-toggle:hover,
.social-toggle:focus-visible {
    color: var(--brand);
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(-2px);
}

/* Tooltip */
.social-toggle::before {
    content: attr(data-tooltip);
    position: absolute;
    right: calc(100% + 1.2rem);
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    padding: 0.5rem 1rem;
    background: #18181b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: #ededed;
    font-family: var(--font-body, sans-serif);
    font-size: 1.25rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-toggle:hover::before,
.social-toggle:focus-visible::before {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* Over a light section */
.social-toggles.on-light {
    background: rgba(255, 255, 255, 0.86);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px -14px rgba(0, 0, 0, 0.22);
}

.social-toggles.on-light .social-toggle {
    color: #3f3f46;
}

.social-toggles.on-light .social-toggle.github { --brand: #0a0a0b; }
.social-toggles.on-light .social-toggle.linkedin { --brand: #0a66c2; }

.social-toggles.on-light .social-toggle:hover,
.social-toggles.on-light .social-toggle:focus-visible {
    background: rgba(0, 0, 0, 0.05);
}

.social-toggles.on-light .social-toggle::before {
    background: #0a0a0b;
    border-color: #0a0a0b;
    color: #fafaf9;
}

@media (max-width: 1280px) {
    .social-toggles {
        display: none;
    }
}
