/* 
 * Professional "Aurora" Portfolio Design
 * Top Navigation Layout - Hyper Responsive
 */

/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
  /* Aurora Theme Colors */
  --bg-dark: #09090b; /* Zinc 950 - Deepest Black */
  --bg-card: #18181b; /* Zinc 900 */
  --text-main: #f4f4f5; /* Zinc 100 */
  --text-muted: #a1a1aa; /* Zinc 400 */

  /* Gradients */
  --grad-primary: linear-gradient(
    135deg,
    #a855f7,
    #ec4899
  ); /* Purple to Pink */
  --grad-glow: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.4),
    rgba(236, 72, 153, 0.4)
  );
  --accent-color: #d946ef; /* Fuchsia */

  --glass-bg: rgba(9, 9, 11, 0.8);
  --border-light: rgba(255, 255, 255, 0.08);

  /* Spacing */
  --header-height: 80px;
  --container-width: 1400px;

  /* Fonts */
  --font-main: "Inter", system-ui, sans-serif;
  --font-head: "Outfit", sans-serif;

  --trans-med: 0.3s ease;
}

/* Material Symbols Adjustments */
.material-symbols-rounded {
  font-variation-settings:
  'FILL' 1,
  'wght' 400,
  'GRAD' 0,
  'opsz' 24;
  vertical-align: middle;
  line-height: 1;
  display: inline-block;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.7;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-head);
  color: #fff;
  line-height: 1.2;
}

a {
  color: var(--text-main);
  text-decoration: none;
  transition: var(--trans-med);
}

img {
  max-width: 100%;
  display: block;
}

/* =========================================
   2. TOP NAVIGATION
   ========================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-container {
  width: 100%;
  max-width: var(--container-width);
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: var(--font-head);
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-weight: 500;
  font-size: 1rem;
  color: var(--text-muted);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--grad-primary);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
}

/* =========================================
   3. LAYOUT UTILITIES
   ========================================= */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 8rem 0;
  position: relative;
  overflow: hidden;
}

.text-center {
  text-align: center;
}

.section-title {
  text-align: center;
  margin-bottom: 5rem;
}

.section-title h2 {
  font-size: 3rem;
  font-weight: 700;
  display: inline-block;
  position: relative;
}

.section-title h2::after {
  content: "";
  display: block;
  width: 60%;
  height: 4px;
  background: var(--grad-primary);
  margin: 10px auto 0;
  border-radius: 2px;
}

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 2.5rem;
  transition: var(--trans-med);
}

.glass-card:hover {
  transform: translateY(-8px);
  border-color: rgba(236, 72, 153, 0.3);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  align-items: start;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

/* Buttons */
.btn-primary {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--grad-primary);
  color: #fff;
  border-radius: 50px;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 10px 20px -5px rgba(236, 72, 153, 0.4);
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px -5px rgba(236, 72, 153, 0.6);
}

/* =========================================
   4. SECTIONS
   ========================================= */

/* Hero */
.hero {
  min-height: 100vh;
  padding-top: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(168, 85, 247, 0.15) 0%,
    rgba(9, 9, 11, 0) 50%
  );
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.1;
  z-index: -1;
}

.hero-content h1 {
  font-size: 5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-content .highlight {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-content p {
  font-size: 1.5rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 3rem;
}

/* About */
.about-img {
  border-radius: 24px;
  border: 1px solid var(--border-light);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

.info-item .material-symbols-rounded {
  color: var(--accent-color);
  margin-right: 8px;
  font-size: 1.2rem;
}

/* Skills */
.skill-item {
  margin-bottom: 2rem;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  font-weight: 600;
}

.progress-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 5px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--grad-primary);
  border-radius: 5px;
  width: 0;
  transition: width 1.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Projects */
.project-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.project-img {
  height: 240px;
  width: 100%;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.project-cat {
  color: var(--accent-color);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

.project-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  font-weight: 600;
  padding-top: 1rem;
}

.project-link:hover {
  gap: 1rem;
  color: var(--accent-color);
}

/* Contact */
.contact-wrapper {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.contact-cards {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.contact-box {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 20px;
  text-align: center;
  border: 1px solid var(--border-light);
  flex: 1;
  min-width: 250px;
}

.contact-box .material-symbols-rounded {
  font-size: 2.5rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
  display: block;
}

/* =========================================
   5. RESPONSIVENESS
   ========================================= */
@media (max-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
  .hero-content h1 {
    font-size: 4rem;
  }
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .about-img {
    max-width: 500px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
    z-index: 1002;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 80%;
    max-width: 300px;
    background: rgba(9, 9, 11, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1001;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .hero-content h1 {
    font-size: 3rem;
  }
  .section-title h2 {
    font-size: 2.2rem;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .contact-cards {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1.2rem;
  }
  .hero-content h1 {
    font-size: 2.5rem;
  }
  .hero-content p {
    font-size: 1.1rem;
  }
  .section-title h2 {
    font-size: 2rem;
  }
  .section {
    padding: 4rem 0;
  }
  .about-img {
    width: 100%;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  }
  .contact-box {
    padding: 1.5rem;
  }

  /* Fix for Info Grid (About Section) */
  .info-grid {
    grid-template-columns: 1fr; /* Stack items vertically */
    gap: 1rem;
  }

  /* Fix for Skills Section overlapping text */
  .skill-info {
    font-size: 0.9rem; /* Slightly smaller text */
    gap: 1rem; /* Ensure space between name and percentage */
  }
  .skill-info span:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80%; /* Prevent text from pushing percentage off */
  }
}

@media (min-width: 1600px) {
  .hero-content h1 {
    font-size: 6rem;
  }
  .container {
    max-width: 1600px;
  }
}

/* Chatbot Widget */
.chatbot-widget {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 2000;
}

.chat-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--grad-primary);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(217, 70, 239, 0.4);
  transition: transform 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-btn:hover {
  transform: scale(1.1);
}

.chat-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  height: 500px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.chat-window.open {
  display: flex;
  animation: fadeUp 0.3s ease;
}

@media (max-width: 480px) {
  .chat-window {
    width: 100%;
    height: 100%;
    height: 100dvh; /* Dynamic viewport height */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0;
    position: fixed;
    margin: 0;
    z-index: 2001; /* Above everything */
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Chat Header */
.cw-header {
  padding: 1rem;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cw-body {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.cw-footer {
  padding: 1rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 0.5rem;
}
.cw-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  padding: 0.8rem;
  border-radius: 8px;
  color: #fff;
}
.cw-send {
  background: var(--accent-color);
  border: none;
  width: 40px;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
}

.chat-msg {
  padding: 0.8rem;
  border-radius: 12px;
  font-size: 0.9rem;
  max-width: 80%;
}
.chat-msg.bot {
  background: rgba(255, 255, 255, 0.05);
  align-self: flex-start;
}
.chat-msg.user {
  background: var(--accent-color);
  align-self: flex-end;
}
