/* Dock Animation Styles */
:root {
    --dock-bg: rgba(255, 255, 255, 0.1);
    --dock-border: rgba(255, 255, 255, 0.2);
    --dock-icon-size: 40px;
    --dock-icon-magnified: 60px;
}

body.dark-mode {
    /* Match Hero Section Dark Mode: #032D55 (Brand Navy) */
    /* Using slightly transparent version for glass effect */
    --dock-bg: rgba(3, 45, 85, 0.6);
    --dock-border: rgba(255, 255, 255, 0.1);
}

.dock-container {
    display: flex;
    align-items: center;
    gap: 30px;
    /* Increased space between icons */
    background: var(--dock-bg);
    border: none;
    /* Removed outer line as requested */
    backdrop-filter: blur(12px);
    padding: 10px 20px;
    border-radius: 24px;
    height: 80px;
    /* Reduced from 90px (approx 5px from top/bottom total) */
    /* Fixed height increased to accomodate text below */

    /* Center it */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);

    /* Ensure it handles scaling items nicely */
    transform-origin: bottom center;
}

.dock-item {
    width: var(--dock-icon-size);
    height: var(--dock-icon-size);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    transition: margin 0.1s;
    /* Removed width, height, transform to prevent conflict with JS */
    position: relative;
    color: var(--text-color);
    margin-bottom: 20px;
    /* Push item up slightly so text fits below */
}

/* Align items to center-top or center? 
   We want icons to be roughly in the middle-ish, but text below.
   Let's align dock-container items: center?
   If items have margin-bottom, they will push up.
*/

.dock-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* New class to re-enable transitions when mouse leaves */
.dock-container.dock-resetting .dock-item {
    transition: width 0.3s ease, height 0.3s ease, transform 0.3s ease, margin 0.1s;
}

.dock-item svg {
    width: 60%;
    height: 60%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.dock-separator {
    width: 1px;
    height: 32px;
    background: var(--dock-border);
    margin: 0 4px;
    margin-bottom: 20px;
    /* Align with items */
}

/* Label (Formerly Tooltip) */
.dock-label {
    position: absolute;
    bottom: -22px;
    /* Position below the icon */
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    color: var(--text-color);
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    opacity: 1;
    /* Always visible as requested */
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Optional: Hide label on hover if magnification makes it overlap? 
   Or keeps it. Mac dock hides label distinct from icon.
   User asked for "clearly visible". I'll */
/* Keep label visible on hover */
.dock-item:hover .dock-label {
    opacity: 1;
}

/* =========================================
   Scroll State (Shrink & Compact) - Triggered by Parent Nav
   ========================================= */
.dock-container {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

nav.nav-scrolled .dock-container {
    height: 50px;
    /* Shrink height significantly */
    padding: 0 10px;
    gap: 15px;
    /* Compact icons */

    /* Remove Dock-specific background/border changes if Nav handles it?
       Actually, Dock is inside Nav. 
       User said "entire section". 
       So Dock should probably become transparent or blend in?
       Or just compact. 
       User said: "background color is not changed". 
       So we keep Dock background as is (or let it stay same).
       We REMOVE the blue glow from Dock itself, as Nav has it now.
    */
    box-shadow: none;
    border-color: transparent;
    /* Seamless integration */
    background: transparent;
    /* Let Nav background show through? Or keep subtle? */
}

/* Ensure Nav Scrolled overrides Dock default background if we want "seamless" */
nav.nav-scrolled .dock-container {
    /* If we make it transparent, the icons sit on the Nav. */
    background: rgba(255, 255, 255, 0);
    border: none;
    backdrop-filter: none;
}

/* Hide labels on scroll */
nav.nav-scrolled .dock-label {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
    pointer-events: none;
}

/* Hide separator or compact it */
nav.nav-scrolled .dock-separator {
    height: 20px;
    margin: 0 5px;
}

/* Reset item margins so they center nicely */
nav.nav-scrolled .dock-item {
    margin-bottom: 0;
    width: 36px;
    /* Slightly smaller icons? */
    height: 36px;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .dock-label {
        display: none !important;
        /* Force hide labels on mobile */
    }

    .dock-separator {
        display: none;
        /* Hide separator to save space */
    }

    .dock-container {
        gap: 15px;
        /* Reduce gap */
        padding: 10px 15px;
        height: 60px;
        /* Compact height */
        width: auto;
        min-width: 200px;
        /* Ensure basic width */
    }

    .dock-item {
        margin-bottom: 0;
        /* Align center */
        width: 36px;
        height: 36px;
    }

    /* Ensure dock resets margin on mobile since labels are gone */
    .dock-item {
        margin-bottom: 0;
    }

    /* Hide LinkedIn on mobile */
    .dock-item[href*="linkedin"] {
        display: none;
    }
}