video {
  object-fit: cover;
}

    /* === VARIABLES === */
    :root {
      --primary-color: #8A4FFF; /* A vibrant purple */
      --secondary-color: #FFC107; /* A warm gold */
      --bg-color: #121212;
      --surface-color: #1E1E1E;
      --text-color: #EAEAEA;
      --heading-font: 'Poppins', sans-serif;
      --body-font: 'Roboto', sans-serif;
    }

    /* === RESET & BASE === */
    * { margin: 0; padding: 0; box-sizing: border-box; }
    html { scroll-behavior: smooth; }
    body {
      font-family: var(--body-font);
      background: var(--bg-color);
      color: var(--text-color);
      line-height: 1.7;
      overflow-x: hidden;
    }
    img { max-width: 100%; height: auto; }
    a {
      color: var(--primary-color);
      text-decoration: none;
      transition: color 0.3s ease;
    }
    a:hover { color: var(--secondary-color); }

    /* === TYPOGRAPHY === */
    h1, h2, h3, h4 {
      font-family: var(--heading-font);
      font-weight: 700;
      margin-bottom: 1rem;
      color: #fff;
    }
    h1 { font-size: 3.5rem; line-height: 1.2; }
    h2 { font-size: 2.8rem; text-align: center; margin: 4rem 0 2rem; }
    h3 { font-size: 1.5rem; color: var(--primary-color); }
    p { margin-bottom: 1.2rem; font-size: 1.05rem; }

    /* === LAYOUT === */
    .container {
      max-width: 1100px;
      margin: 0 auto;
      padding: 0 1.5rem;
    }
    section {
      padding: 5rem 0;
      border-bottom: 1px solid #2a2a2a;
    }
    section:last-of-type { border-bottom: none; }

    /* === NAVIGATION === */
    .navbar {
      position: fixed;
      top: 0;
      width: 100%;
      background: rgba(18, 18, 18, 0.8);
      backdrop-filter: blur(10px);
      padding: 1rem 0;
      z-index: 1000;
      transition: top 0.3s;
    }
    .navbar .container {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .nav-logo {
      font-family: var(--heading-font);
      font-size: 1.5rem;
      font-weight: 700;
      color: #fff;
    }
    .nav-links {
      list-style: none;
      display: flex;
      gap: 1.5rem;
    }
    .nav-links a {
      color: var(--text-color);
      font-weight: 500;
      transition: color 0.3s;
    }
    .nav-links a:hover, .nav-links a.active {
      color: var(--primary-color);
    }

    /* === HEADER === */
    .video-header {
      position: relative;
      overflow: hidden;
      min-height: 100vh;
      display: flex;
      align-items: center;
      text-align: center;
      color: white;
    }

    #background-video {
      position: absolute;
      top: 50%;
      left: 50%;
      min-width: 100%;
      min-height: 100%;
      width: auto;
      height: auto;
      z-index: -1;
      transform: translateX(-50%) translateY(-50%);
      background-size: cover;
      transition: 1s opacity;
      filter: brightness(40%);
    }

    .video-header .container {
      position: relative;
      z-index: 2;
    }
    header .container {
      animation: fadeIn 1s ease-in-out;
    }
    header h1 {
      background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }
    header p.tagline {
      font-size: 1.4rem;
      color: #ccc;
      margin: 1rem 0 2.5rem;
    }
    .actions a {
      display: inline-block;
      padding: 14px 28px;
      margin: 0 10px;
      background: var(--primary-color);
      color: white;
      border-radius: 50px;
      font-weight: 600;
      transition: transform 0.3s, background-color 0.3s;
      margin-top: 1rem;
    }
    .actions a:hover {
      transform: translateY(-3px);
      background: var(--secondary-color);
      color: #111;
    }
    .actions a.secondary {
      background: transparent;
      border: 2px solid var(--primary-color);
    }
    .actions a.secondary:hover {
      background: var(--primary-color);
      color: white;
    }

    #projects {
      position: relative;
      z-index: 1;
    }

    #projects::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-image: url('../assets/computer.avif');
      background-size: cover;
      background-position: center;
      filter: brightness(40%);
      z-index: -1;
    }

    /* === PROJECTS === */
    .projects-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
      gap: 2rem;
    }
    .project-card {
      background: var(--surface-color);
      border-radius: 15px;
      padding: 2rem;
      transition: transform 0.3s, box-shadow 0.3s;
      border: 1px solid #2a2a2a;
      display: flex;
      flex-direction: column;
    }
    .project-card:hover {
      transform: translateY(-10px);
      box-shadow: 0 15px 30px rgba(0,0,0,0.5);
    }
    .project-card h3 {
      margin-top: 0;
    }
    .tech-stack {
      font-size: 0.9rem;
      color: #aaa;
      margin-bottom: 1rem;
      font-family: 'Courier New', Courier, monospace;
    }
    .project-card p {
      color: #ccc;
      flex-grow: 1;
    }
    .project-card a {
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      margin-top: 1rem;
    }

    /* === SKILLS === */
    #about {
      background: var(--surface-color);
    }
    .about-content {
      display: grid;
      grid-template-columns: 1fr 2fr;
      gap: 3rem;
      align-items: center;
    }
    .about-image img {
      max-width: 280px;
      border-radius: 50%;
      border: 7px solid var(--primary-color);
      box-shadow: 0 10px 40px rgba(138, 79, 255, 0.25);
      transition: transform 0.3s ease-in-out;
    }
    .about-image img:hover {
      transform: scale(1.05);
    }
    .skills-container {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-start;
      gap: 1rem;
      margin-top: 2rem;
    }
    .skill-badge {
      background: #2a2a2a;
      color: var(--text-color);
      padding: 10px 20px;
      border-radius: 50px;
      font-size: 1rem;
      font-weight: 500;
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      transition: background-color 0.3s, color 0.3s;
    }
    .skill-badge:hover {
      background: var(--primary-color);
      color: #fff;
    }

    /* === CONTACT === */
    #contact {
      background: var(--bg-color);
      text-align: center;
    }
    #contact a {
      color: var(--primary-color);
      font-weight: 600;
    }
    .social-links {
      margin: 2rem 0;
    }

    .social-links a {
      display: inline-block;
      margin: 0 15px;
      font-size: 2.5rem;
      color: #ccc;
      transition: transform 0.3s, color 0.3s;
    }
    .social-links a:hover {
      transform: translateY(-5px);
      color: var(--primary-color);
    }
    a.button {
      display: inline-block;
      padding: 14px 28px;
      background: var(--primary-color);
      color: white;
      border-radius: 50px;
      font-weight: 600;
      transition: transform 0.3s, background-color 0.3s;
      margin-top: 1rem;
    }
    a.button:hover {
      transform: translateY(-3px);
      background: var(--secondary-color);
      color: #111;
    }

    /* === FOOTER === */
    footer {
      text-align: center;
      padding-top: 2rem;
      color: #777;
      font-size: 0.9rem;
      background: #0a0a0a;
      display: flex;
      justify-content: center; /* Centers content horizontally */
      align-items: center; /* Aligns items vertically for consistent appearance */
      text-align: center; /* Fallback for text alignment */
    }
    footer img {
    height: 4vh; /* Adjusts image height to match text size (adjust as needed) */
    vertical-align: middle; /* Fine-tunes vertical alignment with text */
    padding-bottom: 0.2rem;
    }

    /* === ANIMATIONS === */
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(20px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .fade-in-section {
      opacity: 0;
      transform: translateY(40px);
      transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    }
    .fade-in-section.is-visible {
      opacity: 1;
      transform: translateY(0);
    }

    /* === RESPONSIVE === */
    @media (max-width: 768px) {
      h1 { font-size: 2.8rem; }
      h2 { font-size: 2.2rem; }
      .nav-links {
        display: none; /* Simple responsive solution, can be improved with a burger menu */
      }
      .actions {
        flex-direction: column;
        gap: 1rem;
        max-width: 300px;
        margin: 2rem auto;
      }
      .actions a {
        margin: 0;
      }
      .projects-grid {
        grid-template-columns: 1fr;
      }
      .about-content {
        grid-template-columns: 1fr;
        text-align: center;
      }
      .about-image {
        margin-bottom: 2rem;
        display: flex;
        justify-content: center;
      }
      .skills-container {
        justify-content: center;
      }
    }
    
/* === CHATBOT === */
.chatbot-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
}

.chat-icon {
  background-color: var(--primary-color);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: transform 0.3s;
}

.chat-icon:hover {
  transform: scale(1.1);
}

.chat-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  max-height: 500px;
  background: var(--surface-color);
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
  display: none; /* Initially hidden */
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #2a2a2a;
}

.chat-window.open {
  display: flex;
}

.chat-header {
  background: var(--primary-color);
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: white;
}

.chat-body {
  flex-grow: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.message {
  padding: 10px 15px;
  border-radius: 20px;
  max-width: 80%;
  line-height: 1.4;
}

.bot-message {
  background: #2a2a2a;
  color: var(--text-color);
  align-self: flex-start;
}

.user-message {
  background: var(--primary-color);
  color: white;
  align-self: flex-end;
}

.chat-footer {
  padding: 1rem;
  display: flex;
  gap: 0.5rem;
  border-top: 1px solid #2a2a2a;
}

#chatInput {
  flex-grow: 1;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 20px;
  padding: 10px 15px;
  color: var(--text-color);
  outline: none;
}

#sendMessage {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 10px 20px;
  cursor: pointer;
  font-weight: 600;
}