/* ══════════════════════════════════════════════════════════════════
   JHON JAIRO VEJAR CABALLERO — Portfolio Premium
   Dark Futuristic — Glassmorphism — Neon Cyan
══════════════════════════════════════════════════════════════════ */

/* ─── CSS Variables ─────────────────────────────────────────────── */
:root {
  --bg:          #020617;
  --bg-card:     #0f172a;
  --bg-alt:      #080f1e;
  --accent:      #06b6d4;
  --accent-2:    #3b82f6;
  --accent-3:    #8b5cf6;
  --text:        #ffffff;
  --text-muted:  #94a3b8;
  --text-dim:    #475569;
  --glow:        rgba(6,182,212,0.35);
  --glow-blue:   rgba(59,130,246,0.25);
  --border:      rgba(6,182,212,0.15);
  --border-card: rgba(255,255,255,0.07);
  --ff-title:    'Syne', sans-serif;
  --ff-body:     'Space Grotesk', sans-serif;
  --ff-mono:     'JetBrains Mono', monospace;
  --radius:      16px;
  --radius-sm:   8px;
  --transition:  all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset & Base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  cursor: none;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: none; }
ul { list-style: none; }

/* ─── Custom Cursor ─────────────────────────────────────────────── */
#cursor-dot {
  position: fixed;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s;
}
#cursor-ring {
  position: fixed;
  width: 36px; height: 36px;
  border: 1.5px solid rgba(6,182,212,0.6);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.12s ease, width 0.25s, height 0.25s, border-color 0.25s;
}
body:has(a:hover) #cursor-ring,
body:has(button:hover) #cursor-ring {
  width: 56px; height: 56px;
  border-color: var(--accent);
}

/* ─── Loader ────────────────────────────────────────────────────── */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#loader.hidden { opacity: 0; visibility: hidden; }

.loader-inner { text-align: center; }
.loader-logo {
  font-family: var(--ff-title);
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.2em;
  margin-bottom: 2rem;
  text-shadow: 0 0 40px var(--glow);
}
.loader-bar {
  width: 240px;
  height: 2px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  margin: 0 auto 1.5rem;
  overflow: hidden;
}
.loader-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  width: 0%;
  border-radius: 99px;
  animation: loadBar 1.8s ease forwards;
  box-shadow: 0 0 12px var(--glow);
}
@keyframes loadBar { to { width: 100%; } }

.loader-text {
  font-family: var(--ff-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
}
.dots { animation: blink 1s steps(3, end) infinite; }
@keyframes blink { 0%,33%{opacity:1} 34%,66%{opacity:0} 67%{opacity:1} }

/* ─── Scrollbar ──────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 99px; }

/* ─── Navbar ─────────────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.2rem 0;
  transition: var(--transition);
}
#navbar.scrolled {
  background: rgba(2,6,23,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0.8rem 0;
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-logo {
  font-family: var(--ff-title);
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.05em;
  margin-right: auto;
}
.logo-dot { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 1.6rem;
}
.nav-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s;
}
.nav-links a:hover { color: #fff; }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--accent);
  border-radius: 99px;
  color: var(--accent);
  letter-spacing: 0.05em;
  transition: var(--transition);
}
.nav-cta:hover {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 20px var(--glow);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-muted);
  border-radius: 99px;
  transition: var(--transition);
}

/* ─── General Layout ─────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}
.section { padding: 6rem 0; }
.section-alt { background: var(--bg-alt); }

.section-header { text-align: center; margin-bottom: 4rem; }
.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}
.section-title {
  font-family: var(--ff-title);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}
.section-sub {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 1rem;
}
.accent { color: var(--accent); }
.mono { font-family: var(--ff-mono); }
.highlight { color: var(--accent); font-weight: 600; }

/* ─── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  border-radius: 99px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--ff-body);
  letter-spacing: 0.03em;
  transition: var(--transition);
  border: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 0 24px var(--glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px var(--glow), 0 8px 24px rgba(0,0,0,0.3);
}
.btn-outline {
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(6,182,212,0.08);
  transform: translateY(-2px);
}
.btn-ghost {
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
  transform: translateY(-2px);
}
.btn-full { width: 100%; justify-content: center; border-radius: var(--radius-sm); }

/* ═══════════════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════════════ */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 7rem 2rem 4rem;
}

#particles-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}
.hero-glow-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(6,182,212,0.12) 0%, transparent 70%);
  top: -150px; left: -100px;
  animation: floatGlow 8s ease-in-out infinite;
}
.hero-glow-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, transparent 70%);
  bottom: -100px; right: -50px;
  animation: floatGlow 10s ease-in-out infinite reverse;
}
@keyframes floatGlow {
  0%,100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 5rem;
  flex-wrap: wrap;
}

/* Photo */
.hero-photo-wrapper {
  position: relative;
  flex-shrink: 0;
}
.hero-photo {
  width: 220px; height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(6,182,212,0.4);
  position: relative;
  z-index: 2;
  display: block;
}
.photo-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1.5px solid rgba(6,182,212,0.25);
  animation: spinRing 12s linear infinite;
}
.photo-ring-2 {
  inset: -24px;
  border-color: rgba(59,130,246,0.15);
  animation-duration: 20s;
  animation-direction: reverse;
  border-style: dashed;
}
@keyframes spinRing { to { transform: rotate(360deg); } }

.photo-badge {
  position: absolute;
  bottom: 10px;
  right: -10px;
  background: linear-gradient(135deg, #022c22, #064e3b);
  border: 1px solid #10b981;
  color: #10b981;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
  white-space: nowrap;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  animation: pulse-badge 2.5s ease-in-out infinite;
}
@keyframes pulse-badge {
  0%,100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
}

/* Hero text */
.hero-text { flex: 1; min-width: 280px; }

.hero-greeting {
  font-family: var(--ff-mono);
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.hero-name {
  font-family: var(--ff-title);
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.0;
  margin-bottom: 1rem;
}
.name-accent {
  color: var(--accent);
  text-shadow: 0 0 40px var(--glow);
}

.hero-typed-wrapper {
  font-family: var(--ff-mono);
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  min-height: 1.6em;
}
.typed-prefix { color: var(--accent); }
#typed-text { color: #7dd3fc; }
.typed-cursor {
  color: var(--accent);
  animation: blink-c 0.8s step-end infinite;
}
@keyframes blink-c { 0%,100%{opacity:1} 50%{opacity:0} }

.hero-tagline {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}
.hero-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 520px;
  margin-bottom: 1.5rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  border-radius: 99px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
}
.badge-green { color: #10b981; border-color: rgba(16,185,129,0.3); background: rgba(16,185,129,0.08); }
.badge i { font-size: 0.65rem; }

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-family: var(--ff-mono);
}
.scroll-line {
  width: 1px; height: 50px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollAnim 2s ease-in-out infinite;
}
@keyframes scrollAnim {
  0%,100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

/* ─── Stats Strip ─────────────────────────────────────────────────── */
.stats-strip {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0;
}
.stats-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.stat-item {
  flex: 1;
  text-align: center;
  padding: 0.5rem;
}
.stat-num {
  font-family: var(--ff-title);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.stat-plus { font-size: 1.5rem; color: var(--accent); font-weight: 800; }
.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  letter-spacing: 0.05em;
}
.stat-divider {
  width: 1px;
  height: 50px;
  background: var(--border-card);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════
   ABOUT
═══════════════════════════════════════════════════════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: center;
}

.about-img-card { position: relative; }
.img-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.img-frame img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  filter: saturate(0.85);
  transition: filter 0.4s;
}
.img-frame:hover img { filter: saturate(1); }
.img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2,6,23,0.5) 0%, transparent 60%);
}

.about-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.tech-pill {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 99px;
  background: rgba(6,182,212,0.1);
  border: 1px solid var(--border);
  color: var(--accent);
  font-family: var(--ff-mono);
  transition: var(--transition);
}
.tech-pill:hover { background: rgba(6,182,212,0.2); box-shadow: 0 0 12px var(--glow); }

.about-subtitle {
  font-family: var(--ff-title);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}
.about-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
}

.about-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
}
.detail-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.detail-item i { color: var(--accent); width: 16px; }

.about-skills-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.about-skills-quick span {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  font-family: var(--ff-mono);
  transition: var(--transition);
}
.about-skills-quick span:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(6,182,212,0.08);
}

/* ═══════════════════════════════════════════════════════════════════
   EXPERIENCE — TIMELINE
═══════════════════════════════════════════════════════════════════ */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 0;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 48%;
  margin-bottom: 2.5rem;
  margin-left: 0;
}
.timeline-item.timeline-right {
  margin-left: 52%;
}

.timeline-dot {
  position: absolute;
  top: 1.2rem;
  right: -10%;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 0.85rem;
  z-index: 2;
  box-shadow: 0 0 16px var(--glow);
}
.timeline-item.timeline-right .timeline-dot {
  right: auto;
  left: -10%;
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
  position: relative;
}
.timeline-card:hover {
  border-color: var(--border);
  box-shadow: 0 0 30px rgba(6,182,212,0.1);
  transform: translateY(-3px);
}
.timeline-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity 0.3s;
}
.timeline-card:hover::before { opacity: 1; }

.tc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.tc-role {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.2rem;
}
.tc-company {
  font-size: 0.8rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.tc-date {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  background: rgba(255,255,255,0.04);
  padding: 0.25rem 0.6rem;
  border-radius: 99px;
  white-space: nowrap;
}
.tc-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.tc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.tc-tags span {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  background: rgba(6,182,212,0.08);
  border: 1px solid rgba(6,182,212,0.15);
  color: var(--accent);
  font-family: var(--ff-mono);
}

.exp-more-note {
  max-width: 900px;
  margin: 1.5rem auto 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.exp-more-note i { color: var(--accent); }

/* ═══════════════════════════════════════════════════════════════════
   SKILLS
═══════════════════════════════════════════════════════════════════ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: var(--transition);
}
.skill-category:hover {
  border-color: var(--border);
  box-shadow: 0 0 24px rgba(6,182,212,0.08);
}

.cat-header {
  font-family: var(--ff-title);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-bars { display: flex; flex-direction: column; gap: 1rem; }

.skill-bar-item {}
.sb-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
}
.sb-top span:first-child { color: #fff; font-weight: 500; }
.sb-pct { color: var(--accent); font-family: var(--ff-mono); font-size: 0.75rem; }

.sb-track {
  height: 4px;
  background: rgba(255,255,255,0.07);
  border-radius: 99px;
  overflow: hidden;
}
.sb-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 99px;
  width: 0%;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px var(--glow);
}

/* Tech badges */
.tech-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}
.tech-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: 80px;
  padding: 1rem 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.tech-badge i { font-size: 1.5rem; color: var(--accent); }
.tech-badge span { font-size: 0.7rem; color: var(--text-muted); text-align: center; font-family: var(--ff-mono); }
.tech-badge:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 0 20px var(--glow);
}
.tech-badge:hover i { text-shadow: 0 0 12px var(--glow); }

/* ═══════════════════════════════════════════════════════════════════
   TOOLS & TECH STACK
═══════════════════════════════════════════════════════════════════ */
.tools-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.tool-group {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  transition: var(--transition);
}
.tool-group:hover {
  border-color: var(--border);
  box-shadow: 0 0 24px rgba(6,182,212,0.08);
}
.tool-group-title {
  font-family: var(--ff-title);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tool-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.tool-pill {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.35rem 0.8rem;
  border-radius: 99px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  font-family: var(--ff-mono);
  transition: var(--transition);
}
.tool-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(6,182,212,0.08);
}
.tool-group-note {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .tools-groups { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════
   PROJECTS
═══════════════════════════════════════════════════════════════════ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.project-card-wide { grid-column: span 3; }

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(6,182,212,0.04), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.project-card:hover {
  border-color: rgba(6,182,212,0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 30px rgba(6,182,212,0.08);
}
.project-card:hover::after { opacity: 1; }

.pc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pc-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(6,182,212,0.1);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--accent);
  transition: var(--transition);
}
.project-card:hover .pc-icon { box-shadow: 0 0 16px var(--glow); }
.pc-num {
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}
.pc-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}
.pc-desc { font-size: 0.875rem; color: var(--text-muted); flex: 1; }
.pc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.pc-tags span {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.2);
  color: #7dd3fc;
  font-family: var(--ff-mono);
}
.pc-links { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.pc-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 99px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  transition: var(--transition);
}
.pc-btn:hover { border-color: var(--accent); color: var(--accent); }
.pc-btn-primary {
  background: rgba(6,182,212,0.1);
  border-color: var(--border);
  color: var(--accent);
}
.pc-btn-primary:hover {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 16px var(--glow);
}

/* ═══════════════════════════════════════════════════════════════════
   CERTIFICATIONS
═══════════════════════════════════════════════════════════════════ */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 3rem;
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: var(--transition);
}
.cert-card:hover {
  border-color: var(--border);
  transform: translateY(-4px);
  box-shadow: 0 0 24px rgba(6,182,212,0.1);
}
.cert-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(6,182,212,0.1);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--accent);
  margin: 0 auto 0.75rem;
  transition: var(--transition);
}
.cert-card:hover .cert-icon { box-shadow: 0 0 16px var(--glow); }
.cert-card h5 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.3rem;
}
.cert-card p {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.cert-issuer {
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  color: var(--accent);
  background: rgba(6,182,212,0.08);
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
}

.ponencias {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 2rem;
}
.ponencias-title {
  font-family: var(--ff-title);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ponencias-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.ponencia-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-card);
}
.ponencia-item i { color: var(--accent); margin-top: 2px; flex-shrink: 0; }
.ponencia-item p { font-size: 0.85rem; color: var(--text-muted); }

.cvlac-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  margin-right: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 99px;
  transition: var(--transition);
}
.cvlac-link:hover {
  background: rgba(6,182,212,0.1);
  box-shadow: 0 0 16px var(--glow);
}

/* ═══════════════════════════════════════════════════════════════════
   CONTACT
═══════════════════════════════════════════════════════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 3rem;
  align-items: start;
}

.ci-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.ci-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.ci-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  background: rgba(6,182,212,0.1);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.ci-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: var(--ff-mono);
  margin-bottom: 0.2rem;
}
.ci-value {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.2s;
  word-break: break-word;
}
a.ci-value:hover { color: var(--accent); }

.social-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.social-btn {
  width: 46px; height: 46px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-muted);
  transition: var(--transition);
}
.social-wa:hover { border-color: #25d366; color: #25d366; box-shadow: 0 0 16px rgba(37,211,102,0.3); }
.social-li:hover { border-color: #0a66c2; color: #0a66c2; box-shadow: 0 0 16px rgba(10,102,194,0.3); }
.social-em:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 16px var(--glow); }
.social-gh:hover { border-color: #e6edf3; color: #e6edf3; box-shadow: 0 0 16px rgba(230,237,243,0.2); }
.social-orcid:hover { border-color: #a6ce39; color: #a6ce39; box-shadow: 0 0 16px rgba(166,206,57,0.3); }
.social-cvlac:hover { border-color: var(--accent-3); color: var(--accent-3); box-shadow: 0 0 16px rgba(139,92,246,0.3); }
.social-ig:hover { border-color: #e1306c; color: #e1306c; box-shadow: 0 0 16px rgba(225,48,108,0.3); }

.contact-form-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 2rem;
}
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.cf-field { display: flex; flex-direction: column; gap: 0.4rem; }
.cf-field label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }
.cf-field input,
.cf-field textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: #fff;
  font-family: var(--ff-body);
  font-size: 0.9rem;
  transition: border-color 0.2s;
  outline: none;
  resize: vertical;
}
.cf-field input:focus,
.cf-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(6,182,212,0.1);
}
.cf-field input::placeholder,
.cf-field textarea::placeholder { color: var(--text-dim); }

/* ─── Footer ──────────────────────────────────────────────────────── */
#footer {
  position: relative;
  background: var(--bg-card);
  border-top: 1px solid var(--border-card);
  padding: 3rem 2rem;
  text-align: center;
  overflow: hidden;
}
.footer-glow {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 400px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.footer-inner { position: relative; z-index: 1; }
.footer-logo {
  font-family: var(--ff-title);
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.75rem;
}
.footer-copy {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.footer-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.footer-social a {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: var(--transition);
}
.footer-social a:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 14px var(--glow);
  transform: translateY(-2px);
}
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
}
.footer-links a {
  font-size: 0.8rem;
  color: var(--text-dim);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }

/* ─── Back to Top ─────────────────────────────────────────────────── */
#backToTop {
  position: fixed;
  bottom: 6rem; right: 2rem;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  border: none;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  box-shadow: 0 0 20px var(--glow);
}
#backToTop.visible { opacity: 1; transform: translateY(0); }
#backToTop:hover { transform: translateY(-3px); box-shadow: 0 0 30px var(--glow); }

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .project-card-wide { grid-column: span 2; }
  .certs-grid { grid-template-columns: repeat(3, 1fr); }
  .skills-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .timeline::before { left: 20px; }
  .timeline-item, .timeline-item.timeline-right { width: 100%; margin-left: 0; padding-left: 3.5rem; }
  .timeline-dot { left: 1px !important; right: auto !important; }
  .contact-grid { grid-template-columns: 1fr; }
  .ponencias-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .hero-content { gap: 2.5rem; flex-direction: column; text-align: center; }
  .hero-badges, .hero-buttons { justify-content: center; }
  .hero-photo { width: 170px; height: 170px; }
  .stats-container { flex-wrap: wrap; gap: 1.5rem; }
  .stat-divider { display: none; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card-wide { grid-column: span 1; }
  .certs-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 4rem 0; }
  #cursor-dot, #cursor-ring { display: none; }
  body { cursor: auto; }
  button { cursor: pointer; }
  .ai-chat-panel { width: calc(100vw - 2rem); right: 1rem; left: 1rem; }
}

@media (max-width: 480px) {
  .certs-grid { grid-template-columns: 1fr; }
  .hero-name { font-size: 2.4rem; }
}

/* ═══════════════════════════════════════════════════════════════════
   EDUCATION
═══════════════════════════════════════════════════════════════════ */
.education-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 900px;
  margin: 0 auto;
}

.edu-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: var(--transition);
  position: relative;
}
.edu-card:hover {
  border-color: var(--border);
  box-shadow: 0 0 28px rgba(6,182,212,0.08);
  transform: translateX(4px);
}

.edu-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}
.edu-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: rgba(6,182,212,0.1);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--accent);
  flex-shrink: 0;
  transition: var(--transition);
}
.edu-card:hover .edu-icon { box-shadow: 0 0 16px var(--glow); }
.edu-line {
  width: 1px;
  flex: 1;
  min-height: 30px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  margin-top: 8px;
  opacity: 0.3;
}

.edu-body { flex: 1; }

.edu-status {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--ff-mono);
  padding: 0.2rem 0.65rem;
  border-radius: 99px;
  margin-bottom: 0.5rem;
}
.edu-status-active {
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.3);
  color: #10b981;
}
.edu-status-done {
  background: rgba(6,182,212,0.08);
  border: 1px solid rgba(6,182,212,0.2);
  color: var(--accent);
}

.edu-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.3rem;
  line-height: 1.3;
}
.edu-inst {
  font-size: 0.82rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
}
.edu-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.edu-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.edu-tags span {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.2);
  color: #7dd3fc;
  font-family: var(--ff-mono);
}

.edu-date {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  white-space: nowrap;
  padding: 0.25rem 0.65rem;
  background: rgba(255,255,255,0.04);
  border-radius: 99px;
  border: 1px solid var(--border-card);
  align-self: flex-start;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .edu-card { flex-wrap: wrap; }
  .edu-date { order: -1; }
  .edu-left { display: none; }
}

/* ─── WhatsApp Flotante ──────────────────────────────────────────── */
#whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 54px;
  height: 54px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  z-index: 9990;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  transition: var(--transition);
  animation: wa-pulse 2.5s ease-in-out infinite;
}
#whatsapp-float:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 30px rgba(37,211,102,0.6);
}
#whatsapp-float:hover .wa-tooltip {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.wa-tooltip {
  position: absolute;
  right: 64px;
  background: #075e54;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 99px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-8px);
  transition: var(--transition);
  pointer-events: none;
  font-family: var(--ff-body);
}
.wa-tooltip::before {
  content: '';
  position: absolute;
  right: -5px;
  left: auto;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: #075e54;
  border-right: none;
}

@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.4); }
  50%       { box-shadow: 0 4px 30px rgba(37,211,102,0.7), 0 0 0 8px rgba(37,211,102,0.1); }
}

/* ─── Otras Certificaciones ──────────────────────────────────────── */
.other-certs {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 2rem;
  margin-top: 1.5rem;
}

.other-certs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.oc-group {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  transition: var(--transition);
}
.oc-group:hover {
  border-color: var(--border);
  background: rgba(6,182,212,0.03);
}

.oc-group-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--ff-mono);
}

.oc-group ul {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.oc-group ul li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.oc-group ul li i {
  color: var(--accent);
  font-size: 0.6rem;
  margin-top: 4px;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .other-certs-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 550px) {
  .other-certs-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════
   AI CHAT WIDGET
═══════════════════════════════════════════════════════════════════ */
#aiChatToggle {
  position: fixed;
  bottom: 8.4rem;
  right: 2rem;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  border: none;
  color: #fff;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9989;
  box-shadow: 0 4px 24px var(--glow);
  transition: var(--transition);
}
#aiChatToggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 34px var(--glow);
}
#aiChatToggle.active { transform: scale(0.9); opacity: 0.85; }
.ai-chat-tooltip {
  position: absolute;
  right: 64px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 99px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-8px);
  transition: var(--transition);
  pointer-events: none;
}
#aiChatToggle:hover .ai-chat-tooltip { opacity: 1; transform: translateX(0); }

.ai-chat-panel {
  position: fixed;
  bottom: 8.4rem;
  right: 2rem;
  width: 380px;
  max-height: 560px;
  height: 70vh;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(6,182,212,0.08);
  z-index: 9995;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.97);
  transition: var(--transition);
}
.ai-chat-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.ai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-card);
  background: rgba(6,182,212,0.05);
}
.ai-chat-header-left { display: flex; align-items: center; gap: 0.75rem; }
.ai-chat-status {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  flex-shrink: 0;
  animation: pulse-badge 2.5s ease-in-out infinite;
}
.ai-chat-title { font-size: 0.85rem; font-weight: 700; color: #fff; }
.ai-chat-subtitle { font-size: 0.7rem; color: var(--text-dim); }
#aiChatClose {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 0.25rem;
  transition: color 0.2s;
}
#aiChatClose:hover { color: #fff; }

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.1rem 1.1rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.ai-msg {
  max-width: 88%;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  font-size: 0.83rem;
  line-height: 1.5;
}
.ai-msg-bot {
  align-self: flex-start;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  border-bottom-left-radius: 3px;
}
.ai-msg-user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-bottom-right-radius: 3px;
}
.ai-msg-typing { display: flex; gap: 4px; padding: 0.85rem 1rem; }
.ai-msg-typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: typingBounce 1.2s infinite ease-in-out;
}
.ai-msg-typing span:nth-child(2) { animation-delay: 0.15s; }
.ai-msg-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.ai-chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem 0.75rem;
}
.ai-chip {
  font-size: 0.7rem;
  padding: 0.35rem 0.7rem;
  border-radius: 99px;
  background: rgba(6,182,212,0.08);
  border: 1px solid var(--border);
  color: var(--accent);
  font-family: var(--ff-mono);
  transition: var(--transition);
  cursor: pointer;
}
.ai-chip:hover { background: rgba(6,182,212,0.18); }

.ai-chat-input-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border-card);
}
#aiChatInput {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-card);
  border-radius: 99px;
  padding: 0.6rem 1rem;
  color: #fff;
  font-family: var(--ff-body);
  font-size: 0.83rem;
  outline: none;
}
#aiChatInput:focus { border-color: var(--accent); }
.ai-chat-input-row button {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}
.ai-chat-input-row button:hover { box-shadow: 0 0 16px var(--glow); }

.ai-chat-footer {
  text-align: center;
  font-size: 0.65rem;
  color: var(--text-dim);
  padding-bottom: 0.7rem;
  letter-spacing: 0.05em;
}

@media (max-width: 480px) {
  #aiChatToggle { bottom: 8rem; right: 1.25rem; }
  .ai-chat-panel { bottom: 7.6rem; }
}
