/* ============================
   ASSPL — Light/Dark Theme
   ============================ */

/* ---------- Theme Variables ---------- */
:root {
    /* Light Theme (Default) */
    --color-background: #ffffff;
    --color-on-background: #0a0a0a;
    --color-surface: #f8f8f8;
    --color-surface-dim: #f0f0f1;
    --color-on-surface: #18181b;
    --color-on-surface-variant: #71717a;
    --color-outline: #e4e4e7;
    --color-outline-variant: #d4d4d8;
    --color-primary: #0a0a0a;
    --color-on-primary: #ffffff;
    --color-inverse-bg: #0a0a0a;
    --color-inverse-fg: #ffffff;
}

.dark {
    /* Dark Theme */
    --color-background: #0a0a0a;
    --color-on-background: #fafafa;
    --color-surface: #111113;
    --color-surface-dim: #161618;
    --color-on-surface: #fafafa;
    --color-on-surface-variant: #a1a1aa;
    --color-outline: #27272a;
    --color-outline-variant: #3f3f46;
    --color-primary: #fafafa;
    --color-on-primary: #0a0a0a;
    --color-inverse-bg: #fafafa;
    --color-inverse-fg: #0a0a0a;
}

/* ---------- Base ---------- */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    background-color: var(--color-background);
    color: var(--color-on-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.4s ease, color 0.4s ease;
    font-family: 'Inter', sans-serif;
}

::selection {
    background-color: var(--color-on-background);
    color: var(--color-background);
}

/* Hide default cursor only on large screens */
@media (min-width: 769px) {
    body { cursor: none; }
}

/* ---------- Custom Cursor ---------- */
.custom-cursor {
    width: 12px;
    height: 12px;
    background-color: var(--color-on-background);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s cubic-bezier(0.19, 1, 0.22, 1),
                height 0.3s cubic-bezier(0.19, 1, 0.22, 1),
                background-color 0.3s;
    mix-blend-mode: difference;
}

.cursor-expand {
    width: 80px;
    height: 80px;
}

/* ---------- Reveal Animations ---------- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.19, 1, 0.22, 1),
                transform 1s cubic-bezier(0.19, 1, 0.22, 1);
}
.reveal.in {
    opacity: 1;
    transform: translateY(0);
}

.reveal-stagger > * {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.19, 1, 0.22, 1),
                transform 1s cubic-bezier(0.19, 1, 0.22, 1);
}
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 0.6s; opacity: 1; transform: translateY(0); }

/* ---------- Link Underline ---------- */
.link-underline {
    position: relative;
    text-decoration: none;
}
.link-underline::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}
.link-underline:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* ---------- Inverted Section ---------- */
.section-inverted {
    background-color: var(--color-inverse-bg);
    color: var(--color-inverse-fg);
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* ---------- Utility: smooth transition for theme-aware elements ---------- */
.theme-transition {
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}
