/* Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  }
  
/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #000;
}

::-webkit-scrollbar-thumb {
  background: #00bcd4;
  border-radius: 5px;
  border: 2px solid #000;
}

::-webkit-scrollbar-thumb:hover {
  background: #008ba3;
}

body, html {
  height: 100%;
  background-color: #000;
  color: white;
  scroll-behavior: smooth;
  cursor: none;
  overflow-x: hidden;
}
  
  /* Animations */
  @keyframes fadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
  
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Preloader */
  #preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20000;
    transition: opacity 0.8s ease, visibility 0.8s;
  }

  #preloader.hide {
    opacity: 0;
    visibility: hidden;
  }

  .loader {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .loader-circle {
    width: 80px;
    height: 80px;
    border: 3px solid rgba(0, 188, 212, 0.1);
    border-top: 3px solid #00bcd4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 15px rgba(0, 188, 212, 0.4);
  }

  .loader-text {
    color: #00bcd4;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 5px;
    text-shadow: 0 0 10px rgba(0, 188, 212, 0.5);
    animation: pulse 1.5s ease-in-out infinite;
  }

  @keyframes spin {
    to { transform: rotate(360deg); }
  }

  @keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.1); }
  }
  
  /* Header */
  header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10002;
    background: transparent;
  }
  
  .logo {
    font-size: 32px;
    font-weight: bold;
  }
  
  nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
  }
  
  nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
  }
  
  nav a:hover {
    text-decoration: underline;
  }
  
  .menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: white;
  }

  /* Hamburger button bars */
  .menu-toggle {
    width: 44px;
    height: 38px;
    padding: 6px;
    background: transparent;
    border: none;
    flex-direction: column;
    justify-content: space-between;
    z-index: 10003;
    -webkit-tap-highlight-color: transparent;
    display: none; /* hidden by default; shown only on small screens */
  }
  .menu-toggle .bar {
    display: block;
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 3px;
    transform-origin: center;
    transition: transform 250ms ease, opacity 250ms ease;
  }
  .menu-toggle.open .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
  .menu-toggle.open .bar:nth-child(2) { opacity: 0; }
  .menu-toggle.open .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
  
  .resume-btn {
    border: 1px solid white;
    padding: 6px 14px;
    border-radius: 4px;
  }
  
  /* Hero */
  .hero {
    height: 100vh;
    background-image: url('https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    color: white;
    animation: fadeIn 2s ease-out;
  }
  
  .hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 60, 80, 0.4);
  }
  
  .hero .content {
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

/* Scroll reveal */
.animate-on-scroll { opacity: 0; transform: translateY(16px); transition: opacity 600ms ease, transform 600ms ease; }
.animate-on-scroll.in-view { opacity: 1; transform: none; }
  
  .greet { font-size: 20px; margin-bottom: 10px; border-bottom: 1px solid white; }
  .hero h1 { font-size: 72px; font-weight: bold; }
  .subtext { font-size: 24px; margin-top: 10px; }
  
  /* About */
  .about {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    padding: 80px 10%;
    animation: fadeInUp 1s ease-out 0.5s both;
  }
  
  .about-text {
    max-width: 600px;
    flex: 1 1 480px;
  }
  
  .about-text h2 {
    color: #00bcd4;
    font-size: 40px;
    margin-bottom: 20px;
  }
  
  .about-text p { line-height: 1.6; }
  .about-text ul { list-style: none; padding: 0; margin-top: 10px; }
  .about-text li::before {
    content: '◆';
    color: #00bcd4;
    margin-right: 8px;
  }
  
  .about a { color: #00bcd4; }
  .about a:hover { text-decoration: underline; }
  
  .about-image img {
    width: 100%;
    max-width: 320px;
    border-radius: 12px;
    border: 2px solid rgba(0, 188, 212, 0.3);
    box-shadow: 0 12px 30px rgba(0,0,0,0.6);
    animation: aboutFloat 6s ease-in-out infinite;
    transition: all 0.5s ease;
  }

  .about-image img:hover {
    transform: translateY(-10px) rotate(2deg) scale(1.05);
    border-color: #00bcd4;
    box-shadow: 0 20px 40px rgba(0, 188, 212, 0.4);
  }

  @keyframes aboutFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
  }

  .about-image {
    flex: 0 0 320px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Skills */
  .skills {
    padding: 80px 0;
    text-align: center;
    animation: fadeInUp 1s ease-out 1s both;
  }
  
  .skills-label {
    margin-top: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #00bcd4;
    text-shadow: 0 0 20px #00bcd4;
  }

/* Skills layout */
.skills-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: 100%;
  padding: 0 10px;
}

#myCanvasContainer {
  width: 100%;
  max-width: 640px;
  display: flex;
  justify-content: center;
}

#tagList img {
  width: 48px;
  height: auto;
  display: inline-block;
}

/* Desktop: place canvas and label side-by-side */
@media (min-width: 900px) {
  .skills-container {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 60px;
  }

  .skills-label {
    font-size: 32px;
    margin-top: 0;
  }

  #myCanvas {
    max-width: 640px !important;
  }
}
  
  /* Base Styles */
/* Custom Toast Notification */
.custom-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: rgba(0, 188, 212, 0.2);
  backdrop-filter: blur(10px);
  color: #fff;
  padding: 15px 25px;
  border-radius: 12px;
  border: 1px solid rgba(0, 188, 212, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 10001;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.custom-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Back to Top Button */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  background-color: #00bcd4;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 15px rgba(0, 188, 212, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9999;
}

#back-to-top.show {
  opacity: 1;
  visibility: visible;
}

#back-to-top:hover {
  background-color: #008ba3;
  transform: translateY(-5px);
  box-shadow: 0 0 25px rgba(0, 188, 212, 0.9);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    font-family: Arial, sans-serif;
    background-color: #000;
    color: white;
}

.section-title {
    font-size: 36px;
    margin-bottom: 40px;
    color: #00bcd4;
    border-bottom: 2px solid #00bcd4;
    padding-bottom: 10px;
    display: inline-block;
}

/* Timeline */
.journey {
  padding: 80px 20px;
  background: #000;
  text-align: center;
}

.timeline {
  position: relative;
  max-width: 1000px;
  margin: 40px auto;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 2px;
  background: #00bcd4;
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.timeline-item.in-view {
  opacity: 1;
  transform: translateY(0);
}

.left-item { left: 0; text-align: right; }
.right-item { left: 50%; text-align: left; }

.timeline-dot {
  position: absolute;
  width: 16px;
  height: 16px;
  right: -8px;
  background: #00bcd4;
  top: 25px;
  border-radius: 50%;
  z-index: 1;
  box-shadow: 0 0 10px #00bcd4;
}

.right-item .timeline-dot { left: -8px; }

.timeline-content {
  padding: 20px 30px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(0, 188, 212, 0.1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.timeline-content h3 { color: #00bcd4; margin-bottom: 10px; font-size: 20px; }
.timeline-content .date { font-weight: bold; margin-bottom: 10px; color: #fff; }
.timeline-content p { color: #ccc; line-height: 1.5; }

@media (max-width: 768px) {
  .timeline::after { left: 31px; }
  .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; text-align: left; }
  .left-item, .right-item { left: 0; }
  .timeline-dot { left: 23px !important; }
}

/* Coding Stats */
.coding-stats {
  padding: 80px 20px;
  background: #050505;
  text-align: center;
}

.stats-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 40px;
}

.stats-card {
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(0, 188, 212, 0.1);
  transition: transform 0.3s ease, border-color 0.3s ease;
  overflow: hidden;
}

.stats-card:hover {
  transform: translateY(-5px);
  border-color: #00bcd4;
}

.stats-card img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.leetcode-card img {
  min-width: 300px;
}

/* Projects Section */
.featured-projects {
    padding: 80px 20px;
    text-align: center;
    animation: fadeInUp 1s ease-out 1.5s both;
}

.project-nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.nav-btn {
    background-color: #00bcd4;
    color: white;
    font-size: 18px;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.nav-btn:hover {
    background-color: #0097a7;
}

/* Project Content */
.project-content {
    display: none; /* Hide content initially */
}

.project-card {
    display: flex;
    flex-wrap: wrap;
    gap: 60px;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
}

.project-image img {
    width: 100%;
    max-width: 450px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 188, 212, 0.4);
    margin-bottom: 20px;
    object-fit: cover;
}

.project-details {
    max-width: 500px;
    text-align: left;
}

.project-details h3 {
    font-size: 28px;
}

.project-details p {
    line-height: 1.6;
    color: #b0b0b0;
}

.tech-stack span {
    background: #002f36;
    color: #00bcd4;
    margin: 5px;
    padding: 8px 12px;
    border-radius: 20px;
    display: inline-block;
}

.project-links a {
    font-size: 20px;
    color: #00bcd4;
    margin-right: 15px;
}

.project-links a:hover {
    color: white;
}

/* Loading Animation */
.project-nav .nav-btn {
    position: relative;
}

.project-nav .nav-btn:active {
    animation: loading 1s infinite;
}

@keyframes loading {
    0% {
        background-color: #0097a7;
    }
    50% {
        background-color: #007c91;
    }
    100% {
        background-color: #0097a7;
    }
}

  
  /* Contact Section */
  .contact-section {
    padding: 80px 40px;
    background: #000;
    animation: fadeInUp 1s ease-out 2s both;
  }

  /* Force skills section to original centered tag-cloud layout */
  .skills-container {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 24px !important;
  }
  .skills-label {
    order: 2;
    margin-top: 18px;
    font-size: 24px;
  }
  #myCanvasContainer {
    order: 1;
    width: 100%;
    max-width: 640px;
  }
  #myCanvas {
    width: 100% !important;
    height: 420px !important;
    max-width: 640px !important;
  }
  
  .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  
  .left { width: 100%; max-width: 40%; margin-bottom: 40px; }
  .left h1 {
    font-size: 60px;
    line-height: 1.2;
    margin-bottom: 40px;
  }
  
  .info h3 { margin-top: 20px; font-size: 18px; }
  .info p { font-size: 16px; color: #ccc; }
  
  .social-icons a {
    margin-right: 10px;
    font-size: 20px;
    color: white;
  }
  .social-icons a:hover { color: #00aab5; }
  
  .right { width: 100%; max-width: 50%; }
  
  form {
    display: flex;
    flex-direction: column;
  }
  
  input, textarea {
    margin-bottom: 15px;
    padding: 15px;
    background: black;
    border: 1px solid #ccc;
    color: white;
  }

  .field-error {
    color: #ff6b6b;
    font-size: 13px;
    margin-top: -10px;
    margin-bottom: 8px;
    min-height: 16px;
  }

  #contact-status {
    margin-top: 10px;
    font-size: 15px;
  }

  .sr-only { position: absolute; left: -9999px; }
  
  button {
    padding: 15px;
    background-color: #0097a7;
    color: white;
    border: none;
    cursor: pointer;
  }
  button:hover { background-color: #007c8a; }
  
  .menu-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    color: black;
    border-radius: 50%;
    padding: 15px;
    cursor: pointer;
  }
  


  /* FOR ANIMATION */
/* Hero Animation */
@keyframes fadeSlideUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero .content {
  animation: fadeSlideUp 1.5s ease-out forwards;
  opacity: 0; /* Start hidden */
}


/* Custom Cursor */
.cursor-dot {
  width: 8px;
  height: 8px;
  background-color: #00bcd4;
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
}

.cursor-outline {
  width: 30px;
  height: 30px;
  border: 2px solid rgba(0, 188, 212, 0.5);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: all 0.15s ease-out;
}

body {
  cursor: auto;
}

a, button, .nav-btn, .resume-btn {
  cursor: pointer;
}


/* extra code  */
/* Make logo image circular */
.logo-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
}

/* Premium Animated Profile Avatar */
.hero-image-wrapper {
  position: relative;
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid rgba(0, 188, 212, 0.3);
  box-shadow: 0 0 20px rgba(0, 188, 212, 0.2);
  margin-bottom: 25px;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Orbiting Dot Container */
.hero-image-wrapper::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 50%;
  border: 1px solid rgba(0, 188, 212, 0.15);
  pointer-events: none;
}

/* The Orbiting Dot */
.hero-image-wrapper::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: #00bcd4;
  border-radius: 50%;
  top: -6px; /* Position on the thin orbit line */
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 15px #00bcd4, 0 0 30px #00bcd4;
  animation: orbitRotate 4s linear infinite;
  transform-origin: center 81px; /* (wrapper size 150 / 2) + offset 6 */
  z-index: 2;
}

@keyframes orbitRotate {
  from { transform: translateX(-50%) rotate(0deg); }
  to { transform: translateX(-50%) rotate(360deg); }
}

@keyframes profilePulse {
  0% { transform: scale(1); box-shadow: 0 0 20px rgba(0, 188, 212, 0.4); }
  50% { transform: scale(1.03); box-shadow: 0 0 35px rgba(0, 188, 212, 0.7); }
  100% { transform: scale(1); box-shadow: 0 0 20px rgba(0, 188, 212, 0.4); }
}

.hero-image-wrapper:hover {
  transform: scale(1.1);
}

/* Hero section logo styling */
.hero-logo {
  width: 135px;
  height: 135px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #00bcd4;
  animation: profilePulse 3s ease-in-out infinite;
  z-index: 1;
  transition: all 0.3s ease;
}

.hero-logo:hover {
  filter: brightness(1.1);
}

/* Hero section logo styling */
.hero-logo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  animation: profilePulse 3s ease-in-out infinite;
  z-index: 1;
}

/* Make images and canvases responsive to avoid horizontal overflow */
img, canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

#myCanvas {
  width: 100% !important;
  max-width: 400px;
  height: auto !important;
}

/* Prevent large elements from causing horizontal scroll */
.skills-container, .project-card, .container {
  overflow: hidden;
}

/* Footer */
footer {
  background: #000;
  color: white;
  text-align: center;
  padding: 20px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.social-links a {
  color: #00bcd4;
  margin: 0 10px;
  font-size: 24px;
  transition: color 0.3s;
}

.social-links a:hover {
  color: white;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  /* Header */
  header {
    padding: 10px 20px;
  }

  .logo-circle {
    width: 40px;
    height: 40px;
  }

  /* Mobile: dropdown under header (not full-screen) */
  nav ul {
    position: absolute;
    top: 64px;
    right: 20px;
    left: 20px;
    max-width: 360px;
    background: rgba(0,0,0,0.95);
    flex-direction: column;
    padding: 10px 14px;
    display: none;
    gap: 12px;
    align-items: stretch;
    justify-content: flex-start;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.6);
    z-index: 10000;
    opacity: 0;
    transform-origin: top;
    transform: scaleY(0);
    transition: transform 220ms ease, opacity 220ms ease;
  }

  nav ul.active {
    display: flex;
    opacity: 1;
    transform: scaleY(1);
  }

  .menu-toggle {
    display: inline-flex !important;
  }

  nav a {
    font-size: 14px;
  }

  .resume-btn {
    padding: 4px 8px;
    font-size: 12px;
  }

  /* Hero */
  .hero h1 {
    font-size: 48px;
  }

  .subtext {
    font-size: 18px;
  }

  .greet {
    font-size: 16px;
  }

  .hero-logo {
    width: 80px;
    height: 80px;
  }

  /* On larger screens, place hero image and text side-by-side */
  @media (min-width: 900px) {
    .hero .content {
      flex-direction: row;
      align-items: center;
      text-align: left;
    }

    .hero-image-wrapper {
      width: 180px;
      height: 180px;
      margin-right: 40px;
      margin-bottom: 0;
    }

    /* Adjust dot orbit for larger size */
    .hero-image-wrapper::after {
      transform-origin: center 96px; /* (180/2) + 6 */
    }

    .hero-logo {
      width: 165px;
      height: 165px;
    }

    .hero h1 {
      font-size: 72px;
    }
  }

  /* About */
  .about {
    flex-direction: column-reverse;
    padding: 40px 5%;
    text-align: center;
  }

  .about-text {
    max-width: 100%;
  }

  .about-image img {
    max-width: 200px;
  }

  /* Skills */
  .skills {
    padding: 40px 0;
  }

  .skills-label {
    font-size: 20px;
  }

  /* Projects */
  .featured-projects {
    padding: 40px 10px;
  }

  .project-nav {
    flex-direction: column;
    gap: 10px;
  }

  .nav-btn {
    font-size: 16px;
    padding: 10px 15px;
  }

  .project-card {
    flex-direction: column;
    gap: 20px;
  }

  .project-image img {
    width: 250px;
  }

  /* Contact */
  .contact-section {
    padding: 40px 20px;
  }

  .left {
    max-width: 100%;
  }

  .left h1 {
    font-size: 40px;
  }

  .info h3 {
    font-size: 16px;
  }

  .info p {
    font-size: 14px;
  }

  /* Footer */
  footer {
    padding: 15px;
  }

  .social-links a {
    font-size: 20px;
  }
}
