/* Shared foundation for the iterations. Carries the live site's look:
   navy mountain backdrop, warm paper cards, dark glass chat, mono type. */

@font-face {
  font-family: "CodeNewRoman";
  src: url("../../code_new_roman/Code New Roman.woff") format("woff"), url("../../code_new_roman/Code New Roman.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: "CodeNewRoman";
  src: url("../../code_new_roman/Code New Roman b.woff") format("woff"), url("../../code_new_roman/Code New Roman b.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
}

:root {
  --white: #ffffff;
  --soft-white: rgba(255, 255, 255, 0.72);
  --faint-white: rgba(255, 255, 255, 0.42);
  --navy-deep: rgba(8, 15, 24, 0.72);
  --ink: #3d3d3d;
  --ink-soft: #5c5448;
  --ink-faint: #9e8f7a;
  --ink-navy: #263f5d;
  --curve: 4px;
  --sans: "SF Pro Display", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "CodeNewRoman", "Courier New", Courier, monospace;
  --ease: cubic-bezier(0.2, 0.9, 0.2, 1);
  /* the assistant's light: each iteration tunes these */
  --a1: #7fd4ff;
  --a2: #a48bff;
  --a3: #ff8fc4;
  --a4: #ffc27a;
  --accent: var(--a1);
  color-scheme: dark;
}

@media (hover: hover) and (pointer: fine) {
  body, a, button, [role="button"], input { cursor: url("../../cursor-plus.svg") 6 4, default !important; }
}

/* shown only when a page is opened without its stylesheet (a static file preview) */
.static-note { display: none !important; }

* { box-sizing: border-box; }
html { min-height: 100%; }

body {
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  color: var(--white);
  font-family: var(--mono);
  background:
    linear-gradient(180deg, rgba(7, 14, 22, 0.16), rgba(7, 14, 22, 0.74)),
    url("../../background.jpeg") center center / cover no-repeat fixed,
    #0b121d;
}
body::before,
body::after { position: fixed; inset: 0; pointer-events: none; content: ""; }
body::before {
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at center, black 0 38%, transparent 74%);
}
body::after {
  z-index: 1;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.1), transparent 26%),
    linear-gradient(180deg, transparent, var(--navy-deep));
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; color: inherit; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── layout ─────────────────────────────────────────────────────────────── */
.stage { position: relative; z-index: 2; min-height: 100svh; padding: clamp(16px, 2.2vw, 28px); }
.portfolio-layout {
  --pane-h: calc(100svh - clamp(32px, 4.4vw, 56px));
  height: var(--pane-h);
  display: grid;
  grid-template-columns: minmax(0, 60%) minmax(360px, 40%);
  gap: clamp(20px, 3vw, 42px);
}
.content-pane { min-width: 0; height: var(--pane-h); overflow: hidden; }
.content-page {
  position: relative;
  height: 100%;
  overflow-y: auto;
  padding: clamp(14px, 2vw, 24px);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: var(--curve);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.018)), rgba(8, 15, 24, 0.2);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.1), inset 0 1px rgba(255, 255, 255, 0.8);
  scrollbar-color: rgba(0, 0, 0, 0.18) transparent;
  scrollbar-width: thin;
}

/* ── paper sections ─────────────────────────────────────────────────────── */
.portfolio-section {
  padding: clamp(14px, 2.4vw, 30px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--curve);
  background: rgba(255, 255, 255, 0.32);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  transform: scale(0.988);
  transform-origin: center top;
  transition: border-color 420ms ease, background 420ms ease, box-shadow 420ms ease, transform 420ms ease;
}
.portfolio-section + .portfolio-section { margin-top: 16px; }
.portfolio-section.is-active {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.09);
  transform: scale(1);
}
.section-kicker {
  display: block;
  margin-bottom: 14px;
  color: var(--ink-faint);
  font: 600 0.72rem var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.portfolio-section h1,
.portfolio-section h2 {
  margin: 0;
  color: var(--ink);
  font: 600 clamp(1.8rem, 3.4vw, 3.4rem) / 0.96 var(--sans);
  letter-spacing: -0.03em;
}
.portfolio-section h3 { margin: 6px 0 0; color: var(--ink); font: 600 1rem var(--sans); letter-spacing: -0.01em; }
.portfolio-section p { max-width: 64ch; margin-top: 16px; color: var(--ink-soft); line-height: 1.58; }

.overview-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, 0.5fr); gap: clamp(18px, 3vw, 34px); align-items: stretch; }
.overview-copy { align-self: center; }
.overview-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 14px; }
.overview-meta-item { display: inline-flex; align-items: center; gap: 5px; color: #7a7060; font-size: 0.8rem; font-weight: 500; }
.overview-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.overview-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.7);
  color: #2a2a2a;
  font-size: 0.84rem;
  font-weight: 560;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.overview-btn--ghost { background: rgba(255, 255, 255, 0.28); color: #46505c; border-color: rgba(0, 0, 0, 0.12); }
.overview-btn:hover { transform: translateY(-1px); background: #fff; border-color: rgba(0, 0, 0, 0.34); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08); }
.portrait-panel {
  min-height: 300px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 6px;
  background: #d8d2c8;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1), inset 0 1px rgba(255, 255, 255, 0.5);
}
.portrait-panel img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 50% 15%; filter: grayscale(1) contrast(1.08) brightness(1.04); }

.timeline { display: grid; gap: 12px; margin-top: 20px; }
.timeline article,
.skill-layout article {
  padding: 16px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: var(--curve);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.03);
  transition: background 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
}
.timeline article span { color: var(--ink-faint); font-size: 0.76rem; }
.timeline article h3 .job-role { color: var(--ink-navy); }
.timeline article p { margin-top: 10px; font-size: 0.92rem; }
.timeline-company-header > p { margin-top: 2px; color: #867967; font-size: 0.78rem; }
.timeline-role-list { margin-top: 14px; padding-left: 18px; border-left: 1.5px solid rgba(58, 88, 122, 0.28); display: grid; gap: 16px; }
.timeline-role { position: relative; border-radius: 3px; transition: background 300ms ease, box-shadow 300ms ease; }
.timeline-role::before {
  position: absolute;
  left: -24.5px;
  top: 3px;
  width: 9px;
  height: 9px;
  border: 2px solid #3a587a;
  border-radius: 50%;
  background: #f2eee7;
  content: "";
}
.timeline-role h4 { margin: 2px 0 0; color: var(--ink-navy); font: 700 0.95rem var(--sans); }
.timeline-role p { margin-top: 6px; }

.skill-layout { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.skill-layout article { min-height: 180px; padding: 18px; }
.skill-layout article > span { color: var(--ink); font-weight: 700; letter-spacing: -0.01em; }
.skill-layout article p { margin-top: 14px; font-size: 0.9rem; }
.tool-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tool-chips i {
  padding: 4px 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-style: normal;
}

/* ── projects ───────────────────────────────────────────────────────────── */
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 22px; align-items: start; }
.project-card {
  position: relative;
  min-height: 330px;
  padding: 12px;
  display: grid;
  grid-template-rows: 160px auto auto 1fr;
  gap: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--curve);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  color: #1a1410;
  text-align: left;
  overflow: hidden;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 240ms ease, transform 240ms var(--ease);
}
.project-card:hover { border-color: rgba(0, 0, 0, 0.18); background: rgba(255, 255, 255, 0.92); box-shadow: 0 10px 34px rgba(0, 0, 0, 0.12); transform: translateY(-2px); }
.project-card:focus-visible { outline: 2px solid rgba(61, 61, 61, 0.42); outline-offset: 3px; }
.project-card.is-more { display: none; }
.project-grid.show-more .project-card.is-more { display: grid; }
.project-visual {
  position: relative;
  display: block;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 3px;
  background: #e2ddd6 center / cover no-repeat;
  filter: grayscale(0.5) sepia(0.16) saturate(0.62) contrast(0.92) brightness(1.06);
  transition: filter 420ms ease;
  overflow: hidden;
}
.project-card:hover .project-visual,
.project-card.is-expanded .project-visual,
.project-card.is-cited .project-visual { filter: none; }
.project-card strong { display: block; color: var(--ink); font: 650 1.08rem var(--sans); letter-spacing: -0.025em; }
.project-meta { display: block; color: #7a6e62; font-size: 0.72rem; letter-spacing: 0.11em; text-transform: uppercase; }
.project-summary { display: block; color: #7a6e62; font-size: 0.9rem; line-height: 1.45; }
.project-meta-developing { color: #2a6ab5; animation: metaGlow 2.8s ease-in-out infinite; }
@keyframes metaGlow { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; text-shadow: 0 0 8px rgba(42, 106, 181, 0.45); } }

.project-detail { display: none; }
.project-card.is-expanded { grid-column: 1 / -1; order: -1; grid-template-rows: clamp(200px, 30vw, 340px) auto auto auto auto; background: rgba(255, 255, 255, 0.96); transform: none; }
.project-card.is-expanded strong { font-size: 1.7rem; }
.project-card.is-expanded .project-detail { display: grid; gap: 14px; animation: rise 520ms var(--ease) both; }
.project-detail p { margin: 0; max-width: 70ch; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.6; }
.project-detail .project-tagline { color: var(--ink-navy); font: 600 1.02rem var(--sans); }
.project-detail ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.project-detail li { position: relative; padding-left: 18px; color: var(--ink-soft); font-size: 0.88rem; line-height: 1.5; }
.project-detail li::before { position: absolute; left: 0; color: var(--ink-faint); content: "+"; }
.project-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.project-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid rgba(0, 0, 0, 0.08); border-radius: 3px; background: #e2ddd6; }
.project-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border: 1px solid rgba(61, 61, 61, 0.24);
  border-radius: 4px;
  background: rgba(61, 61, 61, 0.06);
  color: var(--ink);
  font-size: 0.78rem;
  transition: background 180ms ease, transform 180ms ease, border-color 180ms ease;
}
.chip-btn:hover { background: rgba(61, 61, 61, 0.12); border-color: rgba(61, 61, 61, 0.4); transform: translateY(-1px); }
.chip-btn--quiet { border-color: transparent; background: none; color: var(--ink-faint); }
.projects-footer { display: flex; justify-content: flex-end; margin-top: 12px; }
.explore-more-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid rgba(61, 61, 61, 0.22); border-radius: 6px; background: rgba(61, 61, 61, 0.07); color: var(--ink); font-size: 0.78rem; transition: background 180ms ease, transform 180ms ease; }
.explore-more-btn:hover { background: rgba(61, 61, 61, 0.12); transform: translateY(-1px); }
.explore-more-btn.is-hidden { display: none; }

/* ── chat pane ──────────────────────────────────────────────────────────── */
.chat-pane { position: relative; min-width: 0; min-height: 0; height: 100%; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 18px; }
.quiet-header { display: flex; align-items: center; gap: 14px; min-height: 28px; animation: floatIn 700ms var(--ease) both; }
.quiet-header .brand { color: rgba(255, 255, 255, 0.78); font: 500 0.92rem var(--sans); letter-spacing: 0.02em; white-space: nowrap; }
.iter-nav { display: flex; gap: 2px; margin-left: auto; padding: 2px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 5px; background: rgba(8, 15, 24, 0.28); backdrop-filter: blur(14px); }
.iter-nav a { padding: 4px 9px; border-radius: 3px; color: var(--faint-white); font-size: 0.7rem; letter-spacing: 0.04em; white-space: nowrap; transition: color 180ms ease, background 180ms ease; }
.iter-nav a b { font-weight: 400; opacity: 0.6; }
.iter-nav a:hover { color: var(--white); }
.iter-nav a.is-current { background: rgba(255, 255, 255, 0.14); color: var(--white); }
.header-tools { display: flex; align-items: center; gap: 6px; }
.sound-btn,
.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  background: rgba(8, 15, 24, 0.28);
  color: var(--soft-white);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  backdrop-filter: blur(14px);
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}
.sound-btn:hover,
.tool-btn:hover { border-color: rgba(255, 255, 255, 0.36); color: var(--white); }
.tool-btn[aria-pressed="true"] { background: rgba(255, 255, 255, 0.16); color: var(--white); border-color: rgba(255, 255, 255, 0.34); }
.sound-bars { display: inline-flex; align-items: center; gap: 2px; height: 12px; }
.sound-bars i { width: 2px; height: 3px; border-radius: 1px; background: currentColor; opacity: 0.5; }
.sound-on .sound-bars i { opacity: 0.7; }
.sound-on.sound-live .sound-bars i { opacity: 1; animation: bars 1.1s ease-in-out infinite; }
.sound-on.sound-live .sound-bars i:nth-child(2) { animation-delay: -0.4s; }
.sound-on.sound-live .sound-bars i:nth-child(3) { animation-delay: -0.75s; }
.sound-on.sound-live .sound-bars i:nth-child(4) { animation-delay: -0.2s; }
@keyframes bars { 0%, 100% { height: 3px; } 50% { height: 12px; } }

.assistant-shell { position: relative; min-height: 0; height: 100%; display: flex; flex-direction: column; gap: 8px; animation: floatIn 860ms 90ms var(--ease) both; }
.message-stream { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-color: rgba(255, 255, 255, 0.28) transparent; scrollbar-width: thin; padding-bottom: 4px; }
.message-row { width: 100%; display: flex; align-items: flex-start; }
.message-row.assistant { justify-content: flex-start; padding-right: clamp(18px, 4vw, 54px); }
.message-row.user { justify-content: flex-end; padding-left: clamp(18px, 5vw, 64px); }
.message {
  width: fit-content;
  max-width: min(86%, 520px);
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--curve);
  font-size: 0.92rem;
  line-height: 1.5;
  backdrop-filter: blur(22px) saturate(112%);
  animation: rise 320ms var(--ease) both;
}
.message.assistant {
  position: relative;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035)), rgba(23, 35, 49, 0.16);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.2), inset 0 1px rgba(255, 255, 255, 0.22);
}
.message.user {
  max-width: min(76%, 420px);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.1)), rgba(23, 35, 49, 0.34);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.2);
}

/* streamed words resolve out of blur */
/* inline, so punctuation never wraps away from its word */
.message-body .w { animation: wordIn 460ms var(--ease) both; }
.message-body .w.b { font-weight: 700; }
.message-body .bullet { color: var(--faint-white); }
.message-body .para-gap { display: block; height: 0.6em; }
@keyframes wordIn { from { opacity: 0; filter: blur(7px); } }

/* a name the assistant said that exists on the page */
.ent {
  display: inline;
  margin: 0 -2px;
  padding: 1px 4px;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  border: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--a1) 26%, transparent), color-mix(in srgb, var(--a2) 26%, transparent));
  box-shadow: inset 0 -1px color-mix(in srgb, var(--a1) 80%, transparent);
  color: var(--white);
  font-weight: 700;
  animation: entIn 700ms var(--ease) both;
  transition: background 200ms ease, box-shadow 200ms ease;
}
.ent:hover { background: linear-gradient(90deg, color-mix(in srgb, var(--a1) 50%, transparent), color-mix(in srgb, var(--a3) 50%, transparent)); box-shadow: inset 0 -1px var(--white), 0 0 18px color-mix(in srgb, var(--a2) 60%, transparent); }
@keyframes entIn { from { opacity: 0; filter: blur(8px); box-shadow: 0 0 26px var(--a1); } }

.msg-meta { margin-top: 12px; padding-top: 9px; border-top: 1px solid rgba(255, 255, 255, 0.1); color: var(--faint-white); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; animation: rise 500ms var(--ease) both; }

/* thinking: a short, truthful trace of what the client is doing */
.trace { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: var(--curve); background: rgba(8, 15, 24, 0.3); backdrop-filter: blur(18px); font-size: 0.72rem; letter-spacing: 0.04em; min-width: 220px; }
.trace-line { display: grid; grid-template-columns: 74px 1fr; gap: 10px; animation: traceIn 360ms var(--ease) both; }
.trace-k { color: var(--faint-white); text-transform: uppercase; }
.trace-v { color: var(--soft-white); }
/* the line being worked on carries a slow pass of light instead of a blinking cursor */
.trace-line:last-child .trace-v { background: linear-gradient(90deg, var(--soft-white) 30%, var(--white) 46%, var(--accent) 52%, var(--soft-white) 70%) 0 0 / 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: traceSweep 1.6s linear infinite; }
@keyframes traceSweep { to { background-position: -220% 0; } }
.aura-mark { flex: none; display: inline-block; width: 18px; height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--a3), var(--a2), var(--a1), var(--am, var(--a3)), var(--ag, var(--a4)), var(--a1), var(--a2), var(--a3)) 0 0 / 300% 100%; opacity: 0.85; animation: auraFlow 7s linear infinite; }
@keyframes auraFlow { to { background-position: -300% 0; } }
@keyframes traceIn { from { opacity: 0; transform: translateX(-8px); filter: blur(4px); } }
@keyframes caret { 50% { opacity: 0; } }

.suggested-prompts { display: flex; flex-wrap: wrap; gap: 6px; }
.suggested-prompt {
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--soft-white);
  font-size: 0.74rem;
  backdrop-filter: blur(14px);
  animation: rise 420ms calc(var(--i, 0) * 70ms) var(--ease) both;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}
/* Controls that lift on hover keep a little invisible margin, so lifting does
   not move them out from under a cursor resting on their edge (which made them
   flicker, and replay their hover sound without end). */
.suggested-prompt, .ghost-btn, .more-btn, .chip-btn { position: relative; }
.suggested-prompt::after, .ghost-btn::after, .more-btn::after, .chip-btn::after { content: ""; position: absolute; inset: -3px -1px; }
.suggested-prompt:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.42); color: var(--white); transform: translateY(-1px); }

.composer {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--curve);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.025)), rgba(8, 15, 24, 0.22);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3), inset 0 1px rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(22px) saturate(112%);
  transition: border-color 220ms ease, box-shadow 220ms ease;
}
.composer:focus-within { border-color: rgba(255, 255, 255, 0.5); }
.composer input { min-width: 0; height: 40px; padding: 0 10px; border: 0; outline: 0; background: transparent; color: var(--white); font-size: 0.94rem; }
.composer input::placeholder { color: var(--faint-white); }
.composer .mic-btn,
.composer .send-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--curve);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.16);
  color: var(--white);
  transition: background 180ms ease, border-color 180ms ease, opacity 180ms ease, transform 180ms ease;
}
.composer .mic-btn:hover,
.composer .send-btn:hover { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.4); }
.composer .mic-btn.is-unsupported { display: none; }
.composer .mic-btn.is-listening { background: var(--white); color: #172331; animation: micPulse 1.1s ease-in-out infinite; }
@keyframes micPulse { 50% { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.12); } }
.composer .send-btn { opacity: 0.4; }
.composer .send-btn.is-ready { opacity: 1; }
.send-btn .stop-icon { display: none; font-size: 0.7rem; }
.is-busy .send-btn .send-icon { display: none; }
.is-busy .send-btn .stop-icon { display: block; }

/* what the assistant can see you looking at */
.context-chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  background: rgba(8, 15, 24, 0.36);
  color: var(--soft-white);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  backdrop-filter: blur(16px);
  animation: rise 360ms var(--ease) both;
  transition: border-color 180ms ease, background 180ms ease;
}
.context-chip[hidden] { display: none; }
.context-chip:hover { border-color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.1); }
.context-chip b { color: var(--white); }
.context-chip em { display: inline-flex; align-items: center; gap: 5px; padding-left: 9px; border-left: 1px solid rgba(255, 255, 255, 0.18); color: var(--white); font-style: normal; }

/* default "the assistant is pointing at this" state */
.is-cited { animation: cited 4.6s ease both; }
@keyframes cited {
  0%, 70% { background: rgba(255, 255, 255, 0.98); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--a2) 70%, transparent), 0 14px 44px color-mix(in srgb, var(--a1) 34%, transparent); }
}

@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes floatIn { from { opacity: 0; transform: translateY(16px); filter: blur(6px); } }

/* ── small screens: content on top, chat docked below ───────────────────── */
@media (max-width: 900px) {
  .portfolio-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1.1fr) minmax(0, 1fr); gap: 12px; }
  .content-pane { height: auto; }
  .overview-section { grid-template-columns: minmax(0, 1fr) 110px; }
  .portrait-panel { min-height: 150px; }
  .skill-layout,
  .project-grid { grid-template-columns: minmax(0, 1fr); }
  .chat-pane { gap: 10px; }
  .quiet-header { gap: 6px; }
  .quiet-header .brand { display: none; }
  .iter-nav { margin-left: 0; }
  .header-tools { margin-left: auto; }
  .iter-nav a { padding: 4px 6px; }
  .sound-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ── the sound control: a small wave in the bottom-left corner ──────────── */
.sound-wave {
  position: fixed;
  left: clamp(12px, 1.8vw, 26px);
  bottom: clamp(12px, 2vh, 24px);
  z-index: 40;
  width: 38px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0;
  /* no box: just the wave. The button area is still there to click. */
  border: 0;
  border-radius: 5px;
  background: none;
  color: var(--white);
  opacity: 0.86;
  transition: opacity 200ms ease, transform 300ms var(--ease);
}
.sound-wave:hover { opacity: 1; transform: scale(1.12); }
.sound-wave:focus-visible { outline: 1px solid rgba(255, 255, 255, 0.6); outline-offset: 2px; }
.sound-wave i { width: 2.5px; height: 20px; border-radius: 2px; background: currentColor; transform: scaleY(0.04); transform-origin: center; will-change: transform; }
body:not(.sound-on) .sound-wave { color: var(--faint-white); }
@media (max-width: 720px) {
  /* on a phone the bottom belongs to the agent sheet, so the wave moves to the top-right corner */
  body > .sound-wave { left: auto; right: 10px; top: 9px; bottom: auto; width: 34px; height: 30px; z-index: 41; }
}
