/* ==========================================================================
   STYLING. This is the file to hand to an AI tool and ask it to restyle.
   Nothing in here affects whether the chat works.
   ========================================================================== */

:root {
  --bg: #fbfbfc;
  --surface: #ffffff;
  --ink: #1b1d22;
  --ink-soft: #5c636e;
  --line: #e3e5ea;
  --accent: #2c4a7e;
  --accent-soft: #eef1f7;
  --ok: #1f6f4a;
  --warn: #8a4b12;
  --radius: 12px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --surface: #1b1e24;
    --ink: #eceef2;
    --ink-soft: #a0a7b4;
    --line: #2b2f37;
    --accent: #8fb0e0;
    --accent-soft: #232936;
    --ok: #6fcfa0;
    --warn: #e0ab6f;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 20px; }

.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 72px 0 40px;
}
.hero h1 { margin: 0 0 6px; font-size: clamp(1.9rem, 5vw, 2.6rem); letter-spacing: -0.02em; }
.headline { margin: 0 0 20px; color: var(--ink-soft); font-size: 1.1rem; }
.links a {
  color: var(--accent); text-decoration: none; margin-right: 18px;
  border-bottom: 1px solid transparent; font-size: 0.95rem;
}
.links a:hover { border-bottom-color: var(--accent); }

.panel { padding: 44px 0; border-bottom: 1px solid var(--line); }
.panel:last-of-type { border-bottom: 0; }
.panel h2 { margin: 0 0 8px; font-size: 1.35rem; letter-spacing: -0.01em; }
.muted { color: var(--ink-soft); font-size: 0.93rem; }

#ask-form { display: flex; gap: 10px; margin: 20px 0 12px; flex-wrap: wrap; }
#question {
  flex: 1 1 240px; min-width: 0; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); font: inherit;
}
#question:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
#ask-button {
  padding: 12px 22px; border: 0; border-radius: var(--radius);
  background: var(--accent); color: #fff; font: inherit; font-weight: 600;
  cursor: pointer;
}
#ask-button:disabled { opacity: 0.55; cursor: progress; }

.suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.suggestions button {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  border-radius: 999px; padding: 6px 13px; font: inherit; font-size: 0.85rem;
  cursor: pointer;
}
.suggestions button:hover { border-color: var(--accent); color: var(--accent); }

.thread { margin-top: 20px; display: flex; flex-direction: column-reverse; gap: 18px; }
.turn {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px;
}
.turn .q { margin: 0 0 10px; font-weight: 600; }
.turn .q::before { content: "Q  "; color: var(--accent); font-family: var(--mono); }
.turn .a { margin: 0; }
.turn .a.blocked { color: var(--warn); }

.trace { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 10px; }
.trace summary {
  cursor: pointer; color: var(--ink-soft); font-size: 0.85rem;
  font-family: var(--mono);
}
.trace-body { font-size: 0.83rem; font-family: var(--mono); margin-top: 10px; }
.trace-body table { width: 100%; border-collapse: collapse; margin: 6px 0 12px; }
.trace-body th, .trace-body td {
  text-align: left; padding: 4px 8px 4px 0; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.trace-body th { color: var(--ink-soft); font-weight: 600; }
.trace-h { color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.06em;
  font-size: 0.72rem; margin: 12px 0 4px; }
.pass { color: var(--ok); }
.fail { color: var(--warn); }

.prose h3 { margin: 26px 0 6px; font-size: 1.05rem; }
.prose h4 { margin: 18px 0 4px; font-size: 0.95rem; color: var(--ink-soft); }
.prose p { margin: 0 0 12px; }

.foot { padding: 30px 20px 60px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* Portfolio header */
.hero {
  background: #102a43;
  color: #f0f7fc;
  border-bottom: 4px solid #2dd4bf;
  padding: 64px 0 40px;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  letter-spacing: -0.035em;
}

.hero .headline {
  color: #d1e1ee;
  max-width: 38rem;
}

.hero .links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.hero .links a {
  color: #99f6e4;
  margin-right: 0;
}

.hero .links a:hover {
  border-bottom-color: #99f6e4;
}

.hero .links a:focus-visible {
  outline: 2px solid #99f6e4;
  outline-offset: 5px;
}
/* Sources remain visible outside the diagnostic panel */
.sources {
  margin-top: 16px;
  padding: 12px 16px;
  border-left: 3px solid #0f766e;
  background: var(--accent-soft);
  border-radius: 0 8px 8px 0;
  overflow-wrap: anywhere;
}

.sources:empty {
  display: none;
}

.sources p {
  margin: 4px 0;
  color: var(--ink);
  font-size: 0.9rem;
}

.sources p:first-child {
  margin-bottom: 8px;
  font-weight: 600;
}

@media (prefers-color-scheme: dark) {
  .sources {
    border-left-color: #5eead4;
  }
}
/* Content layout and readability */
.wrap {
  max-width: 900px;
}

.panel {
  padding: 40px 0;
}

.panel h2 {
  font-size: 1.5rem;
}

.prose {
  overflow-wrap: anywhere;
}

.prose h4 {
  margin-top: 36px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--accent);
  font-size: 1.1rem;
}

.prose h3 {
  margin-top: 28px;
  font-size: 1.05rem;
}

.prose p {
  max-width: 72ch;
  margin-bottom: 18px;
}

.trace-body {
  overflow-wrap: anywhere;
}

.trace-body table {
  table-layout: fixed;
}

#ask-button:focus-visible,
.suggestions button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-color-scheme: dark) {
  #ask-button {
    color: #102a43;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: 40px;
  }

  .turn {
    padding: 16px;
  }

  #ask-button {
    width: 100%;
  }
} 
/* Profile photo and introduction */
.hero { padding-top: 32px; }
.hero-profile {
  display: flex;
  align-items: flex-start;
  max-width: 1280px;
  padding-inline: clamp(28px, 3.125vw, 40px);
  gap: 32px;
}
.profile-photo {
  display: block;
  flex: 0 0 auto;
  order: 2;
  width: 224px;
  height: 224px;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 50%;
  border: 3px solid #d1e1ee;
  filter: brightness(1.1);
}
.profile-intro { order: 1; flex: 1; min-width: 0; padding-top: 16px; }
@media (max-width: 600px) {
  .hero-profile {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  .profile-photo { order: 1; align-self: flex-end; width: 168px; height: 168px; }
  .profile-intro { order: 2; padding-top: 0; }
}
