/* Responsive Design - Mobile First Approach */

/* Projects Horizontal Scroll */
.projects-container {
  position: relative;
  overflow: hidden;
  margin: 2rem 0;
}

.projects-scroll {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 1rem 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.projects-scroll::-webkit-scrollbar {
  display: none;
}

.project-card {
  flex: 0 0 350px;
  background: var(--card-bg);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all 0.4s ease;
  position: relative;
  min-height: 450px;
}

.project-card.featured {
  transform: scale(1.05);
  border-color: var(--border-color);
  box-shadow: 0 20px 40px var(--shadow);
}

.project-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 25px 50px var(--shadow);
  border-color: var(--accent-primary);
}

.project-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-links {
  display: flex;
  gap: 1rem;
  flex-direction: column;
  align-items: center;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 10px 20px;
  background: var(--shadow);
  color: var(--accent-primary);
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.project-link:hover {
  background: var(--accent-primary);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.project-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    var(--accent-primary) 0%,
    var(--accent-secondary) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-icon {
  font-size: 3rem;
  color: var(--text-primary);
}

.project-content {
  padding: 2rem;
}

.project-title {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.project-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--shadow);
  color: var(--accent-primary);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  margin: 2px;
  border: 1px solid var(--border-color);
}

.scroll-indicators {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.scroll-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--shadow);
  border: 1px solid var(--border-color);
  color: var(--accent-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.scroll-btn:hover {
  background: var(--accent-primary);
  color: var(--text-primary);
  transform: scale(1.1);
}

.scroll-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }

  /* Navigation */
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--bg-primary);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 2rem;
    transition: left 0.3s ease;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-link {
    font-size: 1.2rem;
    margin: 1rem 0;
    padding: 1rem 2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
  }

  .nav-link:hover {
    background: var(--shadow);
  }

  .nav-toggle {
    display: flex;
  }

  /* Hero Section */
  .hero-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .hero-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }

  .code-window {
    max-width: 100%;
    margin-top: 2rem;
  }

  .shape-1,
  .shape-2,
  .shape-3,
  .shape-4 {
    display: none;
  }

  /* Projects */
  .projects-scroll {
    gap: 1.5rem;
    padding: 0.5rem 0;
  }

  .project-card {
    flex: 0 0 280px;
    min-height: 400px;
  }

  .project-card.featured {
    transform: scale(1.02);
  }

  .project-content {
    padding: 1.5rem;
  }

  .project-title {
    font-size: 1.2rem;
  }

  .project-description {
    font-size: 0.9rem;
  }

  /* About Section */
  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .about-text .section-title {
    text-align: center;
  }

  .about-text .section-title::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .about-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  /* Skills Section */
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .skill-category {
    padding: 1.5rem;
  }

  /* Contact Section */
  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-methods {
    margin-bottom: 2rem;
  }

  .contact-info .social-links {
    justify-content: center;
  }

  .contact-form h3 {
    text-align: center;
  }

  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-links {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-info .social-links {
    justify-content: center;
  }

  /* Section Headers */
  .section-title {
    font-size: 2rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 10px;
  }

  /* Hero */
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 250px;
  }

  /* Projects */
  .project-card {
    flex: 0 0 250px;
    min-height: 380px;
  }

  .project-content {
    padding: 1rem;
  }

  .project-title {
    font-size: 1.1rem;
  }

  .project-description {
    font-size: 0.85rem;
  }

  /* About Stats */
  .about-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stat {
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 10px;
  }

  /* Contact Form */
  .contact-form {
    padding: 1.5rem;
  }

  /* Scroll Buttons */
  .scroll-btn {
    width: 40px;
    height: 40px;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .project-card:hover {
    transform: none;
  }

  .project-card:active {
    transform: scale(0.98);
  }

  .btn:hover {
    transform: none;
  }

  .btn:active {
    transform: scale(0.95);
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .project-icon {
    font-size: 3.5rem;
  }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
    padding: 2rem 0;
  }

  .hero-content {
    gap: 1rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .projects-scroll {
    gap: 1rem;
  }

  .project-card {
    flex: 0 0 300px;
    min-height: 350px;
  }
}
