/* Comprehensive Responsive Design Fixes */

/* Mobile-First Approach with Modern Breakpoints */
:root {
  /* Responsive Breakpoints */
  --mobile: 320px;
  --mobile-lg: 425px; 
  --tablet: 768px;
  --tablet-lg: 1024px;
  --desktop: 1200px;
  --desktop-lg: 1440px;
  --desktop-xl: 1920px;
}

/* Base Mobile Styles (320px and up) */
/* Navigation Fixes */
.modern-nav {
  padding: 0.75rem 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}

.nav-brand img {
  width: 40px;
  height: 40px;
}

.nav-brand span {
  font-size: 1.125rem;
}

.nav-links {
  display: none;
}

.mobile-menu-toggle {
  display: block;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--gray-600);
  cursor: pointer;
  padding: 0.5rem;
  transition: all 0.3s ease;
  z-index: 10000;
  position: relative;
}

.mobile-menu-toggle:hover {
  color: var(--primary-500);
}

.mobile-menu-toggle.active {
  color: var(--primary-500);
}

.mobile-menu-toggle i {
  transition: all 0.3s ease;
}

/* Mobile Menu Improvements */
.mobile-menu {
  position: fixed;
  top: 0;
  /* right: -100%; */
  width: 100%;
  height: 100vh;
  background: var(--white);
  z-index: 9999;
  transition: right 0.3s ease-in-out;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
  right: 100%;
}

/* Body states when menu is open */
body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* Menu backdrop for better UX */
.mobile-menu::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  /* z-index: -1; */
}

.mobile-menu.active::before {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-content {
  padding: 5rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
  background: var(--white);
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 400px;
  margin-left: auto;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.mobile-menu-link {
  padding: 1rem 0;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--gray-800);
  border-bottom: 1px solid var(--gray-100);
  transition: all 0.3s ease;
  text-decoration: none;
  display: block;
  position: relative;
}

.mobile-menu-link:hover {
  color: var(--primary-500);
  padding-left: 1rem;
  background: var(--gray-50);
}

.mobile-menu-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 2px;
  background: var(--primary-500);
  transition: width 0.3s ease;
}

.mobile-menu-link:hover::before {
  width: 30px;
}

/* Hero Section Mobile */
.hero-section {
  min-height: 100vh;
  padding: 6rem 0 2rem;
  display: flex;
  align-items: center;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  text-align: center;
}

.hero-title {
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1rem;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.hero-subtitle > span:first-child {
  font-size: 0.875rem;
}

#typing-effect {
  font-size: 1.125rem;
}

.hero-description {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2rem;
}

.hero-actions .btn {
  width: 100%;
  max-width: 280px;
  padding: 0.875rem 1.5rem;
  font-size: 0.875rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.stat {
  text-align: center;
  padding: 1rem 0.5rem;
}

.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-500);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--gray-600);
  margin-top: 0.25rem;
}

.hero-image {
  order: -1;
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.image-container {
  position: relative;
  width: 200px;
  height: 200px;
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--white);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Section Spacing */
.section {
  padding: 3rem 0;
}

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

/* About Section Mobile */
.about-content {
    /* padding-left: 10em; */
    /* padding-right: 50px; */
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  justify-content: center;
}

.about-text h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.about-text p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.about-highlights {
    align-items: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 400px;
  /* max-width: none; */
}

/* About subcontent responsive */
.about-subcontent {
  flex-direction: column;
  text-align: center;
  gap: 2rem;
}

.about-image {
  order: -1;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

.highlight {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: 0.5rem;
}

.highlight i {
  font-size: 1.25rem;
  color: var(--primary-500);
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.highlight h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.highlight p {
  font-size: 0.875rem;
  margin: 0;
}

.about-image {
  text-align: center;
}

.about-image img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

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

.skill-category {
  background: var(--white);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--gray-100);
}

.card-header h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.skill-item {
  margin-bottom: 1rem;
}

.skill-name {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.progress-bar {
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 3px;
  transition: width 1s ease-in-out;
}

.soft-skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.skill-tag {
  padding: 0.5rem 0.75rem;
  background: var(--gray-100);
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.tool-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: 0.5rem;
}

.tool-item i {
  font-size: 1.5rem;
  color: var(--primary-500);
  margin-bottom: 0.5rem;
}

.tool-item span {
  font-size: 0.75rem;
  font-weight: 500;
}

/* Timeline Mobile */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 1rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gray-200);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-icon {
  position: absolute;
  left: -2.75rem;
  top: 0.5rem;
  width: 2rem;
  height: 2rem;
  background: var(--primary-500);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.875rem;
  border: 3px solid var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.timeline-content {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--gray-100);
}

.timeline-date {
  color: var(--primary-500);
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.timeline-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  /* color: var(--gray-900); */
}

.timeline-content h4 {
  font-size: 1rem;
  /* color: var(--gray-600); */
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.timeline-content p {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--gray-500);
  margin: 0;
}

/* Projects Grid Mobile */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.project-card {
  background: var(--white);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--gray-100);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

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

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

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

.project-actions {
  display: flex;
  gap: 0.75rem;
}

.project-content {
  padding: 1.5rem;
}

.project-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--gray-900);
}

.project-description {
  font-size: 0.875rem;
  line-height: 1.5;
  /* color: var(--gray-200); */
  margin-bottom: 1rem;
}

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

.tech-tag {
  padding: 0.25rem 0.75rem;
  background: var(--gray-100);
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  /* color: var(--gray-700); */
}

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

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.contact-info p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-icon {
  width: 3rem;
  height: 3rem;
  background: var(--primary-500);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.contact-details h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.contact-details a,
.contact-details span {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.contact-details a:hover {
  color: var(--primary-500);
}

.social-links h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.social-icons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-link {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--gray-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  font-size: 1.125rem;
  transition: all 0.2s ease;
}

.social-link:hover {
  background: var(--primary-500);
  color: white;
  transform: translateY(-2px);
}

/* Contact Form Mobile */
.contact-form-container {
  margin-top: 1rem;
}

.contact-form {
  background: var(--white);
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--gray-100);
}

.card-header {
  padding: 1.5rem 1.5rem 0;
}

.card-header h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.card-body {
  /* padding: 0 1.5rem 1.5rem; */
}

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

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  /* color: var(--gray-900); */
  font-size: 0.875rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.2s ease;
  background: var(--white);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Footer Mobile */
.footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: 2rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--gray-400);
  transition: color 0.2s ease;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-700);
}

.footer-bottom p {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  background: var(--primary-500);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.scroll-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background: var(--primary-600);
  transform: translateY(-2px);
}

/* Large Mobile Devices (425px and up) */
@media (min-width: 425px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
  
  .hero-subtitle > span:first-child {
    font-size: 1rem;
  }
  
  #typing-effect {
    font-size: 1.25rem;
  }
  
  .hero-actions {
    flex-direction: row;
    justify-content: center;
  }
  
  .hero-actions .btn {
    width: auto;
    min-width: 160px;
  }
  
  .soft-skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .mobile-menu-content {
    max-width: 300px;
    padding: 4rem 1.5rem 2rem;
  }
}

/* Tablet Portrait (768px and up) */
@media (min-width: 768px) {
  .modern-nav {
    padding: 1rem 0;
  }
  
  .nav-links {
    display: flex;
    gap: 2rem;
  }
  
  .mobile-menu-toggle {
    display: none;
  }
  
  .mobile-menu {
    display: none !important;
  }
  
  .hero-content {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    text-align: left;
  }
  
  .hero-image {
    order: 0;
    justify-content: flex-end;
  }
  
  .image-container {
    width: 300px;
    height: 300px;
  }
  
  .hero-title {
    font-size: 3rem;
  }
  
  .hero-actions {
    justify-content: flex-start;
  }
  
  .section {
    padding: 4rem 0;
  }
  
  .section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
  }
  
  .about-content {
    /* padding-left: 40em; */
    grid-template-columns: 2fr;
    gap: 3rem;
    align-items: center;
  }
  
  .about-subcontent {
    flex-direction: row;
    gap: 2rem;
    text-align: left;
  }
  
  .about-image {
    order: 0;
    max-width: 350px;
  }
  
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  
  .contact-content {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
  
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }
  
  .soft-skills-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet Landscape (1024px and up) */
@media (min-width: 1024px) {
  .container {
    max-width: 1200px;
    padding: 0 2rem;
  }
  
  .hero-title {
    font-size: 3.5rem;
  }
  
  .section {
    padding: 5rem 0;
  }
  
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .footer-content {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .timeline {
    padding-left: 0;
    max-width: 800px;
    margin: 0 auto;
  }
  
  .timeline::before {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .timeline-item {
    width: 50%;
    margin-bottom: 3rem;
  }
  
  .timeline-item:nth-child(odd) {
    padding-right: 2rem;
    text-align: right;
  }
  
  .timeline-item:nth-child(even) {
    margin-left: 50%;
    padding-left: 2rem;
    text-align: left;
  }
  
  .timeline-icon {
    left: auto;
    right: -1rem;
  }
  
  .timeline-item:nth-child(even) .timeline-icon {
    right: auto;
    left: -1rem;
  }
  
  .about-subcontent {
    flex-direction: row;
    gap: 3rem;
    align-items: flex-start;
  }
  
  .about-highlights {
    max-width: 500px;
  }
  
  .about-image {
    max-width: 400px;
  }
}

/* Desktop (1200px and up) */
@media (min-width: 1200px) {
  .container {
    max-width: 1400px;
    padding: 0 3rem;
  }
  
  .hero-title {
    font-size: 4rem;
  }
  
  .image-container {
    width: 350px;
    height: 350px;
  }
  
  .section {
    padding: 6rem 0;
  }
  
  .section-title {
    font-size: 3rem;
  }
  
  .about-subcontent {
    gap: 4rem;
  }
  
  .about-highlights {
    max-width: 600px;
  }
}

/* Large Desktop (1440px and up) */
@media (min-width: 1440px) {
  .container {
    max-width: 1600px;
  }
  
  .hero-content {
    gap: 4rem;
  }
  
  .image-container {
    width: 400px;
    height: 400px;
  }
}

/* Ultra Wide (1920px and up) */
@media (min-width: 1920px) {
  .container {
    max-width: 1800px;
  }
  
  .hero-title {
    font-size: 4.5rem;
  }
}

/* Fix for very small screens */
@media (max-width: 320px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero-title {
    font-size: 1.75rem;
  }
  
  .hero-actions .btn {
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
  }
  
  .stat-number {
    font-size: 1.25rem;
  }
  
  .stat-label {
    font-size: 0.7rem;
  }
  
  .soft-skills-grid {
    grid-template-columns: 1fr;
  }
  
  .tools-grid {
    grid-template-columns: 1fr;
  }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
  /* Dark mode styles can be added here */
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --primary-500: #0000ff;
    --gray-600: #000000;
    --gray-700: #000000;
    --gray-800: #000000;
  }
}

/* Print styles */
@media print {
  .modern-nav,
  .mobile-menu,
  .scroll-to-top,
  .btn,
  .project-overlay {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .hero-section {
    page-break-after: always;
  }
  
  .section {
    page-break-inside: avoid;
  }
}
