/* ============================================================
   GRIFFIN PILZ — CASE FILE Nº 001
   Dark noir dossier. Typewriter type, desk-lamp light,
   evidence in the margins.
   ============================================================ */

:root {
  --ink: #0c0b09;          /* the room */
  --ink-2: #14110c;        /* the desk */
  --panel: #161209;        /* the folder */
  --bone: #e8dfc9;         /* the paper */
  --bone-dim: #8f8570;     /* old paper */
  --amber: #d2a13a;        /* the lamp */
  --amber-dim: #6e5620;
  --red: #b23a30;          /* the stamp */
  --line: rgba(232, 223, 201, 0.14);
  --line-strong: rgba(232, 223, 201, 0.3);

  --font-display: "Special Elite", "Courier New", monospace;
  --font-mono: "Courier Prime", "Courier New", monospace;

  --nav-h: 64px;
  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--amber); color: var(--ink); }

a { color: inherit; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- atmosphere ---------- */

.grain {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none;
  z-index: 60;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 1.1s steps(4) infinite;
}
@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-1.2%, 0.8%); }
  50%  { transform: translate(0.9%, -0.6%); }
  75%  { transform: translate(-0.5%, -1%); }
  100% { transform: translate(0, 0); }
}

.vignette {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 55;
  background:
    radial-gradient(ellipse 120% 90% at 50% 30%, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
}

/* ---------- nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav-logo {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.15;
}
.nav-logo-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  color: var(--bone);
}
.nav-logo-sub {
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--bone-dim);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.5vw, 32px);
}
.nav-links > a {
  text-decoration: none;
  font-size: 0.86rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--bone);
  transition: color 0.25s var(--ease-out);
}
.nav-links > a:hover { color: var(--amber); }

.nav-chat-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--amber);
  border: 1px solid var(--amber);
  padding: 9px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.25s var(--ease-out), color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.nav-chat-btn:hover {
  background: transparent;
  color: var(--amber);
  box-shadow: 0 0 24px rgba(210, 161, 58, 0.25);
}
.nav-chat-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: dot-pulse 2s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}
.nav-chat-short { display: none; }

/* ---------- shared bits ---------- */

.section {
  position: relative;
  padding: clamp(96px, 14vh, 180px) clamp(20px, 6vw, 96px);
  max-width: 1280px;
  margin: 0 auto;
  scroll-margin-top: var(--nav-h);
}

.label {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--amber);
}

.stamp {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  color: var(--red);
  border: 3px double var(--red);
  padding: 0.25em 0.7em;
  transform: rotate(-8deg);
  opacity: 0.85;
  text-transform: uppercase;
  white-space: nowrap;
}

.redacted {
  color: transparent;
  background: repeating-linear-gradient(-45deg, #2b261d, #2b261d 5px, #352e22 5px, #352e22 10px);
  border-radius: 2px;
  user-select: none;
  cursor: help;
}

/* reveal-on-scroll — only hides content when JS is running (html.js),
   so nothing is ever invisible if the script fails */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.js [data-reveal].in-view {
  opacity: 1;
  transform: translateY(0);
}

/* background props */
.prop {
  position: absolute;
  color: var(--bone);
  opacity: 0;
  z-index: -1;
  pointer-events: none;
  transition: opacity 1.6s ease;
  will-change: transform;
}
.prop.prop-visible { opacity: 0.16; }

.prop-magnifier {
  width: clamp(240px, 30vw, 440px);
  right: -4%;
  top: 160px;
  transform: rotate(-14deg);
  color: var(--amber);
}
.prop-magnifier.prop-visible { opacity: 0.13; }

.prop-notebook {
  width: clamp(220px, 26vw, 380px);
  left: -3%;
  top: 120px;
  transform: rotate(7deg);
}

.prop-pencil {
  width: clamp(140px, 16vw, 240px);
  left: 8%;
  top: 520px;
  transform: rotate(-24deg);
}

.prop-mug {
  width: clamp(200px, 22vw, 320px);
  right: 2%;
  top: 40px;
  transform: rotate(6deg);
}

.prop-ring {
  width: clamp(140px, 16vw, 220px);
  color: var(--amber-dim);
}
.prop-ring.prop-visible { opacity: 0.35; }
.prop-ring-1 { right: 10%; bottom: -30px; transform: rotate(12deg); }
.prop-ring-2 { left: 4%; top: 60px; transform: rotate(-20deg); }

/* ============================================================
   HERO
   ============================================================ */

.hero-track { height: 340vh; position: relative; }

.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.hero-lamp {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 55% at 50% 12%, rgba(210, 161, 58, 0.09), transparent 65%);
  animation: lamp-flicker 9s linear infinite;
}
@keyframes lamp-flicker {
  0%, 100% { opacity: 1; }
  91% { opacity: 1; }
  92% { opacity: 0.55; }
  93% { opacity: 0.95; }
  94% { opacity: 0.5; }
  95% { opacity: 1; }
}

.hero-stack {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1em;
  transition: opacity 0.8s var(--ease-out), filter 0.8s var(--ease-out);
}
.hero-row {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 5.4vh, 3.4rem);
  line-height: 1.22;
  letter-spacing: 0.22em;
  color: var(--bone);
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.hero-row.row-on { opacity: 1; transform: scale(1); }
.hero-row:nth-child(odd).row-on { opacity: 0.85; }

.hero-sticky.hero-done .hero-stack {
  opacity: 0.13;
  filter: blur(2px);
}

.hero-final {
  position: relative;
  z-index: 2;
  text-align: center;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  pointer-events: none;
  padding: 0 20px;
}
.hero-sticky.hero-done .hero-final {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hero-final-lockup { position: relative; display: inline-block; }
.hero-word {
  font-family: var(--font-display);
  font-size: clamp(3rem, 11vw, 8.5rem);
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--amber);
  text-shadow: 0 0 60px rgba(210, 161, 58, 0.35);
  line-height: 1;
}
.hero-stamp {
  position: absolute;
  top: -1.1em;
  right: -0.6em;
  font-size: clamp(0.6rem, 1.4vw, 0.95rem);
  transform: rotate(11deg);
}
.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 3vw, 1.9rem);
  letter-spacing: 0.12em;
  margin-top: 0.6em;
}
.hero-sub {
  margin-top: 2.2em;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--bone-dim);
}
.hero-sub strong { color: var(--bone); font-weight: 700; }

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.66rem;
  letter-spacing: 0.34em;
  color: var(--bone-dim);
  transition: opacity 0.5s ease;
}
.scroll-cue-chevron {
  font-size: 1rem;
  animation: cue-bob 1.8s ease-in-out infinite;
}
@keyframes cue-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}
.hero-sticky.hero-done .scroll-cue { opacity: 0; }

/* ============================================================
   THE SUBJECT
   ============================================================ */

.subject { text-align: center; }

.subject-headline {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4.6vw, 3.4rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.35;
  margin-top: 1.2em;
}

.typed-wrap { color: var(--amber); white-space: nowrap; }
.caret {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  margin-left: 2px;
  background: var(--amber);
  vertical-align: -0.12em;
  animation: caret-blink 1s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

.subject-copy {
  max-width: 560px;
  margin: 3em auto 0;
  color: var(--bone-dim);
  font-size: 0.95rem;
}

/* ============================================================
   MARQUEE
   ============================================================ */

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  margin-bottom: clamp(56px, 8vh, 96px);
  user-select: none;
}
.marquee-track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  animation: marquee-slide 36s linear infinite;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.4vw, 1.6rem);
  letter-spacing: 0.24em;
  color: var(--bone-dim);
}
.marquee-reverse { animation-direction: reverse; }
@keyframes marquee-slide {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-big .marquee-track {
  font-size: clamp(1.6rem, 4.5vw, 3.2rem);
  color: var(--amber);
}

/* ============================================================
   CASE FILES
   ============================================================ */

.cases { z-index: 1; }

.case-num {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--amber);
}
.stamp-closed { font-size: 0.66rem; }
.stamp-ongoing {
  font-size: 0.66rem;
  color: var(--amber);
  border-color: var(--amber);
}

/* ============================================================
   FOLDERS — manila case files with papers inside
   ============================================================ */

.folder-grid {
  display: grid;
  gap: clamp(28px, 4vw, 44px) clamp(24px, 3vw, 40px);
}
.case-grid {
  grid-template-columns: repeat(2, 1fr);
  max-width: 1020px;
}
.ob-grid {
  grid-template-columns: repeat(3, 1fr);
  text-align: left;
}

.folder {
  position: relative;
  height: 440px;
  cursor: pointer;
}
.folder:focus-visible { outline: 2px solid var(--amber); outline-offset: 5px; }

/* papers sticking out the right side */
.side-paper {
  position: absolute;
  width: 24px;
  background: linear-gradient(90deg, #c9bd97, #b1a682);
  border: 1px solid rgba(0, 0, 0, 0.4);
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);
  z-index: 0;
}
.sp-1 { right: -9px;  top: 205px; height: 62px; transform: rotate(1.6deg); }
.sp-2 { right: -6px;  top: 272px; height: 44px; transform: rotate(-1.3deg); opacity: 0.85; }
.sp-3 { right: -12px; top: 322px; height: 72px; transform: rotate(0.7deg); opacity: 0.7; }

.folder-back {
  position: absolute;
  left: 0; right: 0; top: 26px; bottom: 0;
  background: linear-gradient(180deg, #2a2213, #221b0e);
  border: 1px solid #3e3420;
  border-radius: 3px 3px 6px 6px;
  z-index: 1;
}

.folder-tab {
  position: absolute;
  top: 0; left: 14px;
  height: 28px;
  padding: 0 18px;
  background: #2a2213;
  border: 1px solid #3e3420;
  border-bottom: none;
  border-radius: 7px 7px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  z-index: 1;
}
.tab-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--amber);
  animation: dot-pulse 2s ease-in-out infinite;
}

/* the sheet peeking out of the folder */
.folder-peek {
  position: absolute;
  left: 26px; right: 36px;
  top: 42px; height: 150px;
  background: linear-gradient(180deg, #d6cba8, #cabf9b);
  border: 1px solid #a99d78;
  transform: rotate(-0.5deg);
  display: flex;
  justify-content: center;
  padding-top: 11px;
  z-index: 2;
  transition: transform 0.4s var(--ease-out), opacity 0.35s ease;
}
.folder-peek span {
  font-size: 0.56rem;
  letter-spacing: 0.3em;
  color: #756a4e;
  text-transform: uppercase;
}
.folder:hover .folder-peek { transform: translateY(-7px) rotate(-0.5deg); }
.folder.open .folder-peek { opacity: 0; }

/* manila front flap */
.folder-front {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 62%;
  z-index: 3;
  background: linear-gradient(180deg, #382e19, #2d2413);
  border: 1px solid #4a3d24;
  border-radius: 2px 2px 6px 6px;
  box-shadow: 0 -8px 22px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 26px 52px;
}
.folder-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--bone);
}
.folder-stamp {
  position: absolute;
  top: 16px; right: 14px;
  font-size: 0.58rem;
}
.folder-hint {
  position: absolute;
  top: 18px; left: 18px;
  font-size: 0.56rem;
  letter-spacing: 0.26em;
  color: var(--amber);
  opacity: 0.75;
  transition: opacity 0.3s ease;
}
.folder:hover .folder-hint { opacity: 1; }
.folder-org {
  position: absolute;
  bottom: 14px; left: 0; right: 0;
  text-align: center;
  font-size: 0.62rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--bone-dim);
}
.org-note { color: var(--amber-dim); letter-spacing: 0.18em; }

/* the document pulled out of the folder */
.folder-doc {
  position: absolute;
  left: 12px; right: 22px; top: 16px; bottom: 44px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  background:
    repeating-linear-gradient(180deg, transparent 0 27px, rgba(103, 89, 62, 0.13) 27px 28px),
    linear-gradient(180deg, #ddd3b2, #d0c5a0);
  border: 1px solid #b0a480;
  color: #2c2619;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
  box-shadow: 0 26px 54px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(36px) scale(0.985);
  pointer-events: none;
  cursor: default;
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}
.folder.open .folder-doc {
  opacity: 1;
  transform: translateY(0) rotate(-0.6deg);
  pointer-events: auto;
}

.paper-close {
  position: absolute;
  top: 7px; right: 26px;
  z-index: 7;
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #6b5f45;
  cursor: pointer;
  padding: 5px 7px;
  transition: color 0.25s ease, transform 0.25s ease;
}
.paper-close:hover { color: var(--red); transform: rotate(90deg); }

.paper-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 24px 24px 16px;
  overflow: auto;
  min-height: 0;
}
.paper-heading {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: #2c2619;
  border-bottom: 1px solid rgba(90, 78, 54, 0.35);
  padding-bottom: 9px;
  padding-right: 26px;
}
.paper-heading-sm {
  font-size: 0.6rem;
  letter-spacing: 0.26em;
  color: #6b5f45;
  padding-right: 26px;
}
.paper-text {
  font-size: 0.83rem;
  line-height: 1.6;
  color: #3a3323;
}
.paper-evidence {
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  color: #4a4231;
}
.plabel {
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  color: #8a6d1f;
  margin-right: 0.6em;
  text-transform: uppercase;
}
.paper-link {
  margin-top: auto;
  align-self: flex-start;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: #7a5c14;
  text-decoration: none;
  border-bottom: 1px solid rgba(122, 92, 20, 0.45);
  transition: color 0.3s ease, border-color 0.3s ease;
}
.paper-link:hover { color: #2c2619; border-color: #2c2619; }

/* two-page papers (side projects) */
.paper-nav {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px dashed rgba(90, 78, 54, 0.4);
  padding-top: 11px;
}
.paper-next, .paper-prev {
  background: none;
  border: 1px solid rgba(122, 92, 20, 0.55);
  color: #7a5c14;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  padding: 7px 12px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.paper-next:hover, .paper-prev:hover { background: #7a5c14; color: #ddd3b2; }
.paper-pageno {
  font-size: 0.58rem;
  letter-spacing: 0.24em;
  color: #6b5f45;
}
.paper-page-2 { display: none; }
.folder-doc.page-two .paper-page-1 { display: none; }
.folder-doc.page-two .paper-page-2 { display: flex; }

/* the live preview window on page 2 */
.preview-window {
  position: relative;
  display: block;
  flex: 1;
  min-height: 150px;
  border: 1px solid rgba(90, 78, 54, 0.55);
  overflow: hidden;
  background: #171310;
  cursor: pointer;
}
.preview-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px;
}
.preview-fallback b {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  color: var(--bone);
}
.preview-fallback i {
  font-size: 0.66rem;
  color: var(--bone-dim);
}
.preview-window iframe {
  position: absolute;
  top: 0; left: 0;
  width: 1280px;
  height: 800px;
  border: 0;
  transform-origin: top left;
  pointer-events: none;
  background: transparent;
}
.preview-open {
  position: absolute;
  left: 50%; bottom: 10px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.56rem;
  letter-spacing: 0.22em;
  color: var(--amber);
  background: rgba(12, 11, 9, 0.85);
  border: 1px solid var(--amber-dim);
  padding: 6px 11px;
  transition: border-color 0.3s ease;
}
.preview-window:hover .preview-open { border-color: var(--amber); }

/* ============================================================
   STATS
   ============================================================ */

.stats { text-align: center; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 64px);
  margin-top: clamp(40px, 6vh, 72px);
}
.stat { padding: 32px 12px; border-top: 1px solid var(--line); }
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6.5vw, 5rem);
  color: var(--bone);
  margin-top: 0.35em;
  line-height: 1;
  text-shadow: 0 0 40px rgba(232, 223, 201, 0.12);
}
.stats-footnote {
  margin: clamp(48px, 8vh, 80px) auto 0;
  max-width: 480px;
  color: var(--bone-dim);
  font-style: italic;
  font-size: 0.9rem;
}

/* ============================================================
   OFF THE BOOKS
   ============================================================ */

.offbooks { z-index: 1; text-align: center; }

.offbooks-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-top: 1em;
}
.offbooks-intro {
  max-width: 520px;
  margin: 1.4em auto 0;
  color: var(--bone-dim);
  font-size: 0.95rem;
}

.ob-grid { margin-top: clamp(44px, 7vh, 72px); }

.prop-ring-ob { right: 6%; top: 40px; transform: rotate(-16deg); }

/* ============================================================
   THE RECORD
   ============================================================ */

.record { z-index: 1; }

.record-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(40px, 6vw, 96px);
}

.record-entry {
  padding: 28px 0;
  border-bottom: 1px dashed var(--line);
}
.record-entry:last-child { border-bottom: none; }
.record-entry-edu { border-bottom: none; padding: 14px 0 0; }
.record-dates {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--amber);
}
.record-role {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-weight: 400;
  margin-top: 0.5em;
}
.record-org {
  color: var(--bone-dim);
  font-size: 0.85rem;
  margin-top: 0.25em;
}
.record-bullets {
  margin-top: 1em;
  padding-left: 1.1em;
  color: var(--bone-dim);
  font-size: 0.88rem;
}
.record-bullets li { margin-bottom: 0.5em; }
.record-bullets li::marker { content: "› "; color: var(--amber); }

.skills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.skills li {
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 7px 12px;
  border: 1px solid var(--line);
  color: var(--bone);
  transition: border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.skills li:hover {
  border-color: var(--amber);
  color: var(--amber);
  transform: translateY(-2px) rotate(-1deg);
}

.record-download-label { display: block; margin-top: 48px; }

.btn-dossier {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 20px;
  padding: 18px 26px;
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  color: var(--ink);
  background: var(--bone);
  border: 1px solid var(--bone);
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}
.btn-dossier:hover {
  background: transparent;
  color: var(--bone);
  box-shadow: 0 0 30px rgba(232, 223, 201, 0.12);
}
.btn-dossier-sub {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  opacity: 0.65;
  text-transform: uppercase;
}

/* ============================================================
   INTERROGATION
   ============================================================ */

.interrogation { max-width: 860px; }

.interrogation-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  font-weight: 400;
  margin: 0.6em 0 1.4em;
}

.qa { border-top: 1px solid var(--line); }
.qa:last-child { border-bottom: 1px solid var(--line); }
.qa summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px 4px;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.25rem);
  letter-spacing: 0.04em;
  transition: color 0.3s ease, padding-left 0.3s ease;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary:hover { color: var(--amber); padding-left: 12px; }
.qa-marker {
  font-family: var(--font-mono);
  color: var(--amber);
  font-size: 1.3rem;
  transition: transform 0.35s var(--ease-out);
}
.qa[open] .qa-marker { transform: rotate(45deg); }
.qa p {
  padding: 0 4px 26px;
  color: var(--bone-dim);
  font-size: 0.92rem;
  max-width: 62ch;
}
.qa a { color: var(--amber); }

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  position: relative;
  border-top: 1px solid var(--line);
  padding-bottom: 64px;
  margin-top: clamp(64px, 10vh, 120px);
}
.footer .marquee { border-top: none; margin-bottom: 64px; }

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(20px, 6vw, 96px);
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
}
.footer-email {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.6vw, 1.7rem);
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--bone);
  border-bottom: 1px solid var(--amber-dim);
  transition: color 0.3s ease, border-color 0.3s ease;
}
.footer-email:hover { color: var(--amber); border-color: var(--amber); }

.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  text-decoration: none;
  color: var(--bone-dim);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  margin-top: 6px;
  transition: color 0.3s ease;
  width: fit-content;
}
.footer-links a:hover { color: var(--amber); }
.footer-links .label { margin-bottom: 8px; }

.footer-fine p:not(.label) {
  margin-top: 16px;
  font-size: 0.74rem;
  color: var(--bone-dim);
  line-height: 1.9;
}

/* ============================================================
   CHAT DRAWER
   ============================================================ */

.chat-scrim {
  position: fixed; inset: 0;
  z-index: 190;
  background: rgba(5, 4, 3, 0.55);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.chat-scrim.scrim-on { opacity: 1; }

.chat {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 200;
  width: min(600px, 94vw);
  min-width: 360px;
  max-width: 96vw;
  display: flex;
  flex-direction: column;
  background: var(--ink-2);
  border-left: 1px solid var(--line-strong);
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.6);
  transform: translateX(105%);
  transition: transform 0.55s var(--ease-out);
}
.chat.chat-open { transform: translateX(0); }

/* drag-to-resize handle on the inner (left) edge */
.chat-resize {
  position: absolute;
  top: 0; left: -4px; bottom: 0;
  width: 22px;
  cursor: ew-resize;
  z-index: 210;
  touch-action: none;
  display: grid;
  place-items: center;
}
.chat-resize::after {
  content: "";
  width: 3px;
  height: 44px;
  border-radius: 3px;
  background: var(--line-strong);
  transition: background 0.25s var(--ease-out), height 0.25s var(--ease-out);
}
.chat-resize:hover::after,
.chat-resize:focus-visible::after,
.chat-resize.resizing::after { background: var(--amber); height: 76px; }
.chat-resize:focus-visible { outline: none; }
.chat.resizing { transition: none; user-select: none; }

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 100% 200% at 50% -80%, rgba(210, 161, 58, 0.12), transparent 70%);
}
.chat-title {
  font-family: var(--font-display);
  letter-spacing: 0.18em;
  font-size: 1rem;
}
.chat-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 0.64rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--amber);
}
.chat-close {
  background: none;
  border: 1px solid var(--line);
  color: var(--bone-dim);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  width: 36px; height: 36px;
  cursor: pointer;
  transition: color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.chat-close:hover { color: var(--red); border-color: var(--red); transform: rotate(90deg); }

.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--amber-dim) transparent;
}

.msg {
  max-width: 85%;
  padding: 12px 16px;
  font-size: 0.88rem;
  line-height: 1.55;
  animation: msg-in 0.4s var(--ease-out);
}
@keyframes msg-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.msg-agent {
  align-self: flex-start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 2px solid var(--amber);
  color: var(--bone);
}
.msg-user {
  align-self: flex-end;
  background: var(--amber);
  color: var(--ink);
}
.msg-typing {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 14px 16px;
}
.msg-typing i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--amber);
  animation: typing-bounce 1.2s ease-in-out infinite;
}
.msg-typing i:nth-child(2) { animation-delay: 0.15s; }
.msg-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.chat-form {
  display: flex;
  border-top: 1px solid var(--line);
}
.chat-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--bone);
}
.chat-input::placeholder { color: var(--bone-dim); font-style: italic; }
.chat-send {
  background: transparent;
  border: none;
  border-left: 1px solid var(--line);
  padding: 0 22px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--amber);
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}
.chat-send:hover { background: var(--amber); color: var(--ink); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1100px) {
  .ob-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .record-grid { grid-template-columns: 1fr; }
  .case-grid, .ob-grid { grid-template-columns: 1fr; }
  .folder { height: 540px; }
  .stat-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .prop-magnifier { right: -18%; }
  .prop-notebook { left: -20%; }
  .prop-mug { right: -12%; }
  .prop-pencil { display: none; }
}

@media (max-width: 640px) {
  .nav { padding: 0 14px; }
  .nav-logo-sub { display: none; }
  .nav-logo-name { font-size: 0.92rem; letter-spacing: 0.08em; }
  .nav-chat-full { display: none; }
  .nav-chat-short { display: inline; }
  .nav-links { gap: 12px; }
  .nav-links > a { font-size: 0.74rem; letter-spacing: 0.04em; }
  .nav-chat-btn { padding: 8px 10px; font-size: 0.72rem; letter-spacing: 0.08em; }
  .chat { width: 100vw; min-width: 0; max-width: 100vw; }
  .chat-resize { display: none; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain, .scroll-cue-chevron, .nav-chat-dot, .hero-lamp { animation: none; }
  .marquee-track { animation-duration: 240s; }
  .js [data-reveal] { transition: none; opacity: 1; transform: none; }
  .hero-row, .hero-final, .hero-stack, .chat, .prop { transition: none; }
  .folder-doc, .folder-peek, .tab-dot { transition: none; animation: none; }
}
