/* Modern landing page styles */

/* --- Global Fixes --- */
body {
  overflow-x: hidden !important;
}

#page-wrapper {
  overflow-x: hidden !important;
}

* {
  box-sizing: border-box;
}

/* Ensure hero section doesn't overlap other content */
#banner.modern-hero {
  position: relative !important;
  z-index: 1 !important;
}

.gradient-text {
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* Dark glassmorphism overlay on hero section */
#banner.modern-hero:after {
  background: rgba(8, 10, 15, 0.85) !important;
  background-image: none !important;
  backdrop-filter: blur(15px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(15px) saturate(180%) !important;
}

/* Fix hero section background scrolling issues */
#banner.modern-hero {
  background-attachment: scroll !important;
  background-position: center center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  position: relative !important;
}

/* Deep black background layer */
#banner.modern-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000;
  z-index: 0;
  pointer-events: none;
}

/* Simple 3D shapes - no interaction */
#banner.modern-hero .particles {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}

/* Empty - using dedicated divs instead */
#banner.modern-hero .particles::before,
#banner.modern-hero .particles::after {
  display: none;
}

/* Top Shape 1: Triangle - Top Left */
#banner.modern-hero .top-shape-left {
  position: absolute;
  top: -15%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 3px solid rgba(255, 255, 255, 0.15);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  box-shadow: 0 0 120px rgba(255, 255, 255, 0.12);
  animation: floatSpin1 20s ease-in-out infinite;
  z-index: 2;
  pointer-events: none;
}

/* Top Shape 2: Square - Top Right */
#banner.modern-hero .top-shape-right {
  position: absolute;
  top: -12%;
  right: -15%;
  width: 380px;
  height: 380px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 3px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  box-shadow: 0 0 110px rgba(255, 255, 255, 0.11);
  animation: floatSpin2 24s ease-in-out infinite;
  z-index: 2;
  pointer-events: none;
}

/* Bottom Shape: Rectangle - Bottom Center */
#banner.modern-hero .bottom-shape-center {
  position: absolute;
  bottom: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 480px;
  height: 280px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.085) 0%, rgba(255, 255, 255, 0.015) 100%);
  border: 3px solid rgba(255, 255, 255, 0.14);
  border-radius: 25px;
  box-shadow: 0 0 105px rgba(255, 255, 255, 0.1);
  animation: floatSpin5 28s ease-in-out infinite;
  z-index: 2;
  pointer-events: none;
}

/* Simple floating animations */
@keyframes floatSpin1 {
  0%, 100% {
    transform: rotate(0deg) scale(1);
    opacity: 0.7;
  }
  50% {
    transform: rotate(180deg) scale(1.05);
    opacity: 0.9;
  }
}

@keyframes floatSpin2 {
  0%, 100% {
    transform: rotate(0deg) translateY(0);
    opacity: 0.75;
  }
  50% {
    transform: rotate(180deg) translateY(-20px);
    opacity: 0.95;
  }
}

@keyframes floatSpin3 {
  0%, 100% {
    transform: rotate(0deg) translateX(0);
    opacity: 0.72;
  }
  50% {
    transform: rotate(180deg) translateX(15px);
    opacity: 0.92;
  }
}

@keyframes floatSpin4 {
  0%, 100% {
    transform: rotate(0deg);
    opacity: 0.68;
  }
  50% {
    transform: rotate(180deg);
    opacity: 0.88;
  }
}

@keyframes floatSpin5 {
  0%, 100% {
    transform: translateX(-50%) rotate(0deg) translateY(0);
    opacity: 0.7;
  }
  50% {
    transform: translateX(-50%) rotate(180deg) translateY(-15px);
    opacity: 0.9;
  }
}

/* Ensure content is always visible and properly layered */
#banner.modern-hero .content {
  position: relative !important;
  z-index: 10 !important;
}

/* Ensure overlay doesn't interfere with content */
#banner.modern-hero:after {
  z-index: 1 !important;
}

/* Make sure all hero content is above the overlay */
#banner.modern-hero .hero-content-wrapper,
#banner.modern-hero .hero-header,
#banner.modern-hero .hero-cta,
#banner.modern-hero .hero-social {
  position: relative !important;
  z-index: 11 !important;
}

/* Additional animated geometric shapes */
#banner.modern-hero {
  position: relative;
  overflow: hidden;
}

/* More simple shapes */
#banner.modern-hero .geometric-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  overflow: visible;
}

/* Shape 3: Hexagon - Bottom Left */
#banner.modern-hero .geometric-shapes::before {
  content: '';
  position: absolute;
  bottom: -18%;
  left: -8%;
  width: 360px;
  height: 360px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 3px solid rgba(255, 255, 255, 0.15);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  box-shadow: 0 0 115px rgba(255, 255, 255, 0.12);
  animation: floatSpin3 22s ease-in-out infinite;
}

/* Shape 4: Triangle - Bottom Right */
#banner.modern-hero .geometric-shapes::after {
  content: '';
  position: absolute;
  bottom: -16%;
  right: -10%;
  width: 370px;
  height: 370px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 3px solid rgba(255, 255, 255, 0.14);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  box-shadow: 0 0 108px rgba(255, 255, 255, 0.11);
  animation: floatSpin4 26s ease-in-out infinite;
}

/* Simple white glow */
#banner.modern-hero .content::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 60%);
  border-radius: 50%;
  animation: simpleGlow 10s ease-in-out infinite;
  z-index: -1;
  pointer-events: none;
  filter: blur(50px);
}

@keyframes simpleGlow {
  0%, 100% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1.1);
  }
}


/* Projects section should start after hero */
#projects {
  position: relative !important;
  z-index: 2 !important;
}

/* Fix contact section scrolling and positioning issues */
#contact {
  background-attachment: scroll !important;
  position: relative !important;
  overflow: visible !important;
}

/* Ensure contact content is properly layered */
#contact .container {
  position: relative !important;
  z-index: 10 !important;
}

/* Fix floating text issues */
#contact .contact-header {
  position: relative !important;
  z-index: 11 !important;
}

#contact .contact-header h2,
#contact .contact-header p {
  position: relative !important;
  z-index: 12 !important;
}

/* --- Global icon fixes --- */
.icons .icon::before {
  font-size: 1.15rem;
  line-height: 1;
  vertical-align: middle;
}

/* Normalize inline <i class="fa ..."> sizing */
i.fas, i.far, i.fab {
  line-height: 1;
}

/* --- Header Enhancements --- */
.modern-header {
  backdrop-filter: blur(20px);
  transition: all 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  height: auto !important;
  min-height: 4rem !important;
  background: rgba(12, 13, 18, 0.95) !important;
}

.modern-header #nav ul li a:hover {
  color: #60a5fa !important;
}

.modern-header .resume-btn:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-2px);
}

.modern-header #nav ul li a:hover {
  color: #60a5fa !important;
}

.modern-header .resume-btn:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-2px);
}

/* Mobile Menu Styles */
#mobile-menu-toggle {
  display: none !important;
  z-index: 1001;
}

@media (max-width: 768px) {
  #mobile-menu-toggle {
    display: block !important;
  }
  
  .modern-header #nav {
    position: fixed !important;
    top: 0 !important;
    right: -100% !important;
    width: 80% !important;
    max-width: 300px !important;
    height: 100vh !important;
    background: rgba(23, 24, 32, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    transition: right 0.3s ease !important;
    z-index: 10001 !important;
    padding: 5rem 2rem 2rem !important;
    margin: 0 !important;
  }
  
  .modern-header #nav.active {
    right: 0 !important;
  }
  
  .modern-header #nav ul {
    flex-direction: column !important;
    gap: 2rem !important;
    align-items: flex-start !important;
  }
  
  .modern-header #nav ul li {
    width: 100% !important;
    margin: 0 !important;
  }
  
  .modern-header #nav ul li a {
    font-size: 1.1rem !important;
    padding: 0.5rem 0 !important;
    display: block !important;
    width: 100% !important;
  }
  
  /* Mobile menu overlay */
  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
  }
}

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

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

@keyframes bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-10px);
  }
}

/* Hero CTA Buttons */
.cta-primary {
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25) !important;
}

.cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35) !important;
  background: linear-gradient(135deg, #5b21b6, #6366f1) !important;
}

.cta-secondary:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.1) !important;
}

/* Hero Social Icons */
.social-icon-modern:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.4) !important;
}

/* --- Modern Project Showcase Sections --- */
.project-showcase {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}

.project-showcase:nth-child(2) { animation-delay: 0.1s; }
.project-showcase:nth-child(3) { animation-delay: 0.2s; }
.project-showcase:nth-child(4) { animation-delay: 0.3s; }
.project-showcase:nth-child(5) { animation-delay: 0.4s; }

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

/* Modern Project Card Enhancements */
.modern-project-card {
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.modern-project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.modern-project-card:hover::before {
  opacity: 1;
}

.modern-project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12), 0 5px 15px rgba(59, 130, 246, 0.1) !important;
}

/* Project Image Hover Effects */
.modern-project-card:hover .project-image-wrapper img {
  transform: scale(1.08);
}

.modern-project-card:hover .project-image-wrapper > div {
  opacity: 1 !important;
}

/* Project Link Hover */
.project-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35) !important;
  background: linear-gradient(135deg, #1d4ed8, #1e40af) !important;
}

.project-link:hover span {
  transform: translateX(3px);
  display: inline-block;
}

/* Category Badge */
.project-category {
  box-shadow: 0 2px 8px rgba(3, 105, 161, 0.15);
}

/* --- About Me Section --- */
.about-image-wrapper {
  transition: all 0.4s ease;
}

.about-image-wrapper:hover {
  transform: translateY(-10px) rotate(-2deg);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
}

.about-image-wrapper img {
  transition: transform 0.4s ease;
}

.about-image-wrapper:hover img {
  transform: scale(1.05);
}

.experience-grid > div {
  transition: all 0.3s ease;
}

.experience-grid > div:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.15);
  border-color: #3b82f6;
}

/* --- Hero Section Enhancements --- */
#banner {
  position: relative;
  overflow: hidden;
}

#banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

/* --- Contact Section Enhancements --- */
#contact {
  position: relative;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Contact Cards */
.contact-card {
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.contact-card:hover::before {
  opacity: 1;
}

/* Email Card Specific Hover */
.email-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(59, 130, 246, 0.4) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Social Card Hover */
.social-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* --- Responsive Design --- */

/* Mobile First Approach - Small Mobile */
@media (max-width: 576px) {
  /* Header Mobile - Fix sticky header */
  #header.modern-header {
    padding: 0.5rem 1rem !important;
    position: fixed !important;
    z-index: 10000 !important;
    background: rgba(12, 13, 18, 0.95) !important;
    height: 3.5rem !important;
    min-height: 3.5rem !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
  }
  
  .modern-header #logo {
    height: 2.5rem !important;
    position: relative !important;
    left: 0 !important;
    top: 0 !important;
  }
  
  .modern-header #logo img {
    height: 2rem !important;
  }
  
  .modern-header #nav ul {
    gap: 1rem !important;
  }
  
  .modern-header #nav ul li a {
    font-size: 0.8rem;
    padding: 0.2rem 0.3rem;
  }

  /* Hero Section Mobile - Fix overflow and alignment */
  #banner.modern-hero {
    min-height: calc(100vh - 3.5rem) !important;
    margin-top: 3.5rem !important;
    padding-top: 2rem !important;
    overflow-x: hidden !important;
    position: relative !important;
  }
  
  /* Dark glassmorphism overlay on mobile */
  #banner.modern-hero:after {
    background: rgba(8, 10, 15, 0.88) !important;
    background-image: none !important;
    backdrop-filter: blur(12px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(180%) !important;
  }
  
  /* Scale down massive shapes for mobile */
  #banner.modern-hero .particles::before {
    width: 280px;
    height: 280px;
    top: -10%;
    left: -12%;
  }
  
  #banner.modern-hero .particles::after {
    width: 300px;
    height: 300px;
    bottom: -15%;
    right: -15%;
  }
  
  #banner.modern-hero .geometric-shapes::before {
    width: 260px;
    height: 260px;
    top: -12%;
    right: -13%;
  }
  
  #banner.modern-hero .content::before {
    width: 350px;
    height: 350px;
    opacity: 0.4;
  }
  
  /* Hide interactive shapes on mobile for performance */
  .interactive-shapes {
    display: none !important;
  }
  
  /* Fix mobile background scrolling */
  #banner.modern-hero {
    background-attachment: scroll !important;
  }
  
  .modern-hero .content {
    padding: 1rem !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  
  .modern-hero .hero-content-wrapper {
    padding: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  
  .modern-hero h2 {
    font-size: 1.8rem !important;
    line-height: 1.2 !important;
    margin-bottom: 1rem !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
    padding: 0 0.5rem !important;
  }
  
  .modern-hero h2 span {
    display: inline !important;
  }
  
  .modern-hero p {
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    margin-bottom: 1.5rem !important;
    padding: 0 0.5rem !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  .hero-cta {
    flex-direction: column !important;
    gap: 0.8rem !important;
    margin-bottom: 2rem !important;
    align-items: center !important;
    padding: 0 0.5rem !important;
  }
  
  .cta-primary, .cta-secondary {
    width: 100% !important;
    max-width: 260px !important;
    padding: 0.8rem 1.2rem !important;
    font-size: 0.9rem !important;
    justify-content: center !important;
    text-align: center !important;
  }
  
  .hero-social {
    margin-top: 1rem;
    padding: 0 0.5rem !important;
  }
  
  .hero-social p {
    font-size: 0.75rem !important;
    margin-bottom: 0.8rem !important;
  }
  
  .hero-social ul.icons {
    gap: 0.8rem !important;
  }
  
  .social-icon-modern {
    width: 40px !important;
    height: 40px !important;
  }
  

  /* Projects Section Mobile */
  #projects {
    padding: 3rem 0 4rem 0 !important;
  }
  
  #projects .container {
    padding: 0 1rem;
  }
  
  .major h2 {
    font-size: 2.2rem !important;
    margin-bottom: 3rem !important;
  }
  
  .modern-project-card {
    margin-bottom: 3rem !important;
    border-radius: 16px !important;
  }
  
  .project-content {
    padding: 2rem 1.5rem !important;
    text-align: center;
  }
  
  .project-category {
    font-size: 0.7rem !important;
    padding: 0.3rem 0.8rem !important;
    margin-bottom: 1rem !important;
  }
  
  .project-content h3 {
    font-size: 1.6rem !important;
    line-height: 1.3 !important;
    margin-bottom: 1rem !important;
  }
  
  .project-content p {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    margin-bottom: 1.5rem !important;
  }
  
  .project-tags {
    gap: 0.4rem !important;
    margin-bottom: 1.5rem !important;
    justify-content: center;
  }
  
  .project-tags span {
    padding: 0.4rem 0.8rem !important;
    font-size: 0.75rem !important;
  }
  
  .project-link {
    padding: 0.7rem 1.5rem !important;
    font-size: 0.9rem !important;
  }
  
  .project-image-wrapper {
    min-height: 250px !important;
    height: 250px !important;
  }

  /* Contact Section Mobile */
  #contact {
    padding: 4rem 0 !important;
    background-attachment: scroll !important;
    overflow: visible !important;
  }
  
  #contact .container {
    padding: 0 1rem;
    position: relative !important;
    z-index: 10 !important;
  }
  
  .contact-header {
    position: relative !important;
    z-index: 11 !important;
  }
  
  .contact-header h2 {
    font-size: 2.2rem !important;
    margin-bottom: 1rem !important;
    position: relative !important;
    z-index: 12 !important;
  }
  
  .contact-header p {
    font-size: 1rem !important;
    padding: 0 1rem;
    margin-bottom: 3rem !important;
    position: relative !important;
    z-index: 12 !important;
  }
  
  .contact-card {
    padding: 1rem !important;
    gap: 0.6rem !important;
    margin-bottom: 0.8rem;
    position: relative !important;
    z-index: 11 !important;
  }
  
  .contact-card div {
    width: 30px !important;
    height: 30px !important;
  }
  
  .contact-card span {
    font-size: 0.9rem !important;
  }
  
  .contact-card .icon::before {
    font-size: 0.9rem !important;
  }

  /* Footer Mobile */
  #footer {
    padding: 1.5rem 0 !important;
  }
  
  #footer .copyright {
    font-size: 0.9rem;
  }
}

/* Tablet Portrait */
@media (min-width: 577px) and (max-width: 768px) {
  /* Header Tablet */
  #header.modern-header {
    position: fixed !important;
    z-index: 10000 !important;
    background: rgba(12, 13, 18, 0.95) !important;
    height: 4rem !important;
    min-height: 4rem !important;
  }
  
  .modern-header #nav ul {
    gap: 1.5rem !important;
  }

  /* Hero Section Tablet */
  #banner.modern-hero {
    margin-top: 4rem !important;
    padding-top: 2rem !important;
    overflow-x: hidden !important;
    min-height: calc(100vh - 4rem) !important;
  }
  
  /* Dark glassmorphism overlay on tablet */
  #banner.modern-hero:after {
    background: rgba(8, 10, 15, 0.83) !important;
    background-image: none !important;
    backdrop-filter: blur(13px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(13px) saturate(180%) !important;
  }
  
  /* Scale massive shapes for tablet */
  #banner.modern-hero .particles::before {
    width: 350px;
    height: 350px;
    top: -12%;
    left: -10%;
  }
  
  #banner.modern-hero .particles::after {
    width: 380px;
    height: 380px;
    bottom: -18%;
    right: -14%;
  }
  
  #banner.modern-hero .geometric-shapes::before {
    width: 330px;
    height: 330px;
    top: -14%;
    right: -12%;
  }
  
  #banner.modern-hero .content::before {
    width: 500px;
    height: 500px;
    opacity: 0.5;
  }
  
  /* Show interactive shapes on tablet */
  .interactive-shapes {
    display: block !important;
  }
  
  /* Fix tablet background scrolling */
  #banner.modern-hero {
    background-attachment: scroll !important;
  }
  
  .modern-hero .content {
    padding: 2rem !important;
    max-width: 100% !important;
  }
  
  .modern-hero h2 {
    font-size: 2.2rem !important;
    word-wrap: break-word !important;
    padding: 0 1rem !important;
  }
  
  .modern-hero p {
    font-size: 1rem !important;
    max-width: 100% !important;
    padding: 0 1rem !important;
  }
  
  .hero-cta {
    flex-direction: row !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
    padding: 0 1rem !important;
  }
  
  .cta-primary, .cta-secondary {
    max-width: 220px !important;
  }

  /* Projects Section Tablet */
  #projects {
    padding: 4rem 0 5rem 0 !important;
  }
  
  .project-content {
    padding: 2.5rem 2rem !important;
  }
  
  .project-content h3 {
    font-size: 1.9rem !important;
  }
  
  .project-content p {
    font-size: 1.05rem !important;
  }
  
  .project-image-wrapper {
    min-height: 350px !important;
  }

  /* Contact Section Tablet */
  #contact {
    background-attachment: scroll !important;
    overflow: visible !important;
  }
  
  .contact-header h2 {
    font-size: 2.5rem !important;
  }
  
  .contact-card {
    padding: 1.1rem !important;
  }
}

/* Tablet Landscape */
@media (min-width: 769px) and (max-width: 992px) {
  /* Hero Section Tablet Landscape */
  .modern-hero h2 {
    font-size: 3.2rem !important;
  }
  
  .modern-hero p {
    font-size: 1.25rem !important;
  }

  /* Projects Section Tablet Landscape */
  .project-content {
    padding: 3rem 2.5rem !important;
  }
  
  .project-content h3 {
    font-size: 2rem !important;
  }
  
  .project-image-wrapper {
    min-height: 400px !important;
  }
}

/* Desktop Small */
@media (min-width: 993px) and (max-width: 1200px) {
  .project-content {
    padding: 3.2rem 2.8rem !important;
  }
  
  .project-image-wrapper {
    min-height: 450px !important;
  }
}

/* Large Desktop */
@media (min-width: 1400px) {
  .container {
    max-width: 1400px !important;
  }
  
  .project-content {
    padding: 4rem 3.5rem !important;
  }
  
  .project-content h3 {
    font-size: 2.4rem !important;
  }
  
  .project-content p {
    font-size: 1.15rem !important;
  }
  
  .project-image-wrapper {
    min-height: 550px !important;
  }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .modern-hero h2 {
    font-size: 2rem !important;
  }
  
  .modern-hero p {
    font-size: 0.95rem !important;
    margin-bottom: 1.5rem !important;
  }
  
  .hero-cta {
    margin-bottom: 2rem !important;
  }
  
  .project-image-wrapper {
    min-height: 200px !important;
  }
  
  #projects {
    padding: 2rem 0 3rem 0 !important;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .project-image-wrapper img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .scroll-indicator {
    animation: none !important;
  }
  
  .modern-project-card:hover {
    transform: none !important;
  }
  
  .project-link:hover span {
    transform: none !important;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .modern-project-card {
    background: #1a1a1a !important;
    border: 1px solid #333 !important;
  }
  
  .project-content h3 {
    color: #ffffff !important;
  }
  
  .project-content p {
    color: #cccccc !important;
  }
  
  .project-tags span {
    background: #333 !important;
    color: #ffffff !important;
    border-color: #555 !important;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Increase touch targets */
  .cta-primary, .cta-secondary {
    min-height: 48px !important;
    padding: 1rem 2rem !important;
  }
  
  .contact-card {
    min-height: 48px !important;
    padding: 1.2rem !important;
  }
  
  .project-link {
    min-height: 44px !important;
    padding: 0.9rem 2rem !important;
  }
  
  /* Remove hover effects on touch devices */
  .modern-project-card:hover {
    transform: none !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  }
  
  .project-link:hover span {
    transform: none !important;
  }
  
  .contact-card:hover {
    transform: none !important;
    background: rgba(255, 255, 255, 0.08) !important;
  }
}

/* Print Styles */
@media print {
  .modern-header,
  .hero-social,
  .scroll-indicator,
  #footer {
    display: none !important;
  }
  
  .modern-hero {
    background: white !important;
    color: black !important;
  }
  
  .modern-hero h2 {
    color: black !important;
  }
  
  .modern-hero p {
    color: black !important;
  }
  
  .project-showcase {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
  
  .project-content {
    padding: 1rem !important;
  }
}

/* Ultra-wide screens */
@media (min-width: 1920px) {
  .container {
    max-width: 1600px !important;
  }
  
  .modern-hero h2 {
    font-size: 4rem !important;
  }
  
  .modern-hero p {
    font-size: 1.4rem !important;
  }
  
  .project-content {
    padding: 5rem 4rem !important;
  }
  
  .project-content h3 {
    font-size: 2.6rem !important;
  }
  
  .project-content p {
    font-size: 1.2rem !important;
  }
  
  .project-image-wrapper {
    min-height: 600px !important;
  }
}

/* About Me Page Responsive Styles */
@media (max-width: 768px) {
  .about-section {
    padding: 3rem 0 !important;
  }
  
  .about-content {
    padding: 0 1rem !important;
  }
  
  .about-image-wrapper {
    margin-bottom: 2rem !important;
    text-align: center !important;
  }
  
  .about-image-wrapper img {
    width: 200px !important;
    height: 200px !important;
  }
  
  .about-text h2 {
    font-size: 2.2rem !important;
    margin-bottom: 1.5rem !important;
  }
  
  .about-text p {
    font-size: 1rem !important;
    line-height: 1.7 !important;
    margin-bottom: 1.5rem !important;
  }
  
  .experience-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  
  .experience-grid > div {
    padding: 1.5rem !important;
  }
  
  .experience-grid h3 {
    font-size: 1.3rem !important;
  }
  
  .experience-grid p {
    font-size: 0.95rem !important;
  }
}

@media (max-width: 576px) {
  .about-text h2 {
    font-size: 1.8rem !important;
  }
  
  .about-text p {
    font-size: 0.95rem !important;
  }
  
  .about-image-wrapper img {
    width: 180px !important;
    height: 180px !important;
  }
  
  .experience-grid > div {
    padding: 1.2rem !important;
  }
  
  .experience-grid h3 {
    font-size: 1.2rem !important;
  }
}

