/* ============================================================
   PORTFOLIO WEBSITE - Custom Stylesheet
   Theme: Dark Futuristic / Deep Space
   Accents: Cyan (#00f5ff), Purple (#a855f7), Emerald (#10b981)
   Font: Inter (Google Fonts)
   ============================================================ */

/* ============================================================
   1. CSS CUSTOM PROPERTIES
   ============================================================ */

:root {
  /* Background Colors */
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #1a1a2e;

  /* Text Colors */
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;

  /* Accent Colors */
  --accent-cyan: #00f5ff;
  --accent-purple: #a855f7;
  --accent-green: #10b981;

  /* Glow Effects */
  --glow-cyan: 0 0 20px rgba(0, 245, 255, 0.3);
  --glow-purple: 0 0 20px rgba(168, 85, 247, 0.3);
  --glow-green: 0 0 20px rgba(16, 185, 129, 0.3);

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(10px);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Spacing */
  --section-padding: 6rem 2rem;
  --max-width: 1200px;
}

/* Light Theme Overrides */
[data-theme='light'] {
  --bg-primary: #f8f9fa;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --text-primary: #1a1a2e;
  --text-secondary: #555555;
  --accent-cyan: #00c4cc;
  --accent-purple: #9333ea;
  --accent-green: #059669;
  --glow-cyan: 0 0 20px rgba(0, 196, 204, 0.2);
  --glow-purple: 0 0 20px rgba(147, 51, 234, 0.2);
  --glow-green: 0 0 20px rgba(5, 150, 105, 0.2);
  --glass-bg: rgba(0, 0, 0, 0.02);
  --glass-border: rgba(0, 0, 0, 0.08);
}


/* ============================================================
   2. BASE STYLES
   ============================================================ */

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  transition: background-color var(--transition-base), color var(--transition-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-purple));
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #33f7ff, #b96ef9);
}

/* Selection */
::selection {
  background-color: var(--accent-cyan);
  color: #0a0a0a;
}

::-moz-selection {
  background-color: var(--accent-cyan);
  color: #0a0a0a;
}


/* ============================================================
   3. SCROLL PROGRESS BAR
   ============================================================ */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  z-index: 9999;
  transform-origin: left;
  transition: width 0.1s linear;
  pointer-events: none;
}


/* ============================================================
   4. NAVBAR
   ============================================================ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 2rem;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar.scrolled {
  background: rgba(17, 17, 17, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  padding: 0.7rem 2rem;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  position: relative;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition-base);
  padding: 0.25rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-cyan);
  transition: width var(--transition-base);
  transform: translateX(-50%);
  border-radius: 1px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-cyan);
}


/* ============================================================
   5. MOBILE MENU
   ============================================================ */

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100vh;
  background: var(--bg-secondary);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 5rem;
  display: flex;
  flex-direction: column;
}

.mobile-menu.active {
  transform: translateX(0);
}

.mobile-menu .nav-link {
  display: block;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.mobile-menu .nav-link::after {
  display: none;
}

.mobile-menu .nav-link:hover,
.mobile-menu .nav-link.active {
  background: rgba(0, 245, 255, 0.05);
  color: var(--accent-cyan);
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
  z-index: 1000;
}

.mobile-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Hamburger Button */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1002;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-base);
  border-radius: 1px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}


/* ============================================================
   6. HERO SECTION
   ============================================================ */

.hero {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 2rem;
}

/* Profile Photo */
.profile-photo-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
}

.profile-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-cyan);
  box-shadow: var(--glow-cyan);
  animation: profileGlow 3s ease-in-out infinite alternate;
  position: relative;
  z-index: 1;
}

.profile-photo-wrapper::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: conic-gradient(from 0deg, var(--accent-cyan), var(--accent-purple), var(--accent-cyan)) border-box;
  -webkit-mask:
    linear-gradient(#fff 0 0) padding-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: spin 8s linear infinite;
}

/* Typing Effect */
.typing-cursor {
  border-right: 2px solid var(--accent-cyan);
  animation: blink 0.6s infinite;
  padding-right: 2px;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  color: var(--text-secondary);
  min-height: 2.5rem;
  margin-bottom: 1.5rem;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}


/* ============================================================
   7. SECTION STYLES
   ============================================================ */

.section {
  padding: var(--section-padding);
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  font-size: 1.1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.section-divider {
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  margin: 0 auto 3rem;
  border-radius: 2px;
}


/* ============================================================
   8. ABOUT SECTION
   ============================================================ */

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.highlight-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition-base);
  cursor: default;
}

.highlight-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
}

.highlight-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.highlight-number {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.highlight-label {
  font-size: 0.95rem;
  color: var(--text-secondary);
}


/* ============================================================
   9. SKILLS SECTION
   ============================================================ */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.skill-category {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition-base);
}

.skill-category:hover {
  border-color: var(--accent-purple);
  box-shadow: var(--glow-purple);
}

.skill-category-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-category-title i {
  color: var(--accent-cyan);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.8rem;
  background: rgba(0, 245, 255, 0.08);
  border: 1px solid rgba(0, 245, 255, 0.15);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-primary);
  transition: all var(--transition-base);
  cursor: default;
  gap: 0.3rem;
}

.skill-tag:hover {
  background: rgba(0, 245, 255, 0.15);
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(0, 245, 255, 0.2);
}

.skill-tag i {
  font-size: 0.8rem;
  color: var(--accent-cyan);
}

/* Skill Bars */
.skill-bar-container {
  margin-top: 1rem;
}

.skill-bar-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.skill-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.8rem;
}

.skill-bar-fill {
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.skill-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmer 2s infinite;
}


/* ============================================================
   10. EXPERIENCE TIMELINE
   ============================================================ */

.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-cyan), var(--accent-purple), var(--accent-green));
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
}

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

.timeline-dot {
  position: absolute;
  left: -31px;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-cyan);
  border: 3px solid var(--bg-primary);
  box-shadow: var(--glow-cyan);
  z-index: 1;
}

.timeline-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition-base);
}

.timeline-card:hover {
  transform: translateX(5px);
  border-color: rgba(0, 245, 255, 0.2);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.timeline-company {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.timeline-role {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.timeline-date {
  font-size: 0.85rem;
  color: var(--accent-purple);
  font-weight: 500;
  white-space: nowrap;
}

.timeline-location {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Expandable Details */
.timeline-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-card.expanded .timeline-details {
  max-height: 500px;
}

.timeline-details ul {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.timeline-details li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.timeline-details li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
}

.timeline-toggle {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--accent-cyan);
  cursor: pointer;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-family: inherit;
  transition: all var(--transition-base);
  margin-top: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.timeline-toggle:hover {
  background: rgba(0, 245, 255, 0.1);
  border-color: var(--accent-cyan);
}


/* ============================================================
   11. EDUCATION & CERTIFICATIONS
   ============================================================ */

.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.cert-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-base);
}

.cert-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-purple);
  box-shadow: var(--glow-purple);
}

.cert-icon {
  font-size: 2rem;
  color: var(--accent-cyan);
  margin-bottom: 1rem;
}

.cert-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.cert-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cert-date {
  font-size: 0.8rem;
  color: var(--accent-purple);
  margin-top: 0.5rem;
}

.cert-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--accent-cyan);
  text-decoration: none;
  font-size: 0.85rem;
  margin-top: auto;
  padding-top: 1rem;
  transition: color var(--transition-base);
}

.cert-link:hover {
  color: var(--accent-purple);
}

.cert-link i {
  font-size: 0.75rem;
  transition: transform var(--transition-base);
}

.cert-link:hover i {
  transform: translateX(3px);
}

/* Featured Certification Card */
.cert-featured {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  max-width: 720px;
  margin: 0 auto 2rem;
  padding: 2.5rem;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(0, 245, 255, 0.2);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.cert-featured:hover {
  border-color: rgba(0, 245, 255, 0.45);
  box-shadow: 0 0 30px rgba(0, 245, 255, 0.12), 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Subtle animated gradient shimmer along the top edge */
.cert-featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple), var(--accent-cyan));
  background-size: 200% 100%;
  animation: gradientShift 4s ease infinite;
}

.cert-featured-badge-col {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-featured-badge {
  width: 150px;
  height: 150px;
  object-fit: contain;
  border-radius: var(--radius-md);
  transition: transform var(--transition-base), filter var(--transition-base);
  filter: drop-shadow(0 0 8px rgba(0, 245, 255, 0.15));
}

.cert-featured:hover .cert-featured-badge {
  transform: scale(1.05);
  filter: drop-shadow(0 0 16px rgba(0, 245, 255, 0.3));
}

.cert-featured-info-col {
  flex: 1;
  min-width: 0;
}

.cert-featured-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0a0a0a;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-green));
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.75;
  }
}

.cert-featured-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 0.25rem;
}

.cert-featured-code {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-purple);
  margin-bottom: 0.75rem;
}

.cert-featured-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Responsive: stack vertically on mobile */
@media (max-width: 640px) {
  .cert-featured {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
  }

  .cert-featured-badge {
    width: 120px;
    height: 120px;
  }

  .cert-featured-title {
    font-size: 1.2rem;
  }

  .cert-featured-info-col .btn-primary {
    justify-content: center;
    width: 100%;
  }
}

/* Light theme */
[data-theme='light'] .cert-featured {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 196, 204, 0.25);
}

[data-theme='light'] .cert-featured:hover {
  border-color: rgba(0, 196, 204, 0.5);
  box-shadow: 0 0 30px rgba(0, 196, 204, 0.1), 0 8px 32px rgba(0, 0, 0, 0.08);
}

[data-theme='light'] .cert-featured-tag {
  color: #ffffff;
}


/* ============================================================
   12. CONTACT SECTION
   ============================================================ */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-item i {
  font-size: 1.5rem;
  color: var(--accent-cyan);
  width: 40px;
  text-align: center;
  flex-shrink: 0;
}

.contact-item-text {
  display: flex;
  flex-direction: column;
}

.contact-item-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.contact-item-value {
  font-size: 1rem;
  color: var(--text-primary);
}

/* Contact Form */
.contact-form {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group:last-of-type {
  margin-bottom: 0;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.5;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.1);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}

.form-error {
  color: #ef4444;
  font-size: 0.8rem;
  margin-top: 0.3rem;
  display: none;
}

.form-error.show {
  display: block;
}

.form-success {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-lg);
}

.form-success-icon {
  font-size: 3.5rem;
  color: var(--accent-green);
  margin-bottom: 1rem;
  animation: fadeInUp 0.5s ease-out;
}

.form-success-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-success-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Disabled / loading state for submit button */
.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}


/* ============================================================
   13. BUTTONS
   ============================================================ */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: #ffffff;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  transition: all var(--transition-base);
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 245, 255, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  background: transparent;
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  transition: all var(--transition-base);
  text-decoration: none;
  line-height: 1.4;
}

.btn-secondary:hover {
  background: rgba(0, 245, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 245, 255, 0.15);
}

.btn-secondary:active {
  transform: translateY(0);
}

.btn-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-base);
  font-size: 1rem;
  text-decoration: none;
}

.btn-icon:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
}


/* ============================================================
   14. BACK TO TOP BUTTON
   ============================================================ */

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: #ffffff;
  border: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  z-index: 999;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 245, 255, 0.3);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 245, 255, 0.4);
}

.back-to-top:active {
  transform: translateY(-1px);
}


/* ============================================================
   15. FOOTER
   ============================================================ */

.footer {
  background: var(--bg-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 3rem 2rem;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-base);
  font-size: 1.2rem;
}

.footer-link:hover {
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

.footer-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-text a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color var(--transition-base);
}

.footer-text a:hover {
  color: var(--accent-purple);
}


/* ============================================================
   16. SCROLL ANIMATIONS
   ============================================================ */

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-slide-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.animate-slide-right {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.animate-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Animation Delay Utilities */
.delay-1 {
  transition-delay: 0.1s;
}

.delay-2 {
  transition-delay: 0.2s;
}

.delay-3 {
  transition-delay: 0.3s;
}

.delay-4 {
  transition-delay: 0.4s;
}

.delay-5 {
  transition-delay: 0.5s;
}


/* ============================================================
   17. TOAST NOTIFICATION
   ============================================================ */

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg-card);
  border: 1px solid var(--accent-cyan);
  color: var(--text-primary);
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  z-index: 10000;
  opacity: 0;
  transition: all var(--transition-base);
  pointer-events: none;
  box-shadow: var(--glow-cyan);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 90vw;
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.toast i {
  color: var(--accent-cyan);
}


/* ============================================================
   18. KEYFRAME ANIMATIONS
   ============================================================ */

@keyframes profileGlow {
  from {
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.3), 0 0 40px rgba(0, 245, 255, 0.1);
  }

  to {
    box-shadow: 0 0 30px rgba(0, 245, 255, 0.5), 0 0 60px rgba(0, 245, 255, 0.2);
  }
}

@keyframes blink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

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

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

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}


/* ============================================================
   19. RESPONSIVE DESIGN
   ============================================================ */

/* Tablet and below */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
  }

  .section {
    padding: 4rem 1rem;
  }

  .section-title {
    font-size: 2rem;
  }

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

  .timeline {
    padding-left: 25px;
  }

  .timeline::before {
    left: 10px;
  }

  .timeline-dot {
    left: -23px;
    width: 12px;
    height: 12px;
  }

  .hero-title {
    font-size: clamp(2rem, 6vw, 3rem);
  }

  .hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.4rem);
  }

  .profile-photo {
    width: 140px;
    height: 140px;
  }

  .profile-photo-wrapper::before {
    inset: -6px;
  }

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

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

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

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .navbar {
    padding: 0.8rem 1rem;
  }

  .navbar.scrolled {
    padding: 0.6rem 1rem;
  }

  .highlight-number {
    font-size: 2.5rem;
  }

  .timeline-header {
    flex-direction: column;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .section {
    padding: 3rem 0.75rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }

  .hero-title {
    font-size: clamp(1.75rem, 7vw, 2.5rem);
  }

  .profile-photo {
    width: 120px;
    height: 120px;
  }

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

  .highlight-card {
    padding: 1.5rem;
  }

  .skill-category {
    padding: 1.5rem;
  }

  .timeline-card {
    padding: 1.5rem;
  }

  .cert-card {
    padding: 1.5rem;
  }

  .contact-form {
    padding: 1.5rem;
  }

  .btn-primary,
  .btn-secondary {
    padding: 0.7rem 1.4rem;
    font-size: 0.9rem;
    width: 100%;
    justify-content: center;
  }

  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }

  .mobile-menu {
    width: 100%;
  }

  .footer {
    padding: 2rem 1rem;
  }

  .highlight-number {
    font-size: 2rem;
  }
}

/* Desktop and above */
@media (min-width: 1024px) {
  .navbar {
    padding: 1.2rem 3rem;
  }

  .navbar.scrolled {
    padding: 0.8rem 3rem;
  }

  .section {
    padding: 8rem 2rem;
  }

  .hero-content {
    padding: 3rem;
  }

  .timeline {
    padding-left: 50px;
  }

  .timeline::before {
    left: 24px;
  }

  .timeline-dot {
    left: -35px;
    width: 16px;
    height: 16px;
  }

  .about-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .contact-grid {
    gap: 4rem;
  }
}


/* ============================================================
   20. PRINT STYLES
   ============================================================ */

@media print {

  .navbar,
  .scroll-progress,
  .back-to-top,
  .hero-canvas,
  .theme-toggle,
  .hamburger,
  .mobile-menu,
  .mobile-overlay,
  .contact-form,
  .footer-links {
    display: none !important;
  }

  * {
    animation: none !important;
    transition: none !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 12pt;
  }

  .section-title {
    -webkit-text-fill-color: #000000;
    color: #000000 !important;
    background: none !important;
  }

  .nav-brand {
    -webkit-text-fill-color: #000000;
    color: #000000 !important;
    background: none !important;
  }

  .highlight-card,
  .skill-category,
  .timeline-card,
  .cert-card {
    background: #ffffff !important;
    border: 1px solid #cccccc !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
  }

  .hero {
    min-height: auto;
    padding: 2rem 0;
  }

  .timeline-details {
    max-height: none !important;
    overflow: visible !important;
  }

  a {
    color: #000000 !important;
    text-decoration: underline;
  }
}


/* ============================================================
   21. REDUCED MOTION
   ============================================================ */

@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;
  }

  .animate-on-scroll,
  .animate-slide-left,
  .animate-slide-right,
  .animate-scale {
    opacity: 1;
    transform: none;
  }

  .profile-photo {
    animation: none;
  }

  .profile-photo-wrapper::before {
    animation: none;
  }

  .skill-bar-fill::after {
    animation: none;
  }
}


/* ============================================================
   22. LIGHT THEME SPECIFICS
   ============================================================ */

[data-theme='light'] .highlight-card {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme='light'] .highlight-card:hover {
  background: rgba(0, 0, 0, 0.03);
  border-color: var(--accent-cyan);
  box-shadow: 0 4px 15px rgba(0, 196, 204, 0.15);
}

[data-theme='light'] .skill-category {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme='light'] .skill-category:hover {
  border-color: var(--accent-purple);
  box-shadow: 0 4px 15px rgba(147, 51, 234, 0.15);
}

[data-theme='light'] .skill-tag {
  background: rgba(0, 196, 204, 0.08);
  border-color: rgba(0, 196, 204, 0.2);
  color: var(--text-primary);
}

[data-theme='light'] .skill-tag:hover {
  background: rgba(0, 196, 204, 0.15);
  box-shadow: 0 0 10px rgba(0, 196, 204, 0.15);
}

[data-theme='light'] .skill-bar {
  background: rgba(0, 0, 0, 0.06);
}

[data-theme='light'] .timeline-card {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme='light'] .timeline-card:hover {
  border-color: rgba(0, 196, 204, 0.3);
}

[data-theme='light'] .timeline-dot {
  border-color: var(--bg-primary);
}

[data-theme='light'] .timeline-toggle {
  border-color: rgba(0, 0, 0, 0.15);
}

[data-theme='light'] .timeline-toggle:hover {
  background: rgba(0, 196, 204, 0.1);
  border-color: var(--accent-cyan);
}

[data-theme='light'] .cert-card {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme='light'] .cert-card:hover {
  border-color: var(--accent-purple);
  box-shadow: 0 4px 15px rgba(147, 51, 234, 0.15);
}

[data-theme='light'] .contact-form {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme='light'] .form-input,
[data-theme='light'] .form-textarea {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--text-primary);
}

[data-theme='light'] .form-input:focus,
[data-theme='light'] .form-textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0, 196, 204, 0.1);
}

[data-theme='light'] .navbar.scrolled {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

[data-theme='light'] .hamburger span {
  background: var(--text-primary);
}

[data-theme='light'] .mobile-menu {
  background: rgba(255, 255, 255, 0.98);
  border-left: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme='light'] .mobile-menu .nav-link:hover,
[data-theme='light'] .mobile-menu .nav-link.active {
  background: rgba(0, 196, 204, 0.05);
}

[data-theme='light'] .btn-icon {
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--text-secondary);
}

[data-theme='light'] .btn-icon:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

[data-theme='light'] .footer {
  background: var(--bg-secondary);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme='light'] .toast {
  background: var(--bg-card);
  border-color: var(--accent-cyan);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

[data-theme='light'] ::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

[data-theme='light'] ::selection {
  background-color: var(--accent-cyan);
  color: #ffffff;
}

[data-theme='light'] .timeline-details li::before {
  color: var(--accent-cyan);
}

[data-theme='light'] .back-to-top {
  box-shadow: 0 4px 15px rgba(0, 196, 204, 0.2);
}

[data-theme='light'] .back-to-top:hover {
  box-shadow: 0 8px 25px rgba(0, 196, 204, 0.3);
}

/* ============================================================
   23. UTILITY CLASSES
   ============================================================ */

.text-gradient {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-cyan {
  color: var(--accent-cyan);
}

.text-purple {
  color: var(--accent-purple);
}

.text-green {
  color: var(--accent-green);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}

.gradient-shift {
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
}

/* ============================================================
   24. SCROLL DOWN ARROW INDICATOR
   ============================================================ */

.scroll-down-arrow {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(0, 245, 255, 0.3);
  color: var(--accent-cyan);
  font-size: 1.1rem;
  text-decoration: none;
  cursor: pointer;
  animation: scrollBounce 2s ease-in-out infinite;
  transition: opacity var(--transition-base), border-color var(--transition-base),
    box-shadow var(--transition-base);
  z-index: 10;
  opacity: 0.85;
}

.scroll-down-arrow:hover {
  opacity: 1;
  border-color: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
}

/* Variant for non-hero (non-absolute) sections */
.scroll-down-arrow--inline {
  position: relative;
  bottom: auto;
  left: auto;
  transform: none;
  margin: 3rem auto 0;
}

/* Hide arrow once user scrolls past its section */
.scroll-down-arrow.hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes scrollBounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  40% {
    transform: translateX(-50%) translateY(-8px);
  }

  60% {
    transform: translateX(-50%) translateY(-4px);
  }
}

/* Inline variant uses simpler bounce without translateX */
.scroll-down-arrow--inline {
  animation: scrollBounceInline 2s ease-in-out infinite;
}

@keyframes scrollBounceInline {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-8px);
  }

  60% {
    transform: translateY(-4px);
  }
}

/* Responsive: smaller on mobile */
@media (max-width: 768px) {
  .scroll-down-arrow {
    width: 38px;
    height: 38px;
    font-size: 0.95rem;
    bottom: 1.5rem;
  }

  .scroll-down-arrow--inline {
    margin-top: 2rem;
  }
}

/* Print: hide */
@media print {
  .scroll-down-arrow {
    display: none;
  }
}

/* Reduced motion: stop bounce */
@media (prefers-reduced-motion: reduce) {

  .scroll-down-arrow,
  .scroll-down-arrow--inline {
    animation: none;
  }
}

/* ============================================================
   25. AI CHAT INTEGRATED NAVBAR
   ============================================================ */

/* ── Nav Chat Trigger (Closed State) ── */
.nav-chat-trigger {
  position: relative;
  width: 250px;
  height: 40px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  cursor: pointer;
  z-index: 1005;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              background var(--transition-base),
              border-color var(--transition-base),
              box-shadow var(--transition-base);
}

.nav-chat-trigger:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(0, 245, 255, 0.3);
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.1);
}

/* Inner Pill (closed state elements) */
.nav-chat-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  pointer-events: none;
}

.nav-chat-icon {
  color: var(--accent-cyan);
  font-size: 1rem;
  flex-shrink: 0;
}

.nav-chat-placeholder {
  color: var(--text-secondary);
  font-size: 0.85rem;
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Expanded Form (Open State) ── */
.nav-chat-expanded {
  display: none;
  align-items: center;
  width: 100%;
  height: 100%;
  gap: 0.6rem;
}

.nav-chat-expanded-icon {
  color: var(--accent-cyan);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.nav-chat-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.92rem;
  padding: 0.25rem 0;
  min-width: 0;
}

.nav-chat-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.nav-chat-close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: color var(--transition-fast);
}

.nav-chat-close-btn:hover {
  color: #ef4444;
}

/* ── Expanded Trigger Animation & Layout Override ── */
.nav-chat-trigger.expanded {
  position: absolute;
  left: 8rem; /* Anchors right next to logo (CJB) */
  width: 66vw; /* Grows to the right, occupying 2/3s of the screen */
  background: var(--bg-secondary);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 25px rgba(0, 245, 255, 0.15), 0 8px 32px rgba(0, 0, 0, 0.4);
  cursor: default;
}

.nav-chat-trigger.expanded .nav-chat-pill {
  display: none;
}

.nav-chat-trigger.expanded .nav-chat-expanded {
  display: flex;
}

/* Hide other navbar components when expanded */
.nav-links,
.nav-actions {
  transition: opacity 0.3s ease;
}

.navbar.chat-active .nav-links,
.navbar.chat-active .nav-actions {
  opacity: 0;
  pointer-events: none;
}

/* ── Chat Panel Dropdown ── */
.chat-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  width: 100%;
  max-height: 500px;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border: 1px solid rgba(0, 245, 255, 0.15);
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.03);
  z-index: 1000;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.3s,
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ── Header ── */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.25rem;
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.05), rgba(168, 85, 247, 0.03));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.chat-header-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.chat-header-status {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin: 0;
}

.chat-header-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), color var(--transition-fast);
  font-size: 0.75rem;
}

.chat-header-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

/* ── Messages Area ── */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 0;
  scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

/* ── Message Bubble ── */
.chat-message {
  display: flex;
  gap: 0.6rem;
  max-width: 90%;
  animation: chatMsgIn 0.3s ease-out;
}

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

.chat-message--ai {
  align-self: flex-start;
}

.chat-message--user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-message-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.chat-message--ai .chat-message-avatar {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: #fff;
}

.chat-message--user .chat-message-avatar {
  background: rgba(168, 85, 247, 0.2);
  color: var(--accent-purple);
}

.chat-message-bubble {
  padding: 0.75rem 1rem;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.55;
  word-break: break-word;
}

.chat-message--ai .chat-message-bubble {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-top-left-radius: 4px;
}

.chat-message--user .chat-message-bubble {
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.12), rgba(168, 85, 247, 0.1));
  border: 1px solid rgba(0, 245, 255, 0.15);
  color: var(--text-primary);
  border-top-right-radius: 4px;
}

.chat-message-bubble p {
  margin: 0 0 0.4rem 0;
}

.chat-message-bubble p:last-child {
  margin-bottom: 0;
}

/* Code blocks in AI responses */
.chat-message-bubble code {
  background: rgba(0, 245, 255, 0.08);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.82em;
  font-family: 'Fira Code', 'Consolas', monospace;
}

.chat-message-bubble pre {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.75rem;
  overflow-x: auto;
  margin: 0.5rem 0;
}

.chat-message-bubble pre code {
  background: none;
  padding: 0;
}

/* Bold / strong */
.chat-message-bubble strong {
  color: var(--accent-cyan);
  font-weight: 600;
}

/* Lists */
.chat-message-bubble ul,
.chat-message-bubble ol {
  margin: 0.3rem 0;
  padding-left: 1.2rem;
}

.chat-message-bubble li {
  margin-bottom: 0.2rem;
}

/* ── Typing Indicator ── */
.chat-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.75rem 1rem;
}

.chat-typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-cyan);
  opacity: 0.4;
  animation: chatTyping 1.4s ease-in-out infinite;
}

.chat-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.chat-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes chatTyping {
  0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
  30% { opacity: 1; transform: scale(1.1); }
}

/* ── Suggested Questions ── */
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.chat-suggestion {
  background: rgba(0, 245, 255, 0.08);
  border: 1px solid rgba(0, 245, 255, 0.18);
  color: var(--accent-cyan);
  font-size: 0.78rem;
  padding: 0.35rem 0.7rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.chat-suggestion:hover {
  background: rgba(0, 245, 255, 0.16);
  border-color: var(--accent-cyan);
  transform: translateY(-1px);
}

/* ── Send button ── */
.chat-send-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: #fff;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.chat-send-btn:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

.chat-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* ── Error message ── */
.chat-error {
  font-size: 0.8rem;
  color: #ef4444;
  text-align: center;
  padding: 0.5rem 1rem;
  background: rgba(239, 68, 68, 0.06);
  border-radius: 8px;
  margin: 0 1rem;
}

/* ── Mobile Responsive ── */
@media (max-width: 991px) {
  .nav-chat-trigger {
    width: 200px;
  }
}

@media (max-width: 768px) {
  .nav-chat-trigger {
    width: 140px;
  }

  .nav-chat-trigger.expanded {
    left: 1rem;
    width: calc(100% - 2rem);
  }

  .chat-panel {
    max-height: calc(100vh - 8rem);
  }
}

/* ── Print: hide chat ── */
@media print {
  .nav-chat-trigger,
  .chat-panel {
    display: none;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .chat-panel {
    transition: opacity 0.15s;
    transform: none;
  }

  .nav-chat-trigger {
    transition: none;
  }

  .chat-message {
    animation: none;
  }

  .chat-typing-dot {
    animation: none;
    opacity: 0.6;
  }
}

/* ── Light Theme ── */
[data-theme='light'] .nav-chat-trigger {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme='light'] .nav-chat-trigger:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 196, 204, 0.35);
}

[data-theme='light'] .nav-chat-trigger.expanded {
  background: #ffffff;
  border-color: var(--accent-cyan);
}

[data-theme='light'] .chat-panel {
  background: #ffffff;
  border-color: rgba(0, 196, 204, 0.2);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

[data-theme='light'] .chat-header {
  background: linear-gradient(135deg, rgba(0, 196, 204, 0.05), rgba(147, 51, 234, 0.03));
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

[data-theme='light'] .chat-message--ai .chat-message-bubble {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.06);
}

[data-theme='light'] .chat-message--user .chat-message-bubble {
  background: linear-gradient(135deg, rgba(0, 196, 204, 0.08), rgba(147, 51, 234, 0.06));
  border-color: rgba(0, 196, 204, 0.15);
}

[data-theme='light'] .chat-header-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme='light'] .chat-message-bubble pre {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}