/* ================================
  RESPONSIVE.CSS - CODEO
  ================================ */

/* ================================
  RESPONSIVE BREAKPOINTS
  ================================ */

/* Extra Small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
 .container {
   padding: 0 var(--space-3);
   max-width: 100%;
 }
 
 /* Navigation */
 .nav-container {
   padding: var(--space-3) var(--space-4);
 }
 
 .brand-text {
   font-size: var(--text-xl);
 }
 
 .nav-menu {
   background: rgba(15, 15, 35, 0.98);
   font-size: var(--text-lg);
   gap: var(--space-4);
 }
 
 /* Hero */
 .hero {
   padding-top: 70px;
   min-height: 90vh;
 }
 
 .hero-title {
   font-size: var(--text-3xl);
   margin-bottom: var(--space-4);
 }
 
 .hero-subtitle {
   font-size: var(--text-base);
   margin-bottom: var(--space-6);
 }
 
 .hero-cta {
   flex-direction: column;
   gap: var(--space-3);
 }
 
 .btn {
   padding: var(--space-3) var(--space-4);
   font-size: var(--text-sm);
   width: 100%;
   max-width: 280px;
 }
 
 /* Code Window */
 .code-window {
   max-width: 280px;
   margin: 0 auto;
 }
 
 .window-header {
   padding: var(--space-2);
 }
 
 .window-title {
   font-size: var(--text-xs);
 }
 
 .code-content {
   padding: var(--space-3);
   font-size: var(--text-xs);
 }
 
 .code-line {
   gap: var(--space-2);
   margin-bottom: var(--space-1);
 }
 
 .line-number {
   width: 15px;
   font-size: var(--text-xs);
 }
 
 /* Sections */
 .services,
 .about,
 .projects,
 .contact {
   padding: var(--space-12) 0;
 }
 
 .section-title {
   font-size: var(--text-2xl);
   margin-bottom: var(--space-4);
 }
 
 .section-description {
   font-size: var(--text-base);
   margin-bottom: var(--space-8);
 }
 
 .section-badge {
   font-size: var(--text-xs);
   padding: var(--space-1) var(--space-3);
 }
 
 /* Theme Toggle */
 .theme-toggle {
   top: 90px;
   right: var(--space-3);
   width: 40px;
   height: 40px;
   padding: var(--space-2);
 }
 
 .theme-toggle i {
   font-size: var(--text-sm);
 }
 
 /* Back to Top */
 .back-to-top {
   width: 45px;
   height: 45px;
   bottom: var(--space-4);
   right: var(--space-4);
   font-size: var(--text-base);
 }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
 .container {
   max-width: 540px;
   padding: 0 var(--space-4);
 }
 
 .hero-title {
   font-size: var(--text-4xl);
 }
 
 .code-window {
   max-width: 350px;
 }
 
 .btn {
   max-width: 320px;
 }
 
 .theme-toggle {
   top: 100px;
 }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
 .container {
   max-width: 720px;
   padding: 0 var(--space-6);
 }
 
 /* Navigation - Desktop view starts */
 .nav-menu {
   position: static;
   width: auto;
   height: auto;
   background: transparent;
   backdrop-filter: none;
   flex-direction: row;
   justify-content: flex-start;
   font-size: var(--text-base);
   gap: var(--space-6);
 }
 
 .hamburger {
   display: none;
 }
 
 .nav-actions .btn {
   display: inline-flex;
 }
 
 /* Hero */
 .hero-container {
   grid-template-columns: 1fr;
   gap: var(--space-10);
   text-align: center;
 }
 
 .hero-title {
   font-size: var(--text-5xl);
 }
 
 .hero-cta {
   flex-direction: row;
   justify-content: center;
 }
 
 .btn {
   width: auto;
   max-width: none;
 }
 
 .code-window {
   max-width: 450px;
   margin: 0 auto;
 }
 
 /* Services */
 .services-grid {
   grid-template-columns: repeat(2, 1fr);
   gap: var(--space-6);
 }
 
 /* Projects */
 .projects-grid {
   grid-template-columns: repeat(2, 1fr);
   gap: var(--space-6);
 }
 
 /* Stats */
 .stats-container {
   grid-template-columns: repeat(2, 1fr);
   gap: var(--space-6);
 }
 
 /* About & Contact still single column */
 .about-content,
 .contact-content {
   grid-template-columns: 1fr;
   gap: var(--space-10);
 }
 
 /* Theme Toggle */
 .theme-toggle {
   top: 50%;
   transform: translateY(-50%);
 }
 
 .theme-toggle:hover {
   transform: translateY(-50%) scale(1.1);
 }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
 .container {
   max-width: 960px;
   padding: 0 var(--space-8);
 }
 
 /* Hero */
 .hero-container {
   grid-template-columns: 1fr 1fr;
   gap: var(--space-12);
   text-align: left;
 }
 
 .hero-cta {
   justify-content: flex-start;
 }
 
 .code-window {
   max-width: 480px;
   margin-left: auto;
 }
 
 /* About */
 .about-content {
   grid-template-columns: 1fr 1fr;
   gap: var(--space-12);
 }
 
 /* Contact */
 .contact-content {
   grid-template-columns: 1fr 1fr;
   gap: var(--space-12);
 }
 
 /* Services */
 .services-grid {
   grid-template-columns: repeat(3, 1fr);
   gap: var(--space-8);
 }
 
 /* Projects */
 .projects-grid {
   grid-template-columns: repeat(3, 1fr);
   gap: var(--space-8);
 }
 
 /* Stats */
 .stats-container {
   grid-template-columns: repeat(4, 1fr);
 }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
 .container {
   max-width: 1140px;
 }
 
 .code-window {
   max-width: 500px;
 }
 
 .services-grid {
   grid-template-columns: repeat(3, 1fr);
 }
 
 .projects-grid {
   grid-template-columns: repeat(3, 1fr);
 }
}

/* ================================
  MOBILE MENU SPECIFIC STYLES
  ================================ */
@media (max-width: 767.98px) {
 .nav-menu {
   position: fixed;
   top: 0;
   right: -100%;
   width: 100%;
   height: 100vh;
   background: rgba(15, 15, 35, 0.98);
   backdrop-filter: blur(20px);
   flex-direction: column;
   justify-content: center;
   align-items: center;
   gap: var(--space-6);
   font-size: var(--text-xl);
   transition: right var(--transition-base);
   z-index: calc(var(--z-fixed) + 1);
 }
 
 .nav-menu.active {
   right: 0;
 }
 
 .hamburger {
   display: flex;
   z-index: calc(var(--z-fixed) + 2);
 }
 
 .nav-actions .btn {
   display: none;
 }
 
 /* Prevent scroll when menu is open */
 body.menu-open {
   overflow: hidden;
 }
}

/* ================================
  SERVICES RESPONSIVE
  ================================ */
@media (max-width: 575.98px) {
 .services-grid {
   grid-template-columns: 1fr;
   gap: var(--space-4);
 }
 
 .service-card {
   padding: var(--space-4);
 }
 
 .service-card.featured {
   transform: none;
   border: 2px solid var(--primary);
 }
 
 .service-icon {
   width: 50px;
   height: 50px;
   font-size: var(--text-lg);
   margin-bottom: var(--space-4);
 }
 
 .service-title {
   font-size: var(--text-lg);
   margin-bottom: var(--space-3);
 }
 
 .service-description {
   font-size: var(--text-sm);
   margin-bottom: var(--space-4);
 }
 
 .service-features {
   font-size: var(--text-xs);
 }
 
 .service-badge {
   top: -8px;
   right: var(--space-4);
   font-size: var(--text-xs);
 }
}

/* ================================
  ABOUT RESPONSIVE
  ================================ */
@media (max-width: 991.98px) {
 .about-content {
   grid-template-columns: 1fr;
   gap: var(--space-8);
 }
 
 .stats-container {
   margin-top: var(--space-6);
 }
}

@media (max-width: 575.98px) {
 .feature-item {
   padding: var(--space-3);
   margin-bottom: var(--space-4);
 }
 
 .feature-icon {
   width: 40px;
   height: 40px;
   font-size: var(--text-base);
 }
 
 .feature-content h4 {
   font-size: var(--text-base);
   margin-bottom: var(--space-1);
 }
 
 .feature-content p {
   font-size: var(--text-sm);
 }
 
 .stats-container {
   grid-template-columns: 1fr;
   gap: var(--space-3);
   padding: var(--space-4);
 }
 
 .stat-number {
   font-size: var(--text-3xl);
 }
 
 .stat-label {
   font-size: var(--text-xs);
 }
}

/* ================================
  PROJECTS RESPONSIVE
  ================================ */
@media (max-width: 575.98px) {
 .projects-grid {
   grid-template-columns: 1fr;
   gap: var(--space-4);
 }
 
 .project-image {
   height: 200px;
 }
 
 .project-placeholder {
   font-size: var(--text-4xl);
 }
 
 .project-content {
   padding: var(--space-4);
 }
 
 .project-title {
   font-size: var(--text-lg);
   margin-bottom: var(--space-2);
 }
 
 .project-description {
   font-size: var(--text-sm);
 }
 
 .tag {
   font-size: var(--text-xs);
   padding: var(--space-1) var(--space-2);
 }
}

/* ================================
  CONTACT RESPONSIVE
  ================================ */
@media (max-width: 991.98px) {
 .contact-content {
   grid-template-columns: 1fr;
   gap: var(--space-8);
 }
}

@media (max-width: 575.98px) {
 .contact-method {
   padding: var(--space-3);
   margin-bottom: var(--space-3);
 }
 
 .method-icon {
   width: 45px;
   height: 45px;
   font-size: var(--text-lg);
 }
 
 .method-content h4 {
   font-size: var(--text-base);
 }
 
 .method-content p {
   font-size: var(--text-sm);
 }
 
 .contact-form-container {
   padding: var(--space-4);
 }
 
 .form-group {
   gap: var(--space-1);
   margin-bottom: var(--space-4);
 }
 
 .form-group label {
   font-size: var(--text-sm);
 }
 
 .form-group input,
 .form-group select,
 .form-group textarea {
   padding: var(--space-3);
   font-size: var(--text-sm);
 }
 
 .form-submit {
   align-self: stretch;
   padding: var(--space-3);
 }
}

/* ================================
  FOOTER RESPONSIVE
  ================================ */
@media (max-width: 767.98px) {
 .footer-content {
   flex-direction: column;
   gap: var(--space-6);
   text-align: center;
   margin-bottom: var(--space-8);
   padding-bottom: var(--space-6);
 }
 
 .footer-social {
   gap: var(--space-3);
 }
 
 .social-link {
   width: 45px;
   height: 45px;
   font-size: var(--text-base);
 }
}

@media (max-width: 575.98px) {
 .footer {
   padding: var(--space-10) 0 var(--space-6);
 }
 
 .footer-brand-text {
   font-size: var(--text-xl);
 }
 
 .footer-tagline {
   font-size: var(--text-xs);
 }
 
 .footer-bottom {
   font-size: var(--text-xs);
 }
 
 .footer-bottom p {
   margin-bottom: var(--space-1);
 }
}

/* ================================
  MODAL RESPONSIVE
  ================================ */
@media (max-width: 767.98px) {
 .modal {
   padding: var(--space-3);
 }
 
 .modal-content {
   max-height: 85vh;
 }
 
 .modal-body {
   padding: var(--space-4);
 }
 
 .modal-close {
   top: var(--space-3);
   right: var(--space-3);
   width: 35px;
   height: 35px;
 }
}

@media (max-width: 575.98px) {
 .modal {
   padding: var(--space-2);
 }
 
 .modal-body {
   padding: var(--space-3);
 }
 
 .project-detail {
   gap: var(--space-3);
 }
 
 .project-header h2 {
   font-size: var(--text-xl);
   margin-bottom: var(--space-3);
 }
 
 .project-features ul {
   grid-template-columns: 1fr;
   gap: var(--space-2);
 }
 
 .project-features li {
   font-size: var(--text-sm);
 }
 
 .tech-item {
   font-size: var(--text-xs);
   padding: var(--space-1) var(--space-2);
 }
 
 .project-contact {
   padding: var(--space-4);
 }
 
 .project-contact p {
   font-size: var(--text-base);
   margin-bottom: var(--space-3);
 }
}

/* ================================
  LANDSCAPE ORIENTATION
  ================================ */
@media (max-height: 600px) and (orientation: landscape) {
 .hero {
   min-height: auto;
   padding: var(--space-16) 0;
 }
 
 .hero-title {
   font-size: var(--text-3xl);
   margin-bottom: var(--space-3);
 }
 
 .hero-subtitle {
   font-size: var(--text-base);
   margin-bottom: var(--space-4);
 }
 
 .scroll-indicator {
   display: none;
 }
 
 .nav-menu {
   gap: var(--space-4);
   font-size: var(--text-lg);
 }
}

/* ================================
  HIGH DPI DISPLAYS
  ================================ */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
 .service-icon,
 .feature-icon,
 .method-icon,
 .project-placeholder {
   transform: translateZ(0);
   backface-visibility: hidden;
 }
 
 .code-content {
   font-size: var(--text-sm);
   line-height: 1.5;
 }
}

/* ================================
  PRINT STYLES
  ================================ */
@media print {
 .navbar,
 .back-to-top,
 .scroll-indicator,
 .hamburger,
 .theme-toggle,
 .contact-form,
 .hero-background,
 .geometric-shapes {
   display: none !important;
 }
 
 .hero {
   min-height: auto;
   padding: var(--space-6) 0;
 }
 
 .hero-container {
   grid-template-columns: 1fr;
   gap: var(--space-4);
 }
 
 body {
   font-size: 12pt;
   line-height: 1.4;
   color: #000;
   background: #fff;
 }
 
 h1, h2, h3, h4, h5, h6 {
   color: #000;
   page-break-after: avoid;
 }
 
 .service-card,
 .project-card {
   page-break-inside: avoid;
   box-shadow: none;
   border: 1px solid #ccc;
   margin-bottom: var(--space-4);
 }
 
 .gradient-text,
 .brand-text {
   color: #000;
   -webkit-text-fill-color: initial;
 }
 
 a {
   color: #000;
   text-decoration: underline;
 }
 
 .btn {
   border: 1px solid #000;
   background: transparent;
   color: #000;
 }
}

/* ================================
  ACCESSIBILITY IMPROVEMENTS
  ================================ */
@media (prefers-reduced-motion: reduce) {
 * {
   animation-duration: 0.01ms !important;
   animation-iteration-count: 1 !important;
   transition-duration: 0.01ms !important;
   scroll-behavior: auto !important;
 }
 
 .scroll-arrow,
 .shape,
 .logo-animation {
   animation: none !important;
 }
}

/* High contrast mode */
@media (prefers-contrast: high) {
 .service-card,
 .project-card,
 .contact-form-container,
 .stats-container {
   border: 2px solid var(--text-primary);
 }
 
 .btn {
   border: 2px solid currentColor;
 }
 
 .gradient-text,
 .brand-text {
   color: var(--primary);
   -webkit-text-fill-color: initial;
 }
 
 .section-badge {
   border: 2px solid var(--primary);
   background: transparent;
 }
}

/* ================================
  CONTAINER RESPONSIVE UTILITIES
  ================================ */
.container-fluid {
 width: 100%;
 padding-right: var(--space-4);
 padding-left: var(--space-4);
 margin-right: auto;
 margin-left: auto;
}

@media (min-width: 576px) {
 .container,
 .container-sm {
   max-width: 540px;
 }
}

@media (min-width: 768px) {
 .container,
 .container-sm,
 .container-md {
   max-width: 720px;
 }
}

@media (min-width: 992px) {
 .container,
 .container-sm,
 .container-md,
 .container-lg {
   max-width: 960px;
 }
}

@media (min-width: 1200px) {
 .container,
 .container-sm,
 .container-md,
 .container-lg,
 .container-xl {
   max-width: 1140px;
 }
}

/* ================================
  DISPLAY UTILITIES RESPONSIVE
  ================================ */
@media (max-width: 575.98px) {
 .d-none-xs { display: none !important; }
 .d-block-xs { display: block !important; }
 .d-flex-xs { display: flex !important; }
}

@media (min-width: 576px) and (max-width: 767.98px) {
 .d-none-sm { display: none !important; }
 .d-block-sm { display: block !important; }
 .d-flex-sm { display: flex !important; }
}

@media (min-width: 768px) and (max-width: 991.98px) {
 .d-none-md { display: none !important; }
 .d-block-md { display: block !important; }
 .d-flex-md { display: flex !important; }
}

@media (min-width: 992px) {
 .d-none-lg { display: none !important; }
 .d-block-lg { display: block !important; }
 .d-flex-lg { display: flex !important; }
}