/* ============================================================
   GLOBAL STYLES — Qamar Zaka Portfolio
   ============================================================ */

/* ── Base ────────────────────────────────────────────────── */
body {
  font-family: var(--font);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ── Focus Visible ───────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ── Selection ───────────────────────────────────────────── */
::selection {
  background: rgba(49, 92, 255, 0.15);
  color: var(--text);
}

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar        { width: 5px; }
::-webkit-scrollbar-track  { background: var(--bg); }
::-webkit-scrollbar-thumb  { background: var(--border-dark); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Skip Link ───────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: #fff;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  border-radius: var(--r-md);
  transition: top var(--t-fast);
  white-space: nowrap;
}
.skip-link:focus { top: 1rem; }

/* ── Screen Reader Only ──────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ── Container ───────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

/* ── Section ─────────────────────────────────────────────── */
.section {
  padding-block: var(--section-py);
}

/* ── Typography Utilities ────────────────────────────────── */
.u-display {
  font-size: var(--fs-display);
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
}

.u-h1 {
  font-size: var(--fs-h1);
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-snug);
}

.u-h2 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-snug);
}

.u-h3 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
}

.u-lead {
  font-size: var(--fs-lg);
  line-height: var(--lh-relaxed);
}

.u-muted { color: var(--text-muted); }
.u-accent { color: var(--accent); }

/* ── Reveal Animations ───────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--t-slow), transform var(--t-slow);
}

.reveal--right { transform: translateX(22px); }
.reveal--left  { transform: translateX(-22px); }
.reveal--scale { transform: scale(0.97); }

.reveal.in-view {
  opacity: 1;
  transform: none;
}

/* Stagger delays */
.reveal-d1 { transition-delay: 80ms;  }
.reveal-d2 { transition-delay: 160ms; }
.reveal-d3 { transition-delay: 240ms; }
.reveal-d4 { transition-delay: 320ms; }
.reveal-d5 { transition-delay: 400ms; }

/* Disable reveals when motion is reduced */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
