/* style.css - All your styles go here */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  --bg1: #0a0a0a;
  --bg2: #1a1a2e;
  --bg3: #16213e;
  --border: rgba(0, 255, 136, 0.28);

  --text: #e2e8f0;
  --header-bg: rgba(10, 10, 10, 0.95);
  --footer-bg: #0a0a0a;
  --footer-border: rgba(0, 255, 136, 0.2);

  --accent1: #00ff88;
  --accent2: #00d4aa;

  --bot-msg-bg: rgba(255, 255, 255, 0.08); /* Default for dark mode */
}

html[data-theme="light"] {
  --bg1: #f8fafc;
  --bg2: #eef2ff;
  --bg3: #ffffff;
  --border: rgba(15, 23, 42, 0.18);
  --footer-bg: #ffffff;
  --footer-border: rgba(15, 23, 42, 0.12);

  --text: #0f172a;
  --header-bg: rgba(255, 255, 255, 0.92);

  --accent1: #00a85a;
  --accent2: #008f78;

  /* NEW: Variables specifically for the chat bubbles in light mode */
  --bot-msg-bg: rgba(15, 23, 42, 0.05);
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: linear-gradient(
    135deg,
    var(--bg1) 0%,
    var(--bg2) 50%,
    var(--bg3) 100%
  );
  overflow-x: hidden;
}

/* Header */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 1rem 0;
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

.logo {
  font-family: "Poppins", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent1);
}

.nav-links {
  display: flex;
  background: var(--header-bg);

  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--text);

  text-decoration: none;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--accent1);
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--accent1);
  transition: 0.3s;
}

/* Hero */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 2rem;
}

.hero-content h1 {
  font-family: "Poppins", sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1rem;
  background: linear-gradient(45deg, var(--accent1), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content h1 span {
  background: linear-gradient(45deg, var(--accent1), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  font-size: 1.3rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  opacity: 0.9;
}

.cta-button {
  background: linear-gradient(45deg, var(--accent1), var(--accent2));
  color: #0a0a0a;
  padding: 1rem 2.5rem;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  text-decoration: none;
  display: inline-block;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(0, 255, 136, 0.3);
}

/* Sections */
/* Update this tag in your style.css */
section {
  padding: 3.5rem 2rem; /* Reduced from 5rem to pull all sections closer together */
  max-width: 1200px;
  margin: 0 auto;
}

section h2 {
  font-family: "Poppins", sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  text-align: center;
  margin-bottom: 3rem;
  background: linear-gradient(45deg, var(--accent1), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: center;
}

.about-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.about-text p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

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

.skill-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03) inset;

  transition: transform 0.3s;
}

.skill-card:hover {
  transform: translateY(-10px);
  border-color: rgba(0, 255, 136, 0.45);
}

.skill-icon {
  font-size: 3rem;
  color: var(--accent1);
  margin-bottom: 1rem;
}

.skill-card h3 {
  margin-bottom: 1rem;
  color: var(--text);
}

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

.experience-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 2rem;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.internship {
  border-left: 4px solid var(--accent1);
}

.internship h3 {
  color: var(--accent1);
}

.education {
  border-left: 4px solid var(--accent2);
}

.education h3 {
  color: var(--accent2);
}

.experience-card h4 {
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.date {
  opacity: 0.8;
  margin-bottom: 1rem;
}

.experience-card ul {
  margin-top: 1rem;
  padding-left: 1.5rem;
}

.experience-card li {
  margin-bottom: 0.5rem;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03) inset;

  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

.project-card:hover {
  transform: translateY(-15px);
  box-shadow: 0 30px 60px rgba(0, 255, 136, 0.2);
  border-color: rgba(0, 255, 136, 0.45);
}

.project-image {
  height: 200px;
  background: linear-gradient(45deg, var(--accent1), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #0a0a0a;
}

.project-content {
  padding: 1.5rem;
}

.project-title {
  font-family: "Poppins", sans-serif;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--accent1);
}

.project-tags {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
}

.project-tags span {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info div {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

.contact-info i {
  font-size: 1.5rem;
  color: var(--accent1);
  margin-right: 1rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  background: var(--card2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 1rem;

  font-family: inherit;
}

.contact-form button {
  background: linear-gradient(45deg, var(--accent1), var(--accent2));
  border: none;
  padding: 1rem;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

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

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  color: var(--text);

  font-size: 1.5rem;
  transition: color 0.3s;
}

.social-links a:hover {
  color: var(--accent1);
}

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

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.98);
    flex-direction: column;
    padding: 1rem 2rem;
    gap: 1rem;
  }

  .nav-links.active {
    display: flex;
  }

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

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

/* Scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Make cards feel clickable */
.project-card {
  cursor: pointer;
}
.project-card:focus {
  outline: 2px solid rgba(0, 255, 136, 0.6);
  outline-offset: 6px;
}

/* Modal using native <dialog> */
.project-modal {
  width: min(900px, 92vw);
  border: 1px solid rgba(0, 255, 136, 0.25);
  border-radius: 18px;
  padding: 0;
  background: rgba(10, 10, 10, 0.92);
  color: var(--text);

  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}
.project-modal {
  position: fixed;
  inset: 0; /* top/right/bottom/left = 0 */
  margin: auto; /* centers the dialog box */
}
/* Smaller modals for Education/Experience */
.project-modal.modal-small {
  width: min(720px, 92vw);
}

.project-modal::backdrop {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
}

.modal-inner {
  position: relative;
  padding: 1.5rem 1.5rem 1.75rem;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(0, 255, 136, 0.25);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);

  font-size: 1.6rem;
  cursor: pointer;
}

.modal-subtitle {
  opacity: 0.9;
  margin: 0.5rem 0 1rem;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0.75rem 0 1.25rem;
}

.modal-link {
  text-decoration: none;
  color: #0a0a0a;
  background: linear-gradient(45deg, var(--accent1), var(--accent2));
  padding: 0.65rem 1rem;
  border-radius: 999px;
  font-weight: 700;
}

.modal-section {
  margin-top: 1rem;
}
.modal-section h4 {
  margin-bottom: 0.6rem;
  color: var(--accent1);
}

.modal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.modal-chips span {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.25);
  font-size: 0.95rem;
}

.modal-bullets {
  margin-top: 0.75rem;
  padding-left: 1.2rem;
}
.modal-bullets li {
  margin-bottom: 0.4rem;
}

/* Compact Experience/Education cards */
.experience-card {
  padding: 1.25rem; /* was 2rem */
}

.experience-card h3 {
  margin-bottom: 0.35rem;
}
.experience-card h4 {
  margin-bottom: 0.35rem;
}

.experience-card .date {
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}

.experience-card ul {
  margin-top: 0.6rem;
  padding-left: 1.1rem;
}

.experience-card li {
  margin-bottom: 0.35rem;
}

.experience-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(4, minmax(200px, 1fr));
}

@media (max-width: 1024px) {
  .experience-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}
@media (max-width: 600px) {
  .experience-grid {
    grid-template-columns: 1fr;
  }
}

/* Secondary CTA: subtle outline */
.cta-secondary {
  background: transparent;
  color: var(--accent1);
  border: 1px solid rgba(0, 255, 136, 0.55);
  box-shadow: none;
}

.cta-secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(0, 255, 136, 0.18);
}

/* Header resume link: pill + border */
.nav-resume {
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 136, 0.45);
  background: rgba(255, 255, 255, 0.03);
}

.nav-resume:hover {
  color: var(--accent1);
  border-color: rgba(0, 255, 136, 0.8);
}

.project-content {
  padding: 1.1rem;
} /* was 1.5rem */
.project-title {
  font-size: 1.15rem;
} /* was 1.3rem */
.project-image {
  height: 160px;
} /* was 200px */
.project-tags {
  gap: 0.6rem;
  flex-wrap: wrap;
}
.project-tags span {
  font-size: 0.8rem;
}

/* Ensure form controls use site font */
button,
input,
textarea,
select {
  font: inherit;
}

/* Theme toggle button */
nav {
  position: relative;
}

.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 136, 0.35);
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent1);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  position: relative;
  z-index: 1101; /* keep it clickable above mobile dropdown */
}

/* Optional: spacing on mobile */
@media (max-width: 768px) {
  .theme-toggle {
    margin-left: auto;
    margin-right: 0.75rem;
  }
}

.chat-fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--accent1), var(--accent2));
  border: none;
  color: #0a0a0a;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 255, 136, 0.3);
  z-index: 999;
  transition: all 0.3s;
}

.chat-fab:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 20px 40px rgba(0, 255, 136, 0.4);
}

.ai-chat-modal {
  width: min(95vw, 900px);
  height: min(85vh, 800px);
  max-width: 900px;
}

.ai-chat-modal .modal-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.ai-chat-shell {
  flex: 1;
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg2);
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* AI Chat Modal - Fixed alignment + thick borders */
.ai-chat-modal {
  width: min(95vw, 1000px);
  height: min(90vh, 850px);
  max-width: 1000px;
  padding: 0 !important; /* Remove all modal padding */
}

.ai-chat-modal .modal-inner {
  height: 100%;
  padding: 0 !important; /* No padding */
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 2px solid var(--border); /* Thick outer border */
  overflow: hidden; /* Clip content to border */
}

.ai-chat-modal h3,
.ai-chat-modal .modal-subtitle {
  display: none !important; /* Hide duplicate title */
}

.ai-chat-shell {
  flex: 1;
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  border: none;
}
/* ========== HERO AI BAR (CLEAN & PROFESSIONAL) ========== */
.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.5rem; /* Reduced to fix the huge gap before About Me */
  width: 100%;
}

/* Clean, glass-like input box */
.hero-ai-bar {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 650px; /* Slightly wider */
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.6rem 0.6rem 0.6rem 1.6rem; /* This shrinks the height just a bit */
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}
/* Subtle glow on hover instead of crazy animations */
.hero-ai-bar:hover {
  transform: translateY(-2px);
  border-color: var(--accent1);
  box-shadow: 0 8px 25px rgba(0, 255, 136, 0.15);
}

/* Static, professional icon */
.spark-icon {
  color: var(--accent1);
  font-size: 1.4rem; /* Increased size */
  margin-right: 1.2rem;
}
/* Fully visible, static text */
/* Fully visible, static text with a fade transition */
.ai-typing-text {
  flex: 1;
  color: var(--text);
  opacity: 0.9;
  text-align: left;
  font-family: "Inter", sans-serif;
  font-size: 1.15rem; /* Increased font size */
  transition: opacity 0.4s ease;
}
/* Clean Send Button */
.ai-go-btn {
  background: var(--accent1);
  border-radius: 50%;
  width: 48px; /* Scaled down from 52px */
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a0a0a;
  font-size: 1.2rem; /* Increased icon size inside button */
  margin-left: 1rem;
  transition:
    background 0.3s,
    transform 0.3s;
}

.hero-ai-bar:hover .ai-go-btn {
  background: var(--accent2);
  transform: translateX(3px); /* Just a tiny nudge right on hover */
}

/* Restored Buttons Row */
.hero-secondary-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Scaled down CTA buttons so they don't overpower the search bar */
.hero-small-btn {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
}

/* AI Chat Suggestion Pills - Subtle Version */
.ai-pill {
  background: transparent; /* No more solid green background */
  border: 1px solid var(--border); /* Matches the default subtle gray/green border */
  color: var(--text); /* Standard text color */
  opacity: 0.6; /* Fades them into the background slightly */
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-family: "Inter", sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

/* They only light up when the user hovers over them */
.ai-pill:hover {
  opacity: 1;
  border-color: rgba(0, 255, 136, 0.4);
  color: var(--accent1);
}

#ai-suggestions::-webkit-scrollbar {
  display: none;
}
/* AI Chat Bubble Styles */
.ai-msg {
  max-width: 78%;
  width: fit-content; /* <-- ADD THIS LINE to make the box hug the text */
  padding: 12px 14px;
  border-radius: 16px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.ai-msg.user {
  align-self: flex-end;
  color: #0a0a0a;
  background: linear-gradient(45deg, var(--accent1), var(--accent2));
  border-bottom-right-radius: 6px;
}

.ai-msg.bot {
  align-self: flex-start;
  color: var(--text);
  background: var(--bot-msg-bg); /* Now it adapts to light/dark mode! */
  border: 1px solid var(--border);
  border-bottom-left-radius: 6px;
  width: fit-content;    /* Shrinks box to text size */
  max-width: 80%;       /* Prevents stretching too far */
  margin-right: auto;    /* Pushes it to the left */
  display: inline-block;
}

/* Mobile Optimizations for AI Chat Modal */
@media (max-width: 768px) {
  .ai-chat-modal {
    width: 100vw;
    height: 100vh;
    height: 100dvh; /* Uses dynamic viewport height to account for mobile browser UI */
    max-width: none;
    border-radius: 0;
    border: none;
  }

  .ai-chat-modal .modal-inner {
    border-radius: 0;
    border: none;
  }

  .ai-chat-wrap {
    border-radius: 0 !important;
    border: none !important;
  }

  /* Make bubbles slightly wider on small screens to fit more text */
  .ai-msg {
    max-width: 90%;
  }
}

/* Mic Button Recording State */
#mic-btn.recording {
  color: #ff4757 !important; /* Forces it to turn red */
  animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* --- AI Speaker Button (Inline Icon Only) --- */
.speaker-btn {
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  padding: 0 0 0 8px; /* Just a tiny bit of space from the last word */
  display: inline-flex;
  align-items: center;
  transition: all 0.2s ease;
  opacity: 0.5; /* Faded so it's not distracting */
  vertical-align: middle; /* Keeps it perfectly level with the text */
}

.speaker-btn:hover {
  opacity: 1;
  color: var(--accent1);
}

/* Active state when talking */
.speaker-btn.playing {
  color: #10b981;
  opacity: 1;
  animation: pulse-green 1.5s infinite;
}

@keyframes pulse-green {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}



