* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  background: #1a1a1a;
  color: #fff;
  transition: all 0.3s ease;
  margin: 0;
}

/* Interactive Background */
#interactive-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.container {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* Scroll reveal animation */
.scroll-reveal {
  opacity: 1 !important;
  transform: translateY(0) !important;
  transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.9);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(0, 0, 0, 0.95);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-text {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: bold;
  color: #6e8efb;
  background: rgba(110, 142, 251, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.logo-text:hover {
  background: rgba(110, 142, 251, 0.2);
  transform: scale(1.05);
}

.logo-name {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 500;
}

.nav-container {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: clamp(1rem, 2vw, 2rem);
  margin: 0;
}

.nav-item {
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  position: relative;
  padding: 0.5rem 0;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.nav-item::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background: linear-gradient(45deg, #6e8efb, #a777e3);
  transition: width 0.3s ease;
}

.nav-item:hover {
  color: #6e8efb;
  transform: translateY(-2px);
}

.nav-item:hover::after {
  width: 100%;
}

.resume-link {
  background: linear-gradient(45deg, #6e8efb, #a777e3);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.resume-link::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;
}

.resume-link:hover::before {
  left: 100%;
}

.resume-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(110, 142, 251, 0.4);
}

.resume-link:hover::after {
  display: none;
}

/* Theme Switcher */
.theme-switcher {
  position: relative;
}

.theme-checkbox {
  display: none;
}

.theme-label {
  width: 60px;
  height: 26px;
  background: #333;
  border-radius: 50px;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px;
  transition: all 0.3s ease;
}

.theme-label:hover {
  transform: scale(1.05);
}

.theme-label i {
  font-size: 1rem;
  color: #fff;
  transition: all 0.3s ease;
}

.theme-ball {
  width: 22px;
  height: 22px;
  background: linear-gradient(45deg, #6e8efb, #a777e3);
  position: absolute;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 10px rgba(110, 142, 251, 0.3);
}

.theme-checkbox:checked + .theme-label .theme-ball {
  transform: translateX(34px);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.hamburger:hover {
  transform: scale(1.1);
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: #fff;
  transition: all 0.3s ease;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  position: relative;
  overflow: hidden;
}

.hero-content {
  text-align: center;
  z-index: 2;
  max-width: 800px;
  padding: 0 2rem;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: bold;
  margin-bottom: 1rem;
  background: linear-gradient(45deg, #6e8efb, #a777e3);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  color: #ddd;
  margin-bottom: 2rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.cta-button {
  padding: 12px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  overflow: hidden;
}

.cta-button {
  background: linear-gradient(45deg, #6e8efb, #a777e3);
  color: white;
}

.cta-button.secondary {
  background: transparent;
  color: #6e8efb;
  border: 2px solid #6e8efb;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(110, 142, 251, 0.4);
}

.cta-button.secondary:hover {
  background: #6e8efb;
  color: white;
}

/* Sections */
.section {
  padding: 5rem 2rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  background: rgba(0, 0, 0, 0.2) !important;
  backdrop-filter: blur(5px);
  border-radius: 20px;
  margin-bottom: 2rem;
  position: relative;
  z-index: 10;
  border: 1px solid rgba(110, 142, 251, 0.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.section h2 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  text-align: center;
  margin-bottom: 3rem;
  background: linear-gradient(45deg, #6e8efb, #a777e3);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}

.section h2::after {
  content: '';
  position: absolute;
  width: 50px;
  height: 3px;
  background: linear-gradient(45deg, #6e8efb, #a777e3);
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

/* About Section */
.about-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #ccc;
  margin-bottom: 1.5rem;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem;
  background: rgba(110, 142, 251, 0.1);
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: bold;
  color: #6e8efb;
}

.stat-label {
  font-size: 0.9rem;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Skills Section */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
}

.skill-category h3 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: #6e8efb;
}

.skill-bars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skill-bar {
  position: relative;
}

.skill-name {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.skill-progress {
  width: 100%;
  height: 8px;
  background: #333;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.skill-progress::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(45deg, #6e8efb, #a777e3);
  border-radius: 10px;
  transition: width 1.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Tech Stack */
.tech-stack {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.tech-item {
  position: relative;
  padding: 1.5rem;
  background: rgba(110, 142, 251, 0.1);
  border-radius: 15px;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  cursor: pointer;
}

.tech-item:hover {
  transform: translateY(-10px) rotate(5deg);
  background: linear-gradient(45deg, rgba(110, 142, 251, 0.2), rgba(167, 119, 227, 0.2));
  box-shadow: 0 20px 40px rgba(110, 142, 251, 0.3);
}

.tech-item i {
  font-size: clamp(2rem, 3vw, 2.5rem);
  color: #6e8efb;
  transition: all 0.3s ease;
}

.tech-item:hover i {
  color: #fff;
  transform: scale(1.2);
}

.tech-item::before {
  content: attr(data-name);
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  opacity: 0;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.tech-item:hover::before {
  opacity: 1;
  top: -50px;
}

/* Projects */
.project-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.project-item {
  background: rgba(45, 45, 45, 0.8);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(110, 142, 251, 0.1);
}

.project-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 50px rgba(110, 142, 251, 0.2);
  border-color: rgba(110, 142, 251, 0.3);
}

.project-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: all 0.3s ease;
}

.project-item:hover img {
  transform: scale(1.05);
}

.project-content {
  padding: 1.5rem;
}

.project-item h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: #6e8efb;
}

.project-item p {
  font-size: 0.95rem;
  color: #ccc;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.languages {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.languages span {
  background: linear-gradient(45deg, #6e8efb, #a777e3);
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.languages span:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(110, 142, 251, 0.3);
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-link {
  color: #6e8efb;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.project-link:hover {
  color: #a777e3;
  transform: scale(1.2);
}

/* Experience Timeline */
.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #6e8efb, #a777e3);
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  margin-bottom: 3rem;
  position: relative;
}

.timeline-item:nth-child(odd) {
  flex-direction: row-reverse;
}

.timeline-item:nth-child(odd) .timeline-content {
  text-align: right;
}

.timeline-date {
  flex: 0 0 150px;
  padding: 1rem;
  background: linear-gradient(45deg, #6e8efb, #a777e3);
  color: white;
  border-radius: 25px;
  text-align: center;
  font-weight: bold;
  align-self: flex-start;
  margin: 0 2rem;
}

.timeline-content {
  flex: 1;
  padding: 1.5rem;
  background: rgba(45, 45, 45, 0.8);
  border-radius: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(110, 142, 251, 0.1);
  transition: all 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(110, 142, 251, 0.2);
}

.timeline-content h3 {
  color: #6e8efb;
  margin-bottom: 0.5rem;
}

.timeline-content h4 {
  color: #a777e3;
  margin-bottom: 1rem;
  font-weight: normal;
}

.timeline-content p {
  color: #ccc;
  line-height: 1.6;
}

/* Contact Section */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #6e8efb;
}

.contact-info p {
  color: #ccc;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-item i {
  color: #6e8efb;
  font-size: 1.2rem;
  width: 20px;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: rgba(110, 142, 251, 0.1);
  border-radius: 50%;
  color: #6e8efb;
  font-size: 1.2rem;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.social-link:hover {
  background: linear-gradient(45deg, #6e8efb, #a777e3);
  color: white;
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 15px 30px rgba(110, 142, 251, 0.3);
}

/* Contact Form */
.contact-form-container {
  background: rgba(45, 45, 45, 0.8);
  padding: 2rem;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(110, 142, 251, 0.1);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  color: #6e8efb;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  padding: 1rem;
  border: 2px solid rgba(110, 142, 251, 0.2);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #6e8efb;
  box-shadow: 0 0 20px rgba(110, 142, 251, 0.2);
}

.submit-btn {
  padding: 1rem 2rem;
  background: linear-gradient(45deg, #6e8efb, #a777e3);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  overflow: hidden;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(110, 142, 251, 0.4);
}

.submit-btn:active {
  transform: translateY(0);
}

.submit-btn.loading .btn-text {
  opacity: 0;
}

.submit-btn.loading .btn-loading {
  opacity: 1;
}

.btn-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Footer */
footer {
  padding: 2rem;
  background: rgba(17, 17, 17, 0.9);
  width: 100%;
  text-align: center;
  border-top: 1px solid rgba(110, 142, 251, 0.1);
}

/* Light Mode */
body.light-mode {
  background: #f5f7fa;
  color: #2d3748;
}

body.light-mode #interactive-bg {
  background: linear-gradient(135deg, #f5f7fa 0%, #e2e8f0 100%);
}

body.light-mode .navbar {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

body.light-mode .nav-item {
  color: #2d3748;
}

body.light-mode .hamburger span {
  background: #2d3748;
}

body.light-mode .hero {
  background: linear-gradient(135deg, #e2e8f0, #edf2f7);
}

body.light-mode .hero-content p {
  color: #4a5568;
}

body.light-mode .section h2 {
  color: #2d3748;
}

body.light-mode .about-text p {
  color: #4a5568;
}

body.light-mode .about-stats {
  background: rgba(76, 104, 215, 0.1);
}

body.light-mode .tech-item {
  background: rgba(76, 104, 215, 0.1);
}

body.light-mode .project-item {
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

body.light-mode .project-item h3 {
  color: #4c68d7;
}

body.light-mode .project-item p {
  color: #4a5568;
}

body.light-mode .timeline-content {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(76, 104, 215, 0.1);
}

body.light-mode .timeline-content h3 {
  color: #4c68d7;
}

body.light-mode .timeline-content h4 {
  color: #7f9cf5;
}

body.light-mode .timeline-content p {
  color: #4a5568;
}

body.light-mode .contact-info p {
  color: #4a5568;
}

body.light-mode .contact-form-container {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(76, 104, 215, 0.1);
}

body.light-mode .form-group input,
body.light-mode .form-group textarea {
  background: rgba(255, 255, 255, 0.5);
  color: #2d3748;
  border-color: rgba(76, 104, 215, 0.2);
}

body.light-mode footer {
  background: rgba(237, 242, 247, 0.9);
  color: #4a5568;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    flex-direction: column;
    padding: 1rem;
    backdrop-filter: blur(10px);
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .section {
    padding: 3rem 1rem;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .contact-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .timeline::before {
    left: 0;
  }
  
  .timeline-item {
    flex-direction: column;
    padding-left: 2rem;
  }
  
  .timeline-item:nth-child(odd) {
    flex-direction: column;
  }
  
  .timeline-item:nth-child(odd) .timeline-content {
    text-align: left;
  }
  
  .timeline-date {
    align-self: flex-start;
    margin: 0 0 1rem 0;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  
  .cta-button {
    width: 200px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .project-matrix {
    grid-template-columns: 1fr;
  }
  
  .skills-container {
    grid-template-columns: 1fr;
  }
  
  .tech-stack {
    gap: 1rem;
  }
  
  .tech-item {
    padding: 1rem;
  }
}

/* Typing Animation */
.typing-cursor::after {
  content: '|';
  font-weight: 100;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}
