/* ================================================================
   Portfolio — Design system
   ================================================================ */

:root {
  /* Surfaces — pure white editorial */
  --bg:          oklch(1 0 0);
  --bg-elev:     oklch(0.995 0.001 255);
  --bg-sunk:     oklch(0.970 0.004 255);
  --panel:       rgba(255, 255, 255, 0.92);
  --panel-solid: oklch(1 0 0);

  /* Borders — lighter, more refined */
  --border:        oklch(0.890 0.006 255);
  --border-strong: oklch(0.800 0.010 255);
  --border-soft:   oklch(0.940 0.003 255);

  /* Text — true black base for editorial contrast */
  --ink:       oklch(0.120 0.010 255);
  --ink-soft:  oklch(0.350 0.010 255);
  --ink-mute:  oklch(0.540 0.008 255);
  --ink-faint: oklch(0.700 0.005 255);

  /* Accent — refined cobalt */
  --accent:      oklch(0.480 0.130 255);
  --accent-soft: oklch(0.480 0.130 255 / 0.07);
  --accent-ink:  oklch(0.320 0.125 255);
  --accent-glow: oklch(0.480 0.130 255 / 0.12);

  /* Agent identity */
  --agent-research: oklch(0.500 0.120 222);
  --agent-code:     oklch(0.490 0.115 155);
  --agent-design:   oklch(0.540 0.110 32);
  --agent-writer:   oklch(0.490 0.115 304);
  --agent-data:     oklch(0.540 0.108 72);
  --agent-ops:      oklch(0.490 0.115 190);

  /* Radii */
  --r-xs:   4px;
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-pill: 999px;

  /* Shadows — very soft, editorial */
  --shadow-sm: 0 1px 3px oklch(0 0 0 / 0.04), 0 1px 2px oklch(0 0 0 / 0.03);
  --shadow-md: 0 4px 16px oklch(0 0 0 / 0.06), 0 2px 4px oklch(0 0 0 / 0.03);
  --shadow-lg: 0 12px 40px oklch(0 0 0 / 0.08), 0 4px 10px oklch(0 0 0 / 0.04);
  --shadow-xl: 0 24px 72px oklch(0 0 0 / 0.10), 0 8px 20px oklch(0 0 0 / 0.05);

  /* Type */
  --font-sans:    'Geist', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-display: 'DM Serif Display', 'Instrument Serif', Georgia, serif;
  --font-mono:    'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

[data-theme="dark"] {
  --bg:          oklch(0.155 0.013 255);
  --bg-elev:     oklch(0.192 0.014 255);
  --bg-sunk:     oklch(0.128 0.010 255);
  --panel:       oklch(0.192 0.014 255 / 0.80);
  --panel-solid: oklch(0.192 0.014 255);
  --border:        oklch(0.278 0.013 255);
  --border-strong: oklch(0.365 0.013 255);
  --border-soft:   oklch(0.238 0.012 255);
  --ink:       oklch(0.950 0.005 255);
  --ink-soft:  oklch(0.755 0.009 255);
  --ink-mute:  oklch(0.575 0.009 255);
  --ink-faint: oklch(0.410 0.008 255);
  --accent:      oklch(0.700 0.125 255);
  --accent-soft: oklch(0.700 0.125 255 / 0.15);
  --accent-ink:  oklch(0.845 0.090 255);
  --accent-glow: oklch(0.700 0.125 255 / 0.22);
  --shadow-sm: 0 1px 3px oklch(0 0 0 / 0.30);
  --shadow-md: 0 4px 14px oklch(0 0 0 / 0.40);
  --shadow-lg: 0 8px 30px oklch(0 0 0 / 0.50);
  --shadow-xl: 0 20px 60px oklch(0 0 0 / 0.60);
}

/* ================================================================
   Reset + base
   ================================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body, #root { height: 100%; width: 100%; }

body {
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  letter-spacing: -0.007em;
}

button, input, textarea, select {
  font-family: inherit; font-size: inherit;
  color: inherit; letter-spacing: inherit;
}

button { background: none; border: none; padding: 0; cursor: pointer; color: inherit; }
input, textarea { background: none; border: none; outline: none; color: inherit; }
input::placeholder, textarea::placeholder { color: var(--ink-faint); }

::selection { background: var(--accent-soft); color: var(--accent-ink); }

/* ================================================================
   Ambient background
   ================================================================ */

.app-bg { display: none; }

[data-theme="dark"] .app-bg {
  display: block;
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 900px 600px at 70% -10%, oklch(0.49 0.13 255 / 0.14) 0%, transparent 70%),
    radial-gradient(ellipse 600px 500px at -5% 110%, oklch(0.56 0.10 304 / 0.10) 0%, transparent 70%);
}

/* ================================================================
   App shell
   ================================================================ */

.app {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 240px 1fr;
  height: 100vh; width: 100vw;
}

.app[data-sidebar="collapsed"] { grid-template-columns: 60px 1fr; }

.main {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; min-width: 0;
}

/* ================================================================
   Sidebar
   ================================================================ */

.sidebar {
  height: 100vh;
  border-right: 1px solid var(--border-soft);
  background: var(--bg-elev);
  display: flex; flex-direction: column;
  padding: 0 8px 12px; gap: 1px;
  overflow: hidden;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 10px 16px;
  margin-bottom: 8px;
}

/* Collapse / expand toggle lives inside the sidebar brand */
.sidebar-toggle {
  width: 28px; height: 28px; border-radius: var(--r-sm);
  display: grid; place-items: center;
  color: var(--ink-faint); cursor: pointer;
  background: none; border: none; padding: 0;
  transition: all 0.13s ease;
  margin-left: auto; flex-shrink: 0;
}
.sidebar-toggle:hover { background: var(--bg-sunk); color: var(--ink-mute); }
.sidebar-toggle .icon { width: 15px; height: 15px; stroke-width: 1.65; }

.sidebar[data-collapsed="true"] .brand-mark { display: none; }
.sidebar[data-collapsed="true"] .sidebar-brand { justify-content: center; padding: 14px 10px 16px; }
.sidebar[data-collapsed="true"] .sidebar-toggle { margin-left: 0; }

.brand-mark {
  width: 30px; height: 30px; border-radius: 10px;
  background: var(--ink);
  display: grid; place-items: center;
  color: var(--bg);
  font-family: var(--font-display);
  font-size: 16px; font-weight: 400; font-style: italic;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink); white-space: nowrap;
}

.brand-name em { font-style: italic; color: var(--ink-soft); }

/* Collapsed state */
.sidebar[data-collapsed="true"] .brand-name,
.sidebar[data-collapsed="true"] .nav-label,
.sidebar[data-collapsed="true"] .sidebar-section-label,
.sidebar[data-collapsed="true"] .agent-name,
.sidebar[data-collapsed="true"] .agent-status,
.sidebar[data-collapsed="true"] .nav-badge { display: none; }

.sidebar[data-collapsed="true"] .nav-item,
.sidebar[data-collapsed="true"] .agent-row { justify-content: center; padding: 10px; }

.sidebar-section-label {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.10em;
  color: var(--ink-faint);
  padding: 16px 10px 6px;
}

.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; border-radius: var(--r-sm);
  color: var(--ink-mute); font-size: 13px; font-weight: 450;
  cursor: pointer; transition: all 0.13s ease;
}

.nav-item:hover { background: var(--bg-sunk); color: var(--ink); }
.nav-item[data-active="true"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 500; }
.nav-item .icon { width: 15px; height: 15px; flex-shrink: 0; stroke-width: 1.6; }
.nav-label { flex: 1; }

.nav-badge {
  background: var(--accent); color: white;
  font-size: 9.5px; font-weight: 600;
  padding: 1px 6px; border-radius: var(--r-pill); min-width: 16px; text-align: center;
}

/* Agent list */
.agents-list {
  display: flex; flex-direction: column; gap: 1px;
  flex: 1; overflow-y: auto; margin: 0 -2px; padding: 0 2px;
}

.agent-row {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 10px; border-radius: var(--r-sm);
  cursor: pointer; transition: background 0.13s ease;
}

.agent-row:hover { background: var(--bg-sunk); }

.agent-avatar {
  width: 24px; height: 24px; border-radius: var(--r-sm);
  flex-shrink: 0; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.95);
  position: relative;
  font-family: var(--font-display); font-style: italic;
}

.agent-avatar.lg { width: 36px; height: 36px; font-size: 15px; border-radius: 11px; }
.agent-avatar.xl { width: 52px; height: 52px; font-size: 20px; border-radius: 15px; }

.agent-status-dot {
  position: absolute; bottom: -2px; right: -2px;
  width: 8px; height: 8px; border-radius: 50%;
  border: 2px solid var(--bg-elev);
}

.agent-status-dot.idle     { background: var(--border-strong); }
.agent-status-dot.active   { background: oklch(0.62 0.14 145); }
.agent-status-dot.thinking { background: oklch(0.68 0.15 72); animation: pulse-dot 1.4s ease-in-out infinite; }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.25); }
}

.agent-meta { min-width: 0; flex: 1; }
.agent-name  { font-size: 12.5px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent-status { font-size: 11px; color: var(--ink-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* User card */
.user-card {
  margin-top: auto; padding: 10px;
  border-top: 1px solid var(--border-soft);
  display: flex; align-items: center; gap: 9px;
  cursor: pointer; border-radius: var(--r-sm);
  transition: background 0.13s ease;
}
.user-card:hover { background: var(--bg-sunk); }

.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, oklch(0.58 0.11 304) 100%);
  display: grid; place-items: center;
  color: white; font-size: 10.5px; font-weight: 700; flex-shrink: 0;
  letter-spacing: 0.02em;
}

/* ================================================================
   Topbar
   ================================================================ */

.topbar {
  height: 52px; flex-shrink: 0; z-index: 5;
  border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center;
  padding: 0 24px; gap: 10px;
  background: var(--bg);
  position: relative; overflow: hidden;
}

/* Static decorative curves — absolutely positioned so they don't affect layout */
.topbar-deco {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 200px; height: 52px;
  opacity: 0.28; pointer-events: none;
}
[data-theme="dark"] .topbar-deco { opacity: 0.18; }

.topbar-title {
  font-size: 13px; font-weight: 450; color: var(--ink-soft);
  display: flex; align-items: center; gap: 7px;
  white-space: nowrap; overflow: hidden;
}

.topbar-crumb { color: var(--ink-faint); font-weight: 400; }
.topbar-actions { margin-left: auto; display: flex; gap: 2px; align-items: center; }

.topbar-nav {
  display: flex; align-items: center; gap: 32px;
}

.topbar-nav-link {
  font-size: 13px; font-weight: 450;
  color: var(--ink-mute);
  cursor: pointer;
  transition: color 0.14s ease;
  letter-spacing: -0.005em;
  white-space: nowrap;
}

.topbar-nav-link:hover { color: var(--ink); }

.icon-btn {
  width: 30px; height: 30px; border-radius: var(--r-sm);
  display: grid; place-items: center;
  color: var(--ink-mute); cursor: pointer;
  transition: all 0.13s ease; position: relative;
}

.icon-btn:hover { background: var(--bg-sunk); color: var(--ink); }
.icon-btn .icon { width: 15px; height: 15px; stroke-width: 1.65; }

.icon-btn .notif-bubble {
  position: absolute; top: 6px; right: 6px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg);
}

/* ================================================================
   Home — hero + content
   ================================================================ */

.home {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  overflow-y: auto;
}

/* Hero band — content sits in the upper portion, not dead-centre */
.home-hero {
  width: 100%; display: flex; flex-direction: column; align-items: center;
  padding: 120px 40px 48px;
  margin-bottom: 0;
  min-height: calc(100vh - 52px);
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
}

/* Hero content sits above the bg art */
.home-hero > :not(.hero-bg-art) { position: relative; z-index: 1; }

/* ================================================================
   Hero decorative background — animated blobs + SVG curves
   ================================================================ */

.hero-bg-art {
  position: absolute; inset: 0;
  z-index: 0; pointer-events: none; overflow: hidden;
}

/* Soft colour blobs */
.hero-blob {
  position: absolute; border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}

.hero-blob-1 {
  width: 720px; height: 520px; top: -18%; left: -12%;
  background: oklch(0.490 0.135 255 / 0.055);
  animation: blob-drift 22s ease-in-out infinite alternate;
}
.hero-blob-2 {
  width: 580px; height: 420px; top: 25%; right: -14%;
  background: oklch(0.490 0.115 304 / 0.040);
  animation: blob-drift 17s ease-in-out infinite alternate-reverse;
  animation-delay: -6s;
}
.hero-blob-3 {
  width: 440px; height: 340px; bottom: -8%; left: 28%;
  background: oklch(0.550 0.110 72 / 0.030);
  animation: blob-drift 26s ease-in-out infinite alternate;
  animation-delay: -12s;
}

[data-theme="dark"] .hero-blob-1 { background: oklch(0.490 0.135 255 / 0.18); }
[data-theme="dark"] .hero-blob-2 { background: oklch(0.490 0.115 304 / 0.13); }
[data-theme="dark"] .hero-blob-3 { background: oklch(0.550 0.110 72 / 0.10); }

@keyframes blob-drift {
  0%   { transform: translate(0,   0  ) scale(1.00); }
  30%  { transform: translate(28px,-32px) scale(1.04); }
  60%  { transform: translate(-18px, 24px) scale(0.97); }
  100% { transform: translate(22px, 14px) scale(1.03); }
}

/* Flowing SVG curves — use border color so they dissolve into the background */
.hero-lines {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  color: var(--border);
  opacity: 0.55;
  animation: lines-drift 34s ease-in-out infinite alternate;
  will-change: transform;
}

[data-theme="dark"] .hero-lines { opacity: 0.30; color: var(--border-strong); }

@keyframes lines-drift {
  0%   { transform: translate(0, 0) rotate(0deg); }
  50%  { transform: translate(12px, -18px) rotate(0.3deg); }
  100% { transform: translate(-8px, 12px) rotate(-0.2deg); }
}

.greeting-eyebrow {
  font-family: var(--font-sans);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 24px;
  display: flex; align-items: center; gap: 10px;
}

.greeting-eyebrow::before,
.greeting-eyebrow::after {
  content: '';
  display: block; width: 28px; height: 1px;
  background: var(--border-strong);
}

.greeting {
  font-family: var(--font-display);
  font-size: 92px; font-weight: 400;
  text-align: center; letter-spacing: -0.03em; line-height: 0.96;
  color: var(--ink); margin-bottom: 28px;
}

.greeting em {
  font-style: italic;
  color: var(--accent);
}

.greeting-sub {
  font-size: 16px; font-weight: 300; color: var(--ink-mute); line-height: 1.75;
  margin: 0 0 32px; text-align: center; max-width: 480px;
  letter-spacing: 0.005em;
}

/* Composer */
.composer-wrap {
  width: 100%; max-width: 620px; position: relative;
}

/* Animated typewriter placeholder */
.composer-ta-wrap { position: relative; }

.composer-ph {
  position: absolute; top: 0; left: 0; right: 0;
  padding: 2px 8px; /* matches textarea padding */
  font-family: var(--font-sans);
  font-size: 15px; line-height: 1.55;
  color: var(--ink-faint);
  pointer-events: none;
  white-space: nowrap; overflow: hidden;
  letter-spacing: -0.007em;
}


.composer-ph-cursor {
  display: inline-block;
  width: 2px; height: 1.05em;
  background: var(--ink-faint);
  vertical-align: text-bottom;
  margin-left: 1px; border-radius: 1px;
  animation: cursor-blink 0.7s ease-in-out infinite;
}

.composer {
  background: var(--panel-solid);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  padding: 18px 20px 14px;
  box-shadow: 0 2px 12px oklch(0 0 0 / 0.06), 0 0 0 1px oklch(0 0 0 / 0.02);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  position: relative;
}

.composer:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg), 0 0 0 3px var(--accent-soft);
}

.composer textarea {
  width: 100%; min-height: 28px; max-height: 200px;
  resize: none; font-size: 15px; line-height: 1.55;
  padding: 2px 8px; display: block;
}

.composer-toolbar {
  display: flex; align-items: center; justify-content: flex-end;
  padding-top: 8px; margin-top: 8px;
}


.send-btn {
  margin-left: auto; width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink); color: var(--bg);
  display: grid; place-items: center;
  cursor: pointer; transition: all 0.18s ease;
  flex-shrink: 0;
}

.send-btn:disabled { opacity: 0.25; cursor: not-allowed; }
.send-btn:not(:disabled):hover { background: var(--accent); transform: translateY(-1px); box-shadow: 0 4px 12px var(--accent-glow); }
.send-btn .icon { width: 14px; height: 14px; stroke-width: 2.2; }


/* ================================================================
   Scroll-triggered animations
   ================================================================ */

[data-animate] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Home body — suggestions + sections */
.home-body {
  width: 100%; display: flex; flex-direction: column;
  align-items: center; padding: 0 40px 80px;
}

/* Suggestion chips */
.suggest-row {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center; margin: 32px 0 0;
  max-width: 680px; width: 100%;
}

/* When suggest-row is in home-body (fallback) */
.home-body .suggest-row { margin: 44px 0 56px; }

.suggest-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 16px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: 12.5px; color: var(--ink-mute);
  cursor: pointer; transition: all 0.14s ease; font-weight: 450;
}

.suggest-chip:hover {
  border-color: var(--border-strong); color: var(--ink);
  transform: translateY(-1px); box-shadow: var(--shadow-sm);
  background: var(--bg-elev);
}

.suggest-chip .icon { width: 13px; height: 13px; stroke-width: 1.7; }

/* Section headings */
.section-head {
  display: flex; align-items: baseline; gap: 10px;
  width: 100%; max-width: 960px; margin: 0 auto 24px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 30px; font-weight: 400;
  color: var(--ink); letter-spacing: -0.02em;
}

.section-sub  { font-size: 13px; color: var(--ink-mute); margin-top: 1px; }
.section-link { margin-left: auto; font-size: 12px; color: var(--accent-ink); cursor: pointer; font-weight: 500; }
.section-link:hover { text-decoration: underline; }

/* Agent grid */
.agent-grid {
  width: 100%; max-width: 960px;
  margin: 0 auto 64px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  border: 1px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--border);
}

.agent-card {
  background: var(--panel-solid);
  cursor: pointer; transition: background 0.16s ease;
  position: relative;
}

.agent-card-inner {
  padding: 28px 26px 22px;
  height: 100%;
}

.agent-card:hover {
  background: var(--bg-sunk);
}

.agent-card-tint { display: none; }

.agent-card-head {
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 14px;
}

.agent-card-name { font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: -0.012em; line-height: 1.2; }
.agent-card-role { font-size: 11.5px; color: var(--ink-mute); margin-top: 3px; }

.agent-card-desc {
  font-size: 13px; color: var(--ink-soft); line-height: 1.65;
  margin-bottom: 16px;
}

.agent-card-foot {
  display: flex; align-items: center; gap: 12px;
  font-size: 11px; color: var(--ink-faint);
  padding-top: 14px; border-top: 1px solid var(--border-soft);
}

.agent-card-stat { display: flex; align-items: center; gap: 5px; }

/* ================================================================
   Visual career timeline
   ================================================================ */

.timeline {
  width: 100%; max-width: 960px;
  margin: 0 auto 64px;
  position: relative;
  padding-left: 36px;
}

/* Vertical connecting line */
.timeline::before {
  content: '';
  position: absolute;
  left: 11px; top: 8px; bottom: 32px;
  width: 2px;
  background: linear-gradient(to bottom, var(--border-strong) 0%, var(--border-soft) 100%);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-bottom: 44px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -31px; top: 5px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--border-strong);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--border-strong);
  z-index: 1;
  transition: box-shadow 0.3s ease;
}

.timeline-item.current .timeline-dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 14px var(--accent-glow);
  animation: tl-pulse 2.2s ease-in-out infinite;
}

@keyframes tl-pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--accent-soft), 0 0 14px var(--accent-glow); }
  50%       { box-shadow: 0 0 0 7px var(--accent-soft), 0 0 22px var(--accent-glow); }
}

.timeline-item.education .timeline-dot {
  background: var(--agent-writer);
  box-shadow: 0 0 0 2px oklch(0.490 0.115 304 / 0.25);
}

.timeline-period {
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 7px;
}

.timeline-item.current .timeline-period {
  color: var(--accent);
}

.timeline-title {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 400;
  letter-spacing: -0.025em; line-height: 1.15;
  color: var(--ink); margin-bottom: 4px;
}

.timeline-company {
  font-size: 13px; font-weight: 500;
  color: var(--ink-mute); margin-bottom: 10px;
}

.timeline-desc {
  font-size: 13.5px; color: var(--ink-soft);
  line-height: 1.70; margin-bottom: 12px;
  max-width: 660px;
}

.timeline-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
}

.timeline-tag {
  font-size: 11px; padding: 3px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: transparent; color: var(--ink-mute);
  font-weight: 400;
}

.timeline-item.current .timeline-tag {
  border-color: var(--accent-soft);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

/* Activity */
.activity-preview {
  width: 100%; max-width: 960px; margin: 0 auto 64px;
  background: var(--panel-solid); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
}

.activity-row {
  display: grid; grid-template-columns: 30px 1fr auto;
  gap: 14px; padding: 16px 24px; align-items: center;
  border-top: 1px solid var(--border-soft);
  cursor: pointer; transition: background 0.13s ease;
}

.activity-row:first-of-type { border-top: none; }
.activity-row:hover { background: var(--bg-sunk); }

.activity-text { font-size: 13.5px; color: var(--ink); line-height: 1.45; }
.activity-text .who  { font-weight: 600; }
.activity-text .what { color: var(--ink-soft); }
.activity-time { font-size: 11px; color: var(--ink-faint); white-space: nowrap; }

/* ================================================================
   Chat screen
   ================================================================ */

.chat-screen {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden; min-height: 0;
}

.chat-pane { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 40px 0 16px; }

.chat-inner {
  max-width: 680px; margin: 0 auto;
  padding: 0 36px;
  display: flex; flex-direction: column; gap: 32px;
}

/* Empty state */
.chat-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex: 1; padding: 80px 40px;
  text-align: center;
}

.chat-empty-title {
  font-family: var(--font-display);
  font-size: 36px; font-weight: 400; letter-spacing: -0.02em;
  color: var(--ink); margin-bottom: 10px;
}

.chat-empty-sub {
  font-size: 14px; color: var(--ink-mute); line-height: 1.6; max-width: 340px;
  font-weight: 300;
}

.msg {
  display: flex; flex-direction: column; gap: 10px;
  max-width: 100%; animation: msg-in 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.msg-head { display: flex; align-items: center; gap: 9px; }
.msg-author { font-size: 13px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.msg-time   { font-size: 11px; color: var(--ink-faint); }

.msg.user { align-self: flex-end; max-width: 72%; }

.msg.user .msg-bubble {
  background: oklch(0.908 0.014 255);
  color: oklch(0.160 0.015 255);
  padding: 13px 18px;
  border-radius: 20px 20px 5px 20px;
  font-size: 14px; line-height: 1.6;
}

[data-theme="dark"] .msg.user .msg-bubble {
  background: oklch(0.268 0.020 255);
  color: oklch(0.920 0.008 255);
}

.msg.user .msg-head { justify-content: flex-end; }

.msg.agent .msg-bubble {
  font-size: 14.5px; line-height: 1.8; color: var(--ink);
  padding-left: 36px;
}
.msg.agent .msg-head { padding-left: 0; }

/* Markdown body styles */
.markdown-body p { margin-bottom: 12px; }
.markdown-body p:last-child { margin-bottom: 0; }
.markdown-body strong { font-weight: 600; color: var(--ink); }
.markdown-body em { font-style: italic; }
.markdown-body a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; }
.markdown-body ul, .markdown-body ol { margin: 6px 0 14px; padding-left: 20px; }
.markdown-body li { margin-bottom: 5px; line-height: 1.7; }
.markdown-body h1, .markdown-body h2 { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.02em; margin: 18px 0 8px; }
.markdown-body h1 { font-size: 22px; }
.markdown-body h2 { font-size: 18px; }
.markdown-body h3 { font-size: 15px; font-weight: 600; margin: 14px 0 6px; }
.markdown-body hr { border: none; border-top: 1px solid var(--border-soft); margin: 16px 0; }
.markdown-body blockquote { border-left: 3px solid var(--border-strong); padding-left: 14px; color: var(--ink-mute); margin: 10px 0; }

.msg.agent .msg-bubble code {
  font-family: var(--font-mono); font-size: 12.5px;
  background: var(--bg-sunk); padding: 2px 6px; border-radius: 5px;
}

.msg.agent .msg-bubble ul, .msg.agent .msg-bubble ol { margin: 6px 0 12px; padding-left: 22px; }
.msg.agent .msg-bubble li { margin-bottom: 6px; }

.msg-actions { display: flex; gap: 2px; padding-left: 36px; margin-top: 2px; opacity: 0; transition: opacity 0.13s ease; }
.msg.agent:hover .msg-actions { opacity: 1; }

.msg-action {
  width: 26px; height: 26px; border-radius: 6px;
  display: grid; place-items: center;
  color: var(--ink-faint); cursor: pointer; transition: all 0.13s ease;
}
.msg-action:hover { background: var(--bg-sunk); color: var(--ink-mute); }
.msg-action .icon { width: 12px; height: 12px; }

/* Streaming cursor */
.stream-cursor {
  display: inline-block;
  width: 2px; height: 1.1em;
  background: var(--ink-mute);
  margin-left: 2px;
  vertical-align: text-bottom;
  border-radius: 1px;
  animation: cursor-blink 0.7s ease-in-out infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Typing */
.typing { display: inline-flex; align-items: center; gap: 5px; padding: 6px 0; }
.typing span { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-faint); animation: typing-dot 1.2s ease-in-out infinite; }
.typing span:nth-child(2) { animation-delay: 0.18s; }
.typing span:nth-child(3) { animation-delay: 0.36s; }

@keyframes typing-dot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30%           { opacity: 1; transform: translateY(-4px); }
}

/* Chat composer */
.chat-composer-wrap {
  padding: 0 36px 28px; flex-shrink: 0;
}
.chat-composer-wrap .composer-wrap { max-width: 680px; margin: 0 auto; }
.chat-composer-wrap .composer {
  box-shadow: 0 2px 16px oklch(0 0 0 / 0.07), 0 0 0 1px oklch(0 0 0 / 0.03);
}

/* ================================================================
   Modal
   ================================================================ */

.modal-overlay {
  position: fixed; inset: 0;
  background: oklch(0.15 0.01 255 / 0.30);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  z-index: 100; display: grid; place-items: center;
  animation: overlay-in 0.18s ease; padding: 40px;
}

@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--r-xl); box-shadow: var(--shadow-xl);
  width: 100%; max-width: 720px; max-height: 82vh;
  display: flex; flex-direction: column; overflow: hidden;
  animation: modal-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-head {
  display: flex; align-items: center;
  padding: 18px 22px; border-bottom: 1px solid var(--border-soft);
}

.modal-title { font-family: var(--font-display); font-size: 21px; font-weight: 400; color: var(--ink); letter-spacing: -0.012em; }

.modal-close {
  margin-left: auto; width: 28px; height: 28px; border-radius: var(--r-sm);
  display: grid; place-items: center; color: var(--ink-mute); cursor: pointer; transition: all 0.13s ease;
}
.modal-close:hover { background: var(--bg-sunk); color: var(--ink); }

.modal-body { flex: 1; overflow-y: auto; display: grid; grid-template-columns: 172px 1fr; }

.settings-nav { border-right: 1px solid var(--border-soft); padding: 12px 8px; display: flex; flex-direction: column; gap: 1px; }
.settings-nav-item { padding: 7px 12px; border-radius: var(--r-sm); font-size: 12.5px; color: var(--ink-soft); cursor: pointer; transition: all 0.13s ease; }
.settings-nav-item:hover { background: var(--bg-sunk); color: var(--ink); }
.settings-nav-item[data-active="true"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 500; }

.settings-content { padding: 22px 26px; }
.settings-section { margin-bottom: 26px; }
.settings-section:last-child { margin-bottom: 0; }
.settings-section-title { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); margin-bottom: 12px; font-weight: 600; }

.setting-row { display: flex; align-items: center; padding: 10px 0; border-top: 1px solid var(--border-soft); }
.setting-row:first-of-type { border-top: none; padding-top: 0; }
.setting-label { flex: 1; }
.setting-label .name { font-size: 13.5px; color: var(--ink); font-weight: 500; }
.setting-label .desc { font-size: 12px; color: var(--ink-mute); margin-top: 2px; }

.toggle { width: 36px; height: 20px; border-radius: var(--r-pill); background: var(--border-strong); position: relative; cursor: pointer; transition: background 0.18s ease; flex-shrink: 0; }
.toggle[data-on="true"] { background: var(--accent); }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: white; transition: transform 0.18s ease; box-shadow: 0 1px 3px oklch(0 0 0 / 0.2); }
.toggle[data-on="true"]::after { transform: translateX(16px); }

.select-pill { display: flex; border: 1px solid var(--border); border-radius: var(--r-sm); padding: 2px; gap: 2px; }
.select-pill button { padding: 4px 10px; border-radius: 6px; font-size: 12px; color: var(--ink-mute); cursor: pointer; }
.select-pill button[data-active="true"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 500; }

.profile-block { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--bg-sunk); border-radius: var(--r-md); margin-bottom: 18px; }
.profile-block .user-avatar { width: 46px; height: 46px; font-size: 14px; }
.profile-name  { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.profile-email { font-size: 12px; color: var(--ink-mute); margin-top: 2px; }

/* ================================================================
   Notifications panel
   ================================================================ */

.notif-panel-overlay { position: fixed; inset: 0; z-index: 90; background: oklch(0.15 0.01 255 / 0.18); animation: overlay-in 0.18s ease; }

.notif-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: 368px;
  background: var(--bg-elev); border-left: 1px solid var(--border);
  box-shadow: var(--shadow-xl); z-index: 91;
  display: flex; flex-direction: column;
  animation: panel-in 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes panel-in { from { transform: translateX(100%); } to { transform: translateX(0); } }

.notif-head { padding: 18px 20px; border-bottom: 1px solid var(--border-soft); display: flex; align-items: center; gap: 9px; }
.notif-title { font-family: var(--font-display); font-size: 21px; font-weight: 400; flex: 1; letter-spacing: -0.012em; }

.notif-tabs { display: flex; gap: 18px; padding: 0 20px; border-bottom: 1px solid var(--border-soft); }
.notif-tab { padding: 10px 0; font-size: 13px; color: var(--ink-mute); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 450; }
.notif-tab[data-active="true"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.notif-tab .count { background: var(--bg-sunk); color: var(--ink-mute); font-size: 10px; padding: 1px 6px; border-radius: var(--r-pill); margin-left: 6px; font-weight: 500; }
.notif-tab[data-active="true"] .count { background: var(--accent-soft); color: var(--accent-ink); }

.notif-body { flex: 1; overflow-y: auto; padding: 4px 0; }

.notif-item { padding: 14px 20px; border-bottom: 1px solid var(--border-soft); cursor: pointer; transition: background 0.13s ease; display: grid; grid-template-columns: 30px 1fr; gap: 12px; position: relative; }
.notif-item:hover { background: var(--bg-sunk); }
.notif-item[data-unread="true"]::before { content: ""; position: absolute; left: 8px; top: 22px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

.notif-text { font-size: 13px; color: var(--ink); line-height: 1.5; }
.notif-text .who { font-weight: 600; }
.notif-meta { display: flex; align-items: center; gap: 7px; margin-top: 4px; font-size: 11px; color: var(--ink-faint); }

/* ================================================================
   Tweaks panel
   ================================================================ */

.tweaks-panel { position: fixed; bottom: 20px; right: 20px; width: 272px; background: var(--panel-solid); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-xl); z-index: 80; overflow: hidden; animation: msg-in 0.22s ease; }
.tweaks-head { padding: 12px 16px; border-bottom: 1px solid var(--border-soft); display: flex; align-items: center; }
.tweaks-title { font-family: var(--font-display); font-size: 17px; font-weight: 400; flex: 1; font-style: italic; }
.tweaks-body { padding: 12px 16px; max-height: 60vh; overflow-y: auto; }
.tweak-row  { display: flex; align-items: center; padding: 8px 0; }
.tweak-label { flex: 1; font-size: 12.5px; color: var(--ink-soft); }
.swatch-row  { display: flex; gap: 6px; }
.swatch { width: 21px; height: 21px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: all 0.14s ease; }
.swatch[data-active="true"] { border-color: var(--ink); transform: scale(1.15); }

/* ================================================================
   Contact footer
   ================================================================ */

.home-footer {
  width: 100%;
  margin: 0 auto 48px;
  padding: 0 30px;
  position: relative;
}

.home-footer-card {
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--bg-elev);
  padding: 44px 52px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px;
  position: relative; overflow: hidden;
}

/* Subtle gradient tint inside footer card */
.home-footer-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 120% at 0% 50%, var(--accent-soft) 0%, transparent 70%);
  pointer-events: none; border-radius: inherit;
}

.footer-left { position: relative; z-index: 1; }

.footer-label {
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 10px;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 36px; font-weight: 400;
  letter-spacing: -0.025em; color: var(--ink);
  line-height: 1.1; margin-bottom: 6px;
}

.footer-name em { font-style: italic; color: var(--accent); }

.footer-tagline {
  font-size: 13.5px; color: var(--ink-mute);
  font-weight: 300; margin-top: 4px;
}

.footer-links {
  display: flex; flex-wrap: wrap; gap: 10px;
  position: relative; z-index: 1;
  justify-content: flex-end;
}

.footer-link {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--panel-solid);
  color: var(--ink-soft); font-size: 13px; font-weight: 450;
  cursor: pointer; text-decoration: none;
  transition: all 0.16s ease;
}

.footer-link:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
  background: var(--accent-soft);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.footer-link .icon { width: 13px; height: 13px; stroke-width: 1.7; }

/* Decorative SVG curves inside the footer card */
.footer-curves {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0.40; pointer-events: none;
}

[data-theme="dark"] .footer-curves { opacity: 0.18; }

@media (max-width: 768px) {
  .home-footer-card {
    flex-direction: column; align-items: flex-start;
    padding: 32px 28px;
  }
  .footer-links { justify-content: flex-start; }
  .footer-name { font-size: 28px; }
}

/* ================================================================
   Scrollbar
   ================================================================ */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ================================================================
   Mobile
   ================================================================ */

@media (max-width: 768px) {
  body { overflow: hidden; }

  .app { grid-template-columns: 1fr; height: 100dvh; }
  .sidebar { display: none; }
  .topbar { position: sticky; top: 0; z-index: 10; }

  .home-hero { padding: 52px 24px 40px; min-height: calc(100dvh - 52px); }
  .greeting  { font-size: 52px; }
  .greeting-sub { font-size: 14.5px; margin-bottom: 32px; }

  .home-body { padding: 0 20px 100px; }
  .suggest-row { gap: 6px; }
  .agent-grid { grid-template-columns: 1fr; gap: 0; }

  .chat-inner  { padding: 0 16px; }
  .chat-composer-wrap { padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); }

  .theme-toggle-hero { top: 16px; right: 24px; }
  .theme-toggle-hero span { display: none; }

  .timeline { padding-left: 24px; }
  .timeline::before { left: 7px; }
  .timeline-dot { left: -20px; }
  .timeline-title { font-size: 19px; }
}
