/* Base and Theme Variables */
:root {
  --bg-color: #030a16;
  --bg-darker: #010610;
  --accent-color: #00D4FF;
  --accent-glow: rgba(0, 212, 255, 0.4);
  --text-main: #f0f4f8;
  --text-muted: #a0aec0;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-hover: rgba(0, 212, 255, 0.1);
  --font-main: 'Inter', sans-serif;
  --font-heading: 'Space Grotesk', sans-serif;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset & Setup */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent; /* Remove blue tap highlight on mobile */
}

html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
}

::selection {
  background-color: var(--accent-color);
  color: var(--bg-color);
}

body.has-custom-cursor, body.has-custom-cursor * {
  cursor: none !important;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-darker);
}
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

/* Typography & Utilites */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
}
a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}
.dot {
  color: var(--accent-color);
}
.section-padding {
  padding: 100px 0;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
}
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-top: -2rem;
  margin-bottom: 3rem;
}

/* Custom Cursor */
.cursor-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent-color);
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  z-index: 99999;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.cursor-outline {
  width: 30px;
  height: 30px;
  border: 1px solid var(--accent-glow);
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  z-index: 99998;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease-out, width 0.2s, height 0.2s, background-color 0.2s;
}

/* Loader */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--bg-darker);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  transition: opacity 0.5s ease-out;
}
.loader-logo {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 2px;
  animation: pulse 1.5s infinite alternate;
}
@keyframes pulse {
  0% { text-shadow: 0 0 10px var(--accent-glow); transform: scale(1); }
  100% { text-shadow: 0 0 30px var(--accent-color); transform: scale(1.1); }
}

/* Glassmorphism Classes */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 30px;
  transition: var(--transition);
}
.glass-card:hover {
  border-color: var(--accent-glow);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.05);
  transform: translateY(-5px);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.btn-primary {
  background: var(--accent-color);
  color: #000;
  box-shadow: 0 0 15px var(--accent-glow);
  border: none;
}
.btn-primary:hover {
  box-shadow: 0 0 25px var(--accent-color);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(4px);
}
.btn-outline:hover {
  border-color: var(--accent-color);
  background: rgba(0, 212, 255, 0.05);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 20px 0;
  z-index: 1000;
  transition: var(--transition);
}
.navbar.scrolled {
  padding: 15px 0;
  background: rgba(3, 10, 22, 0.8);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--glass-border);
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 1px;
}
.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}
.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
  position: relative;
  transition: var(--transition);
}
.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--accent-color);
  transition: var(--transition);
}
.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}
.nav-link:hover, .nav-link.active {
  color: var(--accent-color);
}
.active-btn {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 8px 16px;
  border-radius: 6px;
}
.active-btn::after {
  display: none;
}
.active-btn:hover {
  border-color: var(--accent-color);
  color: var(--text-main);
}
.hamburger {
  display: none;
  font-size: 2rem;
}

/* Hero Section */
.hero {
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding-top: 60px;
}
#tsparticles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero-content {
  text-align: center;
  z-index: 1;
  max-width: 800px;
  padding: 0 20px;
}
.profile-img-container {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 30px;
}
.glow-ring {
  position: absolute;
  top: -5px; left: -5px; right: -5px; bottom: -5px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--bg-color), var(--accent-color), var(--bg-color));
  animation: spin 4s linear infinite;
  z-index: -1;
  filter: blur(8px);
  opacity: 0.8;
}
@keyframes spin { 100% { transform: rotate(360deg); } }
.profile-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg-color);
  position: relative;
  z-index: 1;
}
.hero-name {
  font-size: 3.5rem;
  margin-bottom: 10px;
  background: linear-gradient(to right, #fff, var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  font-size: 1.5rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-family: var(--font-main);
  font-weight: 400;
  height: 35px;
}
.typed-text {
  color: var(--accent-color);
  font-weight: 600;
}
.hero-tagline {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}
.hero-cta {
  display: flex;
  gap: 20px;
  justify-content: center;
}
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  z-index: 1;
  opacity: 0.7;
}
.mouse {
  width: 24px;
  height: 36px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  position: relative;
}
.wheel {
  width: 4px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollWheel 2s infinite;
}
@keyframes scrollWheel {
  0% { top: 6px; opacity: 1; }
  100% { top: 20px; opacity: 0; }
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
  align-items: center;
}
.about-img-box {
  padding: 15px;
  position: relative;
}
.about-img {
  width: 100%;
  border-radius: 12px;
  display: block;
}
.about-text h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--text-main);
}
.about-text p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 1.05rem;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.stat-item {
  text-align: center;
  padding: 20px 10px;
}
.stat-item h4 {
  font-size: 2.5rem;
  color: var(--accent-color);
  display: inline-block;
}
.stat-item span {
  font-size: 2.5rem;
  color: var(--accent-color);
  font-family: var(--font-heading);
  font-weight: 700;
}
.stat-item p {
  margin: 5px 0 0;
  font-size: 0.9rem;
  color: var(--text-main);
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}
.skill-card {
  padding: 25px;
}
.skill-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}
.skill-header i {
  font-size: 2rem;
  color: var(--accent-color);
}
.skill-header h3 {
  font-size: 1.1rem;
}
.progress-wrap {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--accent-color);
  width: 0;
  border-radius: 4px;
  box-shadow: 0 0 10px var(--accent-glow);
  transition: width 1.5s cubic-bezier(0.1, 0.5, 0.1, 1);
}

/* Experience Timeline */
.timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 30px;
  width: 2px;
  height: 100%;
  background: var(--glass-border);
}
.timeline-item {
  position: relative;
  padding-left: 80px;
  margin-bottom: 40px;
}
.timeline-item:last-child {
  margin-bottom: 0;
}
.timeline-dot {
  position: absolute;
  left: 21px;
  top: 30px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-color);
  border: 3px solid var(--accent-color);
  box-shadow: 0 0 10px var(--accent-glow);
  z-index: 1;
}
.timeline-content {
  padding: 30px;
}
.timeline-header {
  margin-bottom: 15px;
}
.timeline-header .date {
  font-size: 0.9rem;
  color: var(--accent-color);
  font-weight: 600;
  display: inline-block;
  margin-bottom: 5px;
}
.timeline-header h3 {
  font-size: 1.4rem;
  margin-bottom: 5px;
}
.timeline-header h4 {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-weight: 500;
}
.timeline-details {
  list-style-type: disc;
  padding-left: 20px;
  color: var(--text-muted);
}
.timeline-details li {
  margin-bottom: 8px;
}

/* Education Section */
.education-card {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  gap: 30px;
  align-items: center;
}
.edu-icon {
  width: 80px;
  height: 80px;
  background: rgba(0, 212, 255, 0.1);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.5rem;
  color: var(--accent-color);
  flex-shrink: 0;
}
.edu-info h3 {
  font-size: 1.5rem;
  margin-bottom: 5px;
}
.edu-info h4 {
  font-size: 1.2rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 5px;
}
.edu-date {
  display: inline-block;
  background: var(--glass-bg);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--accent-color);
  margin-bottom: 10px;
}

/* Certifications Section */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}
.cert-card {
  text-align: center;
  padding: 40px 20px;
}
.cert-badge {
  font-size: 3rem;
  color: var(--accent-color);
  margin-bottom: 20px;
  transition: var(--transition);
}
.cert-card:hover .cert-badge {
  transform: scale(1.2);
  text-shadow: 0 0 15px var(--accent-glow);
}
.cert-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}
.cert-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}
.contact-info h3 {
  font-size: 2rem;
  margin-bottom: 15px;
  line-height: 1.3;
}
.contact-info p {
  color: var(--text-muted);
  margin-bottom: 40px;
}
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 25px;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 20px;
  transition: var(--transition);
}
.contact-item:hover {
  transform: translateX(10px);
  color: var(--accent-color);
}
.contact-item:hover .icon-box {
  background: var(--accent-color);
  color: #000;
  box-shadow: 0 0 15px var(--accent-glow);
}
.icon-box {
  width: 50px;
  height: 50px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  transition: var(--transition);
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-group input, .form-group textarea {
  width: 100%;
  padding: 15px 20px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 16px; /* Must be 16px to prevent iOS auto-zoom */
  transition: var(--transition);
  appearance: none;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.1);
}
.submit-btn {
  width: 100%;
  justify-content: center;
  padding: 15px;
}
.form-status {
  margin-top: 15px;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
  opacity: 0;
  display: none;
  transform: translateY(10px);
  transition: all 0.4s ease;
}
.form-status.success {
  display: block;
  opacity: 1;
  transform: translateY(0);
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid var(--accent-glow);
  color: var(--accent-color);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
}
.form-status.sending {
  display: block;
  opacity: 1;
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
}

/* Footer Section */
footer {
  border-top: 1px solid var(--glass-border);
  padding: 60px 0 30px;
  background: var(--bg-darker);
}
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}
.footer-logo {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
}
.social-links {
  display: flex;
  gap: 15px;
}
.glass-icon {
  width: 45px;
  height: 45px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  font-size: 1.2rem;
  transition: var(--transition);
}
.glass-icon:hover {
  background: var(--accent-color);
  color: #000;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px var(--accent-glow);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .about-grid, .contact-grid {
    grid-template-columns: 1fr;
  }
  .about-img-box {
    max-width: 500px;
    margin: 0 auto;
  }
  .hero-name {
    font-size: 2.8rem;
  }
}

@media (max-width: 768px) {
  /* Navbar / Mobile menu */
  .hamburger {
    display: block;
    cursor: auto;
    z-index: 1001; /* Ensure above menu */
    position: relative;
  }
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    background: rgba(3, 10, 22, 0.98);
    backdrop-filter: blur(20px);
    width: 100%; /* Full screen menu */
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    transition: 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0);
    border-left: none;
    z-index: 1000;
  }
  .nav-links.active {
    right: 0;
  }
  
  /* Staggered text reveal for mobile nav items */
  .nav-link {
    font-size: 1.8rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
  }
  .nav-links.active .nav-link {
    opacity: 1;
    transform: translateY(0);
  }
  .nav-links.active li:nth-child(1) .nav-link { transition-delay: 0.1s; }
  .nav-links.active li:nth-child(2) .nav-link { transition-delay: 0.2s; }
  .nav-links.active li:nth-child(3) .nav-link { transition-delay: 0.3s; }
  .nav-links.active li:nth-child(4) .nav-link { transition-delay: 0.4s; }
  .nav-links.active li:nth-child(5) .nav-link { transition-delay: 0.5s; }
  .nav-links.active li:nth-child(6) .nav-link { transition-delay: 0.6s; }
  .active-btn { border: none; padding: 0; background: transparent; }

  /* Hero Tweaks */
  .hero {
    padding-top: 100px;
    min-height: auto;
    padding-bottom: 60px;
  }
  .hero-name { font-size: 2.2rem; line-height: 1.2; margin-top: 10px; }
  .hero-subtitle { font-size: 1.2rem; height: auto; margin-bottom: 15px;}
  .hero-tagline { font-size: 1rem; margin-bottom: 30px; padding: 0 10px; }
  .hero-cta { flex-direction: column; width: 100%; padding: 0 15px; }
  .btn { width: 100%; justify-content: center; padding: 15px; }
  
  /* General Spacing */
  .section-padding { padding: 60px 0; }
  .section-title { font-size: 2rem; margin-bottom: 2rem; }
  .section-subtitle { margin-bottom: 2rem; font-size: 0.9rem; }

  /* Grids & Cards */
  .stats-grid { grid-template-columns: 1fr; gap: 15px; margin-top: 30px; }
  .timeline::before { left: 15px; }
  .timeline-item { padding-left: 50px; }
  .timeline-dot { left: 6px; width: 16px; height: 16px; }
  
  .glass-card { padding: 25px 20px; }
  .education-card { flex-direction: column; text-align: center; }
  .edu-icon { margin-bottom: 10px; }
  
  /* Contact tweaks */
  .contact-info { text-align: center; }
  .contact-item { justify-content: center; }
  
  /* Footer tweaks */
  .footer-content { flex-direction: column; gap: 20px; text-align: center; }
  .footer-bottom { flex-direction: column; gap: 15px; text-align: center; }
  
  /* Disable custom cursor cleanly on mobile */
  .cursor-dot, .cursor-outline { display: none !important; }
  * { cursor: auto !important; }
}
