/* =========================================================
   TALHA USMANI · v3 · TOY
   Vibrant, draggable, playful. Hot palette.
   ========================================================= */

:root {
  --cream: #FFF6EC;
  --paper: #FFEFD9;
  --ink: #1A0F0A;
  --ink-2: #4A2A1A;
  --tomato: #FF3B2F;
  --orange: #FF7A1A;
  --pink: #FF2D87;
  --yellow: #FFD400;
  --magenta: #E91E63;
  --burgundy: #7A0E1F;
  --line: #1A0F0A;

  --display: 'Boldonse', 'Anton', sans-serif;
  --body: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body {
  min-height: 100vh;
  cursor: none;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(26,15,10,0.10) 1px, transparent 0);
  background-size: 22px 22px;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: none; }
::selection { background: var(--yellow); color: var(--ink); }

/* Custom cursor */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
}
.cursor-dot {
  width: 8px; height: 8px;
  background: var(--cream);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.15s ease, height 0.15s ease, background 0.15s ease;
}
.cursor-ring {
  width: 38px; height: 38px;
  border: 1.5px solid var(--cream);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.cursor-dot.big { width: 18px; height: 18px; }
.cursor-ring.big { width: 80px; height: 80px; background: rgba(255,255,255,0.05); }
.cursor-dot.grab { width: 0; height: 0; }
.cursor-ring.grab {
  width: 56px; height: 56px;
  border: 1.5px dashed var(--cream);
}
.cursor-label {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  background: var(--ink);
  color: var(--yellow);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 5px 9px;
  border-radius: 999px;
  transform: translate(16px, 18px);
  opacity: 0;
  transition: opacity 0.15s ease;
  text-transform: uppercase;
}
.cursor-label.on { opacity: 1; }

/* Page chrome */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 80;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px;
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav .brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--ink);
  color: var(--cream);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
}
.nav .brand .blob {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--tomato);
  animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

.nav-right {
  display: flex; gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
}
.nav-right a, .nav-right button {
  background: var(--cream);
  color: var(--ink);
  padding: 8px 13px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.nav-right a:hover, .nav-right button:hover {
  background: var(--yellow);
  transform: translateY(-2px) rotate(-1deg);
}
.nav-right .sound-btn { display: inline-flex; align-items: center; gap: 6px; }

/* HERO */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 110px 28px 60px;
  display: flex; flex-direction: column; justify-content: center;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 30px;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}
.hero-left h1 {
  font-family: var(--display);
  font-size: clamp(56px, 9vw, 156px);
  line-height: 0.88;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero-left h1 .word {
  display: inline-block;
  position: relative;
}
.hero-left h1 .word.t { color: var(--tomato); }
.hero-left h1 .word.o { color: var(--orange); }
.hero-left h1 .word.p { color: var(--pink); }
.hero-left h1 .word.y { color: var(--yellow); -webkit-text-stroke: 2px var(--ink); }
.hero-left h1 .word.k {
  background: var(--ink);
  color: var(--cream);
  padding: 0 16px 6px;
  border-radius: 14px;
  display: inline-block;
  transform: rotate(-2deg);
}
.hero-sub {
  font-size: clamp(17px, 1.4vw, 22px);
  line-height: 1.45;
  max-width: 560px;
  color: var(--ink-2);
  margin-bottom: 28px;
}
.hero-sub b { background: var(--yellow); padding: 0 4px; border-radius: 3px; color: var(--ink); }

.hero-cta {
  display: flex; gap: 14px; flex-wrap: wrap;
}
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative;
  transition: transform 0.18s cubic-bezier(.34,1.56,.64,1), box-shadow 0.18s ease, background 0.15s ease;
  box-shadow: 4px 4px 0 var(--ink);
}
.btn:hover { transform: translate(-2px, -2px) rotate(-1.5deg); box-shadow: 7px 7px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn.primary { background: var(--tomato); color: var(--cream); }
.btn.primary:hover { background: var(--pink); }
.btn .arr { transition: transform 0.2s ease; display: inline-block; }
.btn:hover .arr { transform: translateX(4px); }

/* HERO RIGHT — playground canvas */
.hero-right {
  position: relative;
  height: 540px;
}
.playground {
  position: absolute; inset: 0;
  border: 2.5px solid var(--ink);
  border-radius: 28px;
  background: var(--paper);
  overflow: hidden;
  box-shadow: 8px 8px 0 var(--ink);
}
.playground::before {
  content: '⌧ DRAG ANYTHING';
  position: absolute;
  top: 14px; left: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  background: var(--ink);
  color: var(--yellow);
  padding: 4px 10px;
  border-radius: 999px;
  z-index: 5;
}
.playground::after {
  content: '';
  position: absolute;
  top: 14px; right: 14px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--tomato);
  box-shadow: 0 0 0 4px rgba(255,59,47,0.2);
  animation: pulse2 1.6s ease-in-out infinite;
  z-index: 5;
}
@keyframes pulse2 {
  0%,100% { box-shadow: 0 0 0 4px rgba(255,59,47,0.2); }
  50% { box-shadow: 0 0 0 10px rgba(255,59,47,0); }
}

/* Floating sticker chips */
.sticker {
  position: absolute;
  font-family: var(--display);
  text-transform: uppercase;
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  font-size: 18px;
  letter-spacing: 0.02em;
  user-select: none;
  cursor: none;
  transform-origin: center;
  box-shadow: 3px 3px 0 var(--ink);
  white-space: nowrap;
  transition: box-shadow 0.15s ease;
}
.sticker.s1 { background: var(--tomato); color: var(--cream); top: 30%; left: 8%; }
.sticker.s2 { background: var(--yellow); color: var(--ink); top: 18%; right: 12%; transform: rotate(8deg); }
.sticker.s3 { background: var(--pink); color: var(--cream); bottom: 22%; left: 18%; transform: rotate(-6deg); }
.sticker.s4 { background: var(--orange); color: var(--ink); bottom: 14%; right: 8%; transform: rotate(4deg); }
.sticker.s5 { background: var(--cream); color: var(--ink); top: 52%; left: 38%; transform: rotate(-3deg); }
.sticker.s6 { background: var(--ink); color: var(--yellow); top: 38%; right: 24%; transform: rotate(2deg); font-size: 14px; padding: 8px 14px; }

.sticker.dragging { box-shadow: 6px 6px 0 var(--ink); z-index: 10; }

.mascot {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 140px; height: 140px;
  pointer-events: none;
}
.mascot svg { width: 100%; height: 100%; }
.mascot .pupil { transform-origin: center; }

/* ticker */
.ticker {
  margin: 30px auto 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: var(--ink);
  color: var(--yellow);
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--display);
  font-size: 32px;
  letter-spacing: 0.04em;
  padding: 12px 0;
  text-transform: uppercase;
}
.ticker .track {
  display: inline-block;
  animation: scroll 30s linear infinite;
  padding-left: 100%;
}
.ticker .track > span { padding: 0 24px; }
.ticker .track > span.acc { color: var(--tomato); }
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* sections */
.sec {
  padding: 100px 28px;
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
}
.sec-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 34px;
  gap: 24px;
  flex-wrap: wrap;
}
.sec-head h2 {
  font-family: var(--display);
  font-size: clamp(44px, 6vw, 92px);
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: -0.015em;
}
.sec-head h2 .acc { color: var(--tomato); }
.sec-head .lbl {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--cream);
  padding: 6px 12px;
  border-radius: 999px;
}

/* PROJECT TABLE — physics-throwable cards live ABOVE this */
.projects {
  background: var(--ink);
  color: var(--cream);
  padding: 80px 28px 100px;
  position: relative;
  overflow: hidden;
}
.projects .sec {
  padding: 0;
}
.projects .sec-head h2 { color: var(--cream); }
.projects .sec-head h2 .acc { color: var(--yellow); }
.projects .sec-head .lbl { background: var(--yellow); color: var(--ink); }
.projects .sec-head .help {
  font-family: var(--mono); font-size: 12px; color: var(--paper);
  letter-spacing: 0.06em; text-transform: uppercase;
}

.physics-zone {
  position: relative;
  height: 580px;
  border: 2.5px dashed rgba(255, 246, 236, 0.3);
  border-radius: 28px;
  margin: 24px auto 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,59,47,0.15) 0%, transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(255,212,0,0.10) 0%, transparent 40%);
}
.physics-zone .hint {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 12px;
  background: var(--cream);
  color: var(--ink);
  padding: 6px 14px;
  border-radius: 999px;
  letter-spacing: 0.06em;
  z-index: 1;
  pointer-events: none;
  animation: bob 2s ease-in-out infinite;
}
.physics-zone .reset {
  position: absolute; top: 18px; right: 18px;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  z-index: 5;
  cursor: none;
}

.proj-card {
  position: absolute;
  width: 280px;
  border: 2.5px solid var(--ink);
  border-radius: 18px;
  padding: 18px 20px;
  font-family: var(--body);
  user-select: none;
  cursor: none;
  box-shadow: 5px 5px 0 var(--ink);
  transition: box-shadow 0.15s ease;
  will-change: transform;
}
.proj-card.dragging { box-shadow: 10px 10px 0 var(--ink); z-index: 20; }
.proj-card .tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--cream);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
}
.proj-card h3 {
  font-family: var(--display);
  font-size: 24px;
  line-height: 1;
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.proj-card p {
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 12px;
}
.proj-card .open {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 1px;
}
.proj-card.c1 { background: var(--tomato); color: var(--cream); top: 60px; left: 10%; transform: rotate(-4deg); z-index: 4; }
.proj-card.c1 .tag { background: var(--cream); color: var(--ink); }
.proj-card.c2 { background: var(--yellow); color: var(--ink); top: 90px; left: 38%; transform: rotate(3deg); z-index: 4; }
.proj-card.c3 { background: var(--pink); color: var(--cream); top: 50px; right: 12%; transform: rotate(-2deg); z-index: 4; }
.proj-card.c3 .tag { background: var(--cream); color: var(--ink); }
.proj-card.c4 { background: var(--cream); color: var(--ink); top: 320px; left: 18%; transform: rotate(2deg); width: 240px; z-index: 2; }
.proj-card.c5 { background: var(--orange); color: var(--ink); top: 340px; right: 22%; transform: rotate(-3deg); width: 240px; z-index: 2; }
.proj-card.c6 { background: var(--pink); color: var(--cream); top: 230px; left: 41%; transform: rotate(4deg); width: 260px; z-index: 5; }
.proj-card.c6 .tag { background: var(--cream); color: var(--ink); }
.proj-card.c7 { background: var(--ink); color: var(--cream); top: 180px; right: 4%; transform: rotate(-3deg); width: 270px; z-index: 5; }
.proj-card.c7 .tag { background: var(--tomato); color: var(--cream); border: 1px solid var(--cream); }
.proj-card.c7 .open { color: var(--tomato); border-bottom-color: var(--tomato); }

/* NUMBERS — bento with hover surprises */
.numbers-sec { background: var(--paper); padding: 100px 28px; }
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 180px;
  gap: 16px;
  max-width: 1400px;
  margin: 0 auto;
}
.tile {
  border: 2.5px solid var(--ink);
  border-radius: 24px;
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  cursor: none;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.2s cubic-bezier(.34,1.56,.64,1), box-shadow 0.2s ease;
}
.tile:hover { transform: translate(-3px, -3px) rotate(-0.6deg); box-shadow: 9px 9px 0 var(--ink); }
.tile .lbl {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; opacity: 0.85;
}
.tile .num {
  font-family: var(--display);
  font-size: 64px; line-height: 0.85;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.tile .desc { font-size: 13px; line-height: 1.35; }
.tile.t1 { background: var(--tomato); color: var(--cream); grid-column: span 2; grid-row: span 2; }
.tile.t1 .num { font-size: 130px; }
.tile.t2 { background: var(--yellow); color: var(--ink); grid-column: span 2; }
.tile.t3 { background: var(--ink); color: var(--cream); }
.tile.t4 { background: var(--pink); color: var(--cream); }
.tile.t5 { background: var(--orange); color: var(--ink); grid-column: span 2; }
.tile.t6 { background: var(--cream); color: var(--ink); }

/* tile playful background motifs */
.tile .motif {
  position: absolute;
  pointer-events: none;
  transition: transform 0.4s ease;
}
.tile:hover .motif { transform: rotate(20deg) scale(1.15); }

/* PRINCIPLES — flippable */
.principles { background: var(--cream); padding: 100px 28px; }
.flip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 1400px;
  margin: 0 auto;
}
.flip {
  perspective: 1200px;
  height: 280px;
  cursor: none;
}
.flip-inner {
  position: relative; width: 100%; height: 100%;
  transition: transform 0.7s cubic-bezier(.34,1.56,.64,1);
  transform-style: preserve-3d;
}
.flip.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute; inset: 0;
  border: 2.5px solid var(--ink);
  border-radius: 24px;
  padding: 24px;
  backface-visibility: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 4px 4px 0 var(--ink);
}
.flip-face.back { transform: rotateY(180deg); }
.flip-face .num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.flip-face h3 {
  font-family: var(--display);
  font-size: 28px;
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.flip-face p { font-size: 14px; line-height: 1.45; }
.flip-face .hint {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; opacity: 0.7;
}
.flip:nth-child(1) .flip-face.front { background: var(--tomato); color: var(--cream); }
.flip:nth-child(1) .flip-face.back  { background: var(--cream); color: var(--ink); }
.flip:nth-child(2) .flip-face.front { background: var(--yellow); color: var(--ink); }
.flip:nth-child(2) .flip-face.back  { background: var(--ink); color: var(--cream); }
.flip:nth-child(3) .flip-face.front { background: var(--pink); color: var(--cream); }
.flip:nth-child(3) .flip-face.back  { background: var(--cream); color: var(--ink); }
.flip:nth-child(4) .flip-face.front { background: var(--orange); color: var(--ink); }
.flip:nth-child(4) .flip-face.back  { background: var(--ink); color: var(--cream); }

/* CONTACT */
.contact {
  padding: 120px 28px 80px;
  background: var(--tomato);
  color: var(--cream);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.contact h2 {
  font-family: var(--display);
  font-size: clamp(52px, 9vw, 132px);
  line-height: 1.0;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}
.contact h2 span { display: inline-block; transition: transform 0.3s ease; }
.contact h2 span:hover { transform: translateY(-12px) rotate(-6deg) scale(1.1); color: var(--yellow); }
.contact-cta {
  display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: center;
  margin-top: 18px;
}
.contact .btn { background: var(--cream); color: var(--ink); border-color: var(--ink); }
.contact .btn:hover { background: var(--yellow); }
.contact-meta {
  font-family: var(--mono);
  font-size: 13px;
  margin-top: 60px;
  letter-spacing: 0.06em;
  opacity: 0.85;
}

/* footer */
footer {
  background: var(--ink);
  color: var(--cream);
  padding: 30px 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
footer a { border-bottom: 1px solid var(--cream); padding-bottom: 1px; }

/* particle / confetti container */
.particles {
  position: fixed; inset: 0; pointer-events: none; z-index: 95;
}
.spark-bit {
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 2px;
  pointer-events: none;
}

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.34,1.56,.64,1); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ─── Height-aware tweaks for laptop viewports ─── */
@media (max-height: 900px) and (min-width: 900px) {
  .hero { padding: 90px 28px 50px; }
  .hero-grid { gap: 24px; }
  .hero-left h1 { font-size: clamp(40px, 6.4vw, 88px); line-height: 0.92; margin-bottom: 14px; }
  .hero-sub { font-size: 15px; line-height: 1.4; margin-bottom: 20px; max-width: 480px; }
  .desk-cta { margin-top: 18px; gap: 10px; }
  .hero-right { height: 440px; }
  .ticker { font-size: 26px; padding: 10px 0; margin-top: 22px; }
}

@media (max-height: 760px) and (min-width: 900px) {
  .hero { padding: 80px 24px 40px; }
  .hero-left h1 { font-size: clamp(36px, 5.4vw, 64px); line-height: 0.94; margin-bottom: 12px; }
  .hero-sub { font-size: 14px; margin-bottom: 16px; }
  .hero-right { height: 380px; }
  .btn { padding: 11px 16px; font-size: 12px; }
  .ticker { font-size: 22px; padding: 8px 0; }
}

@media (max-width: 900px) {
  body { cursor: auto; }
  .cursor-dot, .cursor-ring, .cursor-label { display: none; }
  button, a { cursor: pointer; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-right { height: 360px; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile.t1, .tile.t2, .tile.t5 { grid-column: span 2; }
  .flip-grid { grid-template-columns: 1fr 1fr; }
  .physics-zone { height: 700px; }
  .proj-card { width: 240px; }
  .nav { padding: 12px 14px; }
}
