/**
 * Jadaan.Dev — Core Design Tokens & Dynamic Rules
 * Palette: Onyx Dark Minimal & Cyan Brand
 */

:root {
  /* The Onyx Scale */
  --onyx-50: #f6f6f7;
  --onyx-100: #e5e5e8;
  --onyx-200: #ccccd2;
  --onyx-300: #9fa0aa;
  --onyx-400: #6f707f;
  --onyx-500: #4f505e;
  --onyx-600: #3a3b46;
  --onyx-700: #23252d;
  --onyx-800: #16171c;
  --onyx-850: #101115;
  --onyx-900: #0b0c0e;
  --onyx-950: #060708;

  /* Cyan Brand Accents */
  --cyan-400: #22d3ee;
  --cyan-500: #06b6d4;
  --cyan-600: #0891b2;

  /* Semantic State Colors */
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --amber-400: #fbbf24;
  --red-400: #f87171;

  /* Relaxed Motion Curve */
  --ease-calm: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Direction-Adaptive Typography Rule */
[dir="ltr"] body, [dir="ltr"] .font-dynamic {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

[dir="rtl"] body, [dir="rtl"] .font-dynamic {
  font-family: 'IBM Plex Sans Arabic', system-ui, -apple-system, sans-serif;
}

.font-mono {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* Ambient Radial Backdrop */
.ambient-glow {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 8%, rgba(6, 182, 212, 0.12) 0%, rgba(147, 51, 234, 0.05) 35%, rgba(6, 7, 8, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

/* Interactive Link Card Physics */
.link-card {
  transition: all 0.25s var(--ease-calm);
}

.link-card:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.45);
  background-color: var(--onyx-850);
  box-shadow: 0 12px 28px -6px rgba(6, 182, 212, 0.12);
}

.link-card:active {
  transform: scale(0.985);
}

/* Icon Mirroring for RTL */
.flip-icon {
  transition: transform 0.55s var(--ease-calm);
}

[dir="rtl"] .flip-icon {
  transform: scaleX(-1);
}

/* Pinned Direction-Invariant Header */
.header-pinned-utilities {
  direction: ltr !important;
}

/* Relaxed Optical Dissolve Sequences */
.site-content-fade-out {
  opacity: 0.1;
  transform: translateY(4px);
  transition: opacity 0.24s var(--ease-calm), transform 0.24s var(--ease-calm);
}

.site-content-fade-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.38s var(--ease-calm), transform 0.38s var(--ease-calm);
}

/* Dark Minimal Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--onyx-700);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--cyan-500);
}
