:root {
    color-scheme: light dark;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #252525;
    --bg-curvya: #1a1412;
    --border-primary: #2a2a2a;
    --border-secondary: #3a3a3a;

    --text-primary: #ffffff;
    --text-secondary: #e5e5e5;
    --text-tertiary: #c0c0c0;
    --text-muted: #a0a0a0;
    --text-curvya: #D9A2A2;
    --text-curvya-muted: #ffffff;

    --accent-from: #5c5cff;
    --accent-curvya: #D9A2A2;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;

    --title-font: ;
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #e5e5e5;
    --bg-curvya: #faf5f2;
    --border-primary: #e0e0e0;
    --border-secondary: #d0d0d0;

    --text-primary: #0a0a0a;
    --text-secondary: #1a1a1a;
    --text-tertiary: #404040;
    --text-muted: #666666;
    --text-curvya: #612D44;
    --text-curvya-muted: #666666;

    --accent-curvya: #612D44;

    --accent-from: #1818ff;

}

:root[data-theme="light"],
:root.light {
    color-scheme: light;
}

:root[data-theme="dark"],
:root.dark {
    color-scheme: dark;
}

/* ---------- Dock layout ---------- */
.dock {
    --dock-text: light-dark(rgba(0, 0, 0, 0.55), rgba(255, 255, 255, 0.6));
    --dock-text-active: light-dark(#000, #fff);
    --dock-active-bg: light-dark(rgba(0, 0, 0, 0.09), rgba(255, 255, 255, 0.18));

    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    margin: 0 auto;
    width: fit-content;
    transform: none;
    padding: 0;
    gap: 0;
    z-index: 1000;
    border-radius: 999px;
}

.glass-surface {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.glass-surface__filter {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}

.glass-surface__content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px;
    border-radius: inherit;
}

/* ---------- Dock items (no animation) ---------- */
.dock-item {
    position: relative;
    z-index: 1;
    padding: 10px 20px;
    border-radius: 999px;
    font: 500 15px/1 "Inter", sans-serif;
    color: var(--dock-text);
    text-decoration: none;
}

.dock-item:hover,
.dock-item.active {
    color: var(--dock-text-active);
}

/* the sliding highlight (blob) */
.dock-blob {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 0;
    opacity: 0;
    /* <- add: hidden until JS places it */
    border-radius: 999px;
    background: var(--dock-active-bg);
    pointer-events: none;
    will-change: transform, width;
}

.dock-blob.animate {
    transition:
        transform 0.45s cubic-bezier(0.34, 1.3, 0.64, 1),
        width 0.45s cubic-bezier(0.34, 1.3, 0.64, 1);
}

@media (prefers-reduced-motion: reduce) {
    .dock-blob.animate {
        transition: none;
    }
}

/* ---------- Chromium: real refraction ---------- */
.glass-surface--svg {
    background: light-dark(hsl(0 0% 100% / 0.1), hsl(0 0% 0% / 0.1));
    backdrop-filter: var(--filter-id) saturate(1);
    box-shadow:
        0 0 2px 1px light-dark(color-mix(in oklch, black, transparent 85%), color-mix(in oklch, white, transparent 65%)) inset,
        0 0 10px 4px light-dark(color-mix(in oklch, black, transparent 90%), color-mix(in oklch, white, transparent 85%)) inset,
        0 4px 16px rgba(17, 17, 26, 0.05),
        0 8px 24px rgba(17, 17, 26, 0.05),
        0 16px 56px rgba(17, 17, 26, 0.05);
}

/* ---------- Safari / Firefox: frosted fallback ---------- */
.glass-surface--fallback {
    background: light-dark(hsl(0 0% 100% / 0.17), hsl(0 0% 100% / 0.07));
    -webkit-backdrop-filter: blur(12px) saturate(1.4) brightness(1.04);
    backdrop-filter: blur(12px) saturate(1.4) brightness(1.04);
    box-shadow:
        inset 0 1px 0 0 light-dark(hsl(0 0% 100% / 0.85), hsl(0 0% 100% / 0.3)),
        inset 0 -1px 0 0 light-dark(hsl(0 0% 100% / 0.35), hsl(0 0% 100% / 0.08)),
        0 4px 16px rgba(17, 17, 26, 0.06),
        0 8px 24px rgba(17, 17, 26, 0.06),
        0 16px 56px rgba(17, 17, 26, 0.06);
}

.glass-surface__sheen,
.glass-surface__rim {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
}

.glass-surface__sheen {
    background: linear-gradient(135deg,
            light-dark(hsl(0 0% 100% / 0.42), hsl(0 0% 100% / 0.14)) 0%,
            transparent 42%, transparent 64%,
            light-dark(hsl(0 0% 100% / 0.18), hsl(0 0% 100% / 0.05)) 100%);
}

.glass-surface__rim {
    padding: 2px;
    background: linear-gradient(150deg,
            light-dark(hsl(0 0% 100% / 0.7), hsl(0 0% 100% / 0.34)),
            light-dark(hsl(0 0% 100% / 0.1), hsl(0 0% 100% / 0.03)) 45%,
            light-dark(hsl(0 0% 100% / 0.08), hsl(0 0% 100% / 0.02)) 60%,
            light-dark(hsl(0 0% 100% / 0.42), hsl(0 0% 100% / 0.18)));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

/* keep page content clear of the dock */
.container {
    padding-bottom: 100px;
}

.dock.on-dark {
    --dock-text: rgba(255, 255, 255, 0.7);
    --dock-text-active: #fff;
    --dock-active-bg: rgba(255, 255, 255, 0.18);
}

.dock-item:focus-visible {
    z-index: 2;
    outline: 2px solid var(--accent-from);
    outline-offset: -2px;
    /* inside the pill, can't be clipped */
}