:root {
  --primary: #64ffda;
  --background: #0a192f;
  --text: #ccd6f6;
  --text-secondary: #8892b0;
  --glass: rgba(10, 25, 47, 0.7);
  --card-border: rgba(100, 255, 218, 0.1);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
}

/* Navigation */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(10, 25, 47, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: all 0.3s ease;
}

nav h2 {
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
}

.hero-content {
  max-width: 800px;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  color: var(--primary);
  margin-bottom: 1rem;
  line-height: 1.1;
  animation: fadeInUp 0.8s ease;
}

.hero-content p {
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease 0.2s forwards;
  opacity: 0;
}

/* Experience Section */
/* Experience Section Base */
.experience {
  padding: 8rem 0;
  background: linear-gradient(180deg, var(--background) 0%, rgba(10, 25, 47, 0.8) 100%);
  position: relative;
}

.experience::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.3;
}

/* Timeline Container */
.experience-timeline {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
}

/* Experience Card */
.experience-card {
  background: rgba(10, 25, 47, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(100, 255, 218, 0.1);
  border-radius: 16px;
  padding: 2.5rem;
  position: relative;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.experience-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: 
    0 10px 30px -15px rgba(100, 255, 218, 0.1),
    0 0 0 1px rgba(100, 255, 218, 0.1);
}

/* Card Header */
.experience-header {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 2rem;
}

.company-logo-wrapper {
  flex-shrink: 0;
}

.company-logo {
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.experience-card:hover .company-logo {
  transform: scale(1.05);
}

.company-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0.9);
}

/* Experience Meta */
.experience-meta {
  flex-grow: 1;
}

.role-info {
  margin-bottom: 0.5rem;
}

.role-title {
  color: var(--text);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.experience-card:hover .role-title {
  color: var(--primary);
}

.company-name {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 500;
}

.experience-date {
  display: inline-block;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.3rem 1rem;
  background: rgba(100, 255, 218, 0.1);
  border-radius: 20px;
  margin-top: 0.5rem;
}

/* Experience Content */
.experience-content {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

.responsibility-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
}

.responsibility-list li {
  position: relative;
  padding-left: 1.8rem;
  margin-bottom: 1rem;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.responsibility-list li:hover {
  opacity: 1;
}

.responsibility-list li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 1.2rem;
}

/* Animations */
.experience-card {
  animation: fadeIn 0.5s ease forwards;
  opacity: 0;
}

.experience-card:nth-child(1) { animation-delay: 0.2s; }
.experience-card:nth-child(2) { animation-delay: 0.4s; }
.experience-card:nth-child(3) { animation-delay: 0.6s; }

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .experience-timeline {
    padding: 1.5rem;
    gap: 3rem;
  }
  
  .experience-card {
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  .experience {
    padding: 6rem 0;
  }
  
  .experience-header {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .company-logo {
    width: 60px;
    height: 60px;
  }
  
  .role-title {
    font-size: 1.2rem;
  }
  
  .company-name {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .experience-timeline {
    padding: 1rem;
    gap: 2rem;
  }
  
  .experience-card {
    padding: 1.5rem;
  }
  
  .experience-content {
    font-size: 0.95rem;
  }
  
  .responsibility-list li {
    padding-left: 1.5rem;
  }
}

/* Dark Mode Enhancement */
@media (prefers-color-scheme: dark) {
  .experience-card {
    background: rgba(10, 25, 47, 0.7);
  }
}
/* Projects Section */
.projects {
  padding: 6rem 0;
}

.section-title {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 3rem;
  text-align: center;
}

.project-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 1rem;
  justify-content: center;
}

.project-card {
  background: var(--glass);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  flex: 1 1 300px; /* Ensures cards are flexible with a minimum width of 300px */
  max-width: 400px;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.project-card video {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  transition: transform 0.5s ease;
}

.project-card video:hover {
  transform: scale(1.05);
}

.project-card h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.project-card p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* Skills Section - Improved Responsiveness */
.skills {
  padding: 6rem 0;
  overflow: hidden;
}

.skills-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.show-skill {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  cursor: pointer;
  margin-bottom: 2rem;
}

.show-skill h2 {
  color: var(--primary);
  font-size: 1.2rem;
}

.show-skill img {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.show-skill:hover img {
  transform: translateY(3px);
}

/* New Infinite Scroll Styling */
.skills-flex {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  position: relative;
  padding: 2rem 0;
  width: 100%;
  overflow: hidden;
}

.skills-flex.show {
  display: block;
  opacity: 1;
}

.skills-flex::before,
.skills-flex::after {
  content: '';
  position: absolute;
  top: 0;
  width: 100px;
  height: 100%;
  z-index: 2;
}

.skills-flex::before {
  left: 0;
  background: linear-gradient(to right, var(--background), transparent);
}

.skills-flex::after {
  right: 0;
  background: linear-gradient(to left, var(--background), transparent);
}

.skills-flex .scroll-container {
  display: flex;
  animation: scroll 50s linear infinite;
  gap: 1.5rem;
  width: fit-content;
}

@media (max-width: 768px) {
  .skills-flex .scroll-container {
    animation: scroll 30s linear infinite;
    gap: 1rem;
  }
}

.skills-flex .scroll-container:hover {
  animation-play-state: paused;
}

.skills-flex .scroll-content {
  display: flex;
  gap: 1.5rem;
  padding: 0 1rem;
  flex-wrap: nowrap;
}

@media (max-width: 768px) {
  .skills-flex .scroll-content {
    gap: 1rem;
    padding: 0 0.5rem;
  }
}

.skill-item {
  background: var(--glass);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  white-space: nowrap;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .skill-item {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
}

.skill-item:hover {
  transform: translateY(-5px) scale(1.05);
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(100, 255, 218, 0.2);
  background: rgba(100, 255, 218, 0.1);
}

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

/* Contact Section */
.contact {
  padding: 4rem 0;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.btn {
  color: var(--primary);
  text-decoration: none;
  padding: 0.8rem 2rem;
  border: 2px solid var(--primary);
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--primary);
  z-index: -1;
  transition: width 0.3s ease;
}

.btn:hover {
  color: var(--background);
}

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

.contact-info {
  margin-top: 3rem;
  padding: 2rem;
  background: var(--glass);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  text-align: center;
  animation: fadeInUp 0.5s ease;
}

.contact-info p {
  margin: 0.5rem 0;
  color: var(--text-secondary);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Media Queries - Improved Responsiveness */
@media (max-width: 1024px) {
  .experience-card {
    padding: 1.5rem;
  }
  
  .project-grid {
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  nav {
    padding: 1rem;
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding-top: 4rem;
  }
  
  .section-title {
    font-size: 1.75rem;
    margin-bottom: 2rem;
  }
  
  .experience {
    padding: 6rem 0 4rem;
  }
  
  .experience-timeline {
    gap: 2rem;
  }
  
  .experience-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .company-logo {
    width: 50px;
    height: 50px;
  }

  .project-card {
    margin: 0 0.5rem;
    flex: 1 1 100%;
    max-width: none;
  }

  .contact {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .btn {
    width: 80%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .experience-card {
    padding: 1.25rem;
  }
  
  .experience-meta h3 {
    font-size: 1.1rem;
  }
  
  .skill-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }
}

/* Canvas Background */
canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.6;
}