/* ============================================
   MODERN CSS RESET
   ============================================ */

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

body,
h1, h2, h3, h4, h5, h6,
p, blockquote, pre,
dl, dd, ol, ul, figure,
fieldset, legend {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  overflow-x: hidden;
}

ul[role='list'],
ol[role='list'],
ul,
ol {
  list-style: none;
}

img,
picture,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

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

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-full);
  transition: background var(--transition-main);
}

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

body.hide-scrollbar::-webkit-scrollbar,
body.hide-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

/* ============================================
   SELECTION STYLES
   ============================================ */

::selection {
  background-color: var(--color-accent);
  color: var(--color-bg);
}

::-moz-selection {
  background-color: var(--color-accent);
  color: var(--color-bg);
}

/* ============================================
   CUSTOM INTERACTIVE CURSOR
   ============================================ */

.custom-cursor {
  width: 20px;
  height: 20px;
  border: 1px solid var(--color-accent);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: var(--z-cursor);
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease-out, 
              width 0.3s var(--ease-apple), 
              height 0.3s var(--ease-apple),
              background 0.2s ease;
  mix-blend-mode: difference;
  will-change: transform;
}

.custom-cursor.active {
  width: 60px;
  height: 60px;
  background: var(--color-accent-glow);
  border: none;
}

@media (hover: none) and (pointer: coarse) {
  .custom-cursor {
    display: none;
  }
}

/* ============================================
   ACCESSIBILITY - SKIP LINK
   ============================================ */

.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-accent);
  color: var(--color-bg);
  padding: var(--space-sm) var(--space-md);
  text-decoration: none;
  font-weight: var(--font-weight-semibold);
  z-index: var(--z-loader);
  transition: top var(--transition-main);
}

.skip-link:focus {
  top: var(--space-sm);
  outline: 2px solid var(--color-text);
  outline-offset: 2px;
}

/* ============================================
   FOCUS VISIBLE STYLES
   ============================================ */

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ============================================
   PAGE LOADER
   ============================================ */

/* .page-loader {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: var(--z-loader);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.8s var(--ease-apple), 
              visibility 0.8s var(--ease-apple);
}

.page-loader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loader-matrix {
  text-align: center;
  font-family: var(--font-mono);
}

.matrix-text {
  color: var(--color-accent);
  letter-spacing: var(--letter-spacing-wider);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  display: block;
  margin-bottom: var(--space-md);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.matrix-bar {
  width: 200px;
  height: 2px;
  background: var(--color-border);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-full);
}

.matrix-bar::after {
  content: '';
  position: absolute;
  left: -100%;
  top: 0;
  width: 100%;
  height: 100%;
  background: var(--color-accent);
  animation: loadingShift 1.5s var(--ease-apple) infinite;
  box-shadow: 0 0 10px var(--color-accent-glow);
}

@keyframes loadingShift {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
} */

/* ============================================
   UTILITY CLASSES
   ============================================ */

.container {
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.content-container {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
}

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

.no-select {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.gpu-accelerated {
  transform: translateZ(0);
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .custom-cursor {
    transition: none;
  }
  
  .matrix-text,
  .matrix-bar::after {
    animation: none;
  }
}
