:root {
    --radius: 0.625rem;
    --background: oklch(1 0 0);
    --foreground: oklch(0.141 0.005 285.823);
    --card: oklch(1 0 0);
    --card-foreground: oklch(0.141 0.005 285.823);
    --popover: oklch(1 0 0);
    --popover-foreground: oklch(0.141 0.005 285.823);
    --primary: oklch(0.21 0.006 285.885);
    --primary-foreground: oklch(0.985 0 0);
    --secondary: oklch(0.967 0.001 286.375);
    --secondary-foreground: oklch(0.21 0.006 285.885);
    --muted: oklch(0.967 0.001 286.375);
    --muted-foreground: oklch(0.552 0.016 285.938);
    --accent: oklch(0.967 0.001 286.375);
    --accent-foreground: oklch(0.21 0.006 285.885);
    --destructive: oklch(0.577 0.245 27.325);
    --destructive-foreground: oklch(0.985 0 0);
    --border: oklch(0.92 0.004 286.32);
    --input: oklch(0.92 0.004 286.32);
    --ring: oklch(0.705 0.015 286.067);
    --spotlight-color: 0, 0, 0;
}

.dark {
    --background: oklch(0.141 0.005 285.823);
    --foreground: oklch(0.985 0 0);
    --card: oklch(0.21 0.006 285.885);
    --card-foreground: oklch(0.985 0 0);
    --popover: oklch(0.21 0.006 285.885);
    --popover-foreground: oklch(0.985 0 0);
    --primary: oklch(0.92 0.004 286.32);
    --primary-foreground: oklch(0.21 0.006 285.885);
    --secondary: oklch(0.274 0.006 286.033);
    --secondary-foreground: oklch(0.985 0 0);
    --muted: oklch(0.274 0.006 286.033);
    --muted-foreground: oklch(0.705 0.015 286.067);
    --accent: oklch(0.274 0.006 286.033);
    --accent-foreground: oklch(0.985 0 0);
    --destructive: oklch(0.704 0.191 22.216);
    --destructive-foreground: oklch(0.985 0 0);
    --border: oklch(0.274 0.006 286.033);
    --input: oklch(0.274 0.006 286.033);
    --ring: oklch(0.552 0.016 285.938);
    --spotlight-color: 255, 255, 255;
}

body {
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    background-color: var(--background);
    color: var(--foreground);
}

/* Fluid Background */
.fluid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    background: var(--background);
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    transition: transform 0.2s cubic-bezier(0.075, 0.82, 0.165, 1);
}

.dark .blob {
    opacity: 0.2;
}

.blob-1 {
    background: #329696;
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
}

.blob-2 {
    background: #856ED9;
    top: 20%;
    right: -10%;
    width: 40vw;
    height: 40vw;
}

.blob-3 {
    background: #C19433;
    bottom: -10%;
    left: 20%;
    width: 60vw;
    height: 60vw;
}

/* Updated Glass Card to use new Theme Variables */
.glass-card {
    background: color-mix(in oklch, var(--card) 60%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    color: var(--card-foreground);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), background-color 0.3s ease;
    position: relative;
    /* For spotlight */
    overflow: hidden;
    /* For spotlight */
}

/* Spotlight Effect CSS */
.glass-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    padding: 1px;
    /* border width */
    background: radial-gradient(600px circle at var(--mouse-x, 0px) var(--mouse-y, 0px), rgba(var(--spotlight-color), 0.15), transparent 40%);
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s;
}

/* Inner spotlight glow */
.glass-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(400px circle at var(--mouse-x, 0px) var(--mouse-y, 0px), rgba(var(--spotlight-color), 0.05), transparent 40%);
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s;
}

.glass-card:hover::before,
.glass-card:hover::after {
    opacity: 1;
}

.glass-card:hover {
    transform: translateY(-4px);
    background: color-mix(in oklch, var(--card) 80%, transparent);
}

/* Toaster Styles */
#toaster {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--card-foreground);
    padding: 16px;
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: toast-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* WebGL Canvas Overlay */
#fluid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 50;
    pointer-events: none;
}

/* Water Animation for Progress Bar */
.animated-water {
    background: repeating-linear-gradient(-45deg,
            rgba(0, 0, 0, 0.7) 0%,
            rgba(0, 0, 0, 0.5) 25%,
            rgba(0, 0, 0, 0.7) 50%);
    background-size: 40px 40px;
    animation: waveMove 2s linear infinite;
}

.dark .animated-water {
    background: repeating-linear-gradient(-45deg,
            rgba(255, 255, 255, 0.9) 0%,
            rgba(255, 255, 255, 0.6) 25%,
            rgba(255, 255, 255, 0.9) 50%);
}

@keyframes waveMove {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 40px 40px;
    }
}

/* Me Page Styles */
#me-page {
    display: none;
}

/* Staggered Text Animation Class */
.char {
    display: inline-block;
}

/* Particle System Specifics */
.rotate-zone {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 15%;
    pointer-events: none;
    transition: opacity 0.3s;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
    z-index: 10;
}

.rotate-zone.active {
    opacity: 1;
}

#left-zone {
    left: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.1), transparent);
}

#right-zone {
    right: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.1), transparent);
}

/* Pinch Cursor Styles */
#pinch-cursor-container {
    position: fixed;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 0, 0, 0.2), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 105;
}

#pinch-cursor {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    background: #ff2a2a;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 20px #ff2a2a, 0 0 40px #ff0000;
    transition: left 0.1s linear;
}

/* Hide scrollbar for controls */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

@media (max-width: 600px) {
    #toaster {
        bottom: 16px;
        left: 16px;
        right: 16px;
        align-items: center;
    }

    .toast {
        width: 100%;
    }
}

/* Scrolltelling Journey Section */
.journey-phase {
    transition: opacity 0.1s ease;
}

.journey-draw {
    transition: stroke-dashoffset 0.1s ease;
}

.journey-dot {
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.journey-dot.active {
    background-color: #329696 !important;
    box-shadow: 0 0 12px #329696, 0 0 24px rgba(50, 150, 150, 0.3);
}

.journey-svg {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Remove native smooth scroll — Lenis handles this */
html {
    scroll-behavior: auto;
}