@font-face {
    font-family: "TTK";
    src: url("../font.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

:root {
    --font: "TTK", sans-serif !important;
    --font-display: "TTK", sans-serif !important;
    --font-mono: "TTK", sans-serif !important;
    --font-sans: "TTK", sans-serif !important;
    --site-fx-rgb: var(--accent-rgb, 94, 196, 209);
    --site-pointer-x: 50vw;
    --site-pointer-y: 50vh;
    --site-grid-x: 0px;
    --site-grid-y: 0px;
}

*,
*::before,
*::after {
    border-radius: 0 !important;
    font-family: "TTK", sans-serif !important;
    letter-spacing: 0 !important;
}

html,
body,
body * {
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}

html {
    -webkit-tap-highlight-color: transparent;
}

::selection {
    background: transparent !important;
    color: inherit !important;
}

img,
svg,
canvas,
a {
    -webkit-user-drag: none;
    user-drag: none;
}

a,
button,
select {
    touch-action: manipulation;
}

.ambient-glow,
.cursor-glow {
    display: none !important;
}

.site-fx-root {
    position: fixed;
    inset: 0;
    z-index: 9990;
    overflow: hidden;
    pointer-events: none;
    contain: strict;
}

.site-fx-grid,
.site-fx-lines,
.site-fx-scan,
.site-fx-axis,
.site-fx-cursor,
.site-fx-corner,
.site-fx-progress,
.site-fx-particle {
    position: absolute;
    pointer-events: none;
}

.site-fx-grid {
    inset: -72px;
    opacity: 0.11;
    background-image:
        linear-gradient(rgba(var(--site-fx-rgb), 0.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--site-fx-rgb), 0.2) 1px, transparent 1px);
    background-size: 48px 48px;
    transform: translate3d(var(--site-grid-x), var(--site-grid-y), 0);
    animation: siteGridDrift 24s linear infinite;
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        #000 12%,
        #000 88%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        #000 12%,
        #000 88%,
        transparent 100%
    );
}

.site-fx-lines {
    inset: 0;
    opacity: 0.22;
    background: repeating-linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.018) 0,
        rgba(255, 255, 255, 0.018) 1px,
        transparent 1px,
        transparent 4px
    );
}

.site-fx-scan {
    top: -24vh;
    left: 0;
    width: 100%;
    height: 18vh;
    opacity: 0.5;
    border-top: 1px solid rgba(var(--site-fx-rgb), 0.06);
    border-bottom: 1px solid rgba(var(--site-fx-rgb), 0.18);
    background: linear-gradient(
        180deg,
        transparent,
        rgba(var(--site-fx-rgb), 0.035) 52%,
        transparent
    );
    animation: siteScanPass 9s cubic-bezier(0.45, 0, 0.2, 1) infinite;
}

.site-fx-axis {
    opacity: 0;
    transition: opacity 180ms ease;
}

html.site-pointer-active .site-fx-axis {
    opacity: 0.36;
}

.site-fx-axis-x {
    top: var(--site-pointer-y);
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(var(--site-fx-rgb), 0.08) 24%,
        rgba(var(--site-fx-rgb), 0.62) 50%,
        rgba(var(--site-fx-rgb), 0.08) 76%,
        transparent 100%
    );
}

.site-fx-axis-y {
    top: 0;
    left: var(--site-pointer-x);
    width: 1px;
    height: 100%;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(var(--site-fx-rgb), 0.08) 24%,
        rgba(var(--site-fx-rgb), 0.62) 50%,
        rgba(var(--site-fx-rgb), 0.08) 76%,
        transparent 100%
    );
}

.site-fx-cursor {
    top: var(--site-pointer-y);
    left: var(--site-pointer-x);
    width: 18px;
    height: 18px;
    opacity: 0;
    border: 1px solid rgba(var(--site-fx-rgb), 0.78);
    transform: translate(-50%, -50%) rotate(45deg);
    transition:
        width 180ms ease,
        height 180ms ease,
        opacity 180ms ease,
        border-color 180ms ease,
        transform 180ms ease;
}

.site-fx-cursor::before,
.site-fx-cursor::after {
    content: "";
    position: absolute;
    background: rgba(var(--site-fx-rgb), 0.72);
}

.site-fx-cursor::before {
    top: 50%;
    left: -7px;
    width: calc(100% + 14px);
    height: 1px;
}

.site-fx-cursor::after {
    top: -7px;
    left: 50%;
    width: 1px;
    height: calc(100% + 14px);
}

html.site-pointer-active .site-fx-cursor {
    opacity: 0.72;
}

html.site-pointer-hover .site-fx-cursor {
    width: 30px;
    height: 30px;
    border-color: rgba(var(--site-fx-rgb), 1);
    transform: translate(-50%, -50%) rotate(90deg);
}

.site-fx-corner {
    width: 28px;
    height: 28px;
    opacity: 0.42;
}

.site-fx-corner-tl {
    top: 14px;
    left: 14px;
    border-top: 1px solid rgba(var(--site-fx-rgb), 0.76);
    border-left: 1px solid rgba(var(--site-fx-rgb), 0.76);
}

.site-fx-corner-tr {
    top: 14px;
    right: 14px;
    border-top: 1px solid rgba(var(--site-fx-rgb), 0.76);
    border-right: 1px solid rgba(var(--site-fx-rgb), 0.76);
}

.site-fx-corner-bl {
    bottom: 14px;
    left: 14px;
    border-bottom: 1px solid rgba(var(--site-fx-rgb), 0.76);
    border-left: 1px solid rgba(var(--site-fx-rgb), 0.76);
}

.site-fx-corner-br {
    right: 14px;
    bottom: 14px;
    border-right: 1px solid rgba(var(--site-fx-rgb), 0.76);
    border-bottom: 1px solid rgba(var(--site-fx-rgb), 0.76);
}

.site-fx-progress {
    top: 0;
    left: 0;
    z-index: 3;
    width: 100%;
    height: 2px;
    background: linear-gradient(
        90deg,
        rgba(var(--site-fx-rgb), 0.62),
        rgba(255, 255, 255, 0.96),
        rgba(var(--site-fx-rgb), 0.9)
    );
    box-shadow: 0 0 18px rgba(var(--site-fx-rgb), 0.58);
    transform: scaleX(var(--site-scroll-progress, 0));
    transform-origin: left;
}

.scroll-progress {
    background: linear-gradient(
        90deg,
        rgba(var(--site-fx-rgb), 0.62),
        rgba(255, 255, 255, 0.96),
        rgba(var(--site-fx-rgb), 0.9)
    ) !important;
    box-shadow: 0 0 18px rgba(var(--site-fx-rgb), 0.58) !important;
}

.site-fx-target {
    position: relative;
    isolation: isolate;
    transition:
        border-color 240ms ease,
        box-shadow 240ms ease,
        filter 240ms ease !important;
}

.site-fx-target:hover,
.site-fx-target:focus-within,
.site-fx-target:focus-visible {
    filter: brightness(1.07);
    box-shadow:
        inset 0 0 0 1px rgba(var(--site-fx-rgb), 0.34),
        0 18px 48px rgba(0, 0, 0, 0.24);
}

.site-fx-sweep {
    position: absolute;
    inset: 0;
    z-index: 8;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.site-fx-sweep::before {
    content: "";
    position: absolute;
    top: -25%;
    bottom: -25%;
    left: 0;
    width: 24%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(var(--site-fx-rgb), 0.2),
        rgba(255, 255, 255, 0.14),
        transparent
    );
    transform: translateX(-180%) skewX(-18deg);
}

.site-fx-target:hover .site-fx-sweep,
.site-fx-target:focus-visible .site-fx-sweep,
.site-fx-target:focus-within .site-fx-sweep {
    opacity: 1;
}

.site-fx-target:hover .site-fx-sweep::before,
.site-fx-target:focus-visible .site-fx-sweep::before,
.site-fx-target:focus-within .site-fx-sweep::before {
    animation: siteSweep 880ms cubic-bezier(0.16, 1, 0.3, 1);
}

.site-fx-particle {
    z-index: 5;
    width: 4px;
    height: 4px;
    border: 1px solid rgba(var(--site-fx-rgb), 0.96);
    background: rgba(var(--site-fx-rgb), 0.2);
    transform: translate(-50%, -50%);
    animation: siteParticle 680ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.site-fx-reveal {
    opacity: 0;
    filter: blur(5px);
    transform: translate3d(0, 24px, 0);
    transition:
        opacity 720ms cubic-bezier(0.16, 1, 0.3, 1),
        transform 720ms cubic-bezier(0.16, 1, 0.3, 1),
        filter 720ms cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--site-reveal-delay, 0ms);
}

.site-fx-reveal.site-fx-visible {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0);
}

body.site-fx-ready .site-fx-corner {
    animation: siteCornerPulse 3.6s ease-in-out infinite;
}

@keyframes siteGridDrift {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 48px 48px;
    }
}

@keyframes siteScanPass {
    0%,
    12% {
        transform: translate3d(0, -12vh, 0);
        opacity: 0;
    }
    20% {
        opacity: 0.5;
    }
    72% {
        opacity: 0.32;
    }
    86%,
    100% {
        transform: translate3d(0, 142vh, 0);
        opacity: 0;
    }
}

@keyframes siteSweep {
    from {
        transform: translateX(-180%) skewX(-18deg);
    }
    to {
        transform: translateX(540%) skewX(-18deg);
    }
}

@keyframes siteParticle {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform:
            translate(
                calc(-50% + var(--site-particle-x)),
                calc(-50% + var(--site-particle-y))
            )
            rotate(var(--site-particle-rotation))
            scale(0.2);
    }
}

@keyframes siteCornerPulse {
    0%,
    100% {
        opacity: 0.28;
    }
    50% {
        opacity: 0.64;
    }
}

@media (max-width: 760px), (pointer: coarse) {
    .site-fx-axis,
    .site-fx-cursor {
        display: none;
    }

    .site-fx-grid {
        opacity: 0.075;
        background-size: 40px 40px;
    }

    .site-fx-corner {
        width: 20px;
        height: 20px;
    }

    .site-fx-corner-tl,
    .site-fx-corner-tr {
        top: 9px;
    }

    .site-fx-corner-bl,
    .site-fx-corner-br {
        bottom: 9px;
    }

    .site-fx-corner-tl,
    .site-fx-corner-bl {
        left: 9px;
    }

    .site-fx-corner-tr,
    .site-fx-corner-br {
        right: 9px;
    }
}

@media (max-width: 640px) {
    body:not(.theme-mascot):not(.theme-ttk):not(.theme-trickcal) {
        padding-right: 12px;
        padding-bottom: 28px;
        padding-left: 12px;
    }

    body:not(.theme-mascot):not(.theme-ttk):not(.theme-trickcal) .container {
        width: 100%;
        max-width: 100%;
    }

    body:not(.theme-mascot):not(.theme-ttk):not(.theme-trickcal) .project-grid {
        width: 100%;
        grid-template-columns: minmax(0, 1fr);
    }

    body:not(.theme-mascot):not(.theme-ttk):not(.theme-trickcal) .project-card {
        min-width: 0;
        padding: 32px 24px;
    }

    body:not(.theme-mascot):not(.theme-ttk):not(.theme-trickcal) .project-card h2,
    body:not(.theme-mascot):not(.theme-ttk):not(.theme-trickcal) .project-card .desc {
        overflow-wrap: anywhere;
    }

    .lang-switch {
        top: 10px !important;
        right: 10px !important;
    }

    .weight-switch {
        top: 10px !important;
        right: auto !important;
        left: 10px !important;
    }

    .header {
        margin-top: 56px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-fx-grid,
    .site-fx-scan,
    .site-fx-corner,
    .site-fx-sweep::before,
    .site-fx-particle {
        animation: none !important;
    }

    .site-fx-axis,
    .site-fx-cursor,
    .site-fx-scan {
        display: none !important;
    }

    .site-fx-reveal {
        opacity: 1 !important;
        filter: none !important;
        transform: none !important;
        transition: none !important;
    }

    .site-fx-target {
        transition: none !important;
    }
}
