/* Reset and base styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background-color: #000;
  color: #e7e7e7;
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* Gradient background image */
.image-gradient {
  position: fixed;
  top: 0;
  right: 0;
  opacity: 1;
  z-index: -1;
  min-height: 100vh;
  min-width: 100%;
  object-fit: cover;
}

/* Glowing blur effect */
.layer-blur {
  position: fixed;
  top: 20%;
  right: 0;
  width: 30rem;
  height: 0;
  box-shadow: 0 0 700px 15px #ffffff;
  rotate: -30deg;
  z-index: -1;
}

/* Container */
.container {
  width: 100%;
  margin: 0 auto;
  position: relative;
  overflow-x: hidden;
}

/* Glassmorphism Header - Fixed height issue */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 5rem; /* Reduced padding to fix height */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px; /* Fixed height to prevent tag section hiding */
  z-index: 999;
  
  /* Glassmorphism effect */
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  
  transition: all 0.3s ease;
}

/* Enhanced glassmorphism on scroll */
header.scrolled {
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-bottom: 1px solid rgba(127, 0, 255, 0.2);
  box-shadow: 0 8px 32px rgba(127, 0, 255, 0.1);
}

.logo {
  font-weight: 300;
  font-size: clamp(1.8rem, 3vw, 2.5rem); /* Reduced size for better fit */
  color: #fff;
  letter-spacing: 0.1em;
  text-shadow: 0 0 20px rgba(127, 0, 255, 0.6);
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
  text-shadow: 0 0 30px rgba(127, 0, 255, 0.8);
}

nav {
  display: flex;
  gap: 2rem;
  margin-left: auto;
  margin-right: 2rem;
}

nav a {
  font-size: 0.9rem; /* Slightly smaller for better fit */
  letter-spacing: 0.1rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.3rem 0; /* Reduced padding */
  font-weight: 500;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #7f00ff, #e100ff);
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(127, 0, 255, 0.5);
}

nav a:hover::after {
  width: 100%;
}

nav a:hover {
  color: #fff;
  text-shadow: 0 0 10px rgba(127, 0, 255, 0.5);
  transform: translateY(-2px);
}

.btn {
  font-size: 0.9rem; /* Smaller button text */
  font-weight: 500;
  padding: 0.6rem 1.5rem; /* Reduced padding */
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.signin {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-weight: 600;
}

.signin:hover {
  background: rgba(127, 0, 255, 0.3);
  border-color: rgba(127, 0, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(127, 0, 255, 0.3);
}

/* Home Section */
#home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 70px; /* Account for fixed header */
}

/* Main content layout matching reference */
main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: calc(100vh - 70px); /* Adjusted for header height */
  padding: 2rem 5rem 0;
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.content {
  flex: 1;
  max-width: 600px;
  z-index: 999;
  position: relative;
}

.tag-box {
  position: relative;
  width: clamp(16rem, 20vw, 20rem);
  height: 3rem;
  border-radius: 50px;
  background: linear-gradient(
    270deg,
    #7f00ff,
    #e100ff,
    #7f00ff,
    #e100ff,
    #7f00ff
  );
  background-size: 200% 100%;
  animation: gradient-animation 3s linear infinite;
  box-shadow: 0 0 30px rgba(127, 0, 255, 0.6);
  margin-bottom: 2rem;
}

.tag {
  position: absolute;
  inset: 3px;
  background-color: #000;
  border-radius: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  letter-spacing: 0.1em;
}

.tag:hover {
  color: #e100ff;
  transform: scale(1.02);
}

@keyframes gradient-animation {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 200% 0%;
  }
}

h1 {
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.1;
  margin: 2rem 0;
  color: #fff;
  text-shadow: 0 0 30px rgba(127, 0, 255, 0.6);
  font-family: 'Abolition', 'Lato', sans-serif;
}

.description {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  letter-spacing: 0.05em;
  max-width: 500px;
  color: #a8b2d1;
  margin-bottom: 3rem;
  line-height: 1.6;
  font-weight: 400;
}

.buttons {
  display: flex;
  gap: 1.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.buttons .btn {
  text-decoration: none;
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  border: 2px solid rgba(127, 0, 255, 0.6);
  background: rgba(0, 0, 0, 0.3);
  color: #7f00ff;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.buttons .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #7f00ff, #e100ff);
  transition: left 0.3s ease;
  z-index: -1;
}

.buttons .btn:hover::before {
  left: 0;
}

.buttons .btn:hover {
  color: #fff;
  border-color: rgba(127, 0, 255, 0.8);
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(127, 0, 255, 0.4);
}

/* 3D Model positioning to match reference */
.robot-3d {
  position: absolute;
  top: 0;
  right: -20%;
  height: 100%;
  width: 70%;
}

/* Portfolio Sections */
.portfolio-section {
  min-height: 100vh;
  padding: 8rem 5rem 5rem;
  position: relative;
  display: flex;
  align-items: center;
}

.section-content {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 3rem;
  color: #fff;
  text-shadow: 0 0 20px rgba(127, 0, 255, 0.5);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #7f00ff, #e100ff);
  box-shadow: 0 0 10px #7f00ff;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scaleX(1);
  }
  50% {
    opacity: 0.7;
    transform: scaleX(1.1);
  }
}

/* About Section */
.about-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
}

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

.about-text p {
  color: #a8b2d1;
  margin-bottom: 1.5rem;
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  line-height: 1.8;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

.about-text p:nth-child(2) {
  animation-delay: 0.2s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Projects Section */
.projects-container {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  margin-top: 3rem;
}

.project-item {
  position: relative;
  height: clamp(400px, 50vh, 500px);
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 4rem;
  transition: transform 0.3s ease;
}

.project-item:hover {
  transform: scale(1.02);
}

.project-image-container {
  position: relative;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.project-image {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  object-fit: cover;
  filter: brightness(0.6) saturate(0.8);
  transform: scale(1);
  transition: all 0.5s ease;
}

.project-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 2rem;
  z-index: 2;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  transition: all 0.3s ease;
}

.project-item:hover .project-image {
  filter: brightness(1) saturate(1);
  transform: scale(1.1);
}

.project-item:hover .project-content {
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  transform: translateY(-10px);
}

.project-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: #fff;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.project-description {
  color: #e7e7e7;
  margin-bottom: 1.5rem;
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  line-height: 1.6;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.project-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  background: rgba(127, 0, 255, 0.3);
  color: #e100ff;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: clamp(0.7rem, 1vw, 0.8rem);
  border: 1px solid rgba(127, 0, 255, 0.5);
  transition: all 0.3s ease;
}

.tech-tag:hover {
  background: rgba(127, 0, 255, 0.6);
  transform: translateY(-2px);
}

.project-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.project-link {
  color: #7f00ff;
  text-decoration: none;
  font-size: clamp(0.9rem, 1.1vw, 1rem);
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border: 1px solid #7f00ff;
  border-radius: 25px;
}

.project-link:hover {
  color: #fff;
  background: #7f00ff;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(127, 0, 255, 0.3);
}

/* Skills Section */
.skills-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 3rem 4rem;
  max-width: 1000px;
  margin: 0 auto;
}

.skills-category:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}

.skills-category:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}

.skills-category:nth-child(3) {
  grid-column: 1 / -1;
  grid-row: 2;
  max-width: 500px;
  margin: 0 auto;
}

.skills-category h3 {
  font-size: clamp(1.5rem, 2.5vw, 1.8rem);
  color: #fff;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 10px #7f00ff;
}

.skills-list {
  list-style: none;
}

.skills-list li {
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateX(-20px);
  animation: slideInLeft 0.6s ease forwards;
}

.skills-list li:nth-child(2) { animation-delay: 0.2s; }
.skills-list li:nth-child(3) { animation-delay: 0.4s; }

@keyframes slideInLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.skill-name {
  display: block;
  margin-bottom: 0.8rem;
  font-weight: 500;
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  color: #e7e7e7;
}

.skill-bar {
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.skill-level {
  height: 100%;
  background: linear-gradient(90deg, #7f00ff, #e100ff);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(127, 0, 255, 0.5);
  transition: width 1s ease;
  position: relative;
}

.skill-level::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Resume Section */
.resume-container {
  display: flex;
  justify-content: center;
  max-width: 600px;
  margin: 0 auto;
}

.resume-section h3 {
  font-size: clamp(1.5rem, 2.5vw, 1.8rem);
  color: #fff;
  margin-bottom: 2rem;
  text-shadow: 0 0 10px #7f00ff;
}

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, #7f00ff, #e100ff);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  padding: 1.5rem;
  background: rgba(25, 25, 25, 0.8);
  border-radius: 10px;
  border-left: 3px solid #7f00ff;
  transition: all 0.3s ease;
}

.timeline-item:hover {
  transform: translateX(10px);
  box-shadow: 0 10px 30px rgba(127, 0, 255, 0.2);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.5rem;
  top: 1.5rem;
  width: 12px;
  height: 12px;
  background: #e100ff;
  border-radius: 50%;
  box-shadow: 0 0 10px #7f00ff;
}

.timeline-date {
  color: #7f00ff;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: clamp(0.9rem, 1.1vw, 1rem);
}

.timeline-item h4 {
  color: #fff;
  margin-bottom: 0.5rem;
  font-size: clamp(1.1rem, 1.3vw, 1.2rem);
}

.timeline-item p {
  color: #a8b2d1;
  font-size: clamp(0.9rem, 1.1vw, 1rem);
}

.resume-download {
  text-align: center;
  margin-top: 3rem;
}

.download-resume {
  background: linear-gradient(45deg, #7f00ff, #e100ff);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
}

.download-resume:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(127, 0, 255, 0.4);
}

/* Contact Section */
.contact-container-new {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}

.social-buttons {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  justify-content: center;
}

.social-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.social-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(-45deg) translate(-100%, -100%);
  transition: transform 0.6s ease;
}

.social-btn:hover::before {
  transform: rotate(-45deg) translate(100%, 100%);
}

.social-icon {
  width: 32px;
  height: 32px;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
  z-index: 2;
}

.social-text {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
  white-space: nowrap;
  pointer-events: none;
}

/* LinkedIn Styling */
.social-btn.linkedin {
  color: #0077b5;
}

.social-btn.linkedin:hover {
  background: linear-gradient(135deg, #0077b5, #005885);
  color: white;
  transform: translateY(-8px) scale(1.1);
  box-shadow: 0 20px 40px rgba(0, 119, 181, 0.4);
}

.social-btn.linkedin:hover .social-text {
  opacity: 1;
  bottom: -35px;
  color: #0077b5;
}

/* Instagram Styling */
.social-btn.instagram {
  color: #e4405f;
}

.social-btn.instagram:hover {
  background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: white;
  transform: translateY(-8px) scale(1.1);
  box-shadow: 0 20px 40px rgba(228, 64, 95, 0.4);
}

.social-btn.instagram:hover .social-text {
  opacity: 1;
  bottom: -35px;
  color: #e4405f;
}

/* GitHub Styling */
.social-btn.github {
  color: #333;
}

.social-btn.github:hover {
  background: linear-gradient(135deg, #333, #24292e);
  color: white;
  transform: translateY(-8px) scale(1.1);
  box-shadow: 0 20px 40px rgba(51, 51, 51, 0.4);
}

.social-btn.github:hover .social-text {
  opacity: 1;
  bottom: -35px;
  color: #333;
}

/* Email Styling */
.social-btn.email {
  color: #ea4335;
}

.social-btn.email:hover {
  background: linear-gradient(135deg, #ea4335, #d33b2c);
  color: white;
  transform: translateY(-8px) scale(1.1);
  box-shadow: 0 20px 40px rgba(234, 67, 53, 0.4);
}

.social-btn.email:hover .social-text {
  opacity: 1;
  bottom: -35px;
  color: #ea4335;
}

/* Pulse Animation */
.social-btn:hover .social-icon {
  animation: pulse 0.6s ease-in-out;
}

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

/* Ripple Effect */
.social-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.social-btn:active::after {
  width: 200px;
  height: 200px;
}

/* Floating Animation */
.social-btn {
  animation: float 3s ease-in-out infinite;
}

.social-btn:nth-child(1) {
  animation-delay: 0s;
}

.social-btn:nth-child(2) {
  animation-delay: 0.5s;
}

.social-btn:nth-child(3) {
  animation-delay: 1s;
}

.social-btn:nth-child(4) {
  animation-delay: 1.5s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(45deg, #7f00ff, #e100ff);
  border-radius: 50%;
  color: #fff;
}

.contact-detail h4 {
  color: #fff;
  margin-bottom: 0.5rem;
  font-size: clamp(1rem, 1.2vw, 1.1rem);
}

.contact-detail p {
  color: #a8b2d1;
  font-size: clamp(0.9rem, 1.1vw, 1rem);
}

.contact-form {
  background: rgba(25, 25, 25, 0.5);
  padding: 2rem;
  border-radius: 15px;
  border: 1px solid rgba(127, 0, 255, 0.2);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(127, 0, 255, 0.3);
  border-radius: 10px;
  color: #fff;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #7f00ff;
  box-shadow: 0 0 15px rgba(127, 0, 255, 0.3);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #a8b2d1;
}

.send-message {
  background: linear-gradient(45deg, #7f00ff, #e100ff);
  color: #fff;
  padding: 1rem 2rem;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.send-message:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(127, 0, 255, 0.4);
}

/* Footer */
footer {
  background: rgba(0, 0, 0, 0.9);
  padding: 3rem 5rem 2rem;
  border-top: 1px solid rgba(127, 0, 255, 0.2);
}

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

.footer-logo {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 600;
  color: #fff;
  margin-bottom: 1rem;
  text-shadow: 0 0 10px #7f00ff;
}

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

.social-icon {
  color: #a8b2d1;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 0.5rem;
}

.social-icon:hover {
  color: #7f00ff;
  transform: translateY(-2px);
}

.copyright {
  color: #a8b2d1;
  font-size: 0.9rem;
}

/* Loader styles */
.loader-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #000;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-hidden {
  opacity: 0;
  visibility: hidden;
}

.absolute {
  position: absolute;
}

.inline-block {
  display: inline-block;
}

.loader {
  display: flex;
  margin: 0.25em 0;
}

.w-2 {
  width: 0.5em;
}

.dash {
  animation: dashArray 2s ease-in-out infinite,
    dashOffset 2s linear infinite;
}

@keyframes dashArray {
  0% {
    stroke-dasharray: 0 1 359 0;
  }
  50% {
    stroke-dasharray: 0 359 1 0;
  }
  100% {
    stroke-dasharray: 359 1 0 0;
  }
}

@keyframes dashOffset {
  0% {
    stroke-dashoffset: 365;
  }
  100% {
    stroke-dashoffset: 5;
  }
}

/* ===== RESPONSIVE DESIGN ===== */

/* Desktop Large (1400px+) */
@media (min-width: 1400px) {
  header {
    padding: 0.8rem 8rem;
  }
  
  main,
  .portfolio-section {
    padding-left: 8rem;
    padding-right: 8rem;
  }
  
  .robot-3d {
    width: 60%;
    right: -15%;
  }
}

/* Desktop Medium (1200px - 1399px) */
@media (max-width: 1399px) and (min-width: 1200px) {
  .robot-3d {
    width: 55%;
    right: -10%;
  }
}

/* Desktop Small / Large Tablet (992px - 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
  header {
    padding: 0.8rem 3rem;
  }
  
  main,
  .portfolio-section {
    padding-left: 3rem;
    padding-right: 3rem;
  }
  
  .robot-3d {
    width: 50%;
    right: -5%;
  }
  
  nav {
    gap: 1.5rem;
  }
  
  .about-container,
  .resume-container {
    gap: 3rem;
  }
  
  .skills-container {
    gap: 2rem 3rem;
  }
}

/* Tablet Portrait (768px - 991px) */
@media (max-width: 991px) and (min-width: 768px) {
  header {
    padding: 0.8rem 2rem;
    height: 65px;
  }
  
  #home {
    padding-top: 65px;
  }
  
  main {
    min-height: calc(100vh - 65px);
    padding: 2rem 2rem 0;
    flex-direction: column;
    text-align: center;
  }
  
  .content {
    max-width: 100%;
    margin-bottom: 3rem;
  }
  
  .robot-3d {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    height: 50vh;
    max-width: 600px;
    margin: 0 auto;
  }
  
  .portfolio-section {
    padding: 6rem 2rem 4rem;
  }
  
  .about-container,
  .skills-container,
  .resume-container {
    gap: 3rem;
  }
  
  .about-paragraph {
    text-align: left;
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .about-paragraph:hover {
    transform: translateX(3px);
  }
  
  .about-stats {
    display: none;
  }
  
  nav {
    gap: 1.2rem;
  }
  
  nav a {
    font-size: 0.85rem;
  }
  
  .signin {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
  }
}

/* Mobile Large (576px - 767px) */
@media (max-width: 767px) and (min-width: 576px) {
  header {
    padding: 0.6rem 1.5rem;
    height: 60px;
    flex-wrap: wrap;
    gap: 2rem;
  }
  
  #home {
    padding-top: 60px;
  }
  
  main {
    min-height: calc(100vh - 60px);
    padding: 1.5rem 1.5rem 0;
    flex-direction: column;
    text-align: center;
  }
  
  .logo {
    font-size: 1.8rem;
  }
  
  nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 1rem;
    margin: 0;
  }
  
  nav a {
    font-size: 0.8rem;
    padding: 0.2rem 0;
  }
  
  .signin {
    order: 2;
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
  }
  
  .robot-3d {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    height: 45vh;
    max-width: 500px;
    margin: 0 auto;
  }
  
  .portfolio-section {
    padding: 5rem 1.5rem 3rem;
  }
  
  .skills-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .skills-category:nth-child(1),
  .skills-category:nth-child(2),
  .skills-category:nth-child(3) {
    grid-column: 1;
    grid-row: auto;
    max-width: 100%;
  }
  
  .about-paragraph {
    text-align: left;
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
    padding: 0.8rem 0;
  }
  
  .about-paragraph:hover {
    transform: translateX(2px);
    letter-spacing: 0.03em;
  }
  
  .about-stats {
    display: none;
  }
  
  .project-item {
    height: 350px;
    margin-bottom: 2rem;
  }
  
  .project-content {
    padding: 1.5rem;
  }
  
  .project-links {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .timeline {
    padding-left: 1.5rem;
  }
  
  .timeline-item {
    padding: 1rem;
  }
  
  .timeline-item:hover {
    transform: translateX(5px);
  }
  
  footer {
    padding: 2rem 1.5rem;
  }
  
  .social-links {
    gap: 1rem;
  }
  
  .social-buttons {
    gap: 2rem;
  }
  
  .social-btn {
    width: 70px;
    height: 70px;
  }
  
  .social-icon {
    width: 28px;
    height: 28px;
  }
}

/* Mobile Small (320px - 575px) */
@media (max-width: 575px) {
  header {
    padding: 0.5rem 1rem;
    height: 55px;
    flex-direction: column;
    gap: 0.3rem;
  }
  
  #home {
    padding-top: 55px;
  }
  
  main {
    min-height: calc(100vh - 55px);
    padding: 1rem 1rem 0;
    flex-direction: column;
    text-align: center;
  }
  
  .logo {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
  }
  
  nav {
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  nav a {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
  }
  
  .signin {
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
    margin-top: 0.3rem;
  }
  
  .tag-box {
    width: 100%;
    max-width: 280px;
    height: 2.5rem;
    margin: 0 auto 1.5rem;
  }
  
  .tag {
    font-size: 0.8rem;
  }
  
  h1 {
    font-size: 2.5rem;
    margin: 1.5rem 0;
  }
  
  .description {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
  
  .buttons {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
  }
  
  .buttons .btn {
    width: 100%;
    max-width: 250px;
    text-align: center;
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .robot-3d {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    height: 40vh;
    max-width: 400px;
    margin: 0 auto;
  }
  
  .portfolio-section {
    padding: 4rem 1rem 2rem;
  }
  
  .section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
  }
  
  .skills-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .skills-category:nth-child(1),
  .skills-category:nth-child(2),
  .skills-category:nth-child(3) {
    grid-column: 1;
    grid-row: auto;
    max-width: 100%;
  }
  
  .about-paragraph {
    text-align: left;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
  }
  
  .about-paragraph:hover {
    transform: translateX(1px);
    letter-spacing: 0.02em;
  }
  
  .project-item {
    height: 300px;
    margin-bottom: 1.5rem;
  }
  
  .project-content {
    padding: 1rem;
  }
  
  .project-tech-stack {
    justify-content: center;
    gap: 0.3rem;
  }
  
  .tech-tag {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
  }
  
  .contact-item {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
    padding: 0.8rem;
  }
  
  .contact-form {
    padding: 1.5rem;
  }
  
  .form-group input,
  .form-group textarea {
    padding: 0.8rem;
    font-size: 0.9rem;
  }
  
  footer {
    padding: 2rem 1rem;
  }
  
  .social-links {
    gap: 0.8rem;
    flex-wrap: wrap;
  }
  
  .social-buttons {
    gap: 1.5rem;
  }
  
  .social-btn {
    width: 60px;
    height: 60px;
  }
  
  .social-icon {
    width: 24px;
    height: 24px;
  }
  
  .social-text {
    font-size: 0.8rem;
  }
}

/* Extra Small Mobile (below 320px) */
@media (max-width: 319px) {
  header {
    height: 50px;
    padding: 0.4rem 0.5rem;
  }
  
  #home {
    padding-top: 50px;
  }
  
  main {
    min-height: calc(100vh - 50px);
    padding: 0.8rem 0.5rem 0;
  }
  
  .logo {
    font-size: 1.3rem;
  }
  
  nav a {
    font-size: 0.7rem;
  }
  
  .signin {
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .robot-3d {
    height: 35vh;
    max-width: 300px;
  }
  
  .portfolio-section {
    padding: 3rem 0.5rem 2rem;
  }
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .project-image {
    filter: contrast(1.2);
  }
  
  .tech-tag {
    border-width: 2px;
  }
}

/* Dark mode optimization */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #000;
  }
}