:root {
    /* Color tokens */
    --bg: #0E1420;
    --surface: #161D2E;
    --surface-raised: #1C2438;
    --border: #2A3348;
    --text-primary: #EDEFF4;
    --text-secondary: #8A93A8;
    --accent: #E8A33D;
    --accent-dim: #7A5A2A;
  
    /* Type */
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'IBM Plex Sans', -apple-system, sans-serif;
    --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
  
    --radius: 6px;
  }
  
  * { box-sizing: border-box; }
  
  html { color-scheme: dark; }
  
  body {
    margin: 0;
    background: var(--bg);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
  }
  
  .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;
  }
  
  a { color: var(--accent); }
  
  :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
  
  /* ---- Header ---- */
  .site-header {
    border-bottom: 1px solid var(--border);
    padding: 28px 40px;
  }
  
  .header-inner {
    max-width: 1160px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .name {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 500;
    margin: 0;
    letter-spacing: -0.01em;
  }
  
  .tagline {
    margin: 4px 0 0;
    color: var(--text-secondary);
    font-size: 15px;
  }
  
  .site-nav {
    display: flex;
    gap: 24px;
  }
  
  .site-nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
  }
  
  .site-nav a:hover { color: var(--text-primary); }
  
  /* ---- Layout ---- */
  .layout {
    max-width: 1160px;
    margin: 0 auto;
    padding: 40px;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 40px;
    align-items: start;
  }
  
  .left-column { min-width: 0; }
  
  .intro-block {
    margin-bottom: 40px;
  }
  
  .intro-text {
    font-size: 17px;
    color: var(--text-primary);
    max-width: 62ch;
    margin: 0;
  }
  
  .section {
    margin-bottom: 40px;
  }
  
  .section-heading {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 500;
    margin: 0 0 12px;
  }
  
  .section-subtext {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0 0 16px;
    max-width: 60ch;
  }
  
  /* ---- Agent cards ---- */
  .agent-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .agent-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    transition: border-color 0.15s ease;
  }
  
  .agent-card:hover,
  .agent-card:focus-visible {
    border-color: var(--accent-dim);
  }
  
  .agent-card-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--text-primary);
  }
  
  .agent-card-pattern {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent);
    margin: 0 0 6px;
  }
  
  .agent-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
  }
  
  .agent-card-placeholder {
    border-style: dashed;
    color: var(--text-secondary);
    font-size: 13px;
    text-align: left;
  }
  
  /* ---- Tech chips ---- */
  .tech-chips {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .tech-chips li {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4px 10px;
  }
  
  .chip-group-label {
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin: 16px 0 8px;
  }

  .intro-secondary {
    margin-top: 16px;
    font-size: 16px;
    color: var(--text-secondary);
  }

  /* ---- Resume link ---- */
  .resume-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 14px;
    text-decoration: none;
    border-bottom: 1px solid var(--accent-dim);
    padding-bottom: 2px;
  }
  
  .resume-link:hover { border-bottom-color: var(--accent); }
  
  /* ---- Chat column ---- */
  .chat-column {
    position: sticky;
    top: 40px;
    align-self: start;
  }
  
  .chat-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    height: min(600px, calc(100vh - 80px));
  }
  
  .chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
  }
  
  .chat-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
  }
  
  .chat-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
  }
  
  .chat-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 2px 0 0;
  }
  
  .chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  .message {
    font-size: 14px;
    line-height: 1.5;
    padding: 10px 13px;
    border-radius: var(--radius);
    max-width: 88%;
  }
  
  .message-bot {
    background: var(--surface-raised);
    color: var(--text-primary);
    align-self: flex-start;
  }
  
  .message-user {
    background: transparent;
    border: 1px solid var(--accent-dim);
    color: var(--text-primary);
    align-self: flex-end;
  }
  
  .message-pending {
    color: var(--text-secondary);
    font-style: italic;
  }
  
  .message-error {
    background: transparent;
    border: 1px solid #7A3A3A;
    color: #E0A0A0;
    align-self: flex-start;
  }
  
  .chat-input-row {
    display: flex;
    gap: 8px;
    padding: 14px;
    border-top: 1px solid var(--border);
  }
  
  .chat-input {
    flex: 1;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
  }
  
  .chat-input:focus-visible {
    border-color: var(--accent);
  }
  
  .chat-send {
    background: var(--accent);
    border: none;
    border-radius: var(--radius);
    color: var(--bg);
    width: 40px;
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .chat-send:hover { background: #f0b153; }
  
  .chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  /* ---- Responsive ---- */
  @media (max-width: 860px) {
    .layout {
      grid-template-columns: 1fr;
      padding: 24px;
      gap: 32px;
    }
  
    .chat-column {
      position: static;
    }
  
    .chat-panel {
      height: 480px;
    }
  
    .site-header {
      padding: 20px 24px;
    }
  }
  
  /* ---- Reduced motion ---- */
  @media (prefers-reduced-motion: reduce) {
    * {
      transition: none !important;
      animation: none !important;
    }
  }