/* ═══════════════════════════════════════════════════════
   JAGADEESH S — Portfolio Stylesheet
   ═══════════════════════════════════════════════════════ */

:root {
  --bg: #080c14;
  --bg2: #0d1117;
  --bg3: #111827;
  --surface: #161d2e;
  --surface2: #1e2a3d;
  --border: rgba(99,102,241,.18);
  --border2: rgba(255,255,255,.07);

  --primary: #6366f1;
  --primary-light: #818cf8;
  --accent: #22d3ee;
  --accent2: #a78bfa;
  --green: #4ade80;

  --text: #f1f5f9;
  --text2: #94a3b8;
  --text3: #64748b;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 60px rgba(0,0,0,.5);
  --glow: 0 0 40px rgba(99,102,241,.25);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; border: none; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ══════════════════ TYPOGRAPHY ══════════════════ */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.accent { color: var(--accent); }

/* ══════════════════ NAVBAR ══════════════════ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 1rem 0;
  transition: all .3s;
}
.navbar.scrolled {
  background: rgba(8,12,20,.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border2);
  padding: .7rem 0;
}
.nav-container {
  max-width: 1280px; margin: auto;
  padding: 0 2rem;
  display: flex; align-items: center; gap: 2rem;
}
.nav-logo {
  font-size: 1.6rem; font-weight: 900;
  color: var(--text);
}
.nav-logo .dot { color: var(--primary); }
.nav-links {
  display: flex; gap: 2rem; list-style: none; margin-left: auto;
}
.nav-links a {
  color: var(--text2); font-size: .9rem; font-weight: 500;
  transition: color .2s;
  position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--primary);
  transform: scaleX(0); transition: transform .2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-ai-btn {
  display: flex; align-items: center; gap: .5rem;
  background: linear-gradient(135deg, var(--primary), var(--accent2));
  color: #fff; padding: .5rem 1.2rem;
  border-radius: 50px; font-size: .85rem; font-weight: 600;
  position: relative; overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.nav-ai-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(99,102,241,.4); }
.ai-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: #4ade80;
  animation: pulse 1.5s infinite;
}
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }

/* ══════════════════ HERO ══════════════════ */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  position: relative; overflow: hidden;
  padding: 8rem 0 4rem;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(99,102,241,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,.05) 1px, transparent 1px);
  background-size: 50px 50px;
}
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); animation: float 8s infinite ease-in-out;
}
.orb-1 { width: 500px; height: 500px; top: -100px; left: -100px; background: rgba(99,102,241,.15); }
.orb-2 { width: 400px; height: 400px; bottom: -50px; right: 10%; background: rgba(34,211,238,.12); animation-delay: -3s; }
.orb-3 { width: 300px; height: 300px; top: 40%; left: 50%; background: rgba(167,139,250,.1); animation-delay: -5s; }

.hero-container {
  max-width: 1280px; margin: auto; padding: 0 2rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
  position: relative; z-index: 1;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(74,222,128,.1); border: 1px solid rgba(74,222,128,.3);
  color: #4ade80; padding: .4rem 1rem; border-radius: 50px;
  font-size: .8rem; font-weight: 600; margin-bottom: 1.5rem;
}
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; animation: pulse 1.5s infinite; }
.hero-name {
  font-size: clamp(3rem, 6vw, 5rem); font-weight: 900;
  line-height: 1.05; letter-spacing: -2px; margin-bottom: .5rem;
}
.hero-title {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 500;
  color: var(--text2); margin-bottom: 1.5rem;
}
.hero-sub { color: var(--text2); max-width: 500px; margin-bottom: 2rem; font-size: .95rem; }
.hero-stats { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 2.5rem; }
.stat { text-align: center; }
.stat-num { font-size: 2rem; font-weight: 800; color: var(--primary-light); }
.stat p { font-size: .75rem; color: var(--text3); margin-top: .15rem; font-weight: 500; }
.stat-divider { width: 1px; height: 40px; background: var(--border2); }
.hero-cta { display: flex; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; gap: .5rem;
  background: linear-gradient(135deg, var(--primary), var(--accent2));
  color: #fff; padding: .75rem 1.8rem; border-radius: 50px;
  font-weight: 600; transition: transform .2s, box-shadow .2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(99,102,241,.4); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: .5rem;
  border: 1px solid var(--border); color: var(--text); padding: .75rem 1.8rem;
  border-radius: 50px; font-weight: 600; transition: all .2s;
}
.btn-ghost:hover { background: var(--surface); border-color: var(--primary); }
.hero-socials { display: flex; gap: 1rem; }
.hero-socials a {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  color: var(--text2); transition: all .2s;
}
.hero-socials a:hover { color: var(--primary); border-color: var(--primary); transform: translateY(-2px); }

/* Profile Card */
.hero-visual { display: flex; justify-content: center; align-items: center; }
.profile-card {
  position: relative; width: 420px; height: 480px;
}
.profile-glow {
  position: absolute; inset: -20px; border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.3), transparent 70%);
  animation: pulse-glow 3s infinite;
}
.profile-img-wrap {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 260px; height: 260px;
}
.profile-img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  border-radius: 50%;
  border: 3px solid rgba(99,102,241,.5);
  box-shadow: 0 0 60px rgba(99,102,241,.3);
}
.profile-ring {
  position: absolute; border-radius: 50%; border: 1px dashed rgba(99,102,241,.3);
  animation: spin 20s linear infinite;
}
.ring-1 { inset: -20px; }
.ring-2 { inset: -40px; animation-direction: reverse; animation-duration: 30s; }
.profile-badge {
  position: absolute;
  background: var(--surface); border: 1px solid var(--border);
  padding: .4rem .8rem; border-radius: 50px; font-size: .8rem; font-weight: 600;
  display: flex; align-items: center; gap: .4rem;
  box-shadow: var(--shadow); backdrop-filter: blur(10px);
}
.profile-badge.flutter { top: 10%; left: -10%; }
.profile-badge.ai { top: 10%; right: -5%; background: rgba(167,139,250,.15); border-color: rgba(167,139,250,.4); }
.profile-badge.dart { bottom: 20%; left: -10%; }
.profile-badge.python { top: 35%; left: -15%; background: rgba(255,212,59,.1); border-color: rgba(255,212,59,.35); }
.profile-badge.golang { top: 35%; right: -12%; background: rgba(0,172,215,.1); border-color: rgba(0,172,215,.35); }
.profile-badge.awsbadge { bottom: 20%; right: -8%; background: rgba(255,153,0,.1); border-color: rgba(255,153,0,.35); }
.floating-tag {
  position: absolute;
  background: rgba(99,102,241,.15); border: 1px solid var(--border);
  color: var(--primary-light); padding: .25rem .7rem; border-radius: 50px;
  font-size: .75rem; font-weight: 600;
  animation: float 4s infinite ease-in-out;
}
.tag-1 { bottom: 10%; right: 5%; animation-delay: 0s; }
.tag-2 { bottom: 30%; right: -10%; animation-delay: -1.5s; }
.tag-3 { bottom: 40%; left: -5%; animation-delay: -3s; }
.tag-4 { top: 55%; left: -12%; animation-delay: -2s; background: rgba(255,212,59,.1); border-color: rgba(255,212,59,.3); color: #ffd43b; }
.tag-5 { top: 70%; right: -8%; animation-delay: -4s; background: rgba(255,153,0,.1); border-color: rgba(255,153,0,.3); color: #ff9900; }

/* ══════════════════ SECTIONS ══════════════════ */
.section { padding: 6rem 0; }
.section-dark { background: var(--bg2); }
.container { max-width: 1280px; margin: auto; padding: 0 2rem; }

.section-label {
  font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 3px; color: var(--primary);
  margin-bottom: .75rem;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800; margin-bottom: 3rem; line-height: 1.2;
}

/* ══════════════════ ABOUT ══════════════════ */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.about-text p { color: var(--text2); margin-bottom: 1rem; font-size: .95rem; }
.about-text strong { color: var(--text); }
.about-highlights { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.highlight-card {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 1.5rem;
  transition: all .3s;
}
.highlight-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--glow); }
.highlight-card i { font-size: 1.5rem; color: var(--primary); margin-bottom: .75rem; display: block; }
.highlight-card h4 { font-size: .95rem; font-weight: 700; margin-bottom: .4rem; }
.highlight-card p { font-size: .8rem; color: var(--text3); }

/* ══════════════════ TIMELINE ══════════════════ */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: linear-gradient(to bottom, var(--primary), transparent);
}
.timeline-item { position: relative; margin-bottom: 2.5rem; }
.timeline-dot {
  position: absolute; left: -2.42rem; top: .5rem;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--surface2); border: 2px solid var(--text3);
  transition: all .3s;
}
.timeline-dot.active { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 12px rgba(99,102,241,.6); }
.timeline-card {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 1.75rem;
  transition: all .3s;
}
.timeline-card:hover { border-color: var(--border); box-shadow: var(--shadow); }
.tcard-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 1rem; flex-wrap: wrap; gap: .5rem;
}
.tcard-header h3 { font-size: 1.1rem; font-weight: 700; }
.company { display: block; color: var(--text3); font-size: .85rem; margin-top: .2rem; }
.period {
  font-size: .8rem; color: var(--text3);
  background: var(--bg); border: 1px solid var(--border2);
  padding: .25rem .7rem; border-radius: 50px; white-space: nowrap;
}
.period.current { color: #4ade80; border-color: rgba(74,222,128,.3); background: rgba(74,222,128,.08); }
.tcard-list { list-style: none; padding: 0; margin-bottom: 1rem; }
.tcard-list li {
  color: var(--text2); font-size: .875rem; padding: .35rem 0;
  padding-left: 1rem; position: relative;
}
.tcard-list li::before {
  content: '▸'; color: var(--primary); position: absolute; left: 0;
}
.tcard-list strong { color: var(--text); }
.tcard-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tcard-tags span {
  background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.2);
  color: var(--primary-light); padding: .2rem .6rem;
  border-radius: 50px; font-size: .75rem; font-weight: 500;
}

/* ══════════════════ SKILLS ══════════════════ */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }
.skill-category {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 1.5rem;
  transition: all .3s;
}
.skill-category:hover { border-color: var(--border); transform: translateY(-3px); }
.skill-cat-icon { font-size: 1.6rem; color: var(--primary); margin-bottom: .75rem; }
.skill-category h4 { font-size: .9rem; font-weight: 700; margin-bottom: 1rem; color: var(--text2); }
.skill-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.skill-pill {
  background: var(--bg2); border: 1px solid var(--border2);
  color: var(--text2); padding: .3rem .7rem;
  border-radius: 50px; font-size: .8rem; font-weight: 500;
  transition: all .2s;
}
.skill-pill:hover { border-color: var(--primary); color: var(--primary-light); }
.skill-pill.primary {
  background: rgba(99,102,241,.15); border-color: rgba(99,102,241,.4);
  color: var(--primary-light); font-weight: 600;
}
.skill-pill.ai-pill {
  background: rgba(167,139,250,.1); border-color: rgba(167,139,250,.35);
  color: var(--accent2); font-weight: 600;
}
.skill-pill.aws-pill {
  background: rgba(255,153,0,.1); border-color: rgba(255,153,0,.35);
  color: #ff9900; font-weight: 600;
}

/* Agentic AI Feature Cards */
.ai-feature-section { margin-top: 1rem; }
.ai-features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 1.5rem; }
.ai-feat-card {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 2rem; cursor: pointer;
  transition: all .3s; position: relative; overflow: hidden;
}
.ai-feat-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 70%, rgba(99,102,241,.05));
  pointer-events: none;
}
.ai-feat-card:hover { border-color: var(--primary); transform: translateY(-6px); box-shadow: var(--glow); }
.ai-feat-icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 1.25rem;
}
.chat-icon { background: rgba(99,102,241,.2); color: var(--primary-light); }
.voice-icon { background: rgba(34,211,238,.2); color: var(--accent); }
.video-icon { background: rgba(167,139,250,.2); color: var(--accent2); }
.ai-feat-card h4 { font-size: 1.05rem; font-weight: 700; margin-bottom: .6rem; }
.ai-feat-card p { font-size: .85rem; color: var(--text3); margin-bottom: 1.25rem; line-height: 1.6; }
.try-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--primary); font-size: .85rem; font-weight: 600;
  transition: gap .2s;
}
.ai-feat-card:hover .try-btn { gap: .6rem; }

/* ══════════════════ OPEN SOURCE ══════════════════ */
.oss-card {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 2rem;
  display: flex; gap: 1.5rem; align-items: flex-start;
  transition: all .3s;
}
.oss-card:hover { border-color: var(--primary); box-shadow: var(--glow); }
.oss-icon { font-size: 2.5rem; color: var(--text2); flex-shrink: 0; }
.oss-header { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.oss-header h3 { font-size: 1.3rem; font-weight: 800; font-family: 'JetBrains Mono', monospace; }
.oss-badges { display: flex; gap: .5rem; flex-wrap: wrap; }
.oss-badge {
  display: flex; align-items: center; gap: .3rem;
  background: var(--bg2); border: 1px solid var(--border2);
  color: var(--text2); padding: .2rem .6rem;
  border-radius: 50px; font-size: .75rem;
}
.oss-badge.mit { color: #4ade80; border-color: rgba(74,222,128,.3); background: rgba(74,222,128,.08); }
.oss-content p { color: var(--text2); font-size: .9rem; margin-bottom: 1rem; }
.oss-links { display: flex; gap: 1rem; }
.oss-link {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--bg2); border: 1px solid var(--border2);
  color: var(--text2); padding: .4rem 1rem; border-radius: 50px;
  font-size: .85rem; font-weight: 500; transition: all .2s;
}
.oss-link:hover { border-color: var(--primary); color: var(--primary-light); }

/* ══════════════════ EDUCATION ══════════════════ */
.edu-card {
  display: flex; gap: 1.5rem; align-items: center;
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 2rem;
  max-width: 600px; transition: all .3s;
}
.edu-card:hover { border-color: var(--primary); }
.edu-icon { font-size: 2rem; color: var(--primary); flex-shrink: 0; }
.edu-content h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .4rem; }
.edu-school { color: var(--text3); font-size: .875rem; display: flex; align-items: center; gap: .4rem; }

/* ══════════════════ CONTACT ══════════════════ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.contact-intro { color: var(--text2); margin-bottom: 2rem; font-size: .95rem; }
.contact-links { display: flex; flex-direction: column; gap: 1rem; }
.contact-item {
  display: flex; gap: 1rem; align-items: center;
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); padding: 1rem 1.25rem;
  transition: all .2s; color: var(--text);
}
.contact-item:hover { border-color: var(--primary); transform: translateX(4px); }
.contact-icon {
  width: 42px; height: 42px; border-radius: 10px;
  background: rgba(99,102,241,.15); border: 1px solid rgba(99,102,241,.3);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); flex-shrink: 0;
}
.contact-item span { font-size: .75rem; color: var(--text3); display: block; }
.contact-item strong { font-size: .9rem; }
.contact-ai-card {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 2.5rem; text-align: center;
}
.ai-avatar-large {
  width: 90px; height: 90px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: #fff; margin: 0 auto 1.5rem;
  position: relative;
}
.ai-avatar-ring {
  position: absolute; inset: -6px; border-radius: 50%;
  border: 2px dashed rgba(99,102,241,.4); animation: spin 10s linear infinite;
}
.contact-ai-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: .75rem; }
.contact-ai-card p { color: var(--text2); font-size: .9rem; margin-bottom: 1.5rem; }
.ai-modes { display: flex; gap: .75rem; justify-content: center; }
.ai-mode-btn {
  display: flex; align-items: center; gap: .4rem;
  background: var(--bg2); border: 1px solid var(--border2);
  color: var(--text2); padding: .6rem 1.2rem;
  border-radius: 50px; font-size: .85rem; font-weight: 600;
  transition: all .2s;
}
.ai-mode-btn:hover { background: rgba(99,102,241,.15); border-color: var(--primary); color: var(--primary-light); }

/* ══════════════════ FOOTER ══════════════════ */
.footer {
  background: var(--bg); border-top: 1px solid var(--border2);
  padding: 2rem 0; text-align: center;
}
.footer p { color: var(--text3); font-size: .85rem; }
.footer-sub { margin-top: .3rem; color: var(--primary); font-size: .8rem; }

/* ══════════════════ FAB AI ══════════════════ */
.fab-ai {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 900;
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent2));
  color: #fff; font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 32px rgba(99,102,241,.5);
  transition: transform .2s, box-shadow .2s;
  position: fixed;
}
.fab-ai:hover { transform: scale(1.1) translateY(-2px); box-shadow: 0 16px 40px rgba(99,102,241,.6); }
.fab-pulse {
  position: absolute; inset: -8px; border-radius: 50%;
  border: 2px solid rgba(99,102,241,.4);
  animation: fab-pulse 2s infinite;
}
@keyframes fab-pulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* ══════════════════ AI AGENT MODAL ══════════════════ */
.agent-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.7); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  padding: 1rem;
}
.agent-overlay.open { display: flex; animation: fade-in .25s ease; }
.agent-modal {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 20px; width: 100%; max-width: 560px;
  max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: 0 40px 100px rgba(0,0,0,.6);
  overflow: hidden;
  animation: slide-up .3s ease;
}
.agent-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border2);
  background: var(--surface);
}
.agent-identity { display: flex; align-items: center; gap: .75rem; }
.agent-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #fff; position: relative;
}
.agent-status-dot {
  position: absolute; bottom: 2px; right: 2px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #4ade80; border: 2px solid var(--surface);
  animation: pulse 2s infinite;
}
.agent-identity h3 { font-size: 1rem; font-weight: 700; }
.agent-identity p { font-size: .78rem; color: var(--text3); }
.agent-header-actions { display: flex; align-items: center; gap: .4rem; }
.agent-tab-btn {
  width: 36px; height: 36px; border-radius: 8px;
  background: none; color: var(--text3); font-size: .95rem;
  transition: all .2s; display: flex; align-items: center; justify-content: center;
}
.agent-tab-btn:hover, .agent-tab-btn.active {
  background: rgba(99,102,241,.2); color: var(--primary-light);
}
.agent-close {
  width: 36px; height: 36px; border-radius: 8px;
  background: none; color: var(--text3); font-size: 1rem;
  transition: all .2s; display: flex; align-items: center; justify-content: center;
  margin-left: .5rem;
}
.agent-close:hover { background: rgba(239,68,68,.2); color: #f87171; }
.agent-tab-panel { display: none; flex: 1; overflow: hidden; }
.agent-tab-panel.active { display: flex; flex-direction: column; }

/* Chat */
.chat-messages {
  flex: 1; overflow-y: auto; padding: 1.25rem;
  display: flex; flex-direction: column; gap: 1rem;
  min-height: 300px; max-height: 380px;
}
.chat-msg { display: flex; gap: .6rem; align-items: flex-start; }
.chat-msg.user { flex-direction: row-reverse; }
.chat-avatar-sm {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; color: #fff;
}
.chat-msg.user .chat-avatar-sm {
  background: linear-gradient(135deg, #22d3ee, #4ade80);
}
.chat-bubble {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 16px 16px 16px 4px;
  padding: .75rem 1rem; max-width: 78%;
  font-size: .875rem; color: var(--text); line-height: 1.5;
}
.chat-msg.user .chat-bubble {
  background: linear-gradient(135deg, rgba(99,102,241,.25), rgba(167,139,250,.2));
  border-color: rgba(99,102,241,.3); border-radius: 16px 16px 4px 16px;
}
.quick-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.quick-chips button {
  background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.3);
  color: var(--primary-light); padding: .3rem .7rem; border-radius: 50px;
  font-size: .75rem; font-weight: 500; cursor: pointer; transition: all .2s;
}
.quick-chips button:hover { background: rgba(99,102,241,.25); }
.chat-typing {
  display: flex; gap: 4px; align-items: center; padding: 4px 0;
}
.chat-typing span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--text3);
  animation: typing-bounce .8s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: .15s; }
.chat-typing span:nth-child(3) { animation-delay: .3s; }
.chat-input-bar {
  display: flex; gap: .5rem; padding: 1rem 1.25rem;
  border-top: 1px solid var(--border2); background: var(--surface);
}
.chat-input-bar input {
  flex: 1; background: var(--bg); border: 1px solid var(--border2);
  color: var(--text); padding: .6rem 1rem; border-radius: 50px;
  font-size: .875rem; outline: none; font-family: inherit;
  transition: border-color .2s;
}
.chat-input-bar input:focus { border-color: var(--primary); }
.chat-voice-btn, .chat-send-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; transition: all .2s; flex-shrink: 0;
}
.chat-voice-btn { background: var(--bg); border: 1px solid var(--border2); color: var(--text3); }
.chat-voice-btn.recording { background: rgba(239,68,68,.2); border-color: #f87171; color: #f87171; animation: pulse 1s infinite; }
.chat-voice-btn:hover { border-color: var(--accent); color: var(--accent); }
.chat-send-btn {
  background: linear-gradient(135deg, var(--primary), var(--accent2));
  color: #fff;
}
.chat-send-btn:hover { transform: scale(1.05); box-shadow: 0 4px 16px rgba(99,102,241,.4); }
.api-key-bar {
  display: none;
}
.api-key-bar input {
  flex: 1; min-width: 120px; background: var(--bg); border: 1px solid var(--border2);
  color: var(--text); padding: .35rem .75rem; border-radius: 6px;
  font-size: .8rem; outline: none; font-family: inherit;
}
.api-key-bar button {
  background: var(--primary); color: #fff;
  padding: .35rem .75rem; border-radius: 6px; font-size: .8rem; font-weight: 600;
  border: none; cursor: pointer;
}
.server-warning-bar {
  display: flex; align-items: center; gap: .5rem;
  padding: .5rem 1.25rem; background: rgba(251,191,36,.08);
  border-top: 1px solid rgba(251,191,36,.25);
  font-size: .78rem; color: #fbbf24; flex-wrap: wrap;
}
.server-warning-bar code {
  background: rgba(0,0,0,.3); padding: .1rem .4rem;
  border-radius: 4px; font-family: 'JetBrains Mono', monospace; font-size: .78rem;
}
.server-warning-bar button {
  margin-left: auto; background: none; border: none;
  color: var(--text3); cursor: pointer; font-size: .85rem;
}

/* Voice Panel */
.voice-panel {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 2rem; gap: 1.25rem;
}
.voice-visualiser {
  width: 160px; height: 160px; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.voice-avatar {
  width: 90px; height: 90px; border-radius: 50%; z-index: 2;
  background: linear-gradient(135deg, var(--primary), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: #fff;
}
.voice-rings { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.vring {
  position: absolute; border-radius: 50%;
  border: 1.5px solid rgba(99,102,241,.2);
}
.r1 { width: 110px; height: 110px; }
.r2 { width: 135px; height: 135px; }
.r3 { width: 160px; height: 160px; }
.vring.active { animation: voice-ring 1.5s infinite; }
.voice-bars {
  position: absolute; bottom: 0; display: flex; gap: 3px; align-items: flex-end;
  height: 30px; opacity: 0; transition: opacity .3s;
}
.voice-bars.active { opacity: 1; }
.voice-bars span {
  width: 4px; background: var(--primary); border-radius: 2px;
  animation: voice-bar .6s infinite ease-in-out;
  height: 8px;
}
.voice-bars span:nth-child(2) { animation-delay: .1s; }
.voice-bars span:nth-child(3) { animation-delay: .2s; }
.voice-bars span:nth-child(4) { animation-delay: .3s; }
.voice-bars span:nth-child(5) { animation-delay: .4s; }
.voice-bars span:nth-child(6) { animation-delay: .5s; }
.voice-bars span:nth-child(7) { animation-delay: .4s; }
.voice-bars span:nth-child(8) { animation-delay: .3s; }
.voice-bars span:nth-child(9) { animation-delay: .2s; }
.voice-bars span:nth-child(10) { animation-delay: .1s; }
.voice-status { font-size: .9rem; font-weight: 600; color: var(--text2); }
.voice-transcript {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 10px; padding: .75rem 1rem; width: 100%;
  min-height: 50px; font-size: .85rem; color: var(--text2);
  font-style: italic;
}
.voice-response {
  background: rgba(99,102,241,.08); border: 1px solid var(--border);
  border-radius: 10px; padding: .75rem 1rem; width: 100%;
  min-height: 50px; font-size: .875rem; color: var(--text); line-height: 1.5;
}
.voice-controls { display: flex; gap: 1rem; margin-top: .5rem; }
.voice-mic-btn {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent2));
  color: #fff; font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s; box-shadow: 0 8px 24px rgba(99,102,241,.4);
}
.voice-mic-btn:hover { transform: scale(1.08); }
.voice-mic-btn.listening { background: linear-gradient(135deg, #ef4444, #f97316); animation: pulse 1s infinite; }
.voice-stop-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border2);
  color: var(--text3); font-size: .95rem;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.voice-stop-btn:hover { border-color: #f87171; color: #f87171; }

/* Video Panel */
.video-panel { flex: 1; display: flex; flex-direction: column; }
.video-main {
  flex: 1; background: #000; position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 280px; overflow: hidden;
}
.remote-video { width: 100%; height: 100%; object-fit: cover; }
.video-ai-avatar {
  display: flex; flex-direction: column; align-items: center; gap: .75rem;
  z-index: 2;
}
.video-ai-face {
  width: 100px; height: 100px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; color: #fff; position: relative;
}
.video-ai-speaking {
  position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid var(--primary); opacity: 0;
  transition: opacity .3s; box-shadow: 0 0 20px rgba(99,102,241,.5);
}
.video-ai-speaking.active {
  opacity: 1; animation: voice-ring 1s infinite;
  box-shadow: 0 0 30px rgba(99,102,241,.8), inset 0 0 20px rgba(99,102,241,.3);
}
.video-ai-name {
  background: rgba(0,0,0,.6); color: #fff;
  padding: .3rem .8rem; border-radius: 50px; font-size: .8rem; font-weight: 600;
}
.video-ai-response {
  max-width: 300px; margin-top: .5rem; padding: .6rem .8rem;
  background: rgba(99,102,241,.15); border: 1px solid rgba(99,102,241,.3);
  border-radius: 12px; color: #fff; font-size: .85rem; line-height: 1.4;
  text-align: center; min-height: 20px; display: flex; align-items: center;
  justify-content: center; max-height: 100px; overflow-y: auto;
}
.local-video {
  position: absolute; bottom: 10px; right: 10px;
  width: 100px; height: 75px; border-radius: 8px; object-fit: cover;
  border: 2px solid rgba(255,255,255,.2); background: #111;
}
.video-overlay-info {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.7); color: #fff;
  padding: .35rem .85rem; border-radius: 50px; font-size: .8rem; font-weight: 500;
}
.video-transcript-box {
  padding: .6rem 1rem; background: var(--surface);
  border-top: 1px solid var(--border2); font-size: .82rem;
  color: var(--text2); min-height: 44px; max-height: 70px; overflow-y: auto;
}
.video-controls {
  display: flex; gap: 1rem; justify-content: center;
  padding: 1rem; background: var(--surface); border-top: 1px solid var(--border2);
}
.vc-btn {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--border2);
  color: var(--text2); font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.vc-btn:hover { border-color: var(--primary); color: var(--primary-light); }
.vc-btn.active { background: rgba(99,102,241,.2); border-color: var(--primary); color: var(--primary-light); }
.vc-btn.muted { background: rgba(239,68,68,.15); border-color: #f87171; color: #f87171; }
.vc-call {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--accent2));
  color: #fff; border: none;
}
.vc-call.in-call { background: linear-gradient(135deg, #ef4444, #dc2626); }

/* ══════════════════ ANIMATIONS ══════════════════ */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .7; transform: scale(.95); }
}
@keyframes pulse-glow {
  0%, 100% { opacity: .5; }
  50% { opacity: 1; }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes typing-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes voice-bar {
  0%, 100% { height: 6px; }
  50% { height: 24px; }
}
@keyframes voice-ring {
  from { transform: scale(1); opacity: .8; }
  to { transform: scale(1.3); opacity: 0; }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slide-up {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ══════════════════ DATA-AOS EMULATION ══════════════════ */
[data-aos] {
  opacity: 0; transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}
[data-aos="fade-right"] { transform: translateX(-30px); }
[data-aos="fade-left"] { transform: translateX(30px); }
[data-aos].aos-animate { opacity: 1; transform: translate(0); }

/* ══════════════════ RESPONSIVE ══════════════════ */
@media (max-width: 1024px) {
  .hero-container { grid-template-columns: 1fr; gap: 3rem; text-align: center; }
  .hero-text { order: 2; }
  .hero-visual { order: 1; }
  .hero-stats, .hero-cta, .hero-socials { justify-content: center; }
  .hero-sub { margin: 0 auto 2rem; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .ai-features-grid { grid-template-columns: 1fr; }
  .profile-card { width: 300px; height: 320px; }
  .profile-img-wrap { width: 210px; height: 210px; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .about-highlights { grid-template-columns: 1fr 1fr; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .tcard-header { flex-direction: column; }
  .hero-stats { gap: 1rem; }
}
@media (max-width: 480px) {
  .about-highlights { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .ai-modes { flex-direction: column; align-items: center; }
  .agent-modal { border-radius: 16px; }
  .voice-panel { padding: 1rem; }
  .profile-card { width: 260px; height: 280px; }
  .profile-img-wrap { width: 170px; height: 170px; }
}
