/* ====== GLOBAL ====== */
html {
  margin: 0;
  padding: 0;
  font-size: 20px;
  scroll-behavior: smooth;
  overflow-y: auto;
}
body { margin: 0; padding: 0; height: 100%; background: #fafafa; color: #333; }

:root {
  --accent: #7c3aed;
  --lavender: #ede9fe;
  --sky: #bfdbfe;
  --mint: #d1fae5;
}

/* ====== NAVBAR ====== */
.navbar {
  z-index: 1000;
  font-size: 1.2rem;
  font-weight: 500;
  border-radius: 15px;
  margin: 20px auto;
  width: 90%;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0, 0, 0, 0.15) !important;
  transition: all 0.3s ease;
}

/* ====== SECTIONS ====== */
.section {
  min-height: 100vh;
  
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 50px 5%;
}
.section-title {
  font-size: 2.6rem;
  font-weight: 600;
  margin-bottom: 25px;
  text-align: center;
}
.section p { font-size: 1.2rem; line-height: 1.6; font-weight: 400; }

/* ====== HERO ====== */
#hero { text-align: center; }
#hero h1 {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 1rem;
}
#hero p { max-width: 650px; margin: 0 auto; }

#hero-title::after {
  content: "|";
  margin-left: 5px;
  animation: blink 1s infinite;
  color: var(--accent);
}

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


/* ====== CARD ====== */
.pastel-card {
  background: #fff !important;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
}

/* ====== CHAT AREA ====== */
#chat-area {
  height: 500px;
  display: flex;
  flex-direction: column;
  border-radius: 0.75rem;
  overflow: hidden;
}

#messages {
  flex-grow: 1;
  background: #fdfdfd;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.message { display: flex; max-width: 80%; word-wrap: break-word; }
.message .bubble {
  padding: 0.75rem 1rem;
  border-radius: 1.25rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  line-height: 1.4;
  font-size: 0.95rem;
  animation: fadeIn 0.3s ease;
}
.message.user { align-self: flex-end; justify-content: flex-end; }
.message.user .bubble {
  background: var(--mint);
  color: #111;
  border-bottom-right-radius: 0.3rem;
}
.message.assistant { align-self: flex-start; justify-content: flex-start; }
.message.assistant .bubble {
  background: var(--lavender);
  color: #111;
  border-bottom-left-radius: 0.3rem;
}

/* Typing indicator */
#typing-indicator { display: flex; align-items: flex-start; gap: 0.25rem; }
#typing-indicator .bubble {
  background: var(--lavender);
  border-bottom-left-radius: 0.25rem;
  display: flex;
  gap: 0.25rem;
}
.dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  animation: blink 1.4s infinite both;
}
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes blink {
  0%, 80%, 100% { opacity: 0.2; }
  40% { opacity: 1; }
}

/* ====== FAQ ====== */
#faqAccordion .accordion-item {
  border: none;
  margin-bottom: 0.75rem;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  background: #fff;
}
#faqAccordion .accordion-button {
  background: #f3f4f6;
  font-weight: 700;
  color: var(--accent);
}
#faqAccordion .accordion-button:not(.collapsed) {
  background: var(--accent);
  color: #fff;
}
#faqAccordion .accordion-body {
  background: #f9fafb;
  color: #374151;
  font-size: 0.95rem;
  line-height: 1.6;
  padding: 1rem 1.25rem;
  border-top: 1px solid #e5e7eb;
}

/* ====== BUTTONS ====== */
.btn-accent {
  background: var(--accent);
  border: none;
  color: #fff;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.2s ease-in-out;
}
.btn-accent:hover { background: #5b21b6; }
.btn-outline-accent {
  border: 2px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
  background: #fff;
}
.btn-outline-accent:hover,
.btn-check:checked + .btn-outline-accent {
  background: var(--accent) !important;
  color: #fff !important;
  border-color: var(--accent) !important;
}

/* ====== CONTACT + FOOTER WRAPPER ====== */
.contact-footer-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  
}
#faq {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  min-height: 0;
}
.site-footer {
  flex: 0 0 5vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  /* Shrink text on mobile */
  html { font-size: 16px; }

  .navbar { font-size: 1rem; margin: 0; width: 100%; border-radius: 0; }
  .section-title { font-size: 2rem;  }
  .section p { font-size: 1rem; }

  .hero-container {
    margin-top: 30px;
  }
  .project-text h3 { font-size: 1.4rem; }
  .project-text p { font-size: 0.9rem; }

  .skill p { font-size: 0.9rem; }
  .site-footer { font-size: 0.9rem; }

  /* === Navbar + Hero together = 100vh === */
  .hero-section {
    min-height: calc(100vh - var(--navbar-height, 60px));
    padding-top: 0;
  }
  .navbar {
    --navbar-height: 60px; /* adjust if your mobile navbar is taller/shorter */
  }
}