/* Bhaavye Bawa — playful plain portfolio
   Tokens: warm paper, ink, one highlighter yellow. Flat colors, no shadows, no gradients. */
:root {
  --paper: #f6f1e5;
  --surface: #fffdf7;
  --ink: #1d1b16;
  --muted: #6b6455;
  --accent: #f2c230;
  --line: rgba(29, 27, 22, 0.14);
  --font-display: "Shantell Sans", "Comic Sans MS", cursive;
  --font-body: "Instrument Sans", system-ui, sans-serif;
  --r-lg: 22px;
  --r-md: 14px;
  --r-pill: 999px;
  --spring: cubic-bezier(0.34, 1.7, 0.5, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}
.wrap { max-width: 680px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 8vw, 4rem); margin: 14px 0 20px; }
h2 { font-size: clamp(1.6rem, 5vw, 2.1rem); margin: 10px 0 12px; }
h3 { font-size: 1.05rem; margin: 0 0 4px; }
p { margin: 0 0 14px; }
a { color: inherit; }
sup { font-size: 0.7em; }

/* header */
.top { border-bottom: 1px solid var(--line); background: var(--paper); }
.top__bar { display: flex; align-items: center; gap: 18px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; text-decoration: none; }
.brand__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--ink); }
.top__nav { display: flex; gap: 14px; margin-left: auto; font-size: 15px; }
.top__nav a { text-decoration: none; color: var(--muted); }
.top__nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* buttons: pill, springy lift */
.btn {
  display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: 15px;
  padding: 10px 20px; border-radius: var(--r-pill); text-decoration: none; border: 2px solid var(--ink);
  transition: transform 0.38s var(--spring), background-color 0.18s ease, color 0.18s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(0); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: #000; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--surface); }
.btn--yellow { background: var(--accent); color: var(--ink); }
.btn--yellow:hover { background: #ffd34d; }

/* tag stickers */
.tag {
  display: inline-block; background: var(--accent); color: var(--ink);
  font-family: var(--font-display); font-weight: 500; font-size: 13px; line-height: 1;
  padding: 7px 12px; border-radius: var(--r-pill); border: 2px solid var(--ink);
  transform: rotate(-2deg); margin: 0;
}
.tag:hover { transform: rotate(1.5deg); transition: transform 0.3s var(--spring); }

/* hero */
.hero { padding: 72px 20px 40px; }
.hl { position: relative; white-space: nowrap; }
.squiggle { position: absolute; left: -1%; bottom: -0.18em; width: 102%; height: 0.24em; overflow: visible; }
.squiggle path {
  fill: none; stroke: var(--accent); stroke-width: 8; stroke-linecap: round;
  stroke-dasharray: 420; stroke-dashoffset: 420; animation: draw 0.9s ease-out 0.6s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.bubble {
  position: relative; display: inline-block; background: var(--surface);
  border: 2px solid var(--ink); border-radius: var(--r-lg); padding: 14px 18px; max-width: 46ch;
}
.bubble::after {
  content: ""; position: absolute; left: 30px; bottom: -12px; width: 0; height: 0;
  border-left: 14px solid var(--ink); border-bottom: 13px solid transparent;
}
.bubble::before {
  content: ""; position: absolute; left: 32px; bottom: -8px; width: 0; height: 0; z-index: 1;
  border-left: 11px solid var(--surface); border-bottom: 10px solid transparent;
}
.bubble p { margin: 0; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0 30px; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin: 0; border-top: 1px solid var(--line); }
.facts > div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: 13px; color: var(--muted); margin: 0; }
.facts dd { margin: 2px 0 0; font-weight: 600; }

/* chat demo */
.demo { padding: 26px 20px 8px; }
.chat { display: grid; gap: 10px; max-width: 520px; }
.chat__q, .chat__a { border: 2px solid var(--ink); border-radius: var(--r-lg); padding: 10px 16px; }
.chat__q { background: var(--surface); border-bottom-left-radius: 4px; justify-self: end; max-width: 80%; }
.chat__a { background: var(--accent); border-bottom-right-radius: 4px; max-width: 92%; }
.chat__q p, .chat__a p { margin: 0; }
.demo__note { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* sections */
.block { padding: 56px 20px 8px; }
.block > p { max-width: 56ch; color: var(--muted); }
.block h2 + p { color: var(--muted); }
.block__cta { margin: 20px 0 8px; }

.about { display: grid; gap: 20px; margin-top: 18px; }
.about__photo { margin: 0; position: relative; }
.about__photo::before {
  content: ""; position: absolute; top: -10px; left: 24px; width: 78px; height: 22px;
  background: var(--accent); opacity: 0.95; border-radius: 3px; transform: rotate(-4deg); z-index: 2;
}
.about__photo img { display: block; width: 100%; border-radius: var(--r-lg); border: 2px solid var(--ink); }

/* rows */
.rows { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--line); }
.rows li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 18px;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.rows li span { font-weight: 600; }
.rows li small { display: block; font-weight: 400; color: var(--muted); font-size: 13.5px; }
.rows li b { font-family: var(--font-display); font-weight: 700; white-space: nowrap; }

.engines { font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }

/* faq */
.faq { margin-top: 8px; border-top: 1px solid var(--line); }
.faq__item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.faq__item p { margin: 0; color: var(--muted); font-size: 15.5px; max-width: 58ch; }

/* form */
.form { display: grid; gap: 14px; max-width: 460px; margin-top: 18px; }
.field { display: grid; gap: 5px; }
.field label { font-weight: 600; font-size: 14.5px; }
.field input, .field textarea {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 2px solid var(--ink); border-radius: var(--r-md); padding: 10px 12px; width: 100%;
}
.field input:focus, .field textarea:focus { outline: 3px solid var(--accent); outline-offset: 1px; }
.form__note { font-size: 13px; color: var(--muted); margin: 0; }

/* footer */
.foot { margin-top: 72px; background: var(--ink); color: var(--paper); }
.foot .wrap { padding-top: 48px; padding-bottom: 32px; }
.foot__big { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.8rem, 6vw, 2.6rem); margin: 0 0 6px; }
.foot__lead { color: #cfc8b8; margin-bottom: 18px; }
.foot__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 20px; margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(246, 241, 229, 0.2); }
.foot__grid h3 { font-size: 13px; text-transform: none; color: #cfc8b8; margin-bottom: 8px; }
.foot__grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14.5px; }
.foot__grid a { color: var(--paper); text-decoration: none; }
.foot__grid a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot .brand { color: var(--paper); }
.foot__lede { color: #cfc8b8; font-size: 14.5px; margin-top: 10px; max-width: 30ch; }
.footnotes { margin: 28px 0 0; padding-left: 20px; font-size: 12.5px; color: #a89f8c; display: grid; gap: 4px; }
.foot__legal { font-size: 12.5px; color: #a89f8c; margin: 18px 0 0; }

/* entrance: one staggered rise */
[data-rise] { opacity: 0; transform: translateY(14px); animation: rise 0.6s var(--spring) forwards; }
[data-rise]:nth-of-type(2) { animation-delay: 0.08s; }
.hero [data-rise]:nth-child(2) { animation-delay: 0.05s; }
.hero [data-rise]:nth-child(3) { animation-delay: 0.15s; }
.hero [data-rise]:nth-child(4) { animation-delay: 0.25s; }
.hero [data-rise]:nth-child(5) { animation-delay: 0.35s; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }
.tag[data-rise] { animation-name: rise-tag; }
@keyframes rise-tag {
  from { opacity: 0; transform: translateY(14px) rotate(-2deg); }
  to { opacity: 1; transform: translateY(0) rotate(-2deg); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-rise] { animation: none; opacity: 1; transform: none; }
  .squiggle path { animation: none; stroke-dashoffset: 0; }
  .btn, .btn:hover, .btn:active, .tag, .tag:hover { transition: none; transform: none; }
}

@media (max-width: 560px) {
  .top__nav { display: none; }
  .top__bar .btn { margin-left: auto; }
  .facts { grid-template-columns: 1fr 1fr; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .rows li { flex-direction: column; gap: 2px; }
}

/* ---- full-width playful layer ---- */
html, body { overflow-x: clip; }
.wrap { max-width: 1180px; padding-left: 24px; padding-right: 24px; }
h1 { font-size: clamp(2.8rem, 9vw, 6.2rem); }
.hero { padding-top: 96px; }

/* slanted marquee band */
.band {
  background: var(--accent); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  width: 100vw; margin: 40px 0 6px calc(50% - 50vw); transform: rotate(-1.2deg) scale(1.04); overflow: hidden;
}
.band__track { display: inline-flex; white-space: nowrap; animation: slide 22s linear infinite; will-change: transform; }
.band__track span { font-family: var(--font-display); font-weight: 700; font-size: clamp(20px, 3.2vw, 32px); padding: 12px 0; }
@keyframes slide { to { transform: translateX(-50%); } }

/* giant outlined backdrop word per section */
.block { position: relative; padding-top: 84px; }
.bigword {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 100vw; text-align: center; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(90px, 21vw, 300px); line-height: 1; color: transparent;
  -webkit-text-stroke: 2px rgba(29, 27, 22, 0.09);
  pointer-events: none; user-select: none;
}
.block > :not(.bigword) { position: relative; z-index: 1; }

/* full-bleed ink quote band */
.quote { background: var(--ink); color: var(--paper); margin-top: 84px; padding: 96px 0; }
.quote__text {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.7rem, 4.6vw, 3.2rem); line-height: 1.25; max-width: 22ch; margin: 0;
}
.quote mark { background: var(--accent); color: var(--ink); padding: 0 0.14em; border-radius: 6px; }

/* typing cursor in the chat demo */
.typing::after {
  content: ""; display: inline-block; width: 0.55em; height: 1em; margin-left: 3px;
  background: var(--ink); vertical-align: -0.12em; animation: blink 0.8s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* accordion faq */
.faq { border-top: 1px solid var(--line); }
details.faq__item { padding: 0; border-bottom: 1px solid var(--line); }
details.faq__item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; padding: 16px 0;
}
details.faq__item summary::-webkit-details-marker { display: none; }
details.faq__item summary::after {
  content: "+"; font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 1;
  transition: transform 0.3s var(--spring); flex: none;
}
details.faq__item[open] summary::after { transform: rotate(45deg); }
details.faq__item summary:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
details.faq__item p { margin: 0 0 16px; color: var(--muted); font-size: 15.5px; max-width: 58ch; }

/* wider grids on desktop */
@media (min-width: 760px) {
  .facts { grid-template-columns: repeat(4, 1fr); }
  .faq { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; align-items: start; }
}
@media (min-width: 900px) {
  .about { grid-template-columns: 5fr 7fr; align-items: start; }
}
.foot__big { font-size: clamp(2.6rem, 10vw, 7rem); }

@media (prefers-reduced-motion: reduce) {
  .band__track { animation: none; }
  .typing::after { animation: none; }
  details.faq__item summary::after { transition: none; }
}

/* chat demo: centered and enlarged */
.demo { padding-top: 64px; padding-bottom: 24px; text-align: center; }
.chat { margin: 0 auto; max-width: 780px; text-align: left; gap: 16px; }
.chat__q, .chat__a { padding: 18px 24px; border-radius: 26px; }
.chat__q p, .chat__a p { font-size: clamp(17px, 2.4vw, 23px); line-height: 1.45; }
.chat__q { max-width: 75%; }
.chat__a { max-width: 92%; }
.demo__note { text-align: center; font-size: 14px; }

/* ---- framed panels everywhere + chat window ---- */
.panel {
  background: var(--surface); border: 2px solid var(--ink);
  border-radius: var(--r-lg); padding: 10px 24px 24px; margin-top: 20px;
}
.panel .rows { border-top: 0; margin-top: 6px; }
.panel .faq { border-top: 0; }
.panel .form { margin-top: 10px; }
.panel .about { margin-top: 10px; }
.panel .engines { border-top: 1px solid var(--line); }

/* chat window: title bar like a browser tab, bubbles flat inside */
.demo { text-align: left; padding-bottom: 24px; }
.chatwin__bar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 2px 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line);
}
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); opacity: 0.22; }
.dots i:nth-child(2) { opacity: 0.45; }
.dots i:nth-child(3) { opacity: 0.75; }
.chatwin__url {
  font-size: 13px; color: var(--muted); background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r-pill); padding: 3px 14px;
}
.chatwin .chat { margin: 0; max-width: none; gap: 14px; }
.chatwin .chat__q, .chatwin .chat__a { border: none; }
.chatwin .chat__q { background: var(--paper); }
.chatwin .chat__a { background: var(--accent); }
.demo__note { text-align: left; }

@media (max-width: 560px) {
  .panel { padding: 6px 16px 18px; }
}

/* ---- bigger small text, tighter about ---- */
.rows li span { font-size: 17px; }
.rows li small { font-size: 15px; }
.rows li b { font-size: 17px; }
details.faq__item summary h3 { font-size: 1.15rem; }
details.faq__item p { font-size: 16.5px; }
.engines { font-size: 15px; }
.footnotes, .foot__legal { font-size: 13.5px; }
.facts dt { font-size: 14px; }
.facts dd { font-size: 17px; }
.tag { font-size: 14px; }
.form__note { font-size: 14px; }
@media (min-width: 900px) {
  .about { grid-template-columns: 4fr 8fr; }
}

/* ---- about section: photo matches rows height, no dead space ---- */
.about { align-items: stretch; }
.about__photo { height: 100%; min-height: 180px; }
.about__photo img { height: 100%; min-height: 180px; object-fit: cover; }
.rows li { padding: 11px 0; }
@media (max-width: 899px) {
  .about__photo, .about__photo img { min-height: 0; height: 230px; }
}

/* ---- about: text-only ---- */
.about__bio { max-width: 56ch; margin: 8px 0 12px; font-size: 17.5px; }
.rows li b a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.rows li b a:hover { background: var(--accent); text-decoration: none; }
