/* ============================================================
   experience.css — 3D Desk experience page
   Brand tokens mirror styles.css so the page stays on-brand.
   ============================================================ */

:root {
  color-scheme: dark;
  --bg: #000;
  --bg-elevated: #0b0c0e;
  --ink: #f5f5f7;
  --muted: #a1a1a6;
  --quiet: #6e7277;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.26);
  --glass-surface: rgba(22, 24, 29, 0.55);
  --glass-surface-strong: rgba(31, 34, 41, 0.66);
  --glass-edge: rgba(255, 255, 255, 0.22);
  --blue: #3f8cff;
  --shadow: rgba(0, 0, 0, 0.55);
  --radius: 8px;
  --radius-small: 6px;

  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Inter Tight", var(--font-body);
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 200ms;
  --dur-med: 500ms;
  --dur-slow: 900ms;

  font-family: var(--font-body);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

html {
  background: var(--bg);
}

body {
  background: radial-gradient(120% 100% at 50% 0%, #101216 0%, #050506 55%, #000 100%);
  color: var(--ink);
  min-height: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  font-family: var(--font-body);
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

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

/* ============ top bar (always visible, keyboard-focusable) ============ */

.exp-topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.05rem clamp(1rem, 4vw, 2.6rem);
  pointer-events: none;
}

.exp-topbar > * {
  pointer-events: auto;
}

.exp-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.exp-brand .brand-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

.exp-brand .brand-name {
  font-size: 0.98rem;
}

.exp-classic-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(8, 9, 11, 0.5);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  transition:
    border-color var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}

.exp-classic-link:hover,
.exp-classic-link:focus-visible {
  border-color: var(--line-strong);
  background: rgba(20, 22, 27, 0.7);
  transform: translateY(-1px);
}

.exp-classic-link .arrow {
  font-family: var(--font-mono);
  opacity: 0.8;
}

/* ============ stage (holds the future canvas) ============ */

.exp-stage {
  position: fixed;
  inset: 0;
  z-index: 1;
}

#exp-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ============ intro / fallback content ============ */

.exp-intro {
  position: relative;
  z-index: 20;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 6rem clamp(1.2rem, 5vw, 3rem) 4rem;
  text-align: center;
  /* Opaque cover over the canvas (start-gate). Hidden once the user enters. */
  background: radial-gradient(120% 100% at 50% 0%, #101216 0%, #050506 55%, #000 100%);
  transition: opacity var(--dur-slow) var(--ease-out);
}

/* When the scene is entered (wired in a later phase), the cover fades away. */
.exp-entered .exp-intro {
  opacity: 0;
  pointer-events: none;
}

.exp-intro__inner {
  max-width: 46rem;
}

.exp-eyebrow {
  margin: 0 0 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--quiet);
}

.exp-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.02em;
  font-size: clamp(2.6rem, 8vw, 5.5rem);
}

.exp-title .accent {
  color: var(--blue);
}

.exp-lead {
  margin: 1.6rem auto 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.55;
}

.exp-actions {
  margin-top: 2.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
}

.exp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition:
    transform var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    opacity var(--dur-fast) var(--ease-out);
}

.exp-btn--primary {
  background: var(--ink);
  color: #050506;
}

.exp-btn--primary:hover,
.exp-btn--primary:focus-visible {
  transform: translateY(-1px);
  background: #fff;
}

.exp-btn--ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: rgba(10, 11, 13, 0.4);
}

.exp-btn--ghost:hover,
.exp-btn--ghost:focus-visible {
  transform: translateY(-1px);
  border-color: var(--glass-edge);
  background: rgba(20, 22, 27, 0.6);
}

.exp-btn[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

/* hero project chips (also serve as crawlable links to the projects section) */
.exp-chips {
  margin: 2.8rem auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  max-width: 38rem;
}

.exp-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
  transition:
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
}

.exp-chip:hover,
.exp-chip:focus-visible {
  color: var(--ink);
  border-color: var(--line-strong);
}

.exp-note {
  margin-top: 2.6rem;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--quiet);
  font-family: var(--font-mono);
}

/* ============ reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ============ mobile ============ */
@media (max-width: 720px) {
  .exp-topbar {
    padding: 0.85rem 1rem;
  }
  .exp-brand .brand-name {
    display: none;
  }
  .exp-classic-link {
    padding: 0.5rem 0.8rem;
    font-size: 0.78rem;
  }
}
