/* ============================================================
   BASE — Global resets, cursor, stagger reveal, scroll
   ============================================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: none;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-base);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Restore cursor on touch devices */
@media (hover: none) {
  html, body { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none; }
}

/* ── Custom cursor ── */
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 8px; height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 160ms var(--ease-out), opacity 200ms ease;
  will-change: left, top;
}

.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 28px; height: 28px;
  border: 1.5px solid var(--color-accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: left 120ms var(--ease-out), top 120ms var(--ease-out),
              width 200ms var(--ease-out), height 200ms var(--ease-out),
              background 200ms var(--ease-out), opacity 200ms ease;
  will-change: left, top;
}

/* Hover state — dot shrinks, ring expands */
body.cursor-hover .cursor-dot {
  transform: translate(-50%, -50%) scale(0.4);
  opacity: 0.6;
}
body.cursor-hover .cursor-ring {
  width: 40px; height: 40px;
  border-color: var(--color-accent);
}

/* All interactive elements suppress default cursor */
a, button, [role="button"], label, input, textarea, select,
.project-card, .article-card, .work-item {
  cursor: none;
}

/* ── Stagger reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 560ms var(--ease-out),
    transform 560ms var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

.container--narrow {
  max-width: var(--max-w-narrow);
}

/* ── Typography base ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--leading-tight);
  color: var(--color-text);
}

p { line-height: var(--leading-base); }

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

img, video {
  display: block;
  max-width: 100%;
}

/* ── Tag pills ── */
.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: transparent;
  white-space: nowrap;
}

/* ── Section labels ── */
.section-label {
  font-family: var(--font-body);
  font-size: var(--text-xxs);
  font-weight: 500;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* ── Divider ── */
hr {
  border: none;
  border-top: 1px solid var(--color-divider);
}

/* ── Scrollbar — minimal ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(22,42,44,0.15); border-radius: 3px; }
