/* ---------------------------------------------------------------------------
   Harsh Joshi personal brand tokens
   Poppins SemiBold headings · Inter body · gold #BF9B30 · badge strip header
--------------------------------------------------------------------------- */

:root {
  --ink: #1b1b1f;
  --paper: #f3f1eb;
  --surface: #ffffff;
  --gold: #bf9b30;
  --gold-deep: #97781f;
  --muted: #6f6a5e;
  --line: #e4e0d4;
  --radius: 16px;
  --head-h: 64px;
  --col: 720px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  height: 100%;
}

/* Signature: the gold badge strip from the CV design system */
.badge-strip {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold) 35%, #dfc06a 65%, var(--gold));
  z-index: 30;
}

/* ------------------------------ Header ---------------------------------- */

.site-head {
  position: fixed;
  top: 5px; left: 0; right: 0;
  height: var(--head-h);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 max(16px, calc((100% - var(--col)) / 2));
  z-index: 20;
}

.mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--gold);
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.03em;
  display: grid;
  place-items: center;
  flex: none;
}

.ident { min-width: 0; }

.name {
  margin: 0;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 17px;
  line-height: 1.2;
}

.role {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.links {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

.links a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--ink);
  transition: color 0.15s, background 0.15s;
}

.links a:hover { color: var(--gold-deep); background: var(--paper); }

/* ------------------------------- Chat ----------------------------------- */

.chat-wrap {
  max-width: var(--col);
  margin: 0 auto;
  padding: calc(var(--head-h) + 5px + 20px) 16px 170px;
}

.intro { padding: 28px 4px 8px; }

.eyebrow {
  margin: 0 0 10px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.intro h1 {
  margin: 0 0 10px;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: clamp(24px, 5.4vw, 34px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  max-width: 18ch;
}

.lede {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 15px;
  max-width: 52ch;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  font: 500 13.5px/1.2 "Inter", sans-serif;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, transform 0.15s;
}

.chip:hover {
  border-color: var(--gold);
  color: var(--gold-deep);
  transform: translateY(-1px);
}

.chips.hidden { display: none; }

/* Messages */

.msg {
  max-width: 85%;
  margin: 14px 0;
  padding: 12px 16px;
  border-radius: var(--radius);
  white-space: pre-wrap;
  overflow-wrap: break-word;
  font-size: 15px;
}

.msg.user {
  margin-left: auto;
  background: var(--ink);
  color: #f7f4ec;
  border-bottom-right-radius: 6px;
}

.msg.assistant {
  margin-right: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
}

.msg.error {
  margin-right: auto;
  background: #fdf3f2;
  border: 1px solid #eccfcb;
  color: #7c3a30;
  font-size: 14px;
}

/* Typing indicator */

.dots { display: inline-flex; gap: 5px; padding: 4px 0; }

.dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 1.2s ease-in-out infinite;
}

.dots span:nth-child(2) { animation-delay: 0.15s; }
.dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes pulse {
  0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* ----------------------------- Composer --------------------------------- */

.composer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(180deg, rgba(243, 241, 235, 0), var(--paper) 26%);
  padding: 26px max(16px, calc((100% - var(--col)) / 2))
           calc(12px + env(safe-area-inset-bottom));
  z-index: 20;
}

.inputwrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 8px 8px 8px 16px;
  box-shadow: 0 6px 24px rgba(27, 27, 31, 0.07);
  transition: border-color 0.15s;
}

.inputwrap:focus-within { border-color: var(--gold); }

#input {
  flex: 1;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  font: 400 15px/1.5 "Inter", sans-serif;
  color: var(--ink);
  padding: 6px 0;
  max-height: 140px;
}

#input::placeholder { color: #a29d90; }

#send {
  flex: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

#send:hover:not(:disabled) { background: var(--gold-deep); }
#send:active:not(:disabled) { transform: scale(0.95); }
#send:disabled { background: var(--line); color: #b6b1a4; cursor: default; }

.fineprint {
  margin: 10px 4px 0;
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
}

.fineprint a { color: var(--gold-deep); text-decoration: none; }
.fineprint a:hover { text-decoration: underline; }

/* -------------------------- Accessibility ------------------------------- */

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

@media (max-width: 480px) {
  .msg { max-width: 92%; }
  .chat-wrap { padding-bottom: 160px; }
}
