/* ==========================================================================
   components.css — buttons, cards, project cards, mock UIs, forms,
   modal, Felix AI launcher + panel
   ========================================================================== */

/* ==========================================================================
   buttons — Apple pills
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 11px 22px;
  border-radius: var(--pill);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -.012em;
  transition: background .22s var(--ease), transform .22s var(--ease),
              border-color .22s var(--ease), color .22s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: scale(.985); }
.btn .ico { width: 16px; height: 16px; }

.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-hover); transform: scale(1.015); }

.btn--ghost {
  background: transparent;
  color: var(--blue);
  border: 1px solid rgba(0, 113, 227, .4);
}
.btn--ghost:hover { background: rgba(0, 113, 227, .06); }

/* on the dark panels the ghost button flips to the light-on-dark treatment */
.approach .btn--ghost,
.contact .btn--ghost,
.hero .btn--ghost,
.mobnav .btn--ghost {
  color: var(--on-dark);
  background: rgba(255, 255, 255, .08);
  border-color: var(--hair-d2);
}
.approach .btn--ghost:hover,
.contact .btn--ghost:hover,
.hero .btn--ghost:hover { background: rgba(255, 255, 255, .14); }

.mobnav .btn--ghost {
  color: var(--ink);
  background: var(--paper-2);
  border-color: var(--hair);
}

.btn--lg { min-height: 50px; padding: 14px 26px; font-size: 17px; }
.btn--sm { min-height: 40px; padding: 9px 17px; font-size: 14px; }

.btn--sm .ico { width: 14px; height: 14px; }

/* text link with the Apple chevron */
.quiet-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  font-size: 17px;
  letter-spacing: -.012em;
  color: var(--blue);
}
.quiet-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.quiet-link .ico { width: 15px; height: 15px; }

.arr { transition: transform .28s var(--ease); }
.btn:hover .arr, .quiet-link:hover .arr { transform: translateX(3px); }
.down { transition: transform .28s var(--ease); }
.btn:hover .down, .quiet-link:hover .down { transform: translateY(2px); }

/* ==========================================================================
   badges
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  letter-spacing: -.008em;
}

/* ==========================================================================
   cards
   ========================================================================== */

.card {
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}

.card--lift {
  transition: transform .4s var(--ease), box-shadow .4s var(--ease),
              border-color .4s var(--ease);
}
.card--lift:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lift);
  border-color: var(--hair-2);
}

/* ==========================================================================
   service tiles
   ========================================================================== */

.svc {
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  padding: 32px 26px;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease),
              border-color .4s var(--ease);
}
.svc:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lift);
  border-color: var(--hair-2);
}

.svc__icon {
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  background: var(--paper-2);
  color: var(--ink);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}
.svc__icon svg { width: 22px; height: 22px; }

.svc__title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.016em;
  line-height: 1.2;
  margin-bottom: 8px;
}
.svc__desc {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.44;
  letter-spacing: -.008em;
}

/* ==========================================================================
   project cards
   ========================================================================== */

.pcard {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease),
              border-color .45s var(--ease);
}
.pcard[data-href] { cursor: pointer; }
.pcard:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lift);
  border-color: var(--hair-2);
}

.pcard__body { padding: 30px 30px 0; display: flex; gap: 16px; }
.pcard__text { flex: 1; min-width: 0; }

.pcard__kicker {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: .02em;
  text-transform: uppercase;
  margin-bottom: 9px;
}

.pcard__title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.12;
  margin-bottom: 6px;
}
.pcard__title a { color: inherit; }
.pcard__title a:hover { color: var(--blue); }
.pcard__title--lg { font-size: clamp(30px, 3.4vw, 40px); }

.pcard__type {
  font-size: 14px;
  color: var(--ink-3);
  margin-bottom: 10px;
  letter-spacing: -.006em;
}

.pcard__desc {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.45;
  letter-spacing: -.008em;
  max-width: 46ch;
}
.pcard__desc--lg { font-size: 17px; line-height: 1.47; }

.pcard__points {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.pcard__points li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.45;
  letter-spacing: -.008em;
}
.pcard__points li::before {
  content: "";
  position: absolute;
  left: 2px; top: 9px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #c7c7cc;
}

.pcard__tags { margin-top: 16px; }

.pcard__cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 20px;
  font-size: 17px;
  color: var(--blue);
  letter-spacing: -.012em;
}
.pcard:hover .pcard__cta .arr { transform: translateX(3px); }

.pcard__chip {
  position: absolute;
  top: 22px; right: 22px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2);
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--hair);
  padding: 5px 10px;
  border-radius: var(--pill);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.arrow-btn {
  width: 38px; height: 38px;
  flex: none;
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--ink-2);
  display: grid;
  place-items: center;
  align-self: flex-start;
  transition: background .28s var(--ease), color .28s var(--ease),
              transform .28s var(--ease);
}
.pcard:hover .arrow-btn { background: var(--blue); color: #fff; transform: translateX(2px); }
.arrow-btn .ico { width: 16px; height: 16px; }

/* ---- featured project: the full-width product panel ---- */

.pcard--feature {
  border: 0;
  background: none;
  box-shadow: none;
  text-align: center;
  overflow: visible;
  margin-bottom: 56px;
}
.pcard--feature:hover { transform: none; box-shadow: none; }

.pcard--feature .pcard__body {
  padding: 0;
  order: -1;
  justify-content: center;
}
.pcard--feature .pcard__text { max-width: 660px; }
.pcard--feature .pcard__desc,
.pcard--feature .pcard__points { margin-inline: auto; text-align: left; }
.pcard--feature .pcard__desc { text-align: center; max-width: 620px; }
.pcard--feature .pcard__kicker { color: var(--blue); font-size: 19px; text-transform: none; letter-spacing: -.014em; }
.pcard--feature .pcard__points { max-width: 520px; }
.pcard--feature .pcard__tags { justify-content: center; }
.pcard--feature .tag-row { justify-content: center; }

.pcard--feature .pcard__shot {
  margin-top: 44px;
  background: linear-gradient(180deg, var(--paper-2) 0%, var(--paper-3) 100%);
  border-radius: var(--r-xl);
  padding: 56px 24px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  position: relative;
}
.pcard--feature .pcard__chip { top: 26px; right: 26px; }

/* ---- shots ---- */

.pcard__shot {
  margin-top: auto;
  padding: 26px 24px 30px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

/* device renders already carry their own rounded bezel and drop shadow in
   the alpha channel, so no border-radius or box-shadow is added on top.
   Sized on BOTH axes: the source files differ slightly in aspect, so pinning
   width alone would leave their heights mismatched in the same row. */
.shot--device { display: contents; }

.device {
  width: 172px;
  height: 356px;  /* 172 x 2.0696 = 356 — matches the normalised asset aspect */
  flex: 0 0 auto;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, .16));
}
.pcard--feature .device {
  width: 264px;
  height: 546px;
  filter: drop-shadow(0 22px 40px rgba(0, 0, 0, .18));
}

/* ==========================================================================
   mock UI panels (cards without a device render)
   ========================================================================== */

.shot {
  margin: auto 30px 30px;
  border-radius: var(--r-md);
  background: var(--paper-2);
  border: 1px solid var(--hair);
  padding: 14px;
  width: calc(100% - 60px);
}
.pcard--feature .shot { margin: 44px 0 0; width: 100%; border: 0; padding: 56px 24px; }

/* `margin-top:auto` pins to the card floor but collapses to zero when the
   card has no slack, so the gap above lives on the text block instead. */
.pcard__body { padding-bottom: 26px; }
.pcard--feature .pcard__body { padding-bottom: 0; }

.ui { display: block; }

.ui__bar {
  display: flex;
  gap: 5px;
  align-items: center;
  margin-bottom: 12px;
}
.ui__bar i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #d2d2d7;
  display: block;
}
.ui__bar span {
  margin-left: 8px;
  font-size: 11px;
  color: var(--ink-3);
}

/* event / attendance mock */
.ev { display: flex; flex-direction: column; gap: 8px; }
.ev__step {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: 11px;
  padding: 10px 12px;
}
.ev__step i {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--ink-2);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-style: normal;
  flex: none;
}
.ev__step.live i { background: var(--blue); color: #fff; }
.ev__step b {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -.008em;
}
.ev__step span { font-size: 11px; color: var(--ink-3); }

.ev__stats { display: flex; gap: 8px; }
.ev__stats > div {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: 9px;
  padding: 8px;
  text-align: center;
}
.ev__stats b { display: block; font-size: 12px; font-weight: 600; }
.ev__stats span { font-size: 10px; color: var(--ink-3); }

/* POS mock */
.pos { display: flex; flex-direction: column; gap: 8px; }
.pos__tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pos__tiles i {
  height: 34px;
  border-radius: 9px;
  background: var(--card);
  border: 1px solid var(--hair);
  display: block;
}
.pos__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: 11px;
  padding: 12px 14px;
}
.pos__total span { font-size: 11px; color: var(--ink-3); }
.pos__total b { font-size: 15px; font-weight: 600; letter-spacing: -.014em; }
.pos__pay { display: flex; gap: 8px; }
.pos__pay span {
  flex: 1;
  font-size: 11px;
  color: var(--ink-3);
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: 8px;
  padding: 7px;
  text-align: center;
}

/* shop mock */
.shop { display: flex; flex-direction: column; gap: 8px; }
.shop__nav {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: 9px;
  padding: 8px 10px;
}
.shop__nav i {
  height: 7px;
  flex: 1;
  border-radius: 4px;
  background: var(--paper-3);
  display: block;
}
.shop__nav i.logo { flex: none; width: 22px; height: 12px; border-radius: 4px; background: #c7c7cc; }
.shop__nav i.cart { flex: none; width: 12px; height: 12px; border-radius: 4px; background: var(--blue); }
.shop__hero {
  height: 54px;
  border-radius: 11px;
  background: linear-gradient(120deg, var(--paper-3), #dfdfe3);
}
.shop__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.shop__grid i {
  height: 34px;
  border-radius: 9px;
  background: var(--card);
  border: 1px solid var(--hair);
  display: block;
}

/* ==========================================================================
   skill cards
   ========================================================================== */

.skillcard { padding: 26px; }

.skillcard__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.skillcard__icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--paper-2);
  color: var(--ink);
  display: grid;
  place-items: center;
  flex: none;
}
.skillcard__icon svg { width: 17px; height: 17px; }
.skillcard__title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.012em;
  flex: 1;
}
.skillcard__count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
}

/* ==========================================================================
   timeline / experience
   ========================================================================== */

.tl-item__card {
  padding: 34px;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  grid-template-rows: auto auto auto auto auto;
  column-gap: 32px;
  row-gap: 0;
}

.tl-item__meta {
  grid-column: 1;
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.tl-item__role { grid-column: 2; grid-row: 1; }
.tl-item__org  { grid-column: 2; grid-row: 2; }
.tl-item__list  { grid-column: 2; grid-row: 3; }
.tl-item__scope { grid-column: 2; grid-row: 4; }
.tl-item__foot  { grid-column: 2; grid-row: 5; }
.tl-item__period { font-size: 13px; color: var(--ink-3); letter-spacing: -.004em; }
.tl-item__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--blue);
  background: rgba(0, 113, 227, .08);
  padding: 4px 10px;
  border-radius: var(--pill);
}

.tl-item__role {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.018em;
  margin-bottom: 4px;
}
.tl-item__org {
  font-size: 15px;
  color: var(--ink-2);
  margin-bottom: 18px;
}
.tl-item__org span { color: var(--ink-3); font-size: 13px; display: block; margin-top: 2px; }

.tl-item__list { display: flex; flex-direction: column; gap: 9px; }
.tl-item__list li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.45;
  letter-spacing: -.008em;
}
.tl-item__list li::before {
  content: "";
  position: absolute;
  left: 2px; top: 9px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #c7c7cc;
}

/* the secondary areas of the role.
   Kept out of the main bullet list on purpose: as one 15-item list the entry
   turned into a CV page. Three short labelled columns hold the same detail but
   stay scannable, and each column is a heading a reader can skip by. */
.tl-item__scope {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--hair);
}

.scope__title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}

.scope__list { display: flex; flex-direction: column; gap: 8px; }
.scope__list li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  line-height: 1.42;
  letter-spacing: -.006em;
  color: var(--ink-2);
}
.scope__list li::before {
  content: "";
  position: absolute;
  left: 2px; top: 8px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #c7c7cc;
}

.tl-item__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--hair);
}
.tl-item__foot .mono { margin-right: 4px; flex: none; }
/* seventeen tags no longer sit on one line, so the label gets its own row and
   the pills wrap as a block rather than indenting awkwardly around it */
.tl-item--now .tl-item__foot { align-items: flex-start; }
.tl-item--now .tl-item__foot .mono { width: 100%; margin-bottom: 4px; }

/* ==========================================================================
   contact links
   ========================================================================== */

.clink {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--hair-d);
  transition: padding-left .28s var(--ease);
}
.clink:hover { padding-left: 10px; }

.clink__icon {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .07);
  color: var(--on-dark);
  display: grid;
  place-items: center;
  flex: none;
}
.clink__icon svg { width: 18px; height: 18px; }

.clink__text { flex: 1; min-width: 0; }
.clink__name {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--on-dark-2);
  letter-spacing: .02em;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.clink__val {
  display: block;
  font-size: 15px;
  color: #fff;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}
.clink__chev { color: var(--on-dark-2); flex: none; }
.clink__chev svg { width: 16px; height: 16px; }

/* ==========================================================================
   form
   ========================================================================== */

.form {
  padding: 34px;
  background: var(--card);
  color: var(--ink);
}

.form__title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.018em;
  margin-bottom: 6px;
}
.form__hint {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.45;
  margin-bottom: 24px;
}

.field { margin-bottom: 16px; }
.field__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
  letter-spacing: -.006em;
}
.label i { color: var(--blue); font-style: normal; }

.input {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--paper-2);
  border: 1px solid transparent;
  color: var(--ink);
  font-size: 16px;
  letter-spacing: -.01em;
  transition: border-color .22s var(--ease), background .22s var(--ease);
}
.input::placeholder { color: #a1a1a6; }
.input:focus {
  outline: none;
  background: var(--card);
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, .12);
}
textarea.input { min-height: 128px; resize: vertical; line-height: 1.5; }

.select-wrap { position: relative; }
.select-wrap select.input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
}
.select__chev {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  pointer-events: none;
  color: var(--ink-3);
}

.form__submit { width: 100%; margin-top: 6px; }
.form__submit[data-state="sent"] { background: var(--green); color: #0b2e16; }
.form__submit[data-state="error"] { background: #ff3b30; color: #fff; }
.form__submit:disabled { opacity: .75; cursor: default; }

.form__status {
  margin-top: 12px;
  font-size: 13px;
  min-height: 18px;
  color: var(--ink-2);
}
.form__status[data-tone="error"] { color: #d70015; }
.form__status[data-tone="ok"] { color: #1a7f37; }

/* ==========================================================================
   modal
   ========================================================================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, .4);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.modal.open { opacity: 1; }

.modal__box {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 36px 32px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  transform: scale(.94);
  transition: transform .34s var(--ease);
}
.modal.open .modal__box { transform: none; }

.modal__icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(48, 209, 88, .14);
  color: #1a7f37;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
}
.modal__box h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.018em;
  margin-bottom: 8px;
}
.modal__box p {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.47;
  margin-bottom: 22px;
}

/* ==========================================================================
   Felix AI — launcher + panel
   ========================================================================== */

.ai-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 10px;
  border-radius: var(--pill);
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--hair);
  color: var(--ink);
  box-shadow: 0 12px 34px -14px rgba(0, 0, 0, .3);
  transition: transform .3s var(--ease), opacity .3s var(--ease),
              background .22s var(--ease);
}
.ai-launcher:hover {
  transform: translateY(-2px) scale(1.02);
  background: #fff;
  border-color: var(--hair-2);
}
.ai-launcher.is-tucked {
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(.94);
}

.ai-launcher__orb {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
}
.ai-mark-icon { width: 24px; height: 24px; }

.ai-launcher__label {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.24;
  text-align: left;
  letter-spacing: -.006em;
}

/* status dot in ink rather than green, to keep the launcher monochrome */
.ai-launcher__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ink);
  opacity: .35;
  flex: none;
}

/* panel */
.ai-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 85;
  width: min(392px, calc(100vw - 32px));
  max-height: min(620px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  background: rgba(251, 251, 253, .92);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  box-shadow: 0 28px 70px -24px rgba(0, 0, 0, .42);
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(.97);
  transform-origin: bottom right;
  transition: opacity .34s var(--ease), transform .34s var(--ease);
}
.ai-panel.open { opacity: 1; transform: none; }

.ai-panel__head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--hair);
  flex: none;
}
.ai-panel__orb {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
}
.ai-panel__head > div { flex: 1; min-width: 0; }
.ai-panel__title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.012em;
}
.ai-panel__sub { font-size: 12px; color: var(--ink-3); }
.ai-panel__close {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink-2);
  flex: none;
  transition: background .22s var(--ease), color .22s var(--ease);
}
.ai-panel__close:hover { background: var(--paper-2); color: var(--ink); }

.ai-scope {
  padding: 11px 18px;
  font-size: 11.5px;
  line-height: 1.42;
  color: var(--ink-2);
  background: var(--paper-2);
  border-bottom: 1px solid var(--hair);
  flex: none;
}
.ai-scope b { color: var(--ink); font-weight: 600; }

.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 180px;
  overscroll-behavior: contain;
}

.ai-msg {
  max-width: 86%;
  padding: 11px 14px;
  border-radius: 18px;
  font-size: 14.5px;
  line-height: 1.47;
  letter-spacing: -.008em;
  word-wrap: break-word;
}
.ai-msg.user {
  align-self: flex-end;
  background: var(--blue);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.ai-msg.bot {
  align-self: flex-start;
  background: var(--card);
  border: 1px solid var(--hair);
  color: var(--ink);
  border-bottom-left-radius: 6px;
}
.ai-msg.bot.notice { background: #fff8e6; border-color: #f0d79a; }
.ai-msg.bot.scope { background: var(--paper-2); color: var(--ink-2); }

.ai-msg p + p { margin-top: 9px; }
.ai-msg ul, .ai-msg ol { margin: 9px 0 0; padding-left: 18px; }
.ai-msg ul li { list-style: disc; margin-bottom: 5px; }
.ai-msg ol li { list-style: decimal; margin-bottom: 5px; }
.ai-msg a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.ai-msg.user a { color: #fff; }
.ai-msg code {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--paper-2);
  padding: 2px 5px;
  border-radius: 5px;
}
.ai-msg.user code { background: rgba(255, 255, 255, .22); }

.ai-thinking { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); }
.ai-typing { display: inline-flex; gap: 3px; }
.ai-typing i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ink-3);
  display: block;
  animation: aiblink 1.3s var(--ease) infinite;
}
.ai-typing i:nth-child(2) { animation-delay: .16s; }
.ai-typing i:nth-child(3) { animation-delay: .32s; }
@keyframes aiblink {
  0%, 60%, 100% { opacity: .28; transform: translateY(0); }
  30%           { opacity: 1;  transform: translateY(-3px); }
}

.ai-quick {
  display: flex;
  gap: 7px;
  padding: 0 18px 12px;
  overflow-x: auto;
  flex: none;
  scrollbar-width: none;
}
.ai-quick::-webkit-scrollbar { display: none; }
.ai-quick button {
  font-size: 12px;
  white-space: nowrap;
  color: var(--ink-2);
  background: var(--card);
  border: 1px solid var(--hair);
  padding: 7px 13px;
  border-radius: var(--pill);
  transition: border-color .22s var(--ease), color .22s var(--ease);
}
.ai-quick button:hover:not(:disabled) { color: var(--ink); border-color: var(--hair-2); }
.ai-quick button:disabled { opacity: .5; cursor: default; }

.ai-form {
  display: flex;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--hair);
  flex: none;
}
.ai-input {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: var(--pill);
  background: var(--card);
  border: 1px solid var(--hair);
  font-size: 15px;
  letter-spacing: -.01em;
}
.ai-input::placeholder { color: #a1a1a6; }
.ai-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, .12);
}
.ai-input:disabled { opacity: .6; }

.ai-send {
  width: 42px; height: 42px;
  flex: none;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  transition: background .22s var(--ease), transform .22s var(--ease);
}
.ai-send:hover:not(:disabled) { background: var(--blue-hover); transform: scale(1.04); }
.ai-send:disabled { opacity: .5; cursor: default; }

.ai-foot {
  padding: 0 18px 14px;
  font-size: 11px;
  color: var(--ink-3);
  text-align: center;
  flex: none;
}

/* ==========================================================================
   modifiers
   ========================================================================== */

.form__submit-label { pointer-events: none; }

/* the widest capability card gets a tinted surface rather than extra size,
   so the four-column rhythm is preserved */
.skillcard--feature { background: var(--paper-2); }

/* per-project tint on the featured product plinth */
.pcard__shot:has(.shot--device-violet) { background-image: radial-gradient(70% 90% at 50% 0%, rgba(88, 86, 214, .10), transparent 70%); }
.pcard__shot:has(.shot--device-pink)   { background-image: radial-gradient(70% 90% at 50% 0%, rgba(255, 55, 95, .09), transparent 70%); }
.pcard__shot:has(.shot--device-blue)   { background-image: radial-gradient(70% 90% at 50% 0%, rgba(0, 113, 227, .09), transparent 70%); }
