/* Design tokens — Jie Liu portfolio */
:root {
  /* Warm palette */
  --cream: #FAFAF8;
  --cream-2: #FAFAF8;
  --sand: #D9C5A7;
  --sand-2: #C9B391;
  --ink: #1C1915;
  --ink-2: #2E2A23;
  --muted: #8A8174;
  --terracotta: #C65D3C;
  --terracotta-2: #A84A2E;
  --moss: #6B7A5A;
  --clay: #B08468;

  /* Semantic (light) */
  --bg: var(--cream);
  --bg-2: var(--cream-2);
  --fg: var(--ink);
  --fg-muted: var(--muted);
  --accent: var(--terracotta);
  --line: rgba(28, 25, 21, 0.14);
  --card: #FAFAF8;

  /* Type */
  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-body: 'Inter Tight', 'Helvetica', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Scale */
  --radius: 14px;
  --radius-lg: 22px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg: #17140F;
  --bg-2: #1F1B15;
  --fg: #F2ECE0;
  --fg-muted: #9A907E;
  --line: rgba(242, 236, 224, 0.14);
  --card: #201C16;
  --sand: #3A3127;
  --sand-2: #4A3E30;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 400ms var(--ease), color 400ms var(--ease);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }

.mono { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.02em; }
.muted { color: var(--fg-muted); }

/* Custom cursor */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transition: transform 120ms var(--ease), width 220ms var(--ease), height 220ms var(--ease), opacity 220ms var(--ease);
  will-change: transform;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: #D4537E;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1px solid #D4537E;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.6;
}
.cursor-ring.hover {
  width: 52px; height: 52px;
  background: rgba(212, 83, 126, 0.3);
  border-color: transparent;
}
@media (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* Selection */
::selection { background: var(--terracotta); color: var(--cream); }

/* Utility */
.container { max-width: 1440px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 720px) { .container { padding: 0 20px; } }

.hidden-ink { color: transparent; -webkit-text-stroke: 1px currentColor; }

/* Noise texture overlay */
.noise {
  display: none;
}

/* Button */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid var(--fg);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  transition: all 300ms var(--ease);
}
.btn:hover { background: var(--fg); color: var(--bg); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--terracotta-2); border-color: var(--terracotta-2); color: #fff; }

/* Scroll reveal */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 800ms var(--ease), transform 800ms var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }

/* Marquee */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee {
  display: flex; gap: 48px; white-space: nowrap;
  animation: marquee 40s linear infinite;
}

/* Arrow */
.arrow { display: inline-block; transition: transform 300ms var(--ease); }
.group:hover .arrow, a:hover .arrow { transform: translate(4px, -4px); }

/* Scroll anchor offset — accounts for fixed nav height */
#work { scroll-margin-top: 100px; }
