/**
 * Nexxore Base Styles v3.0
 * Reset and foundational styles
 */

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

/* Remove default margin */
* {
  margin: 0;
}

/* Document setup */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  font-family: var(--font-family-sans, 'Inter', system-ui, sans-serif);
  font-size: var(--font-body, 14px);
  line-height: 1.6;
  color: var(--text-primary, #fafafa);
  background: var(--bg-base, #09090b);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent-primary, #a855f7);
}

/* Focus states — Accessibility */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent-primary, #a855f7);
  outline-offset: 2px;
}

/* Skip to main content (accessibility) */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  padding: var(--space-2, 8px) var(--space-4, 16px);
  background: var(--accent-primary, #a855f7);
  color: #ffffff;
  z-index: 9999;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
}

/* Container */
.container {
  max-width: var(--container, 1280px);
  margin: 0 auto;
  padding: 0 var(--space-5, 20px);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-semibold, 600);
  line-height: 1.3;
  color: var(--text-primary, #fafafa);
}

h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: var(--weight-bold, 700);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: var(--weight-semibold, 600);
}

h3 {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
}

p {
  color: var(--text-secondary, #a1a1aa);
  margin-bottom: var(--space-4, 16px);
}

p:last-child {
  margin-bottom: 0;
}

/* Monospace text */
code, pre, kbd, samp {
  font-family: var(--font-family-mono, 'JetBrains Mono', monospace);
  font-size: 0.9em;
}

code {
  padding: 0.2em 0.4em;
  background: var(--bg-card, #18181b);
  border-radius: var(--radius-sm, 4px);
}

pre {
  padding: var(--space-4, 16px);
  background: var(--bg-card, #18181b);
  border-radius: var(--radius-md, 8px);
  overflow-x: auto;
}

pre code {
  padding: 0;
  background: none;
}

/* Selection */
::selection {
  background: var(--accent-primary-dim, rgba(168, 85, 247, 0.3));
  color: #ffffff;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-elevated, #111113);
}

::-webkit-scrollbar-thumb {
  background: var(--border-default, #27272a);
  border-radius: var(--radius-full, 9999px);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover, #3f3f46);
}

/* Images */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

/* Form elements inherit font */
input, button, textarea, select {
  font: inherit;
}

/* Remove list styles */
ul, ol {
  list-style: none;
  padding: 0;
}

/* Table reset */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
