@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@500;600&display=swap');
/* "Ask about Felix" widget. Source of truth: job-machine/chat/web/chat.css
 * (build_portfolio.py copies it to resume-ds/chat/).
 *
 * One node, two states, set by data-state on .fjc:
 *   hero    inline in the hero under "View Work"; latest exchange only
 *   docked  fixed bar at the bottom; data-open="1" expands it into a sheet
 * Colors come from the site's tokens so the widget recolors with the picker.
 *
 * The site has global element rules (testimonials.css makes every <button>
 * absolutely positioned at the left middle of its container, with 40px
 * padding). The widget resets what it needs on its own elements with
 * !important and leaves the site's CSS alone. */

.fjc {
  --fjc-accent: var(--sysPrimaryDefault, #4faad1);
  --fjc-btn: var(--button-color, var(--sysPrimaryDefault, #4faad1));
  --fjc-on-btn: var(--OnprimaryText, #fff);
  --fjc-glass: var(--glass, rgba(24, 24, 24, 0.6));
  --fjc-text: var(--text-glass, inherit);
  --fjc-line: var(--line, rgba(127, 127, 127, 0.3));
  --fjc-shadow: 2px 6px 8px 2px rgba(0, 0, 0, 0.33);
  --fjc-field: rgba(127, 127, 127, 0.14);
  pointer-events: auto !important;   /* .hero-content disables pointer events */
  font-family: inherit;
  font-size: inherit;
  line-height: 1.5;
  text-align: left;
}
.fjc *, .fjc *::before, .fjc *::after { box-sizing: border-box; min-width: 0; }
.fjc, .fjc-slot { max-width: 100%; min-width: 0; }
.fjc [hidden] { display: none !important; }

/* ---- resets against the site's global element rules ---------------------- */
.fjc button {
  position: static !important; top: auto !important; left: auto !important; right: auto !important;
  transform: none !important; width: auto !important; height: auto !important; padding: 0 !important;
  margin: 0 !important; z-index: auto !important; background: transparent !important; border: 0 !important;
  color: inherit !important; font: inherit !important; line-height: 1.3 !important; opacity: 1 !important;
  cursor: pointer !important; transition: none !important; box-shadow: none !important;
}
.fjc svg { fill: none !important; display: block; }
.fjc textarea { position: static !important; margin: 0 !important; width: auto !important; }
.fjc p { width: auto !important; max-width: none !important; }

/* ---- shared pieces ------------------------------------------------------- */
.fjc-badge {
  display: inline-block; flex: 0 0 auto; font-size: 0.7em; font-weight: 600; letter-spacing: 0.06em;
  padding: 0.1em 0.45em; border-radius: 999px; border: 1px solid currentColor; opacity: 0.7; line-height: 1.4;
}
/* Speech bubbles: the assistant's are glass with an AI badge; the visitor's take the button color. */
.fjc-thread { display: flex; flex-direction: column; gap: 0.5em; }
.fjc-msg { display: flex; gap: 0.5em; align-items: flex-start; max-width: 88%; }
.fjc-msg.fjc-folded { display: none; }
.fjc-bot {
  align-self: flex-start; background: var(--fjc-glass); color: var(--fjc-text);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--fjc-line); border-radius: 18px 18px 18px 4px; padding: 0.7em 0.95em;
  box-shadow: var(--fjc-shadow);
}
.fjc-bot .fjc-badge { margin-top: 0.3em; }
.fjc-user {
  align-self: flex-end; color: inherit;
  background: rgba(127, 127, 127, 0.18);
  background: color-mix(in srgb, var(--fjc-accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--fjc-accent) 35%, transparent);
  border-radius: 18px 18px 4px 18px; padding: 0.6em 0.95em;
}
/* Handwritten "for <Company>?" after the h1, on application links and company pages. */
/* The h1 paints its gradient through its own glyphs; a transformed child inherits the
   transparent fill but not that paint, so the span paints its own gradient. */
/* An annotation on the heading, not part of it: a pen font, ink-colored, a
   slight tilt. It paints its own color because the h1 fills its text with a
   gradient that transformed children do not inherit. The font is loaded by the
   @import at the top of this sheet, so the homepage markup needs no change. */
.fjc-for {
  display: inline-block; position: relative; z-index: 3; white-space: nowrap; max-width: 100%;
  font-family: 'Caveat', 'Permanent Marker', cursive; font-weight: 600; letter-spacing: 0.01em;
  font-size: 0.72em; line-height: 1; transform: rotate(-2deg);
  margin-left: 0.15em; vertical-align: 0.06em;
  background: none; -webkit-background-clip: border-box; background-clip: border-box;
  color: var(--button-color, #4faad1); -webkit-text-fill-color: var(--button-color, #4faad1);
}
.fjc-body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fjc-body p { margin: 0 0 0.5em !important; }
.fjc-body p:last-child { margin: 0 !important; }
.fjc-body a { color: inherit; text-decoration: underline; }
.fjc-note { font-size: 0.8em; opacity: 0.6; padding-left: 0.4em; }
.fjc-card {
  display: inline-flex; align-items: center; gap: 0.4em; margin: 0.5em 0.5em 0 0; padding: 0.4em 0.8em;
  border-radius: 0.6em; border: 1px solid var(--fjc-line); background: var(--fjc-field);
  color: inherit; font-size: 0.9em; text-decoration: none !important;
}
.fjc-card:hover { border-color: var(--fjc-accent); }
.fjc-dots { display: inline-flex; gap: 4px; height: 1.5em; align-items: center; }
.fjc-dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.35; animation: fjc-blink 1.1s infinite; }
.fjc-dots i:nth-child(2) { animation-delay: 0.18s; }
.fjc-dots i:nth-child(3) { animation-delay: 0.36s; }
.fjc button.fjc-earlier {
  align-self: flex-start; opacity: 0.6 !important; font-size: 0.8em !important;
  margin: 0 0 0.4em 0.4em !important; text-decoration: underline;
}

.fjc-form { display: flex; align-items: flex-end; gap: 0.5em; }
.fjc-form textarea {
  flex: 1 1 auto !important; min-width: 0; resize: none; min-height: 2.6em; max-height: 120px;
  border: 1px solid var(--fjc-line); background: var(--fjc-field); color: inherit;
  border-radius: 0.7em; padding: 0.55em 0.8em; font: inherit; font-weight: 300; line-height: 1.4; outline: none;
}
.fjc-form textarea::placeholder { color: inherit; opacity: 0.55; }
.fjc-form textarea:focus { border-color: var(--fjc-accent); }
.fjc button.fjc-send {
  flex: 0 0 2.6em; width: 2.6em !important; height: 2.6em !important; border-radius: 0.7em;
  background: var(--fjc-btn) !important; color: var(--fjc-on-btn) !important;
  display: grid; place-items: center;
}
.fjc button.fjc-send svg { width: 1.2em; height: 1.2em; stroke: currentColor; }
.fjc button.fjc-send:disabled { opacity: 0.5 !important; cursor: default !important; }

/* ---- hero state ---------------------------------------------------------- */
.fjc-slot { width: 80%; margin-top: 1.4em; }
.fjc[data-state="hero"] .fjc-bar { display: none; }
.fjc[data-state="hero"] .fjc-thread { max-height: 40vh; overflow-y: auto; margin-bottom: 0.9em; padding: 4px; }
.fjc[data-state="hero"] .fjc-thread:empty { display: none; }

/* ---- docked state -------------------------------------------------------- */
html.fjc-docked-page { scroll-padding-bottom: 120px; }
html.fjc-docked-page body { padding-bottom: 110px; }
.fjc[data-state="docked"] {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 9000;
  width: min(720px, calc(100vw - 24px)); font-size: 0.95rem;
  background: var(--fjc-glass); color: var(--fjc-text);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--fjc-line); border-radius: 18px; box-shadow: var(--fjc-shadow);
  padding: 0.6em 0.8em 0.7em;
}
.fjc[data-state="docked"] .fjc-bar { display: flex; align-items: center; gap: 0.6em; padding: 0.2em 0.2em 0.5em; }
.fjc button.fjc-bar-text {
  flex: 1 1 auto; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-weight: 300 !important;
}
.fjc button.fjc-toggle {
  flex: 0 0 2em; width: 2em !important; height: 2em !important; opacity: 0.7 !important;
  display: grid; place-items: center; transition: transform 0.2s ease !important;
}
.fjc button.fjc-toggle svg { width: 1.2em; height: 1.2em; stroke: currentColor; }
.fjc[data-state="docked"][data-open="1"] button.fjc-toggle { transform: rotate(180deg) !important; }
.fjc[data-state="docked"] .fjc-earlier { display: none !important; }
.fjc[data-state="docked"] .fjc-thread { display: none; }
.fjc[data-state="docked"] .fjc-bot { background: var(--fjc-field); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
.fjc[data-state="docked"][data-open="1"] .fjc-bar-text { display: none; }
.fjc[data-state="docked"][data-open="1"] .fjc-thread {
  display: flex; max-height: min(50vh, 460px); overflow-y: auto; padding: 0.2em 0.2em 0.6em; margin-bottom: 0.4em;
}
.fjc[data-state="docked"][data-open="1"] .fjc-msg.fjc-folded { display: flex; }

.fjc-flash { outline: 3px solid var(--fjc-accent); outline-offset: 6px; transition: outline-color 1.5s ease; }
.fjc-flash.fjc-flash-out { outline-color: transparent; }

@keyframes fjc-blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

@media (max-width: 767px) {
  .fjc-slot { width: 100%; }
  .fjc-msg { max-width: 100%; }
  .fjc-form textarea { width: 100%; }
  .fjc-for { display: inline; white-space: normal; transform: none; }
  .fjc[data-state="docked"] { left: 8px; right: 8px; bottom: 8px; width: auto; transform: none; padding: 0.5em 0.6em 0.6em; }
  .fjc[data-state="docked"][data-open="1"] .fjc-thread { max-height: 60vh; }
}
@media (prefers-reduced-motion: reduce) {
  .fjc button.fjc-toggle { transition: none !important; }
}
