@import './variables.css';

:root {
    --project-hover-x: 50vw;
    --project-hover-y: 50vh;
    --project-hover-color: rgba(126, 200, 184, 0.28);
}

html {
    scroll-behavior: smooth;
    font-size: 100%; /* 16px — industry standard root */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
}

:where(a, button, [role="button"], input, textarea, select, summary):focus-visible {
    outline: 3px solid var(--focus-outline-color);
    outline-offset: 3px;
}

:where(a, button, [role="button"], input, textarea, select, summary):focus:not(:focus-visible) {
    outline: none;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--font-weight-regular);
    font-feature-settings: "liga" 1, "kern" 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--text-color);
    background: var(--background-color);
    overflow-x: hidden;
    line-height: var(--line-height-relaxed);
    letter-spacing: var(--letter-spacing-normal);
    transition: background-color 0.45s ease, color 0.45s ease;
    position: relative;
    isolation: isolate;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
    color: var(--text-color);
    text-wrap: balance;
}

p {
    text-wrap: pretty;
    max-width: var(--measure);
}

small {
    font-size: var(--text-sm);
}

body.cursor-active,
body.cursor-active * {
    cursor: none !important;
}

html.light body {
    background: var(--background-color);
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    z-index: -2;
    opacity: 0.55;
}

html.light body::before {
    background-image:
        linear-gradient(to right, rgba(31, 31, 31, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(31, 31, 31, 0.04) 1px, transparent 1px);
}

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb);
}

.App {
    width: 100%;
    min-height: 100vh;
    color: var(--text-color);
    background: transparent;
    transition: background-color 0.45s ease, color 0.45s ease;
}

.App.main-div {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

#navbar-container {
    position: relative;
    z-index: 2500;
}

#portfolio-container {
    position: relative;
    z-index: 2;
}

.portfolio-header {
    display: none;
}

.spotlight {
    display: none;
}

.cursor-inner,
.cursor-outer {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 2147483000;
    pointer-events: none;
}

.cursor-inner {
    width: 8px;
    height: 8px;
    background-color: var(--cursor-color);
}

.cursor-outer {
    width: 35px;
    height: 35px;
    border: 2px solid var(--text-color);
}

.cursor-inner.hover {
    width: 25px;
    height: 25px;
    transition: all 0.2s;
    mix-blend-mode: difference;
}

.cursor-outer.hover {
    width: 50px;
    height: 50px;
    transition: all 0.2s;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    body,
    .App {
        transition: none;
    }
}

@media (max-width: 768px) {
    body::before {
        background-size: 28px 28px;
    }

    .cursor-inner,
    .cursor-outer {
        display: none;
    }

    body.cursor-active,
    body.cursor-active a,
    body.cursor-active button {
        cursor: auto;
    }
}
