/* ==========================================================
   DIYAA JAIN® — Portfolio
   Neue Haas Grotesk Display Pro. White / black, one acid accent.
   Clean bones, human details. Caveat for the handwriting.
   ========================================================== */

:root {
  --bg: #FFFFFF;
  --ink: #0A0A0A;
  --muted: #666666;
  --line: rgba(10, 10, 10, 0.14);
  --acid: #D7FF3E;
  --plate: #0A0A0A;
  --plate-ink: #D7FF3E;
  --paper: #F9F7F0;
  --paper-line: #E9E5D8;
  --paper-ink: #1B1A16;
  --paper-soft: #514E44;
}

:root[data-theme="dark"] {
  --bg: #0A0A0A;
  --ink: #F2F2F0;
  --muted: #A3A39E;
  --line: rgba(242, 242, 240, 0.16);
  --acid: #D7FF3E;
  --plate: #F2F2F0;
  --plate-ink: #0A0A0A;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Satoshi', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 17px;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  transition: background-color 0.4s ease, color 0.4s ease;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* display face for the big type */
h1, h2, h3, .plate-word, .contact-text {
  font-family: 'Cabinet Grotesk', 'Satoshi', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

::selection { background: var(--acid); color: #0A0A0A; }

.grain {
  position: fixed;
  inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none;
  z-index: 999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(6) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0,0); }
  25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -2%); }
  75% { transform: translate(-3%, -3%); }
}

.progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: var(--acid);
  z-index: 200;
}

/* ================= NAV ================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-logo { font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.nav-logo sup { font-size: 9px; vertical-align: super; }
.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 24px; height: 24px;
  background: var(--acid);
  color: #0A0A0A;
  border-radius: 50%;
  font-size: 14px;
  vertical-align: -4px;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nav-logo:hover .logo-mark { transform: rotate(25deg) scale(1.12); }

.nav-status { display: none; } /* retired: keep markup on old pages harmless */

.nav-links { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 32px); font-size: 17px; font-weight: 500; }
.nav-links a { position: relative; padding: 4px 0; }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--acid);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.65, 0, 0.35, 1);
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-pill {
  border: 1.5px solid var(--ink);
  border-radius: 99px;
  padding: 7px 18px !important;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.nav-pill::after { display: none; }
.nav-pill:hover { background: var(--acid); color: #0A0A0A; border-color: var(--acid); transform: translateY(-2px); }

.nav-pill--talk { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.nav-pill--talk:hover { background: var(--acid); color: #0A0A0A; border-color: var(--acid); }

/* clean / chaos */
.mode-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.mode-slash { opacity: 0.4; }
.mode-opt { transition: color 0.25s ease, background-color 0.25s ease; padding: 3px 8px; border-radius: 99px; }
body:not(.chaos) .mode-clean,
body.chaos .mode-chaos { background: var(--acid); color: #0A0A0A; }
.mode-toggle:hover .mode-opt { color: var(--ink); }
body:not(.chaos) .mode-toggle:hover .mode-clean,
body.chaos .mode-toggle:hover .mode-chaos { color: #0A0A0A; }

/* theme toggle */
.theme-toggle { background: none; border: none; cursor: pointer; padding: 0; display: grid; }
.toggle-track {
  width: 40px; height: 22px;
  border: 1.5px solid var(--ink);
  border-radius: 99px;
  display: block;
  position: relative;
  transition: border-color 0.3s ease;
}
.toggle-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease;
}
:root[data-theme="dark"] .toggle-thumb { transform: translateX(18px); background: var(--acid); }

/* ================= HERO ================= */
.hero {
  position: relative;
  min-height: calc(100svh - 62px);
  display: flex;
  align-items: center;
  padding: 80px clamp(16px, 4vw, 48px) 90px;
}
.hero-inner {
  width: 100%;
  max-width: 1050px;
  margin: 0 auto;
}

.hero-h1 {
  font-size: clamp(56px, 9.5vw, 128px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.02em;
  font-kerning: normal;
  font-feature-settings: "kern" 1;
  text-rendering: optimizeLegibility;
}
.hero-h1 .dot { color: var(--acid); }

.hero-id {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 18px;
  margin-top: clamp(30px, 4vw, 48px);
}
.id-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 18%;
  border: 2px solid var(--ink);
}
.id-txt { display: flex; flex-direction: column; gap: 2px; }
.id-name { font-size: 18px; font-weight: 700; line-height: 1.1; }
.id-quirk {
  font-family: 'Caveat', cursive;
  font-size: 21px;
  color: var(--muted);
  line-height: 1.1;
}
.id-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 99px;
}
.status-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--acid);
  border: 1px solid rgba(10,10,10,0.25);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { transform: scale(0.6); opacity: 0.6; } }

.hl {
  background: var(--acid);
  color: #0A0A0A;
  padding: 0 8px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.hero-row {
  margin-top: clamp(32px, 4.5vw, 52px);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 26px;
}
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 14px 28px;
  border: 1.5px solid var(--ink);
  border-radius: 99px;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.hero-btn:hover { background: var(--acid); color: #0A0A0A; border-color: var(--acid); transform: translateY(-2px); }

/* structured sticker row */
.sticker-row {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.row-hint {
  position: absolute;
  top: -26px;
  right: 0;
  font-family: 'Caveat', cursive;
  font-size: 18px;
  color: var(--muted);
  transform: rotate(-2deg);
  white-space: nowrap;
  pointer-events: none;
}
.sticker-row .float-obj {
  position: static;
  width: 54px;
  margin: 0;
}
.sticker-row .obj-note {
  width: auto;
  aspect-ratio: auto;
  border-radius: 99px;
  padding: 13px 17px;
  font-size: 17px;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
}
.scroll-arrow { display: inline-block; animation: dip 1.6s ease-in-out infinite; }
@keyframes dip { 50% { transform: translateY(4px); } }

/* ---- scattered desk objects ---- */
.desk-hint {
  position: absolute;
  top: 9%;
  right: 5%;
  font-family: 'Caveat', cursive;
  font-size: clamp(18px, 1.8vw, 23px);
  color: var(--muted);
  transform: rotate(-3deg);
  white-space: nowrap;
  pointer-events: none;
}

.float-obj {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: clamp(52px, 5vw, 68px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: var(--bg);
  box-shadow: 0 10px 26px -12px rgba(0, 0, 0, 0.35);
  font-size: clamp(23px, 2.2vw, 29px);
  cursor: pointer;
  display: grid;
  place-items: center;
  animation: floaty 5.5s ease-in-out infinite;
  animation-delay: var(--d, 0s);
  transition: background-color 0.2s ease, box-shadow 0.3s ease;
  z-index: 4;
}
.float-obj:hover { background: var(--acid); box-shadow: 0 16px 34px -12px rgba(0, 0, 0, 0.4); }
@keyframes floaty {
  0%, 100% { transform: rotate(var(--r, 0deg)) translateY(0); }
  50% { transform: rotate(var(--r, 0deg)) translateY(-9px); }
}
.float-obj.bounce { animation: objBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes objBounce {
  30% { transform: rotate(var(--r, 0deg)) translateY(-16px) scale(1.18); }
  60% { transform: rotate(var(--r, 0deg)) translateY(3px) scale(0.94); }
}

/* sticky-note object */
.obj-note {
  width: auto;
  aspect-ratio: auto;
  border-radius: 3px;
  border: none;
  background: var(--acid);
  color: #0A0A0A;
  font-family: 'Caveat', cursive;
  font-size: 19px;
  line-height: 1.15;
  padding: 14px 16px 16px;
  text-align: left;
  box-shadow: 0 12px 26px -12px rgba(0, 0, 0, 0.4);
}
.obj-note:hover { background: var(--acid); filter: brightness(1.04); }

/* spinning badge object */
.obj-badge {
  width: clamp(96px, 9vw, 130px);
  border: none;
  background: none;
  box-shadow: none;
  cursor: default;
}
.badge { position: absolute; inset: 0; animation: spin 14s linear infinite; }
.badge text { font-size: 12.5px; font-weight: 600; letter-spacing: 0.28em; fill: var(--ink); }
.badge-core {
  font-size: clamp(26px, 2.6vw, 38px);
  background: var(--acid);
  color: #0A0A0A;
  width: 56%; height: 56%;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ================= SECTIONS ================= */
section { padding: clamp(80px, 10vw, 150px) clamp(16px, 4vw, 48px) 0; }

.sec-head { max-width: 1050px; margin: 0 auto clamp(34px, 4.5vw, 60px); }
.sec-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 12px;
}
.sec-head h2 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.sec-scribble {
  display: inline-block;
  font-family: 'Caveat', cursive;
  font-size: clamp(19px, 2vw, 26px);
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
  transform: rotate(-2deg) translateY(-4px);
  margin-left: 10px;
  white-space: nowrap;
}

/* ================= WORK ================= */
.work { position: relative; }
.work-cards {
  max-width: 1050px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 2.6vw, 30px);
}
.work-cards .work-card { display: flex; flex-direction: column; }
.work-cards .card-body { flex: 1; }

/* clean 2x2 grid sizing */
.card-media { aspect-ratio: 16 / 9.5; min-height: 220px; }
.work-cards .card-top h3 { font-size: clamp(24px, 2.6vw, 34px); }
.work-cards .card-hook { font-size: 16px; }

/* slide-style covers sit whole on white instead of cropping */
.card-media--fit { background: #fff; }
.card-media--fit img { object-fit: contain; object-position: center; }

.work-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease, border-color 0.3s ease;
  will-change: transform;
}
.work-card:hover {
  transform: translateY(-6px);
  border-color: var(--ink);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.4);
}
.work-card--soon { cursor: default; }

.card-media {
  position: relative;
  aspect-ratio: 16 / 8.5;
  min-height: 240px;
  overflow: hidden;
  background: var(--plate);
  border-bottom: 1px solid var(--line);
}
.card-media img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.work-card:hover .card-media img { transform: scale(1.04); }
.card-media--plate { display: grid; place-items: center; }
.plate-word {
  font-size: clamp(44px, 7vw, 96px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--plate-ink);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.work-card:hover .plate-word { transform: rotate(-2.5deg) scale(1.05); }

.card-badge {
  position: absolute;
  top: 16px; left: 16px;
  background: var(--acid);
  color: #0A0A0A;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 8px 14px;
  border-radius: 99px;
  border: 1px solid #0A0A0A;
  z-index: 2;
}
.card-badge--soon { background: var(--bg); color: var(--ink); border-color: currentColor; }

/* emoji floaters that pop on hover */
.floater {
  position: absolute;
  font-size: clamp(26px, 2.6vw, 36px);
  opacity: 0;
  transform: scale(0.4) rotate(-20deg);
  transition: opacity 0.3s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.3));
}
.f-1 { top: 16px; right: 18px; }
.f-2 { bottom: 16px; left: 18px; transition-delay: 0.06s; }
.work-card:hover .floater { opacity: 1; transform: scale(1) rotate(6deg); }
.work-card:hover .f-2 { transform: scale(1) rotate(-8deg); }

.card-body { padding: clamp(22px, 3vw, 40px); }
.card-top { display: flex; align-items: baseline; gap: 16px; margin-bottom: 12px; }
.card-top h3 {
  font-size: clamp(26px, 3.4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.card-arrow {
  margin-left: auto;
  font-size: 26px;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease;
}
.work-card:hover .card-arrow { transform: rotate(45deg); }
.work-card--soon:hover .card-arrow { transform: rotate(90deg); }

.card-hook {
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.6;
  max-width: 62ch;
  margin-bottom: 14px;
}
.card-outcome {
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 18px;
}
.card-outcome .step { color: transparent; -webkit-text-stroke: 0; color: var(--ink); background: var(--acid); border-radius: 4px; padding: 0 4px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.card-tags span {
  font-size: 13px;
  font-weight: 500;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.work-card:hover .card-tags span { border-color: var(--ink); color: var(--ink); }

/* ================= JOURNAL ================= */
.journal { position: relative; }

.book {
  position: relative;
  max-width: 1050px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 16px 1fr;
  filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.18));
}

.book-page {
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0px,
      transparent 31px,
      var(--paper-line) 31px,
      var(--paper-line) 32px
    ),
    var(--paper);
  color: var(--paper-ink);
  padding: clamp(28px, 4vw, 52px) clamp(22px, 3.4vw, 48px) clamp(34px, 4vw, 56px);
  position: relative;
}
.page-left { border-radius: 16px 3px 3px 16px; border: 1px solid var(--paper-line); border-right: none; }
.page-right { border-radius: 3px 16px 16px 3px; border: 1px solid var(--paper-line); border-left: none; }

.book-spine {
  background:
    linear-gradient(90deg,
      rgba(0, 0, 0, 0.14) 0%,
      rgba(0, 0, 0, 0.03) 35%,
      rgba(0, 0, 0, 0.03) 65%,
      rgba(0, 0, 0, 0.16) 100%),
    var(--paper);
  border-top: 1px solid var(--paper-line);
  border-bottom: 1px solid var(--paper-line);
}

/* bookmark tabs */
.book-tab {
  position: absolute;
  right: -13px;
  background: var(--acid);
  color: #0A0A0A;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 7px 16px 7px 12px;
  border-radius: 0 8px 8px 0;
  border: 1px solid #0A0A0A;
  z-index: -1;
}
.tab-1 { top: 64px; }
.tab-2 { top: 116px; right: -22px; }
.tab-3 { top: 168px; }

.washi {
  position: absolute;
  top: -13px;
  left: 44px;
  width: 96px; height: 28px;
  background: var(--acid);
  opacity: 0.85;
  transform: rotate(-4deg);
  border-radius: 2px;
}

.page-title {
  font-family: 'Caveat', cursive;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 600;
  line-height: 32px;
  margin-bottom: 16px;
}
.page-title--gap { margin-top: 34px; }
.page-text {
  font-size: 16.5px;
  line-height: 32px; /* sits on the ruled lines */
  color: var(--paper-soft);
  max-width: 58ch;
  margin-bottom: 16px;
}

.page-list { list-style: none; }
.page-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0 10px;
}
.page-list em {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8B876F;
}
.page-list li { font-size: 16.5px; font-weight: 600; }

.sticky-note {
  display: inline-block;
  background: var(--acid);
  color: #0A0A0A;
  font-family: 'Caveat', cursive;
  font-size: 21px;
  line-height: 1.2;
  padding: 18px 20px 22px;
  transform: rotate(2deg);
  box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.35);
  margin: 18px 0 6px;
  border-radius: 2px;
}

.page-stamps { display: flex; flex-wrap: wrap; gap: 9px; }
.page-stamps span {
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border: 1.5px dashed #A8A28A;
  border-radius: 8px;
  color: var(--paper-soft);
  transform: rotate(-1deg);
}
.page-stamps span:nth-child(even) { transform: rotate(1.4deg); }

/* polaroid */
.polaroid {
  display: inline-block;
  background: #FFFFFF;
  border: 1px solid #E3DFD2;
  padding: 10px 10px 12px;
  transform: rotate(-3deg);
  box-shadow: 0 18px 34px -16px rgba(0, 0, 0, 0.35);
  margin-top: 14px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.polaroid:hover { transform: rotate(0deg) scale(1.03); }
.polaroid-frame {
  width: 168px;
  aspect-ratio: 3.2 / 4;
  background: #EFEDE4;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.polaroid-frame img { width: 100%; height: 100%; object-fit: cover; }
.polaroid-mark {
  font-size: 56px;
  width: 92px; height: 92px;
  background: var(--acid);
  color: #0A0A0A;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.polaroid-cap {
  display: block;
  text-align: center;
  font-family: 'Caveat', cursive;
  font-size: 18px;
  color: #6B675A;
  margin-top: 8px;
}

/* ================= PLAY / AI LAB ================= */
.ai-grid {
  max-width: 1050px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2.2vw, 26px);
}
.ai-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
  background: var(--bg);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease;
  will-change: transform;
}
.ai-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--acid);
  transform: translateY(101%);
  transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1);
  z-index: -1;
}
.ai-card:hover::before { transform: translateY(0); }
.ai-card:hover { color: #0A0A0A; border-color: #0A0A0A; }

/* visual plate on top of each experiment */
.ai-visual {
  position: relative;
  background: var(--plate);
  min-height: clamp(140px, 15vw, 185px);
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.ai-ghost {
  position: absolute;
  right: -6px;
  bottom: -34px;
  font-size: clamp(110px, 12vw, 170px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1.5px color-mix(in srgb, var(--plate-ink) 30%, transparent);
  pointer-events: none;
  user-select: none;
}
.ai-emoji {
  position: relative;
  z-index: 1;
  font-size: clamp(46px, 5vw, 62px);
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.35));
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ai-card:hover .ai-emoji { transform: scale(1.18) rotate(-8deg); }
.ai-num {
  position: absolute;
  top: 16px; left: 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--plate-ink);
  z-index: 2;
}
.ai-status {
  position: absolute;
  top: 12px; right: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 6px 12px;
  border: 1px solid var(--plate-ink);
  color: var(--plate-ink);
  border-radius: 99px;
  z-index: 2;
}
.ai-body {
  padding: clamp(18px, 2.4vw, 26px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.ai-title { font-size: clamp(20px, 2.2vw, 26px); font-weight: 700; letter-spacing: -0.02em; }
.ai-desc { font-size: 15px; line-height: 1.55; color: var(--muted); transition: color 0.3s ease; }
.ai-card:hover .ai-desc { color: #0A0A0A; }
.ai-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }
.ai-tags span {
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.ai-card:hover .ai-tags span { border-color: #0A0A0A; color: #0A0A0A; }

/* ================= CONTACT ================= */
.contact { position: relative; }
.contact-giant {
  display: block;
  max-width: 1050px;
  margin: 0 auto;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  border-radius: 18px;
  text-align: center;
  padding: clamp(36px, 6vw, 90px) 16px;
}
.contact-fill {
  position: absolute;
  inset: 0;
  background: var(--acid);
  transform: translateY(101%);
  transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
  z-index: -1;
}
.contact-giant:hover .contact-fill { transform: translateY(0); }
.contact-text {
  font-size: clamp(44px, 9.5vw, 150px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.95;
  transition: color 0.3s ease;
  display: inline-flex;
  align-items: baseline;
  gap: clamp(8px, 2vw, 28px);
}
.contact-giant:hover .contact-text { color: #0A0A0A; }
.contact-arrow { display: inline-block; transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.contact-giant:hover .contact-arrow { transform: translate(10px, -10px) rotate(8deg); }

.contact-row {
  display: flex;
  justify-content: center;
  gap: clamp(20px, 4vw, 48px);
  padding: 28px 0 0;
  font-size: 15px;
  font-weight: 500;
}
.contact-row a { color: var(--muted); transition: color 0.2s ease; }
.contact-row a:hover { color: var(--ink); }

/* ================= FOOTER ================= */
.footer { margin-top: clamp(70px, 9vw, 130px); border-top: 1px solid var(--line); }
.footer-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 22px clamp(16px, 4vw, 48px);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.footer-meta a:hover { color: var(--ink); }

/* ================= TOAST / SPARKS / SCRIBBLES ================= */
.toast {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: var(--ink);
  color: var(--bg);
  font-family: 'Satoshi', sans-serif;
  font-size: clamp(19px, 2.4vw, 27px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
  text-align: center;
  padding: 24px 42px;
  border-radius: 20px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 300;
  max-width: min(560px, 90vw);
}
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.toast-email { display: block; }
.toast-note { display: block; font-size: 0.68em; font-weight: 500; opacity: 0.85; margin-top: 7px; }

.spark {
  position: fixed;
  width: 9px; height: 9px;
  background: var(--acid);
  border: 1px solid #0A0A0A;
  z-index: 250;
  pointer-events: none;
  border-radius: 1px;
}

.scribble {
  position: absolute;
  font-family: 'Caveat', cursive;
  font-size: clamp(19px, 2vw, 26px);
  color: var(--ink);
  transform: rotate(-4deg);
  pointer-events: none;
  z-index: 5;
}
.scribble--chaos { opacity: 0; transition: opacity 0.4s ease; }
body.chaos .scribble--chaos { opacity: 1; }
.scribble-work { top: 34px; right: clamp(16px, 6vw, 90px); }
.scribble-journal { top: 34px; right: clamp(16px, 8vw, 120px); }
.scribble-contact { top: 30px; left: clamp(16px, 30vw, 46%); }

/* ================= CHAOS MODE ================= */
body.chaos .grain { opacity: 0.085; }
body.chaos .badge { animation-duration: 4s; }
body.chaos .hero-quote { transform: rotate(-1.2deg); }
body.chaos .float-obj { animation-duration: 2.6s; }
body.chaos .work-card:nth-child(odd) { transform: rotate(-0.7deg); }
body.chaos .work-card:nth-child(even) { transform: rotate(0.7deg); }
body.chaos .ai-card:nth-child(odd) { transform: rotate(-0.9deg); }
body.chaos .ai-card:nth-child(even) { transform: rotate(0.9deg); }
body.chaos .book { transform: rotate(-0.8deg); }
body.chaos .sticky-note { transform: rotate(5deg); }
body.chaos .polaroid { transform: rotate(-6deg); }

/* ================= CASE STUDY PAGE ================= */
.cs-hero { padding-top: clamp(48px, 7vw, 100px); }
.cs-crumb { font-size: 13px; font-weight: 600; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 18px; }
.cs-crumb a:hover { color: var(--ink); }
.cs-title {
  font-size: clamp(64px, 14vw, 210px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.9;
}
.cs-title-acid { color: transparent; -webkit-text-stroke: 2.5px var(--ink); }
.cs-sub {
  font-size: clamp(17px, 2.2vw, 26px);
  font-weight: 500;
  letter-spacing: -0.01em;
  max-width: 46ch;
  margin-top: 20px;
}
.cs-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  margin-top: clamp(28px, 4vw, 48px);
}
.cs-meta div { background: var(--bg); padding: 16px 14px; transition: background-color 0.4s ease; }
.cs-meta span { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; color: var(--muted); margin-bottom: 6px; }
.cs-meta strong { font-size: 15px; font-weight: 600; }
.cs-intro { margin-top: clamp(28px, 4vw, 52px); }
.cs-intro > p {
  font-size: clamp(18px, 2.4vw, 30px);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.35;
  max-width: 60ch;
}
.cs-points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(16px, 2.5vw, 32px);
  margin-top: clamp(24px, 3.5vw, 44px);
}
.cs-points div { border-top: 1.5px solid var(--ink); padding-top: 12px; }
.cs-points span { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; color: var(--muted); }
.cs-points p { font-size: 15.5px; font-weight: 500; margin-top: 8px; line-height: 1.5; }

.cs-body { padding-top: clamp(32px, 4.5vw, 60px); }
.cs-canvas {
  max-width: min(1240px, 86vw);
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.35);
}
.cs-canvas img { display: block; width: 100%; height: auto; }

/* compact case hero — name stays small, statement leads, straight into the work */
.cs-hero--compact { padding-top: clamp(32px, 4.5vw, 56px); }
.cs-hero--compact .cs-crumb { margin-bottom: 12px; }
.cs-name {
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.cs-name .dot { color: var(--acid); }
.cs-statement {
  font-size: clamp(26px, 4vw, 52px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
  max-width: 30ch;
  margin-top: clamp(12px, 1.8vw, 20px);
}
.cs-metaline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: clamp(16px, 2.2vw, 26px);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.cs-metaline span::after { content: "·"; margin-left: 10px; opacity: 0.45; }
.cs-metaline span:last-child::after { content: none; }

.cs-end { text-align: center; }
.cs-behance {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 14px 26px;
  border: 1.5px solid var(--ink);
  border-radius: 99px;
  margin-bottom: clamp(28px, 4vw, 48px);
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.cs-behance:hover { background: var(--acid); color: #0A0A0A; border-color: var(--acid); transform: translateY(-3px); }
.cs-end .contact-giant { display: block; }

/* ================= REVEAL ================= */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ================= REDUCED MOTION ================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .grain, .badge, .scroll-arrow, .status-dot, .float-obj { animation: none; }
  .float-obj.bounce { animation: none; }
  .toast, .work-card, .ai-card, .ai-emoji, .card-media img, .plate-word, .floater { transition: none; }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .hide-m { display: none; }
  .nav { padding: 12px 16px; }
  .nav-links { gap: 12px; font-size: 14px; }
  .nav-pill { padding: 6px 13px !important; }
  .mode-toggle { display: none; }

  /* hero: stickers flow inline above the quote */
  .hero { display: block; min-height: 0; padding: 44px 20px 60px; }
  .desk-hint { position: static; display: block; text-align: center; margin-bottom: 14px; transform: rotate(-2deg); }
  .float-obj {
    position: static;
    display: inline-grid;
    margin: 5px;
    width: 54px;
    font-size: 24px;
    animation: none;
    transform: rotate(var(--r, 0deg));
  }
  .obj-note { width: auto; font-size: 17px; padding: 10px 12px; }
  .obj-badge { display: none; }
  .hero-h1 { font-size: clamp(48px, 15vw, 72px); }
  .row-hint { display: none; }
  .sticker-row .obj-note { white-space: normal; text-align: left; line-height: 1.15; }

  .sec-scribble { display: block; margin: 8px 0 0; transform: rotate(-2deg); white-space: normal; }

  .work-cards { grid-template-columns: 1fr; }
  .card-media { aspect-ratio: 16 / 10; min-height: 200px; }

  .book { grid-template-columns: 1fr; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.16)); }
  .book-spine { display: none; }
  .book-tab { display: none; }
  .page-left { border-radius: 16px 16px 0 0; border: 1px solid var(--paper-line); border-bottom: 1px dashed var(--paper-line); }
  .page-right { border-radius: 0 0 16px 16px; border: 1px solid var(--paper-line); border-top: none; }

  .ai-grid { grid-template-columns: 1fr; }
  .scribble { display: none; }
  .footer-meta { justify-content: center; text-align: center; }
}
