/* ══════════════════════════════════════════════════════════════
   BASE — design tokens, reset, and components shared by every page
   ══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
  --bg:        #09090f;
  --surface:   #111118;
  --border:    #1e1e2e;
  --accent:    #d6b840;
  --accent2:   #f0e2a0;
  --accent-rgb:  214, 184, 64;
  --accent2-rgb: 240, 226, 160;
  --text:      #e2e2f0;
  --muted:     #8a8aa8;
  /* One family, Inter, for everything. The three tokens are kept (rather than
     collapsed into one) so each rule still says which *role* the text plays —
     labels, headings, body — and can be tuned per role (weight, tracking)
     without touching the family. */
  --font:      'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono:      var(--font);   /* small labels, tags, dates, buttons */
  --display:   var(--font);   /* headings */
  --body:      var(--font);   /* paragraphs */
  --radius:    12px;
  --max:       860px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  font-optical-sizing: auto; /* Inter's opsz axis: a tighter "display" cut at large sizes */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── SCROLL PROGRESS ─────────────────────────────────────────── */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: var(--accent);
  z-index: 200;
  transition: width .1s linear;
}

/* ── CUSTOM CURSOR ───────────────────────────────────────────── */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  opacity: 0; transition: opacity .25s ease;
}
.cursor-dot { width: 6px; height: 6px; background: var(--accent2); mix-blend-mode: difference; }
.cursor-ring {
  width: 38px; height: 38px;
  border: 1px solid var(--accent);
  background: rgba(var(--accent-rgb), 0.05);
  transition: width .35s cubic-bezier(.16,1,.3,1), height .35s cubic-bezier(.16,1,.3,1),
              border-color .3s, background .3s, opacity .25s;
}
body.has-cursor .cursor-dot, body.has-cursor .cursor-ring { opacity: 1; }
body.has-cursor, body.has-cursor a, body.has-cursor button,
body.has-cursor .project-card, body.has-cursor .exp-item,
body.has-cursor .hero-canvas { cursor: none; }
.cursor-ring.is-link { width: 78px; height: 78px; border-color: var(--accent2); background: rgba(var(--accent-rgb), 0.1); }
.cursor-ring.is-link .cursor-label { opacity: 1; transform: scale(1); }
.cursor-ring.is-down { transform: translate(-50%, -50%) scale(0.85); }
.cursor-label {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent2); opacity: 0; transform: scale(0.6);
  transition: opacity .25s, transform .25s; white-space: nowrap;
}
/* (this class used to pull elements toward the pointer; that effect is gone,
   but it still carries the inline-flex layout those elements rely on) */
.magnetic { display: inline-flex; }

/* ── NAV ─────────────────────────────────────────────────────── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.1rem 2.5rem;
  background: rgba(9,9,15,0.75);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent2);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.nav-status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-family: var(--mono); font-size: 0.86rem; font-weight: 500; color: var(--muted);
  text-decoration: none; letter-spacing: 0; transition: color .2s;
}
.nav-links a:hover { color: var(--text); }

/* ── SHARED LAYOUT ───────────────────────────────────────────── */
section { position: relative; z-index: 1; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 2rem; }

/* a plain line of text above the heading — no tracked caps, bullet, or
   animated rule */
.section-label {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

h2 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 3rem;
}

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0;
  padding: 0.7rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  transition: all .2s;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
}
.btn-primary { background: var(--accent); color: var(--bg); font-weight: 600; }
.btn-primary:hover { background: var(--accent2); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent2); }

/* ── SHARED COMPONENTS: arrow list + tags ───────────────────── */
.exp-bullets { list-style: none; }
.exp-bullets li {
  font-size: 0.9rem;
  color: var(--muted);
  padding: 0.2rem 0;
  display: flex; gap: 0.6rem;
}
.exp-bullets li::before { content: '–'; color: var(--muted); flex-shrink: 0; }

.project-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--accent2);
  background: rgba(var(--accent-rgb), .1);
  border: 1px solid rgba(var(--accent-rgb), .2);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  letter-spacing: 0.01em;
}

/* inline code: same family as everything else (it used to fall back to the
   browser's default monospace), tinted so it still reads as code */
code {
  font-family: var(--font);
  font-size: 0.92em;
  font-weight: 500;
  color: var(--accent2);
  background: rgba(var(--accent-rgb), .1);
  padding: 0.08em 0.4em;
  border-radius: 4px;
}

/* ── SCROLL-REVEAL (generic) ────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ── FOOTER ──────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  position: relative; z-index: 1;
}

/* ── ANIMATIONS ──────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: none; }
}

/* ── RESPONSIVE (shared) ─────────────────────────────────────── */
@media (max-width: 680px) {
  .site-nav { padding: 1rem 1.2rem; }
  .nav-links { gap: 1.2rem; }
}
@media (max-width: 400px) {
  .site-nav { padding: 0.85rem 0.9rem; }
  .nav-logo { font-size: 0.66rem; gap: 0.4rem; }
  .nav-links { gap: 0.8rem; }
  .nav-links a { font-size: 0.62rem; }
}

/* ── ACCESSIBILITY ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .cursor-dot, .cursor-ring { display: none; }
  body.has-cursor, body.has-cursor a, body.has-cursor button,
  body.has-cursor .project-card, body.has-cursor .exp-item { cursor: auto; }
  .scroll-progress { transition: none; }
  .reveal, .exp-item, .project-card, .pagination-link {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .hero-canvas, .hero-avatar-canvas { transition: none; }
  .hero-bg-video, .media-video { display: none; }
}
