/* Color palette from https://www.color-hex.com/color-palette/1053455 */
:root{
  --blue: #158fd4;        /* primary accent */
  --blue-dark: #0e4a80;   /* deep accent */
  --ink-deep: #01050b;    /* near-black */
  --sky-muted: #9daecc;   /* light blue-gray */
  --white: #ffffff;

  /* Theme tokens */
  --bg: #f7fbff;
  --ink: var(--ink-deep);
  --muted: #42536a;
  --card: var(--white);
  --line: #e3eef7;
  --accent: var(--blue);
  --accent-dark: var(--blue-dark);

  /* Chips / tags */
  --chip-bg: #eef6ff;
  --chip-border: var(--sky-muted);
  --chip-hover: #e0f2ff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

/* Utility */
.small { font-size: 14px; }
.list { margin: 6px 0 0 18px; padding: 0; }
.list li { margin-bottom: 6px; }
.muted { color: var(--muted); }

/* Top bar (sticky) */
.topbar{
  position: sticky; top: 0; z-index: 1000;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  display: grid; grid-template-columns: auto 1fr;
  gap: 16px; align-items: center;
  box-shadow: 0 2px 12px rgba(1, 5, 11, 0.06);
}
.brand img{ height:56px; display:block; }

.searchbox{
  display:flex; gap:10px; border:1px solid var(--line); background: var(--white);
  border-radius:999px; padding:12px 16px; align-items:center;
}
.searchbox input{
  width:100%; border:0; outline:0; font-size:17px; background:transparent; color:var(--ink);
}
.searchbox:focus-within{
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(21,143,212,0.15);
}
.searchbox .btn{
  border:1px solid var(--line); background:#f0f7ff; border-radius:999px;
  padding:6px 12px; color:var(--accent-dark); font-size:15px; cursor:pointer; user-select:none;
}

/* Tabs (flat, segmented, minimal "button" look) */
.tabs {
  max-width: 1100px; margin: 0 auto; padding: 14px 16px;
  display: flex; gap: 0;
  border-bottom: 1px solid var(--line);
}
.tab {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px;
  background: transparent;
  color: var(--muted);
  font-size: 15px; font-weight: 500;
  border: 0;
  border-right: 1px solid var(--line);   /* subtle vertical divider */
  text-decoration: none;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}
.tab:last-child { border-right: 0; }
.tab:hover {
  background: var(--chip-hover);
  color: var(--accent-dark);
}
.tab.active {
  background: transparent;
  color: var(--accent);
  border-bottom: 3px solid var(--accent); /* underline indicates active */
  font-weight: 600;
}
.tab:active { transform: none; }
.tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Layout */
.wrap{ max-width:1100px; margin:0 auto; padding:16px; display:grid; grid-template-columns:1fr 320px; gap:20px; }
@media (max-width: 980px){ .wrap{ grid-template-columns:1fr; } }

/* Cards */
.result{
  background:var(--card); border:1px solid var(--line); border-radius:12px; padding:18px; margin-bottom:18px;
  box-shadow: 0 1px 0 rgba(1,5,11,.02), 0 8px 20px rgba(21,143,212,.06);
}
.result-meta{ padding:10px 16px; }
.result-meta strong { color: var(--accent); } /* "Did you mean" pop */

/* Section titles */
.section-title{
  margin:0 0 10px;
  font-size:20px; font-weight:700;
  color:var(--accent-dark);
  border-left:4px solid var(--accent);
  padding-left:8px;
}

/* Knowledge panel */
.panel{
  position: sticky; top: 86px;
  background:var(--card); border:1px solid var(--line); border-radius:12px; padding:16px; height:fit-content;
}
.panel .name{ font-size:22px; font-weight:700; margin:0; color:var(--ink); }
.panel .title{ color:var(--accent); font-weight:600; margin:4px 0 12px; }
.panel .links{ display:flex; flex-wrap:wrap; gap:0; } /* align with segmented tab style */
.panel .links .tab{
  font-size:14px; padding:8px 12px;
  border-right: 1px solid var(--line);
}
.panel .links .tab:last-child{ border-right: 0; }
.avatar{
  width:96px; height:96px; border-radius:12px; object-fit:contain; margin-bottom:12px;
  background: transparent;
}

/* Skill chips (rounded-rectangle instead of pill) */
.chip {
  display: inline-block;
  margin: 4px 6px 0 0;
  padding: 6px 12px;
  border-radius: 8px;              /* <-- was 999px */
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  font-size: 14px;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow .15s ease,
              background-color .15s ease,
              transform .05s ease,
              border-color .15s ease,
              color .15s ease;
}
.chip:hover {
  background: var(--accent);
  border-color: var(--accent-dark);
  color: var(--white);
  box-shadow: 0 2px 6px rgba(14,74,128,.3);
}
.chip:active {
  transform: translateY(1px);
}

/* Accordion */
.acc-item{ border:1px solid var(--line); border-radius:10px; margin:10px 0; overflow:hidden; background:#fff; }
.acc-head{
  width:100%; text-align:left; background:#fff; border:0; padding:14px 16px;
  display:grid; grid-template-columns:1fr auto; gap:10px; align-items:center; cursor:pointer;
  transition: background-color .15s ease, box-shadow .15s ease, border-left-color .15s ease;
  border-left:4px solid transparent;
}
.acc-head:hover{
  background:#f0f7ff;
  box-shadow: 0 1px 0 rgba(0,0,0,.03), 0 6px 14px rgba(1,5,11,.08);
  border-left-color: var(--accent);
}
.acc-head:focus{ outline:2px solid var(--accent); outline-offset:2px; }
.acc-head:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }

.acc-title{ font-weight:600; font-size:17px; color:var(--ink); }
.acc-meta{ color:var(--muted); font-size:13px; }

/* Right-side affordance (label + chevron) */
.affordance{ display:inline-flex; align-items:center; gap:10px; color:var(--accent-dark); font-weight:600; }
.affordance .label{ font-size:14px; }

/* Bigger, high-contrast chevron */
.acc-chevron{
  width:28px; height:28px; border-radius:999px; display:grid; place-items:center;
  border:1px solid var(--accent); background: var(--accent); color: var(--white);
  font-size:18px; line-height:1; transition: transform .2s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}
.acc-head[aria-expanded="true"] .acc-chevron{
  transform: rotate(180deg);
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

/* Body */
.acc-body{ padding:0 16px 14px; border-top:1px solid var(--line); display:none; position:relative; }
.acc-body.open{ display:block; }

/* Fade mask on preview (collapsed) */
.acc-body.collapsed .preview-wrap{
  position:relative; max-height:72px; overflow:hidden; filter: blur(0.3px);
}
.acc-body.collapsed .preview-wrap::after{
  content:""; position:absolute; left:0; right:0; bottom:0; height:42px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.9) 60%, rgba(255,255,255,1));
  pointer-events:none;
}

/* Full content hidden by default; revealed on “Show more” */
.full-content{ display:none; margin-top:8px; }

/* Footer */
footer{
  max-width:1100px; margin:20px auto 28px; padding:0 16px; color:var(--muted); font-size:14px; text-align:center;
}