/* ═══════════════════════════════════════════════════════════
   DHRUMIL PATEL — PORTFOLIO STYLES
   Modern, dark-themed professional portfolio
   ═══════════════════════════════════════════════════════════

   TABLE OF CONTENTS
   ─────────────────
   1.  CSS Variables
   2.  Reset & Base
   3.  Loader
   4.  Custom Cursor
   5.  Navigation
   6.  Layout (Container, Section, Reveal)
   7.  Hero
   8.  Buttons
   9.  About
   10. Timeline (Experience)
   11. Projects
   12. Skills
   13. Education
   14. Publications & Awards
   15. Contact
   16. Footer
   17. Back to Top
   18. Chat Widget
   19. Utilities
   20. Responsive (1024 → 768 → 480)
   21. Print Styles
   ═══════════════════════════════════════════════════════════ */

/* ── CSS Variables ──────────────────────────────────────── */
:root {
  /* Colors */
  --bg-primary: #0a0a0f;
  --bg-secondary: #10101a;
  --bg-card: #151521;
  --bg-card-hover: #1a1a2e;

  --text-primary: #e4e4e7;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  --accent: #818cf8;
  --accent-light: #a5b4fc;
  --accent-dark: #6366f1;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --accent-glow-strong: rgba(99, 102, 241, 0.3);

  --gradient-primary: linear-gradient(135deg, #6366f1, #818cf8, #a78bfa);
  --gradient-card: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(167, 139, 250, 0.04));
  --gradient-hero: linear-gradient(180deg, rgba(99, 102, 241, 0.05) 0%, transparent 50%);

  --border: rgba(99, 102, 241, 0.1);
  --border-hover: rgba(99, 102, 241, 0.3);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15);

  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --section-padding: 100px 0;
  --container-max: 1200px;

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

  /* Nav */
  --nav-height: 70px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent);
  color: #fff;
}

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

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

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-inner {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loader-text {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Custom Cursor ─────────────────────────────────────── */
.cursor-dot,
.cursor-outline {
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: opacity var(--transition-fast);
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
}

.cursor-outline {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(129, 140, 248, 0.4);
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
}

.cursor-outline.hovering {
  width: 50px;
  height: 50px;
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.08);
}

@media (max-width: 768px) {
  .cursor-dot, .cursor-outline { display: none; }
}

/* ── Navigation ────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  transition: all var(--transition-base);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

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

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.logo-bracket {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  transition: all var(--transition-fast);
  position: relative;
}

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

.nav-resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: 8px;
  text-decoration: none;
  transition: all var(--transition-base);
}

.nav-resume-btn:hover {
  background: var(--accent-glow);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
}

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

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translateY(7px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-7px);
}

/* ── Container ─────────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Section ───────────────────────────────────────────── */
.section {
  padding: var(--section-padding);
  position: relative;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 3.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-hover), transparent);
  margin-left: 1rem;
}

.section-number {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
}

/* ── Reveal Animation ──────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-up {
  opacity: 0;
  transform: translateY(30px);
  animation: animateUp 0.8s ease forwards;
  animation-delay: var(--delay, 0s);
}

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

/* ── Hero ──────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 2rem;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: float-particle linear infinite;
}

@keyframes float-particle {
  0% {
    opacity: 0;
    transform: translateY(100vh) scale(0);
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    opacity: 0;
    transform: translateY(-100px) scale(1);
  }
}

.hero-content {
  text-align: center;
  z-index: 1;
  max-width: 800px;
}

.hero-greeting {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--accent-light);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.greeting-wave {
  display: inline-block;
  animation: wave 2.5s ease-in-out infinite;
  transform-origin: 70% 70%;
}

@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(14deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
  60% { transform: rotate(0deg); }
}

.hero-name {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 1rem;
}

.hero-name-accent {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-titles {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  min-height: 2em;
}

.hero-title-static {
  color: var(--text-secondary);
}

.hero-title-typed {
  color: var(--accent-light);
  font-weight: 600;
}

.typed-cursor {
  color: var(--accent);
  animation: blink 1s step-end infinite;
  font-weight: 300;
}

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

.hero-description {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--accent-light);
  border: 1.5px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent-glow);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  color: #fff;
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
}

/* ── Hero Social ───────────────────────────────────────── */
.hero-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
}

.hero-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all var(--transition-base);
  font-size: 1.1rem;
}

.hero-social a:hover {
  color: var(--accent-light);
  border-color: var(--accent);
  background: var(--accent-glow);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

/* ── Hero Scroll ───────────────────────────────────────── */
.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.scroll-mouse {
  width: 24px;
  height: 38px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  position: relative;
  display: flex;
  justify-content: center;
  opacity: 0.5;
  transition: opacity var(--transition-base);
}

.scroll-mouse:hover {
  opacity: 1;
  border-color: var(--accent);
}

.scroll-wheel {
  width: 3px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 6px;
  animation: scroll-down 2s ease-in-out infinite;
}

@keyframes scroll-down {
  0% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ── About ─────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 4rem;
  align-items: start;
}

.about-image-wrapper {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto;
}

.about-image-border {
  position: absolute;
  inset: -8px;
  border: 2px solid var(--accent);
  border-radius: 20px;
  transform: translate(12px, 12px);
  transition: transform var(--transition-base);
}

.about-image-wrapper:hover .about-image-border {
  transform: translate(6px, 6px);
}

.about-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  position: relative;
  z-index: 1;
  filter: grayscale(20%) contrast(1.05);
  transition: filter var(--transition-base);
}

.about-image-wrapper:hover .about-img {
  filter: grayscale(0%) contrast(1);
}

.about-philosophy {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  border-left: 3px solid var(--accent);
}

.about-philosophy blockquote p {
  font-style: italic;
  font-size: 1.05rem;
  color: var(--accent-light);
  margin-bottom: 0.25rem;
}

.about-philosophy cite {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.philosophy-translation {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.about-content p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.98rem;
}

.about-content p strong {
  color: var(--text-primary);
}

.about-highlights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.highlight-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all var(--transition-base);
}

.highlight-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.highlight-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border-radius: 10px;
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
}

.highlight-number {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.highlight-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ── Timeline (Experience) ─────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--border), transparent);
}

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

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

.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 0.5rem;
  transform: translateX(-50%);
}

.timeline-dot {
  width: 14px;
  height: 14px;
  background: var(--bg-primary);
  border: 3px solid var(--accent);
  border-radius: 50%;
  transition: all var(--transition-base);
}

.timeline-item:hover .timeline-dot {
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  transition: all var(--transition-base);
}

.timeline-content:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}

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

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

.timeline-company {
  font-size: 0.95rem;
  color: var(--accent-light);
  margin-top: 0.25rem;
}

.timeline-company i {
  margin-right: 0.25rem;
  font-size: 0.85rem;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.timeline-date i {
  margin-right: 0.25rem;
}

.timeline-details {
  padding-left: 1.25rem;
  margin-bottom: 1.25rem;
}

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

.timeline-details li::before {
  content: '▸';
  position: absolute;
  left: -1rem;
  color: var(--accent);
  font-weight: 700;
}

.timeline-details li strong {
  color: var(--accent-light);
}

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

.timeline-tags span {
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--accent-light);
  background: var(--accent-glow);
  border-radius: 6px;
  border: 1px solid rgba(99, 102, 241, 0.1);
}

/* ── Projects ──────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.75rem;
}

.project-card {
  position: relative;
  border-radius: 16px;
  transition: transform var(--transition-base);
}

.project-card:hover {
  transform: translateY(-5px);
}

.project-card-inner {
  height: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-base);
}

.project-card:hover .project-card-inner {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}

.project-badge {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 8px;
  margin-bottom: 1.25rem;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.project-icon {
  font-size: 2rem;
  color: var(--accent);
}

.project-links {
  display: flex;
  gap: 0.75rem;
}

.project-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  font-size: 1.1rem;
}

.project-links a:hover {
  color: var(--accent-light);
  background: var(--accent-glow);
}

.project-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.project-description {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
  flex: 1;
}

.project-features {
  margin-bottom: 1.25rem;
  padding-left: 0.5rem;
}

.project-features li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.4rem;
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.project-features li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.project-tags span {
  padding: 0.25rem 0.65rem;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--accent-light);
  background: var(--accent-glow);
  border-radius: 5px;
}

/* ── Skills ────────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  transition: all var(--transition-base);
}

.skill-category:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}

.skill-category-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.skill-category-header i {
  font-size: 1.2rem;
  color: var(--accent);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border-radius: 10px;
}

.skill-category-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

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

.skill-tag {
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all var(--transition-fast);
  cursor: default;
}

.skill-tag:hover {
  color: var(--accent-light);
  border-color: var(--accent);
  background: var(--accent-glow);
}

/* ── Education ─────────────────────────────────────────── */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

.edu-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  overflow: hidden;
  transition: all var(--transition-base);
}

.edu-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}

.edu-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

.edu-icon {
  font-size: 1.75rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.edu-details h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.edu-specialization {
  font-size: 0.95rem;
  color: var(--accent-light);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.edu-school,
.edu-date {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.edu-school i,
.edu-date i {
  margin-right: 0.4rem;
  color: var(--accent);
  font-size: 0.82rem;
}

.edu-gpa {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--accent-glow);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 8px;
  font-size: 0.9rem;
  margin: 0.75rem 0;
}

.edu-gpa span {
  color: var(--text-muted);
}

.edu-gpa strong {
  color: var(--accent-light);
}

.edu-honors {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.edu-honors span {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.edu-honors i {
  color: #fbbf24;
  margin-right: 0.5rem;
  font-size: 0.8rem;
}

.edu-courses {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.edu-courses span {
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 5px;
}

/* ── Publications & Awards ─────────────────────────────── */
.pub-awards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.subsection-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.subsection-title i {
  color: var(--accent);
}

.pub-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pub-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all var(--transition-base);
}

.pub-item:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.pub-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border-radius: 10px;
  color: var(--accent);
}

.pub-details h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
  line-height: 1.5;
}

.pub-authors {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.2rem;
}

.pub-venue {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.awards-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.award-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all var(--transition-base);
}

.award-item:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.award-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(251, 191, 36, 0.1);
  border-radius: 10px;
  color: #fbbf24;
  font-size: 0.9rem;
}

.award-item:nth-child(n+5) .award-icon {
  background: var(--accent-glow);
  color: var(--accent);
}

.award-item h4 {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.award-item p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ── Contact ───────────────────────────────────────────── */
.contact {
  text-align: center;
}

.contact .section-title {
  justify-content: center;
}

.contact .section-title::after {
  display: none;
}

.contact-content {
  max-width: 700px;
  margin: 0 auto;
}

.contact-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.contact-description strong {
  color: var(--accent-light);
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  transition: all var(--transition-base);
}

.contact-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.contact-card i {
  font-size: 1.5rem;
  color: var(--accent);
}

.contact-card-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.contact-card-value {
  font-size: 0.88rem;
  color: var(--text-primary);
  font-weight: 500;
}

.contact-btn {
  margin: 0 auto;
}

/* ── Footer ────────────────────────────────────────────── */
.footer {
  padding: 3rem 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: var(--text-muted);
  transition: all var(--transition-base);
  font-size: 1rem;
}

.footer-social a:hover {
  color: var(--accent-light);
  transform: translateY(-3px);
}

.footer-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.footer-text strong {
  color: var(--text-primary);
}

.footer-copyright {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ── Back to Top ───────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-base);
  z-index: 100;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-image-wrapper {
    width: 240px;
    height: 240px;
  }

  .pub-awards-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 70px 0;
    --nav-height: 60px;
  }

  .nav-links,
  .nav-resume-btn {
    display: none;
  }

  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    padding: 6rem 2rem 2rem;
    gap: 0.5rem;
    z-index: 999;
    animation: slideInRight 0.3s ease;
  }

  @keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
  }

  .nav-toggle {
    display: flex;
  }

  .hero-name {
    font-size: clamp(2rem, 10vw, 3.5rem);
    letter-spacing: -1px;
  }

  .hero-titles {
    font-size: 1.1rem;
  }

  .hero-cta {
    flex-direction: column;
    gap: 0.75rem;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }

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

  .timeline {
    padding-left: 1.5rem;
  }

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

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

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

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

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

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

@media (max-width: 480px) {
  .container {
    padding: 0 1.25rem;
  }

  .timeline-content {
    padding: 1.25rem;
  }

  .project-card-inner {
    padding: 1.5rem;
  }
}

/* ═══════════════════════════════════════════════════════════
   CHAT WIDGET
   ═══════════════════════════════════════════════════════════ */

/* ── Floating Action Button ────────────────────────────── */
.chat-widget {
  position: fixed;
  bottom: 2rem;
  right: 6rem;
  z-index: 900;
}

.chat-fab {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
  transition: all var(--transition-base);
}

.chat-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

.chat-fab .chat-fab-close {
  display: none;
}

.chat-fab.active .chat-fab-icon {
  display: none;
}

.chat-fab.active .chat-fab-close {
  display: block;
}

/* Pulse notification ring */
.chat-fab-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
}

.chat-fab-pulse.active {
  animation: fabPulse 2s ease-in-out infinite;
}

@keyframes fabPulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* ── Chat Window ───────────────────────────────────────── */
.chat-window {
  position: absolute;
  bottom: 72px;
  right: 0;
  width: 380px;
  max-height: 550px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);

  /* Hidden by default */
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.95);
  transform-origin: bottom right;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

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

/* ── Chat Header ───────────────────────────────────────── */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

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

.chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
  background-size: 200% 200%;
  animation: avatar-glow 3s ease infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

@keyframes avatar-glow {
  0%, 100% { background-position: 0% 50%; box-shadow: 0 0 12px rgba(99, 102, 241, 0.4); }
  50%       { background-position: 100% 50%; box-shadow: 0 0 18px rgba(168, 85, 247, 0.5); }
}

.chat-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: #34d399;
  border: 2px solid var(--bg-card);
  border-radius: 50%;
}

.chat-header-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.chat-header-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chat-close-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

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

/* ── Chat Messages ─────────────────────────────────────── */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 280px;
  max-height: 350px;
  scroll-behavior: smooth;
}

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

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}

/* ── Message Bubbles ───────────────────────────────────── */
.chat-message {
  display: flex;
  gap: 0.6rem;
  max-width: 88%;
  animation: chatFadeIn 0.3s ease;
}

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

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

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

.chat-message-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  border: 1px solid rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #fff;
  flex-shrink: 0;
  margin-top: 2px;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
}

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

.chat-message.bot .chat-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-bottom-left-radius: 4px;
}

.chat-message.user .chat-bubble {
  background: var(--gradient-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-bubble.error {
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.08);
}

.chat-bubble strong {
  color: var(--text-primary);
  font-weight: 600;
}

.chat-message.user .chat-bubble strong {
  color: #fff;
}

/* ── Typing Indicator ──────────────────────────────────── */
.chat-bubble.typing {
  padding: 0.85rem 1.2rem;
}

.typing-dots {
  display: flex;
  gap: 5px;
  align-items: center;
}

.typing-dots span {
  width: 7px;
  height: 7px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* ── Suggestion Chips ──────────────────────────────────── */
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.25rem 0 0.5rem;
}

.chat-suggestion-btn {
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent-light);
  background: var(--accent-glow);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.chat-suggestion-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent);
}

/* ── Chat Input ────────────────────────────────────────── */
.chat-input-area {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

.chat-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-input {
  flex: 1;
  padding: 0.65rem 1rem;
  font-size: 0.88rem;
  font-family: var(--font-main);
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.chat-input::placeholder {
  color: var(--text-muted);
}

.chat-input:focus {
  border-color: var(--accent);
}

.chat-send-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: var(--gradient-primary);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.chat-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

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

.chat-disclaimer {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5rem;
  opacity: 0.7;
}

/* ── Chat Responsive ───────────────────────────────────── */
@media (max-width: 480px) {
  .chat-widget {
    bottom: 1rem;
    right: 1rem;
  }

  .chat-window {
    width: calc(100vw - 2rem);
    max-height: calc(100vh - 8rem);
    right: -0.5rem;
    bottom: 68px;
    border-radius: 16px;
  }

  .chat-fab {
    width: 52px;
    height: 52px;
    font-size: 1.2rem;
  }
}

/* ── Utility ───────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ═══════════════════════════════════════════════════════════
   21. PRINT STYLES
   ═══════════════════════════════════════════════════════════ */
@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }

  .navbar,
  .loader,
  .cursor-dot,
  .cursor-outline,
  .hero-particles,
  .hero-bg-grid,
  .hero-scroll,
  .back-to-top,
  .chat-widget,
  .nav-toggle,
  .footer-social,
  .hero-social,
  .hero-cta {
    display: none !important;
  }

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

  .section {
    padding: 1.5rem 0;
    page-break-inside: avoid;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666 !important;
  }

  .nav-link::after,
  .nav-logo::after,
  .hero-social a::after,
  .footer-social a::after {
    content: none !important;
  }
}
