/* ============================================
   ISHRAK AHMED — PORTFOLIO (Redesigned)
   Sky blue accent, Dark/Light mode
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #010204;
  --bg2: #03060c;
  --bg3: #050b18;
  --accent: #0ea5e9;
  --accent2: #0284c7;
  --accent-glow: rgba(14,165,233,0.15);
  --white: #f1f5f9;
  --gray: #94a3b8;
  --gray2: #64748b;
  --border: rgba(148,163,184,0.06);
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --transition: all 0.3s ease;
  --radius: 16px;
  --radius-sm: 10px;
  --gradient-bg: linear-gradient(160deg, #010204 0%, #030712 35%, #050b18 65%, #010204 100%);
}

[data-theme="light"] {
  --bg: #f8fafc;
  --bg2: #ffffff;
  --bg3: #f1f5f9;
  --accent: #0284c7;
  --accent2: #0369a1;
  --accent-glow: rgba(2,132,199,0.12);
  --white: #0f172a;
  --gray: #475569;
  --gray2: #64748b;
  --border: rgba(15,23,42,0.08);
  --gradient-bg: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 40%, #f1f5f9 70%, #f8fafc 100%);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--gradient-bg);
  color: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

a { text-decoration: none; color: inherit; }

/* --- Loader --- */
.loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s, visibility 0.6s;
}
.loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-text {
  font-family: var(--font-heading);
  font-size: 32px; font-weight: 700;
  color: var(--accent);
  animation: loaderPulse 1s ease infinite alternate;
}
@keyframes loaderPulse { from { opacity: 0.3; } to { opacity: 1; } }

/* --- Canvas --- */
#bg-canvas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
}

/* ==================== NAVIGATION ==================== */
.top-nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: 72px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px;
  z-index: 100;
  background: transparent;
  backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}
.top-nav.scrolled {
  background: rgba(5,8,16,0.9);
  backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
}
[data-theme="light"] .top-nav.scrolled {
  background: rgba(248,250,252,0.9);
  backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 24px; font-weight: 700;
  color: var(--white);
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex; gap: 36px;
}
.nav-links a {
  font-family: var(--font-body);
  font-size: 14px; font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray);
  transition: var(--transition);
  position: relative;
}
.nav-links a::after {
  content: ''; position: absolute;
  bottom: -4px; left: 0; width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-right { display: flex; align-items: center; gap: 16px; }

.theme-toggle {
  background: none; border: none;
  color: var(--gray);
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.theme-toggle:hover {
  color: var(--accent);
  background: var(--accent-glow);
}

/* --- Mobile Nav --- */
.mobile-nav {
  display: none; position: fixed; bottom: 0; left: 0; width: 100%;
  background: rgba(5,8,16,0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 100; padding: 8px 0;
  justify-content: space-around;
}
.mobile-nav a {
  display: flex; flex-direction: column; align-items: center;
  font-size: 10px; color: var(--gray2);
  gap: 4px; padding: 6px 12px;
  transition: var(--transition);
}
.mobile-nav a i { font-size: 18px; }
.mobile-nav a:hover, .mobile-nav a.active { color: var(--accent); }

/* ==================== SECTIONS ==================== */
.main-content { position: relative; z-index: 1; }

.section {
  padding: 100px 80px;
  max-width: 1300px;
  margin: 0 auto;
  position: relative;
}

.section-label {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-body);
  font-size: 13px; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-label::before {
  content: '';
  width: 32px; height: 2px;
  background: var(--accent);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 48px;
}
.section-title .accent { color: var(--accent); }

/* --- Reveal --- */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ==================== HERO ==================== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 120px 80px 80px;
  max-width: 1300px; margin: 0 auto;
  gap: 60px;
}

.hero-left { flex: 1; }

.hero-greeting {
  font-family: var(--font-body);
  font-size: 16px; font-weight: 500;
  color: var(--gray);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(48px, 7vw, 80px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  min-height: 100px;
}
.typing-line { color: var(--accent); }
.typing-cursor {
  color: var(--accent);
  font-weight: 300;
  animation: cursorBlink 0.7s infinite;
}
@keyframes cursorBlink { 0%,100% { opacity:1; } 50% { opacity:0; } }

.hero-desc {
  font-size: 16px;
  color: var(--gray);
  max-width: 500px;
  margin-bottom: 32px;
  line-height: 1.8;
}

.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }

.btn-primary {
  padding: 14px 36px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-heading);
  font-size: 15px; font-weight: 600;
  border-radius: 50px;
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover {
  background: var(--accent2);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px var(--accent-glow);
}

.btn-outline {
  padding: 14px 36px;
  border: 1.5px solid var(--border);
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 15px; font-weight: 600;
  border-radius: 50px;
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
}

.hero-stats {
  display: flex; gap: 40px;
}
.stat-item h3 {
  font-family: var(--font-heading);
  font-size: 36px; font-weight: 700;
  color: var(--accent);
}
.stat-item p {
  font-size: 13px; color: var(--gray2);
  text-transform: uppercase; letter-spacing: 1px;
}

.hero-right {
  flex: 0 0 350px;
  position: relative;
}
.hero-photo {
  width: 350px; height: 420px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 2px solid var(--border);
  position: relative;
  z-index: 2;
}
.hero-photo-glow {
  position: absolute;
  top: 20px; left: 20px; right: -20px; bottom: -20px;
  border-radius: var(--radius);
  border: 2px solid var(--accent);
  opacity: 0.3;
  z-index: 1;
}

/* ==================== ABOUT ==================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-bio {
  font-size: 16px;
  color: var(--gray);
  line-height: 1.9;
  margin-bottom: 24px;
}

.resume-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 14px; font-weight: 600;
  border-radius: 50px;
  transition: var(--transition);
}
.resume-btn:hover {
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-2px);
}

/* Education */
.edu-block h3 {
  font-family: var(--font-heading);
  font-size: 22px; font-weight: 700;
  margin-bottom: 24px;
}

.edu-item {
  display: flex; gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.edu-item:last-child { border-bottom: none; }

.edu-num {
  font-family: var(--font-heading);
  font-size: 14px; font-weight: 700;
  color: var(--accent);
  min-width: 28px;
}
.edu-details h4 {
  font-family: var(--font-heading);
  font-size: 16px; font-weight: 600;
  margin-bottom: 4px;
}
.edu-date {
  font-size: 13px; font-weight: 600;
  color: var(--accent); letter-spacing: 1px;
}
.edu-degree {
  font-size: 14px; color: var(--gray);
  margin-top: 4px;
}

/* --- Marquee Scrolling --- */
.marquee-section {
  max-width: 1300px;
  overflow: visible;
}

.marquee-wrapper { margin-bottom: 32px; }
.marquee-label {
  font-family: var(--font-heading);
  font-size: 14px; font-weight: 600;
  color: var(--gray2);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.marquee {
  position: relative;
  overflow: hidden;
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
}
.marquee::before, .marquee::after {
  content: '';
  position: absolute; top: 0; bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}
.marquee::before {
  left: 0;
  background: linear-gradient(to right, var(--bg), transparent);
}
.marquee::after {
  right: 0;
  background: linear-gradient(to left, var(--bg), transparent);
}

.marquee-track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: marqueeLeft 30s linear infinite;
}
.marquee[data-direction="right"] .marquee-track {
  animation: marqueeRight 35s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-item {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 36px;
  font-family: var(--font-heading);
  font-size: 22px; font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(241,245,249,0.5);
  white-space: nowrap;
  user-select: none;
  transition: all 0.3s ease;
}
.marquee-item i {
  font-size: 28px;
  color: var(--accent);
  opacity: 0.5;
  transition: all 0.3s ease;
}
.marquee-item:hover {
  color: var(--white);
  transform: scale(1.12);
  text-shadow: 0 0 20px var(--accent-glow);
}
.marquee-item:hover i {
  opacity: 1;
  filter: drop-shadow(0 0 8px var(--accent));
}
.marquee-item::after {
  content: '•';
  margin-left: 36px;
  color: rgba(241,245,249,0.15);
  font-size: 18px;
}

@keyframes marqueeLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes marqueeRight {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* ==================== PROJECTS ==================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 28px;
}

.project-card {
  background: rgba(10, 15, 28, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.project-card:hover {
  border-color: rgba(14, 165, 233, 0.3);
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.project-card-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 16px;
}
.project-icon {
  width: 48px; height: 48px;
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 20px;
}
.project-links { display: flex; gap: 12px; }
.project-link {
  color: var(--gray2); font-size: 18px;
  transition: var(--transition);
}
.project-link:hover { color: var(--accent); transform: translateY(-2px); }

.project-card h3 {
  font-family: var(--font-heading);
  font-size: 20px; font-weight: 700;
  margin-bottom: 8px;
}
.project-date {
  font-size: 12px; color: var(--accent);
  font-weight: 600; letter-spacing: 1px;
  margin-bottom: 12px;
}
.project-desc {
  font-size: 14px; color: var(--gray);
  line-height: 1.7; margin-bottom: 20px;
}

.project-tech-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.project-tech-tag {
  padding: 4px 14px;
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 12px; color: var(--gray2);
  font-weight: 500;
}

.view-all-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 32px;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 14px; font-weight: 600;
  transition: var(--transition);
  margin-top: 40px;
}
.view-all-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ==================== DESIGN WORK ==================== */
.design-intro {
  font-size: 16px; color: var(--gray);
  max-width: 600px; margin-bottom: 40px;
  line-height: 1.8;
}

.design-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.design-card {
  background: rgba(10, 15, 28, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: var(--transition);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.design-card:hover {
  border-color: rgba(14, 165, 233, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.design-card-featured { grid-column: span 2; }

.design-card i {
  width: 48px; height: 48px;
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 20px;
  margin-bottom: 20px;
}
.design-card h3 {
  font-family: var(--font-heading);
  font-size: 18px; font-weight: 700;
  margin-bottom: 8px;
}
.design-card p {
  font-size: 14px; color: var(--gray);
  line-height: 1.7;
}

.design-cta {
  text-align: center;
  margin-top: 40px;
}
.design-cta p {
  color: var(--gray);
  margin-bottom: 16px;
}

/* ==================== EXPERIENCE ==================== */
.experience-timeline { max-width: 800px; }

.exp-item {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.exp-item:last-child { border-bottom: none; }

.exp-date {
  font-size: 13px; font-weight: 600;
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 8px;
  display: block;
}
.exp-item h3 {
  font-family: var(--font-heading);
  font-size: 20px; font-weight: 700;
  margin-bottom: 4px;
}
.exp-org {
  font-size: 14px; color: var(--gray2);
  margin-bottom: 12px;
}
.exp-desc {
  font-size: 14px; color: var(--gray);
  line-height: 1.8;
}

/* ==================== CONTACT ==================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.contact-text p {
  font-size: 16px; color: var(--gray);
  line-height: 1.8; margin-bottom: 32px;
}

.contact-info-list { display: flex; flex-direction: column; gap: 20px; }
.contact-info-item {
  display: flex; align-items: center; gap: 14px;
}
.contact-info-item i {
  width: 40px; height: 40px;
  background: var(--accent-glow);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 16px;
}
.contact-info-item a, .contact-info-item span {
  color: var(--gray); font-size: 14px;
  transition: var(--transition);
}
.contact-info-item a:hover { color: var(--accent); }

.contact-cta-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 36px;
  gap: 16px;
  transition: var(--transition);
}
.contact-cta-box:hover {
  border-color: var(--accent);
  box-shadow: 0 0 40px var(--accent-glow);
}
.contact-cta-icon {
  width: 64px; height: 64px;
  background: var(--accent-glow);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  color: var(--accent);
  margin-bottom: 8px;
}
.contact-cta-heading {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--white);
}
.contact-cta-desc {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.7;
  max-width: 340px;
}
.mailto-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 14px 40px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}
.mailto-btn:hover {
  background: var(--accent2);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px var(--accent-glow);
}

/* ==================== FOOTER ==================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 60px 80px 30px;
  max-width: 1300px; margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  font-family: var(--font-heading);
  font-size: 24px; font-weight: 700;
  margin-bottom: 12px;
}
.footer-brand p {
  font-size: 14px; color: var(--gray);
  margin-bottom: 20px;
}
.footer-socials { display: flex; gap: 12px; }
.footer-socials a {
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray); font-size: 15px;
  transition: var(--transition);
}
.footer-socials a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 14px; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--white);
  margin-bottom: 20px;
}
.footer-col a {
  display: block;
  font-size: 14px; color: var(--gray);
  padding: 6px 0;
  transition: var(--transition);
}
.footer-col a:hover { color: var(--accent); transform: translateX(4px); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--gray2);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
  .section { padding: 80px 40px; }
  .hero { padding: 100px 40px 60px; flex-direction: column; text-align: center; }
  .hero-desc { margin: 0 auto 32px; }
  .hero-buttons { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-right { flex: none; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .projects-grid { grid-template-columns: 1fr; }
  .design-grid { grid-template-columns: repeat(2, 1fr); }
  .design-card-featured { grid-column: span 1; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  .top-nav { display: none; }
  .section { padding: 60px 20px; }
  .hero { padding: 80px 20px 40px; }
  .hero-title { font-size: 40px; }
  .hero-photo { width: 260px; height: 320px; }
  .design-grid { grid-template-columns: 1fr; }
  .footer { padding: 40px 20px 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .mobile-nav { display: flex !important; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 32px; }
  .hero-photo { width: 220px; height: 280px; }
  .hero-buttons { flex-direction: column; width: 100%; gap: 16px; }
  .hero-buttons .hire-btn, .hero-buttons .resume-btn { width: 100%; text-align: center; justify-content: center; }
  .hero-stats { flex-direction: column; gap: 16px; align-items: center; }
  .stat-item { text-align: center; }
}

/* ==================== CHATBOT ==================== */
.chatbot-toggle {
  position: fixed; bottom: 28px; right: 28px;
  width: 56px; height: 56px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--bg); font-size: 24px;
  cursor: pointer; z-index: 200;
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: var(--transition);
  animation: chatPulse 2s ease infinite;
}
.chatbot-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(14,165,233,0.4);
}
@keyframes chatPulse {
  0%, 100% { box-shadow: 0 4px 20px var(--accent-glow); }
  50% { box-shadow: 0 4px 30px rgba(14,165,233,0.35); }
}

/* --- Scroll to Top --- */
.scroll-top {
  position: fixed; bottom: 92px; right: 28px;
  width: 44px; height: 44px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray); font-size: 16px;
  cursor: pointer; z-index: 200;
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
}
.scroll-top.visible {
  opacity: 1; visibility: visible;
  transform: translateY(0);
}
.scroll-top:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}

.chatbot-window {
  position: fixed; bottom: 100px; right: 28px;
  width: 380px; height: 520px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: none; flex-direction: column;
  z-index: 200;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.chatbot-window.open { display: flex; }

.chatbot-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}
.chatbot-header-info { display: flex; align-items: center; gap: 12px; }
.chatbot-avatar {
  width: 36px; height: 36px;
  background: var(--accent-glow);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 16px;
}
.chatbot-header h4 {
  font-family: var(--font-heading);
  font-size: 15px; font-weight: 700;
}
.chatbot-status {
  font-size: 11px; color: var(--gray2);
}
.chatbot-close {
  background: none; border: none;
  color: var(--gray); font-size: 18px;
  cursor: pointer; transition: var(--transition);
}
.chatbot-close:hover { color: var(--white); }

.chatbot-messages {
  flex: 1; overflow-y: auto;
  padding: 20px;
  display: flex; flex-direction: column; gap: 16px;
}
.chatbot-messages::-webkit-scrollbar { width: 4px; }
.chatbot-messages::-webkit-scrollbar-track { background: transparent; }
.chatbot-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.chat-msg p {
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.6;
  max-width: 90%;
}
.chat-msg.bot p {
  background: var(--bg3);
  color: var(--white);
  border-bottom-left-radius: 4px;
}
.chat-msg.user {
  align-self: flex-end;
  display: flex; justify-content: flex-end;
}
.chat-msg.user p {
  background: var(--accent);
  color: var(--bg);
  border-bottom-right-radius: 4px;
}

.chat-msg.bot.typing p {
  color: var(--gray2);
  font-style: italic;
}

.chatbot-input-area {
  display: flex; gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg3);
}
.chatbot-input-area input {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 10px 18px;
  color: var(--white);
  font-size: 13px;
  font-family: var(--font-body);
  outline: none;
  transition: var(--transition);
}
.chatbot-input-area input:focus { border-color: var(--accent); }
.chatbot-input-area button {
  width: 40px; height: 40px;
  background: var(--accent);
  border: none; border-radius: 50%;
  color: var(--bg); font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.chatbot-input-area button:hover { background: var(--accent2); }

@media (max-width: 768px) {
  .chatbot-window {
    bottom: 80px; right: 12px; left: 12px;
    width: auto; height: 60vh;
  }
  .chatbot-toggle { bottom: 80px; right: 16px; }
  .scroll-top { bottom: 144px; right: 16px; }
}

/* ==================== LIGHT MODE OVERRIDES ==================== */
[data-theme="light"] .mobile-nav { background: rgba(248,250,252,0.95); }
[data-theme="light"] #bg-canvas { opacity: 0.3; }
[data-theme="light"] .hero-photo { border-color: rgba(14,165,233,0.2); }
[data-theme="light"] .hero-photo-glow { border-color: var(--accent); opacity: 0.15; }
[data-theme="light"] .project-card,
[data-theme="light"] .design-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: rgba(148, 163, 184, 0.2);
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
[data-theme="light"] .marquee::before { background: linear-gradient(to right, #f8fafc, transparent); }
[data-theme="light"] .marquee::after { background: linear-gradient(to left, #f8fafc, transparent); }
[data-theme="light"] .marquee-item { color: rgba(15,23,42,0.2); }
[data-theme="light"] .marquee-item i { color: var(--accent); opacity: 0.35; }
[data-theme="light"] .marquee-item:hover { color: rgba(15,23,42,0.6); }
[data-theme="light"] .marquee-item:hover i { opacity: 0.8; }
[data-theme="light"] .marquee-item::after { color: rgba(15,23,42,0.1); }
[data-theme="light"] .chatbot-window { background: #ffffff; box-shadow: 0 20px 60px rgba(0,0,0,0.12); }
[data-theme="light"] .chatbot-header { background: #f1f5f9; }
[data-theme="light"] .chatbot-input-area { background: #f1f5f9; }
[data-theme="light"] .chat-msg.bot p { background: #f1f5f9; }
[data-theme="light"] .chat-msg.user p { background: var(--accent); color: #fff; }
[data-theme="light"] .chatbot-toggle { color: #fff; }
[data-theme="light"] .loader { background: #f8fafc; }
[data-theme="light"] .footer { background: var(--bg2); }
