/* Responsive Design */

/* Large Desktop */
@media (min-width: 1440px) {
  .container {
    max-width: 1400px;
  }

  .hero-title {
    font-size: 5rem;
  }

  .hero-subtitle {
    font-size: 3rem;
  }
}

/* Desktop */
@media (max-width: 1199px) {
  .container {
    max-width: 960px;
  }

  .hero-title {
    font-size: 3.5rem;
  }

  .hero-subtitle {
    font-size: 2.2rem;
  }

  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

/* Tablet */
@media (max-width: 991px) {
  .container {
    max-width: 720px;
    padding: 0 15px;
  }

  /* Navigation */
  .nav-menu {
    position: fixed;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-primary);
    box-shadow: var(--shadow-medium);
    border-top: 1px solid var(--border-color);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-menu ul {
    flex-direction: column;
    padding: 2rem;
    gap: 1rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }

  .nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
  }

  /* Hero Section */
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 8rem 0 4rem;
  }

  .hero-content {
    margin-bottom: 2rem;
  }

  .hero-title {
    font-size: 3rem;
  }

  .hero-subtitle {
    font-size: 2rem;
  }

  .hero-description {
    font-size: 1.1rem;
  }

  .floating-elements {
    width: 250px;
    height: 250px;
  }

  .float-item {
    width: 50px;
    height: 50px;
  }

  /* Page Hero */
  .page-hero {
    padding: 6rem 0 3rem;
  }

  .page-title {
    font-size: 2.5rem;
  }

  .page-subtitle {
    font-size: 1.1rem;
  }

  /* About Page */
  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .about-highlights {
    justify-content: center;
  }

  /* Contact Page */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  /* Timeline */
  .timeline-container::before {
    left: 2rem;
  }

  .timeline-item {
    flex-direction: row !important;
    padding-left: 4rem;
  }

  .timeline-item:nth-child(odd) {
    flex-direction: row !important;
  }

  .timeline-year {
    position: absolute;
    left: 0;
    margin: 0;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.9rem;
    padding: 0;
  }

  .timeline-content {
    margin-left: 1rem;
  }

  /* Footer */
  .footer-content {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
  }
}

/* Mobile Large */
@media (max-width: 767px) {
  .container {
    max-width: 540px;
    padding: 0 12px;
  }

  /* Typography */
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  h4 {
    font-size: 1.25rem;
  }

  .section-title {
    font-size: 2rem;
  }

  /* Buttons */
  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  /* Navigation */
  .nav-container {
    padding: 0.8rem 0;
  }

  .nav-logo h2 {
    font-size: 1.5rem;
  }

  .theme-toggle {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  /* Hero Section */
  .hero {
    padding: 6rem 0 3rem;
    min-height: 80vh;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.5rem;
    min-height: 2rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .floating-elements {
    width: 200px;
    height: 200px;
  }

  .float-item {
    width: 40px;
    height: 40px;
  }

  /* Page Hero */
  .page-hero {
    padding: 5rem 0 2rem;
  }

  .page-title {
    font-size: 2rem;
  }

  /* Sections */
  section {
    padding: 3rem 0;
  }

  /* Features */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .feature-card {
    padding: 1.5rem;
  }

  .feature-icon {
    font-size: 2.5rem;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  /* Projects */
  .filter-buttons {
    gap: 0.5rem;
  }

  .filter-btn {
    padding: 6px 16px;
    font-size: 0.9rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .project-image {
    height: 180px;
  }

  .project-info {
    padding: 1.2rem;
  }

  .project-tags {
    gap: 0.3rem;
  }

  .tag {
    font-size: 0.8rem;
    padding: 3px 10px;
  }

  /* Skills */
  .skills-grid {
    gap: 1rem;
  }

  .skill-item {
    padding: 1.2rem;
  }

  /* Values and Timeline */
  .values-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .value-card {
    padding: 1.5rem;
  }

  .value-icon {
    font-size: 2rem;
  }

  /* Contact */
  .contact-items {
    margin-bottom: 1.5rem;
  }

  .contact-item {
    padding: 0.8rem;
    margin-bottom: 1rem;
  }

  .contact-icon {
    font-size: 1.2rem;
    padding: 6px;
  }

  .social-icons {
    gap: 0.8rem;
  }

  .social-icon {
    width: 35px;
    height: 35px;
  }

  .contact-form-container {
    padding: 1.5rem;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 10px;
    font-size: 0.9rem;
  }

  /* Map and FAQ */
  .map-container {
    height: 250px;
  }

  .map-icon {
    font-size: 2.5rem;
  }

  .faq-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .faq-item {
    padding: 1.5rem;
  }

  /* Testimonials */
  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .testimonial-card {
    padding: 1.5rem;
  }

  .author-avatar {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  /* Footer */
  .footer {
    padding: 2rem 0 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }

  .footer-section h3,
  .footer-section h4 {
    margin-bottom: 0.8rem;
  }

  /* Scroll to top */
  .scroll-top {
    width: 45px;
    height: 45px;
    bottom: 1.5rem;
    right: 1.5rem;
  }
}

/* Mobile Small */
@media (max-width: 575px) {
  .container {
    padding: 0 10px;
  }

  /* Typography */
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  h3 {
    font-size: 1.3rem;
  }

  .section-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
  }

  /* Navigation */
  .nav-container {
    padding: 0.6rem 0;
  }

  .nav-logo h2 {
    font-size: 1.3rem;
  }

  .nav-menu ul {
    padding: 1.5rem;
  }

  /* Hero */
  .hero {
    padding: 5rem 0 2rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.3rem;
  }

  .hero-description {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
  }

  .floating-elements {
    width: 150px;
    height: 150px;
  }

  .float-item {
    width: 30px;
    height: 30px;
  }

  /* Page Hero */
  .page-hero {
    padding: 4rem 0 2rem;
  }

  .page-title {
    font-size: 1.8rem;
  }

  .page-subtitle {
    font-size: 1rem;
  }

  /* Sections */
  section {
    padding: 2.5rem 0;
  }

  /* Cards and Items */
  .feature-card,
  .value-card,
  .project-card,
  .testimonial-card,
  .faq-item {
    padding: 1.2rem;
  }

  .feature-icon,
  .value-icon {
    font-size: 2rem;
    margin-bottom: 0.8rem;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .stat-card {
    padding: 1.5rem;
  }

  .stat-icon {
    font-size: 2rem;
  }

  /* About Page */
  .about-highlights {
    flex-direction: column;
    gap: 1rem;
  }

  .highlight-number {
    font-size: 1.8rem;
  }

  /* Skills */
  .skill-item {
    padding: 1rem;
  }

  .skill-info {
    font-size: 0.9rem;
  }

  /* Timeline */
  .timeline-item {
    padding-left: 3rem;
  }

  .timeline-year {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 0.8rem;
  }

  .timeline-content {
    padding: 1rem;
  }

  /* Projects */
  .filter-btn {
    padding: 5px 12px;
    font-size: 0.85rem;
  }

  .project-image {
    height: 160px;
  }

  .project-info h3 {
    font-size: 1.1rem;
  }

  .project-info p {
    font-size: 0.9rem;
  }

  /* Contact */
  .contact-item {
    padding: 0.6rem;
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .contact-details h3 {
    font-size: 1rem;
  }

  .contact-details p {
    font-size: 0.9rem;
  }

  .social-icons {
    justify-content: center;
    gap: 0.6rem;
  }

  .social-icon {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  .contact-form-container {
    padding: 1.2rem;
  }

  .form-group label {
    font-size: 0.9rem;
  }

  .checkbox-label {
    font-size: 0.85rem;
  }

  /* Map */
  .map-container {
    height: 200px;
  }

  .map-icon {
    font-size: 2rem;
  }

  /* Testimonials */
  .author-avatar {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }

  .author-info h4 {
    font-size: 0.9rem;
  }

  .author-info span {
    font-size: 0.8rem;
  }

  /* Footer */
  .footer-section h3 {
    font-size: 1.1rem;
  }

  .footer-section h4 {
    font-size: 1rem;
  }

  .footer-section ul li {
    margin-bottom: 0.3rem;
  }

  .footer-bottom {
    font-size: 0.9rem;
  }
}

/* Mobile Extra Small */
@media (max-width: 400px) {
  .container {
    padding: 0 8px;
  }

  /* Hero */
  .hero-title {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-description {
    font-size: 0.9rem;
  }

  /* Page titles */
  .page-title {
    font-size: 1.6rem;
  }

  .section-title {
    font-size: 1.6rem;
  }

  /* Navigation */
  .nav-logo h2 {
    font-size: 1.2rem;
  }

  .theme-toggle {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  /* Cards */
  .feature-card,
  .value-card,
  .project-card,
  .testimonial-card,
  .faq-item,
  .contact-item {
    padding: 1rem;
  }

  /* Form */
  .contact-form-container {
    padding: 1rem;
  }

  .btn {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  /* Scroll to top */
  .scroll-top {
    width: 40px;
    height: 40px;
  }

  /* Footer */
  .footer {
    padding: 1.5rem 0 0.5rem;
  }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 2rem 0;
  }

  .page-hero {
    padding: 3rem 0 1.5rem;
  }

  .floating-elements {
    display: none;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
  .image-placeholder {
    background-size: cover;
    background-position: center;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .typewriter {
    animation: none;
    border-right: none;
  }

  .float-item {
    animation: none;
  }

  .skill-progress {
    transition: none;
  }
}

/* Print Styles */
@media print {

  .navbar,
  .scroll-top,
  .hero-buttons,
  .filter-buttons,
  .project-overlay,
  .social-icons,
  .contact-form-container {
    display: none !important;
  }

  .hero {
    min-height: auto;
    padding: 2rem 0;
  }

  .page-hero {
    padding: 2rem 0;
  }

  section {
    padding: 1rem 0;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  body {
    color: #000;
    background: #fff;
  }

  .feature-card,
  .project-card,
  .testimonial-card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}