/* ============================================================
   The Lab — calm, content-light, Anthropic-leaning minimalism.
   Warm ivory paper, one muted terracotta accent, a soft serif,
   generous whitespace. The interaction carries the page.
   ============================================================ */

:root {
  --paper: #f1ece2;       /* warm ivory */
  --paper-2: #ebe5d8;
  --ink: #29251d;         /* warm near-black */
  --muted: #8c8576;
  --clay: #c15f3c;        /* the single accent */
  --clay-soft: #d8a48d;
  --line: rgba(41, 37, 29, 0.12);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  /* the dot matrix lives here: pure CSS, always visible, can't fail. The
     canvas (#field) only adds the terracotta reaction under the cursor. */
  background-color: var(--paper);
  background-image: radial-gradient(rgba(41, 37, 29, 0.17) 1.4px, transparent 1.6px);
  background-size: 40px 40px;
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
em { font-style: italic; }
::selection { background: var(--clay); color: var(--paper); }

/* reactive dot field */
#field { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* minimal custom cursor */
.cursor {
  position: fixed; top: 0; left: 0; width: 30px; height: 30px; z-index: 9999;
  border: 1px solid rgba(41, 37, 29, 0.45); border-radius: 50%;
  transform: translate(-50%, -50%); pointer-events: none;
  transition: width .3s var(--ease), height .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.cursor.on { width: 12px; height: 12px; background: var(--clay); border-color: transparent; }
@media (hover: none) { .cursor { display: none; } }

/* cursor-trailing project preview */
.peek {
  position: fixed; top: 0; left: 0; z-index: 50; width: 230px; height: 150px;
  pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(0.85);
  transition: opacity .45s var(--ease), transform .45s var(--ease); will-change: transform, opacity;
}
.peek.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.peek__shape { display: block; width: 100%; height: 100%; border-radius: 14px; background: var(--clay); box-shadow: 0 30px 60px -30px rgba(41,37,29,.5); }

/* nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px clamp(20px, 5vw, 64px);
}
.mark span { display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--clay); transition: transform .5s var(--ease); }
.mark:hover span { transform: scale(1.35); }
.enter, .foot a {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.86rem; letter-spacing: 0.01em; color: var(--ink);
  padding: 9px 16px; border: 1px solid var(--line); border-radius: 100px;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.enter svg { transition: transform .35s var(--ease); }
.enter:hover, .foot a:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.enter:hover svg { transform: translate(2px, -2px); }

/* hero */
main { position: relative; z-index: 2; }
.hero { padding: clamp(150px, 26vh, 300px) clamp(20px, 5vw, 64px) clamp(40px, 8vh, 90px); }
.kicker { display: inline-block; font-size: 0.78rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--muted); margin-bottom: 26px; }
.title {
  font-family: var(--serif); font-optical-sizing: auto; font-weight: 300;
  font-size: clamp(2.8rem, 8.5vw, 8rem); line-height: 0.98; letter-spacing: -0.025em;
  max-width: 16ch; will-change: transform;
}
.title em { font-style: italic; color: var(--clay); font-weight: 400; }

/* project list */
.list { padding: clamp(20px, 5vh, 60px) clamp(20px, 5vw, 64px) clamp(60px, 12vh, 140px); }
.row {
  position: relative; display: grid; align-items: baseline;
  grid-template-columns: 56px 1fr auto 34px; gap: 24px;
  padding: clamp(20px, 3vw, 34px) 6px; border-top: 1px solid var(--line);
  transition: padding-left .5s var(--ease), opacity .5s var(--ease), color .5s var(--ease);
}
.list .row:last-child { border-bottom: 1px solid var(--line); }
.row__n { font-size: 0.82rem; color: var(--muted); letter-spacing: 0.04em; }
.row__name { font-family: var(--serif); font-weight: 300; font-size: clamp(1.8rem, 5vw, 3.6rem); letter-spacing: -0.02em; line-height: 1; }
.row__tag { font-size: 0.86rem; color: var(--muted); align-self: center; }
.row__arr { align-self: center; color: var(--clay); opacity: 0; transform: translateX(-8px); transition: opacity .45s var(--ease), transform .45s var(--ease); }

/* hover: lift the active row, dim the rest, reveal the accent */
.list:hover .row { opacity: 0.42; }
.list .row:hover { opacity: 1; padding-left: 22px; }
.row:hover .row__name { color: var(--clay); }
.row:hover .row__arr { opacity: 1; transform: none; }
.row--soon { pointer-events: none; }
.row--soon .row__name { color: var(--muted); }

/* footer */
.foot {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px clamp(20px, 5vw, 64px); border-top: 1px solid var(--line);
  font-size: 0.86rem; color: var(--muted);
}

/* reveal */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }
.list:hover .row[data-reveal].in { } /* keep hover dim logic intact */

@media (max-width: 640px) {
  .row { grid-template-columns: 38px 1fr; }
  .row__tag, .row__arr { display: none; }
  .peek { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
