@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

/* ============================================================================
   THEME VARIABLES — dark (default) + light
   ============================================================================ */

:root,
[data-theme="dark"] {
  --hub-bg: #030408;
  --hub-bg2: #05060b;
  --hub-surface: rgba(255, 255, 255, 0.03);
  --hub-surface-2: rgba(255, 255, 255, 0.06);
  --hub-border: rgba(255, 255, 255, 0.07);
  --hub-text: #f8fafc;
  --hub-muted: #94a3b8;
  --hub-faint: #475569;

  --hub-accent: #8b5cf6;
  --hub-accent-2: #0ea5e9;
  --hub-accent-3: #c084fc;
  --hub-live: #10b981;

  --hub-radius: 20px;
  --hub-radius-sm: 12px;
  --hub-shadow: 0 32px 64px -16px rgba(0, 0, 0, 0.6);
  --hub-font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --hub-heading: "Space Grotesk", sans-serif;
  --hub-mono: "JetBrains Mono", monospace;

  --hub-card-bg: rgba(13, 17, 23, 0.6);
  --hub-card-hover-bg: rgba(255, 255, 255, 0.04);
  --hub-nav-bg: rgba(3, 4, 8, 0.4);

  --hub-grad-1: rgba(139, 92, 246, 0.12);
  --hub-grad-2: rgba(14, 165, 233, 0.08);
  --hub-grad-3: rgba(192, 132, 252, 0.06);

  /* --- Cyber Technical Tokens --- */
  --hub-cyber-grid: rgba(255, 255, 255, 0.08);
  --hub-cyber-line: rgba(255, 255, 255, 0.15);
  --hub-cyber-node: var(--hub-accent);
  --hub-scanline: rgba(139, 92, 246, 0.05);
  --hub-pulse-max-opacity: 0.4;
}

[data-theme="light"] {
  --hub-bg: #f5f7f9;
  --hub-bg2: #ebedf0;
  --hub-surface: rgba(0, 0, 0, 0.02);
  --hub-surface-2: rgba(0, 0, 0, 0.05);
  --hub-border: rgba(0, 0, 0, 0.06);
  --hub-text: #1e293b;
  --hub-muted: #64748b;
  --hub-faint: #94a3b8;

  --hub-accent: #3b82f6;
  --hub-accent-2: #06b6d4;
  --hub-accent-3: #8b5cf6;
  --hub-live: #10b981;

  --hub-shadow: 0 16px 48px -12px rgba(0, 0, 0, 0.08);

  --hub-card-bg: rgba(255, 255, 255, 0.8);
  --hub-card-hover-bg: #ffffff;
  --hub-nav-bg: rgba(245, 247, 249, 0.7);

  --hub-grad-1: rgba(59, 130, 246, 0.06);
  --hub-grad-2: rgba(6, 182, 212, 0.04);
  --hub-grad-3: rgba(139, 92, 246, 0.03);

  /* --- Blueprint Tokens --- */
  --hub-cyber-grid: rgba(59, 130, 246, 0.08);
  --hub-cyber-line: rgba(59, 130, 246, 0.12);
  --hub-cyber-node: var(--hub-accent);
  --hub-scanline: rgba(59, 130, 246, 0.02);
  --hub-pulse-max-opacity: 0.15;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--hub-text);
  font-family: var(--hub-font);
  background: var(--hub-bg);
  transition: background 400ms ease, color 300ms ease;
  overflow-x: hidden;
}

/* ---- Cyber-Nexus Technical Background ---- */
.hub-tech-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--hub-bg);
  overflow: hidden;
}

.hub-tech-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--hub-cyber-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--hub-cyber-grid) 1px, transparent 1px),
    linear-gradient(var(--hub-cyber-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--hub-cyber-line) 1px, transparent 1px);
  background-size: 20px 20px, 20px 20px, 100px 100px, 100px 100px;
  mask-image: radial-gradient(circle at 50% 50%, black 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black 30%, transparent 90%);
  opacity: 0.8;
}

.hub-tech-scanline {
  position: absolute;
  inset: 0;
  height: 100px;
  background: linear-gradient(to bottom, transparent, var(--hub-scanline), transparent);
  animation: scanline 8s linear infinite;
  z-index: 1;
}

.hub-tech-nodes {
  position: absolute;
  inset: 0;
}

.hub-node {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--hub-cyber-node);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--hub-cyber-node);
  animation: nodePulse 4s ease-in-out infinite;
}

.hub-node::before {
  content: "";
  position: absolute;
  inset: -10px;
  border: 1px solid var(--hub-cyber-node);
  border-radius: 50%;
  opacity: 0.2;
}

[data-theme="dark"] .hub-node::before {
  opacity: 0.6;
  /* Stronger pulse on main page nodes */
}

@keyframes nodeLifecycle {
  0% {
    opacity: 0;
    transform: scale(0);
  }

  25% {
    opacity: 1;
    transform: scale(1);
  }

  75% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(0);
  }
}

@keyframes pulseRing {
  0% {
    inset: -2px;
    opacity: 0;
  }

  25% {
    inset: -2px;
    opacity: 0;
  }

  50% {
    inset: -20px;
    opacity: var(--hub-pulse-max-opacity);
  }

  75% {
    inset: -2px;
    opacity: 0;
  }

  100% {
    inset: -2px;
    opacity: 0;
  }
}

.hub-node-dynamic {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--hub-accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--hub-accent);
  pointer-events: none;
  animation: nodeLifecycle 7s ease-in-out forwards;
  z-index: 1;
}

.hub-node-dynamic::before {
  content: '';
  position: absolute;
  inset: -2px;
  border: 1px solid var(--hub-accent);
  opacity: 0;
  border-radius: 50%;
  animation: pulseRing 7s ease-in-out infinite;
}

[data-theme="dark"] .hub-node-dynamic::before {
  opacity: 0.8;
  /* High visibility for dark mode */
}

@keyframes scanline {
  0% {
    transform: translateY(-100%);
  }

  100% {
    transform: translateY(100vh);
  }
}

@keyframes nodePulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.3;
  }

  50% {
    transform: scale(1.5);
    opacity: 0.8;
  }
}

@keyframes gridPan {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 100px 100px;
  }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  opacity: 0.03;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  z-index: 100;
}

[data-theme="light"] body::before {
  opacity: 0.02;
}

@keyframes orbFloat {
  100% {
    transform: translate(-20px, 20px) scale(0.95);
  }
}



.hub-container {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

/* ============================================================================
   SCROLL-REVEAL ANIMATIONS
   ============================================================================ */

.anim-fade {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.anim-fade.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================================
   HEADER / NAV
   ============================================================================ */

.hub-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  pointer-events: none;
  /* Allow clicking through header to background */
}

.hub-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(900px, calc(100% - 24px));
  margin: 0 auto;
  padding: 8px 24px;
  border: 1px solid var(--hub-border);
  background: var(--hub-nav-bg);
  border-radius: 100px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  /* Re-enable for nav content */
  transition: all 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hub-nav.is-scrolled {
  width: min(700px, calc(100% - 24px));
  background: var(--hub-bg);
  box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.6);
}

.hub-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--hub-text);
  font-family: var(--hub-heading);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.hub-brand-suffix {
  display: inline;
}

@media (max-width: 600px) {
  .hub-brand-suffix {
    display: none;
  }
}

.hub-brand-short {
  display: none;
}

.hub-nav-links {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hub-link {
  color: var(--hub-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 12px;
  padding: 8px 16px;
  border-radius: 100px;
  transition: all 200ms ease;
}

.hub-link:hover {
  color: var(--hub-text);
  background: var(--hub-surface-2);
}

.hub-link.is-active {
  color: var(--hub-text);
  background: var(--hub-surface-2);
  border: 1px solid var(--hub-border);
}

/* -- Theme Toggle Button -- */
.hub-theme-toggle {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hub-border);
  border-radius: 100px;
  background: var(--hub-surface-2);
  cursor: pointer;
  font-size: 14px;
  transition: all 200ms ease;
  position: relative;
  overflow: hidden;
}

.hub-theme-toggle:hover {
  background: var(--hub-surface-2);
  transform: translateY(-1px);
}

.theme-icon-dark,
.theme-icon-light {
  position: absolute;
  transition: opacity 300ms ease, transform 400ms ease;
}

[data-theme="dark"] .theme-icon-dark {
  opacity: 1;
  transform: rotate(0deg);
}

[data-theme="dark"] .theme-icon-light {
  opacity: 0;
  transform: rotate(90deg);
}

[data-theme="light"] .theme-icon-dark {
  opacity: 0;
  transform: rotate(-90deg);
}

[data-theme="light"] .theme-icon-light {
  opacity: 1;
  transform: rotate(0deg);
}

/* ============================================================================
   HERO — Dramatic gradient text + browser card
   ============================================================================ */

.hub-hero {
  margin-top: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 60px;
  gap: 60px;
}

.hub-hero-left {
  max-width: 800px;
}

.hub-kicker {
  margin: 0 0 20px;
  color: var(--hub-accent);
  font-family: var(--hub-mono);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 12px;
}

.hub-title {
  margin: 0 0 24px;
  font-family: var(--hub-heading);
  font-size: clamp(48px, 8vw, 90px);
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-weight: 700;
  color: var(--hub-text);
}

.hub-title span {
  display: block;
}

.hub-title .gradient-text {
  background: linear-gradient(135deg, var(--hub-text) 0%, var(--hub-accent) 50%, var(--hub-accent-2) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 8s linear infinite;
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

.hub-subtitle {
  margin: 0 auto;
  color: var(--hub-muted);
  font-size: 18px;
  line-height: 1.6;
  max-width: 45ch;
  font-weight: 400;
}

.hub-hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  letter-spacing: 0.3px;
  border: 1px solid transparent;
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
}

.hub-btn-primary {
  color: var(--hub-btn-primary-text);
  background: linear-gradient(135deg, var(--hub-accent), var(--hub-accent-2));
  box-shadow: 0 12px 36px rgba(124, 92, 255, 0.2),
    0 0 0 1px rgba(124, 92, 255, 0.15);
}

.hub-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 48px rgba(124, 92, 255, 0.3),
    0 0 0 1px rgba(124, 92, 255, 0.25);
}

.hub-btn-ghost {
  color: var(--hub-text);
  background: var(--hub-surface);
  border-color: var(--hub-border);
}

.hub-btn-ghost:hover {
  transform: translateY(-2px);
  background: var(--hub-surface-2);
}

/* Hero Card */
.hub-hero-right {
  width: 100%;
  max-width: 900px;
  display: block;
  perspective: 2000px;
}

.hub-hero-card {
  width: 100%;
  border-radius: 24px;
  border: 1px solid var(--hub-border);
  background: var(--hub-card-bg);
  box-shadow: var(--hub-shadow),
    0 0 100px rgba(139, 92, 246, 0.08);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 600ms cubic-bezier(0.23, 1, 0.32, 1);
}

.hub-hero-card-top {
  display: flex;
  gap: 7px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--hub-border);
  background: var(--hub-surface);
}

.hub-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--hub-dot-bg);
}

.hub-dot:nth-child(1) {
  background: #ff5f56;
}

.hub-dot:nth-child(2) {
  background: #ffbd2e;
}

.hub-dot:nth-child(3) {
  background: #27c93f;
}

.hub-hero-card-body {
  padding: 0;
}

.hub-skeleton-line {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--hub-surface), var(--hub-surface-2), var(--hub-surface));
  background-size: 200% 100%;
  animation: hubShimmer 1.6s ease-in-out infinite;
  margin-bottom: 12px;
}

.hub-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.hub-skeleton-tile {
  height: 46px;
  border-radius: 14px;
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
}

.w-90 {
  width: 90%;
}

.w-70 {
  width: 70%;
}

.w-60 {
  width: 60%;
}

@keyframes hubShimmer {
  0% {
    background-position: 0% 0%;
  }

  100% {
    background-position: 200% 0%;
  }
}

/* ============================================================================
   STATS BAR
   ============================================================================ */

.hub-stats {
  padding: 48px 0 0;
}

.hub-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.hub-stat {
  padding: 20px;
  border-radius: var(--hub-radius);
  background: var(--hub-card-bg);
  border: 1px solid var(--hub-border);
  backdrop-filter: blur(12px);
  text-align: center;
  transition: transform 200ms ease, border-color 400ms ease, background 700ms ease 100ms;
}

.hub-stat:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 92, 255, 0.2);
  background: var(--hub-card-hover-bg);
}

.hub-stat-number {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--hub-accent), var(--hub-accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.hub-stat-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--hub-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ============================================================================
   ABOUT ME SECTION
   ============================================================================ */

.hub-about {
  padding: 48px 0 24px;
}

.hub-about-card {
  display: flex;
  gap: 32px;
  padding: 36px;
  border-radius: 20px;
  background: var(--hub-card-bg);
  border: 1px solid var(--hub-border);
  backdrop-filter: blur(12px);
  transition: background 300ms ease, border-color 300ms ease;
}

.hub-about-avatar {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
}

.hub-avatar-ring {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--hub-accent), var(--hub-accent-2));
  box-shadow: 0 12px 40px rgba(124, 92, 255, 0.25);
  position: relative;
  animation: avatarGlow 4s ease-in-out infinite alternate;
}

@keyframes avatarGlow {
  0% {
    box-shadow: 0 8px 30px rgba(124, 92, 255, 0.2);
  }

  100% {
    box-shadow: 0 12px 50px rgba(124, 92, 255, 0.35);
  }
}

.hub-avatar-ring::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--hub-bg);
  transition: background 300ms ease;
}

.hub-avatar-emoji {
  position: relative;
  z-index: 1;
  font-size: 38px;
}

.hub-about-body {
  flex: 1;
  min-width: 0;
}

.hub-about-name {
  margin: 2px 0 4px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hub-about-role {
  margin: 0 0 14px;
  color: var(--hub-accent-2);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hub-about-bio {
  margin: 0 0 18px;
  color: var(--hub-muted);
  font-size: 13.5px;
  line-height: 1.75;
  /* Ragged-right: justify + hyphens broke words mid-syllable ("cat-egorization"). */
  text-align: left;
  max-width: 100%;
}

/* Skill tags */

.hub-skill-tag {
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 8px;
  background: rgba(124, 92, 255, 0.10);
  color: var(--hub-accent-3);
  border: 1px solid rgba(124, 92, 255, 0.15);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.hub-skill-tag:hover {
  transform: translateY(-1px);
  background: rgba(124, 92, 255, 0.18);
  border-color: rgba(124, 92, 255, 0.3);
}

/* Social links */
.hub-social-links {
  display: flex;
  gap: 8px;
}

.hub-social {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
  color: var(--hub-muted);
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.hub-social:hover {
  color: var(--hub-text);
  background: var(--hub-surface-2);
  border-color: var(--hub-accent);
  transform: translateY(-2px);
}

.hub-social-sm {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

/* ============================================================================
   BENTO GRID DASHBOARD
   ============================================================================ */

.hub-bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto;
  gap: 16px;
}

.hub-bento-card {
  padding: 24px;
  border-radius: var(--hub-radius);
  background: var(--hub-card-bg);
  border: 1px solid var(--hub-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  transition: all 400ms cubic-bezier(0.23, 1, 0.32, 1);
}

.hub-bento-card:hover {
  background: var(--hub-card-hover-bg);
  border-color: var(--hub-accent);
  transform: translateY(-4px);
  box-shadow: var(--hub-shadow);
}

.bento-intro {
  grid-column: span 4;
  display: flex;
  align-items: center;
  gap: 32px;
}

.bento-intro-aside {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.bento-intro-main {
  flex: 1;
}

.bento-intro-main .hub-about-bio {
  margin: 0;
  text-align: left;
  hyphens: manual;
}

.bento-stack {
  grid-column: span 2;
}

.bento-location {
  grid-column: span 2;
}

@media (max-width: 768px) {
  .hub-bento-grid {
    grid-template-columns: 1fr !important;
  }

  .bento-intro,
  .bento-stack,
  .bento-location {
    grid-column: span 1 !important;
  }

  .bento-intro {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .bento-intro-main .hub-about-bio {
    /* .bento-intro centres the avatar and heading; the bio paragraph opts back
       out -- centred multi-line body text is hard to read. */
    text-align: left;
  }
}

.hub-avatar-wrapper {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--hub-accent), var(--hub-accent-2));
}

.hub-bento-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--hub-bg);
}

.availability-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--hub-live);
  background: rgba(16, 185, 129, 0.1);
  padding: 6px 12px;
  border-radius: 100px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--hub-live);
  border-radius: 50%;
  position: relative;
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--hub-live);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }

  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

.location-content {
  margin-top: 12px;
}

.location-time {
  font-family: var(--hub-mono);
  font-size: 24px;
  font-weight: 700;
  color: var(--hub-text);
}

.location-city {
  font-size: 12px;
  color: var(--hub-muted);
  margin-top: 4px;
}

/* ============================================================================
   PROJECT FILTER BAR
   ============================================================================ */

.hub-filter-bar {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 12px;
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
}

.hub-filter-btn {
  padding: 7px 16px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--hub-muted);
  font-family: var(--hub-font);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}

.hub-filter-btn:hover {
  color: var(--hub-text);
}

.hub-filter-btn.is-active {
  background: var(--hub-accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124, 92, 255, 0.25);
}

/* ============================================================================
   PROJECTS (with thumbnails and tech tags)
   ============================================================================ */

.hub-section {
  padding: 0 0 60px;
}

.hub-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 20px;
}

.hub-h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.hub-muted {
  margin: 0;
  color: var(--hub-muted);
  font-size: 14px;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.hub-project {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border-radius: 18px;
  background: var(--hub-card-bg);
  border: 1px solid var(--hub-border);
  text-decoration: none;
  color: var(--hub-text);
  overflow: hidden;
  position: relative;
  transition: transform 250ms ease, background 250ms ease, border-color 250ms ease, box-shadow 250ms ease;
}

.hub-project::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.05), rgba(35, 200, 255, 0.03));
  opacity: 0;
  transition: opacity 300ms ease;
  z-index: 0;
  pointer-events: none;
}

.hub-project:hover::before {
  opacity: 1;
}

.hub-project:hover {
  transform: translateY(-6px);
  background: var(--hub-card-hover-bg);
  border-color: var(--hub-accent);
  box-shadow: 0 32px 64px -16px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(139, 92, 246, 0.1);
}

/* Spotlight Effect */
.hub-project-spotlight {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(600px circle at var(--x) var(--y),
      rgba(139, 92, 246, 0.06),
      transparent 40%);
  opacity: 0;
  transition: opacity 300ms ease;
}

.hub-project:hover .hub-project-spotlight {
  opacity: 1;
}

.hub-project-disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.hub-project-disabled:hover {
  transform: none;
  background: var(--hub-card-bg);
  border-color: var(--hub-border);
  box-shadow: none;
}

/* -- Project Thumbnail -- */
.hub-project-thumb {
  width: 100%;
  height: 170px;
  background: var(--hub-surface);
  border-bottom: 1px solid var(--hub-border);
  overflow: hidden;
  position: relative;
}

.hub-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.08), rgba(35, 200, 255, 0.05));
  font-size: 42px;
  transition: background 300ms ease;
}

.hub-thumb-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--hub-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hub-thumb-soon {
  background: linear-gradient(135deg, var(--hub-surface), var(--hub-surface-2));
}

.hub-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hub-project:hover .hub-thumb-img {
  transform: scale(1.06);
}

.hub-project-body {
  padding: 18px 20px;
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.hub-project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hub-h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hub-pill {
  font-size: 10px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--hub-muted);
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hub-pill-live {
  color: #064e3b;
  background: rgba(52, 211, 153, 0.85);
  border-color: rgba(52, 211, 153, 0.3);
}

.hub-project-text {
  margin: 8px 0 12px;
  color: var(--hub-muted);
  font-size: 12.5px;
  line-height: 1.55;
}

/* -- Tech Stack Tags -- */
.hub-project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 14px;
}

.hub-tech-tag {
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 6px;
  background: rgba(35, 200, 255, 0.08);
  color: var(--hub-accent-2);
  border: 1px solid rgba(35, 200, 255, 0.12);
}

.hub-tech-tag-muted {
  background: var(--hub-surface);
  color: var(--hub-faint);
  border-color: var(--hub-border);
}

.hub-project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--hub-faint);
  font-size: 11px;
  margin-top: auto;
}

code {
  font-family: var(--hub-mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--hub-code-bg);
  border: 1px solid var(--hub-code-border);
  color: var(--hub-text);
}

.hub-arrow {
  font-weight: 900;
  color: var(--hub-muted);
  transition: transform 200ms ease, color 200ms ease;
}

.hub-project:hover .hub-arrow {
  transform: translateX(4px);
  color: var(--hub-accent);
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.hub-footer {
  padding: 20px 0 28px;
  border-top: 1px solid var(--hub-border);
  background: var(--hub-footer-bg);
  transition: background 300ms ease;
}

.hub-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hub-footer-brand {
  font-weight: 900;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.hub-footer-note {
  margin-top: 4px;
  color: var(--hub-muted);
  font-size: 11px;
}

.hub-last-updated {
  font-size: 11px;
  color: var(--hub-faint);
  font-weight: 600;
}

.hub-last-updated time {
  color: var(--hub-muted);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 980px) {
  .hub-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 24px;
    padding-bottom: 24px;
  }

  .hub-hero-right {
    margin-top: 0;
    width: 100%;
  }

  .hub-hero-card {
    transform: none;
  }

  .hub-grid {
    grid-template-columns: 1fr;
  }

  .hub-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hub-section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .hub-section {
    padding-bottom: 24px;
  }

  .hub-about-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hub-about-bio {
    text-align: left;
  }

  .hub-social-links {
    justify-content: center;
  }

  .hub-footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
}

@media (max-width: 600px) {
  .hub-container {
    width: 100%;
    padding: 0 16px;
  }

  .hub-title {
    font-size: clamp(28px, 8vw, 34px);
    line-height: 1.1;
    margin-bottom: 16px;
  }

  .hub-subtitle {
    font-size: 14px;
  }

  .hub-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .hub-stat {
    padding: 16px 12px;
  }

  .hub-stat-number {
    font-size: 22px;
  }

  .hub-nav {
    padding: 6px 16px;
    gap: 8px;
  }

  .hub-nav-links {
    gap: 8px;
  }

  .hub-link {
    font-size: 12px;
    padding: 6px 8px;
  }

  .hub-about-card {
    padding: 20px;
  }

  .hub-avatar-ring {
    width: 72px;
    height: 72px;
  }

  .hub-avatar-emoji {
    font-size: 32px;
  }

  .hub-project-thumb {
    height: 140px;
  }
}

/* --- Ultra-Small Device Optimization (iPhone SE / 320px) --- */
@media (max-width: 400px) {
  .hub-nav {
    padding: 4px 6px 4px 10px;
    gap: 4px;
    width: calc(100% - 16px);
    /* Use even more screen width */
  }

  .hub-nav-links {
    gap: 2px;
  }

  .hub-link {
    font-size: 10px;
    padding: 4px 6px;
    letter-spacing: -0.02em;
  }

  .hub-brand {
    font-size: 12px;
  }

  .hub-brand-long {
    display: none;
  }

  .hub-brand-short {
    display: inline;
  }

  .hub-theme-toggle {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }
}


/* ============================================================
   TECHNICAL SKILLS
   ============================================================ */
.hub-skills-grid {
  display: grid;
  /* 300px min -> 3 columns inside the 1120px container, so the six groups
     land as a clean 3x2 grid instead of 4+2. */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.hub-skill-group {
  padding: 22px;
  border-radius: var(--hub-radius);
  background: var(--hub-card-bg);
  border: 1px solid var(--hub-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 400ms cubic-bezier(0.23, 1, 0.32, 1),
              background 400ms ease, border-color 400ms ease;
}

.hub-skill-group:hover {
  transform: translateY(-3px);
  background: var(--hub-card-hover-bg);
  border-color: rgba(139, 92, 246, 0.28);
}

.hub-skill-group-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 14px;
}

.hub-skill-num {
  font-family: var(--hub-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--hub-accent);
}

.hub-skill-group-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hub-skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 640px) {
  .hub-skills-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- About: Focus tile ---- */
.hub-focus-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 13px;
}

.hub-focus-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.hub-focus-mark {
  flex-shrink: 0;
  margin-top: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hub-accent);
  box-shadow: 0 0 8px var(--hub-accent);
}

.hub-focus-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--hub-text);
}

.hub-focus-desc {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--hub-muted);
}

/* ============================================================
   CONTACT / CLOSING CTA
   ============================================================ */
.hub-contact {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  padding: 44px 28px;
  border-radius: var(--hub-radius);
  background: var(--hub-card-bg);
  border: 1px solid var(--hub-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hub-contact .hub-kicker {
  margin-bottom: 12px;
}

.hub-contact-title {
  margin: 0 0 12px;
  font-size: clamp(24px, 4vw, 34px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
}

.hub-contact-lead {
  margin: 0 auto 26px;
  max-width: 46ch;
  color: var(--hub-muted);
  font-size: 14.5px;
  line-height: 1.7;
}

.hub-contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* Copyable address — mailto: silently does nothing without a mail client,
   so the address is always visible and one click from the clipboard. */
.hub-email-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 22px;
  font-size: 12.5px;
}

.hub-btn-icon {
  padding: 10px;
}
.hub-btn-icon svg {
  width: 20px;
  height: 20px;
}

.hub-email-addr {
  font-family: var(--hub-mono, ui-monospace, monospace);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--hub-text);
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
  border-radius: 9px;
  padding: 9px 14px;
  user-select: all;
}

.hub-email-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  cursor: pointer;
  color: var(--hub-muted);
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
  border-radius: 9px;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.hub-email-copy:hover {
  color: var(--hub-text);
  background: var(--hub-surface-2);
}

.hub-email-copy:focus-visible {
  outline: 2px solid var(--hub-accent);
  outline-offset: 2px;
}

.hub-email-copy .i-check { display: none; }
.hub-email-copy.is-copied { color: #22c55e; border-color: rgba(34, 197, 94, .45); }
.hub-email-copy.is-copied .i-copy { display: none; }
.hub-email-copy.is-copied .i-check { display: block; }

.hub-email-status {
  color: #22c55e;
  font-weight: 600;
  min-width: 52px;
  text-align: left;
}

/* ============================================================
   FOOTER
   ============================================================ */
.hub-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.hub-footer-nav a {
  color: var(--hub-muted);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  transition: color 180ms ease;
}

.hub-footer-nav a:hover {
  color: var(--hub-text);
}

.hub-footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.hub-footer-social {
  display: flex;
  gap: 8px;
}

@media (max-width: 720px) {
  .hub-footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .hub-footer-right {
    align-items: flex-start;
  }
}

/* ============================================================
   REDUCED MOTION
   Animations are cut to a near-zero duration rather than removed,
   so rules that animate FROM opacity:0 still end up visible.
   Two cases need explicit handling because their resting state is
   opacity:0 -- killing the animation outright would blank them.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  /* Scroll reveals: show immediately, no travel. */
  .anim-fade {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Hero carousel: stop cycling and hold a single slide. Without
     this every slide would finish at opacity:1 and stack. */
  .hero-slider img {
    animation: none !important;
    opacity: 0 !important;
  }

  .hero-slider img.slide-1 {
    opacity: 1 !important;
  }
}

/* ============================================================
   PORTFOLIO AI ASSISTANT WIDGET
   ============================================================ */

.hub-ai-launcher {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  outline: none;
}

.hub-ai-launcher-btn {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--hub-accent), var(--hub-accent-2));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s;
}

.hub-ai-launcher:hover .hub-ai-launcher-btn {
  transform: scale(1.08);
  box-shadow: 0 14px 36px rgba(139, 92, 246, 0.55);
}

.hub-ai-launcher-btn svg {
  width: 26px;
  height: 26px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hub-ai-launcher:hover .hub-ai-launcher-btn svg {
  transform: rotate(12deg);
}

.hub-ai-launcher-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--hub-live);
  border: 2.5px solid var(--hub-bg);
  box-shadow: 0 0 10px var(--hub-live);
}

.hub-ai-launcher-pill {
  background: var(--hub-card-bg);
  border: 1px solid var(--hub-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 8px 14px;
  border-radius: 999px;
  font-family: var(--hub-font);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--hub-text);
  box-shadow: var(--hub-shadow);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
}

[data-theme="light"] .hub-ai-launcher-btn {
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.3);
}

[data-theme="light"] .hub-ai-launcher:hover .hub-ai-launcher-btn {
  box-shadow: 0 14px 30px rgba(59, 130, 246, 0.45);
}

/* Chat Modal Window */
.hub-ai-modal {
  position: fixed;
  bottom: 98px;
  right: 28px;
  width: 400px;
  max-width: calc(100vw - 40px);
  height: 580px;
  max-height: calc(100vh - 120px);
  background: var(--hub-card-bg);
  border: 1px solid var(--hub-border);
  border-radius: var(--hub-radius);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.96);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hub-ai-modal.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Header */
.hub-ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--hub-surface);
  border-bottom: 1px solid var(--hub-border);
}

.hub-ai-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hub-ai-avatar-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--hub-accent), var(--hub-accent-2));
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hub-ai-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.hub-ai-avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--hub-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.hub-ai-status-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--hub-live);
  border: 2px solid var(--hub-bg);
}

.hub-ai-title-wrap {
  display: flex;
  flex-direction: column;
}

.hub-ai-name {
  font-family: var(--hub-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--hub-text);
  line-height: 1.2;
}

.hub-ai-sub {
  font-size: 0.72rem;
  color: var(--hub-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.hub-ai-sub .hub-ai-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--hub-accent);
}

.hub-ai-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hub-ai-icon-btn {
  background: transparent;
  border: none;
  color: var(--hub-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.hub-ai-icon-btn:hover {
  background: var(--hub-surface-2);
  color: var(--hub-text);
}

.hub-ai-icon-btn.hub-ai-close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Chat Body */
.hub-ai-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

.hub-ai-body::-webkit-scrollbar {
  width: 5px;
}

.hub-ai-body::-webkit-scrollbar-thumb {
  background: var(--hub-border);
  border-radius: 99px;
}

/* Message bubbles */
.hub-ai-msg {
  display: flex;
  flex-direction: column;
  max-width: 86%;
  animation: hubMsgPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes hubMsgPop {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hub-ai-msg-bot {
  align-self: flex-start;
}

.hub-ai-msg-user {
  align-self: flex-end;
}

.hub-ai-bubble {
  padding: 12px 15px;
  border-radius: 16px;
  font-size: 0.86rem;
  line-height: 1.55;
  font-family: var(--hub-font);
  word-break: break-word;
}

.hub-ai-msg-bot .hub-ai-bubble {
  background: var(--hub-surface-2);
  border: 1px solid var(--hub-border);
  color: var(--hub-text);
  border-bottom-left-radius: 4px;
}

.hub-ai-msg-bot .hub-ai-bubble a {
  color: var(--hub-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hub-ai-msg-bot .hub-ai-bubble strong {
  color: var(--hub-text);
  font-weight: 700;
}

.hub-ai-msg-bot .hub-ai-bubble ul {
  margin: 6px 0;
  padding-left: 18px;
}

.hub-ai-msg-bot .hub-ai-bubble li {
  margin-bottom: 4px;
}

.hub-ai-msg-bot .hub-ai-bubble code {
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
  padding: 2px 5px;
  border-radius: 4px;
  font-family: var(--hub-mono);
  font-size: 0.8rem;
}

.hub-ai-msg-user .hub-ai-bubble {
  background: linear-gradient(135deg, var(--hub-accent), var(--hub-accent-2));
  color: #ffffff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.25);
}

/* Quick prompt chips */
.hub-ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
  margin-bottom: 4px;
}

.hub-ai-chip {
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--hub-text);
  cursor: pointer;
  font-family: var(--hub-font);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  text-align: left;
}

.hub-ai-chip:hover {
  background: var(--hub-surface-2);
  border-color: var(--hub-accent);
  transform: translateY(-1px);
}

/* Typing Indicator */
.hub-ai-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
  background: var(--hub-surface-2);
  border: 1px solid var(--hub-border);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}

.hub-ai-dot-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hub-accent);
  animation: hubDotPulse 1.4s infinite ease-in-out both;
}

.hub-ai-dot-pulse:nth-child(1) { animation-delay: -0.32s; }
.hub-ai-dot-pulse:nth-child(2) { animation-delay: -0.16s; }

@keyframes hubDotPulse {
  0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Footer / Input Area */
.hub-ai-footer {
  padding: 14px 16px;
  background: var(--hub-surface);
  border-top: 1px solid var(--hub-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hub-ai-input-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hub-ai-input {
  flex: 1;
  background: var(--hub-bg);
  border: 1px solid var(--hub-border);
  border-radius: 999px;
  padding: 10px 16px;
  font-family: var(--hub-font);
  font-size: 0.85rem;
  color: var(--hub-text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.hub-ai-input:focus {
  border-color: var(--hub-accent);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.hub-ai-send-btn {
  background: linear-gradient(135deg, var(--hub-accent), var(--hub-accent-2));
  color: #ffffff;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, opacity 0.15s;
  flex-shrink: 0;
}

.hub-ai-send-btn:hover {
  transform: scale(1.06);
}

.hub-ai-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.hub-ai-disclaimer {
  font-size: 0.68rem;
  color: var(--hub-muted);
  text-align: center;
}

@media (max-width: 480px) {
  .hub-ai-launcher {
    bottom: 20px;
    right: 20px;
  }
  .hub-ai-launcher-pill {
    display: none;
  }
  .hub-ai-modal {
    right: 12px;
    left: 12px;
    bottom: 86px;
    width: auto;
    max-width: none;
    height: calc(100vh - 106px);
  }
}

