@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.min.css');
@import url('/src/theme.css');

:root {
  --font-sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 2px;
}

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

/* Selection */
::selection {
  background: var(--color-rose-bg);
  color: var(--color-rose);
}

/* Noise texture overlay */
@keyframes grain {

  0%,
  100% {
    transform: translate(0, 0);
  }

  10% {
    transform: translate(-2%, -2%);
  }

  20% {
    transform: translate(2%, 1%);
  }

  30% {
    transform: translate(-1%, 3%);
  }

  40% {
    transform: translate(3%, -1%);
  }

  50% {
    transform: translate(-2%, 2%);
  }

  60% {
    transform: translate(1%, -3%);
  }

  70% {
    transform: translate(-3%, 1%);
  }

  80% {
    transform: translate(2%, -2%);
  }

  90% {
    transform: translate(-1%, 2%);
  }
}

.grain::before {
  content: '';
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-size: 128px 128px;
  opacity: 0.025;
  pointer-events: none;
  z-index: 9999;
  animation: grain 8s steps(10) infinite;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(32px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.anim-fade-up {
  animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.anim-fade-in {
  animation: fadeIn 0.7s ease both;
}

a {
  color: inherit;
  text-decoration: none;
}