/* MP Bot Portfolio - Responsive Styles */

/* Large Tablets and Small Desktops */
@media screen and (max-width: 1024px) {
  .container {
    padding: 0 1.5rem;
  }
  
  .hero .container {
    gap: 3rem;
  }
  
  .hero-title {
    font-size: 3.5rem;
  }
  
  .hero-stats {
    gap: 1.5rem;
  }
  
  .stat-number {
    font-size: 1.75rem;
  }
  
  .section-title {
    font-size: 2.5rem;
  }
  
  .technical-achievements {
    gap: 2rem;
  }
  
  .achievement-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .achievement-header h3 {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .footer-content {
    gap: 2rem;
  }
  
  .footer-links {
    gap: 2rem;
  }
}

/* Tablets */
@media screen and (max-width: 768px) {
  /* Navigation */
  .nav-menu {
    position: fixed;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    flex-direction: column;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    transition: transform var(--animation-normal);
    z-index: 1000;
  }
  
  .nav-menu.active {
    transform: translateY(0);
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  /* Hero Section */
  .hero .container {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .hero-title {
    font-size: 3rem;
  }
  
  .hero-description {
    font-size: 1.125rem;
  }
  
  .hero-stats {
    justify-content: center;
    gap: 1rem;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .chat-preview {
    max-width: 100%;
    margin: 0;
  }
  
  /* Typography */
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.75rem; }
  
  .section-title {
    font-size: 2rem;
  }
  
  .section-subtitle {
    font-size: 1.125rem;
  }
  
  /* Sections */
  :root {
    --section-padding: 4rem 0;
    --card-padding: 1.5rem;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  /* Demo Section */
  .demo-features {
    grid-template-columns: 1fr;
  }
  
  .carousel-container {
    grid-template-columns: 1fr;
  }
  
  /* Overview Section */
  .overview-grid {
    grid-template-columns: 1fr;
  }
  
  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
  }
  
  .feature-item {
    padding: 1rem;
  }
  
  /* Technical Section */
  .achievement-header {
    padding: 1rem;
  }
  
  .achievement-content {
    padding: 1rem;
  }
  
  .code-block {
    margin: 1rem 0;
  }
  
  .code-header {
    padding: 0.75rem;
    font-size: 0.8rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .code-header-left {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .code-header-actions {
    align-self: flex-end;
  }
  
  .collapse-btn {
    font-size: 0.75rem;
    padding: 0.375rem 0.625rem;
  }
  
  .code-preview {
    padding: 0.75rem;
    font-size: 0.75rem;
    line-height: 1.5;
  }
  
  .code-content {
    max-height: 0;
  }
  
  .code-block.expanded .code-content {
    max-height: 5000px;
    overflow: visible;
  }
  
  .code-block pre {
    padding: 0.75rem;
    font-size: 0.8rem;
  }
  
  .tech-tags {
    gap: 0.25rem;
  }
  
  .tech-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
  }
  
  /* Stack Section */
  .stack-grid {
    grid-template-columns: 1fr;
  }
  
  .highlights-grid {
    grid-template-columns: 1fr;
  }
  
  /* Timeline */
  .timeline {
    margin-bottom: 3rem;
  }
  
  .timeline::before {
    left: 1rem;
  }
  
  .timeline-item {
    padding-left: 3rem;
  }
  
  .timeline-marker {
    left: 0.5rem;
    width: 1rem;
    height: 1rem;
    font-size: 0.75rem;
  }
  
  .timeline-content::before {
    left: -0.375rem;
    border-right-width: 0.375rem;
    border-top-width: 0.375rem;
    border-bottom-width: 0.375rem;
  }
  
  .challenges-grid {
    grid-template-columns: 1fr;
  }
  
  /* Results Section */
  .results-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  
  .result-number {
    font-size: 2.5rem;
  }
  
  .learning-grid,
  .improvements-grid {
    grid-template-columns: 1fr;
  }
  
  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-links {
    justify-content: center;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  /* Lightbox */
  .lightbox-content {
    max-width: 95vw;
    max-height: 85vh;
  }
  
  .lightbox-close {
    top: 0.25rem;
    right: 0.25rem;
    font-size: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
  }
}

/* Small Tablets and Large Phones */
@media screen and (max-width: 640px) {
  /* Hero */
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
  
  /* Chat Preview */
  .chat-messages {
    padding: 0.75rem;
  }
  
  .message {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
  
  /* Typography */
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  h4 { font-size: 1.25rem; }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  /* Cards */
  .feature-card,
  .overview-card,
  .achievement-card,
  .stack-category,
  .result-card,
  .challenge-card {
    padding: 1rem;
  }
  
  .feature-icon,
  .card-icon,
  .achievement-icon,
  .result-icon,
  .challenge-icon {
    width: 3rem;
    height: 3rem;
    font-size: 1rem;
  }
  
  /* Tech Items */
  .tech-items {
    gap: 0.75rem;
  }
  
  .tech-item {
    padding: 0.75rem;
  }
  
  .tech-item img {
    width: 1.5rem;
    height: 1.5rem;
  }
  
  /* Results */
  .result-card {
    padding: 1.5rem;
  }
  
  .result-number {
    font-size: 2rem;
  }
  
  .result-label {
    font-size: 1rem;
  }
  
  /* Timeline */
  .timeline-content {
    padding: 1rem;
  }
  
  .timeline-tech {
    gap: 0.25rem;
  }
  
  .timeline-tech span {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
  }
  
  /* Footer */
  .footer {
    padding: 2rem 0 1rem;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .brand-logo {
    font-size: 1.25rem;
  }
  
  .brand-logo i {
    font-size: 1.5rem;
  }
}

/* Mobile Phones */
@media screen and (max-width: 480px) {
  /* Base */
  .container {
    padding: 0 0.75rem;
  }
  
  :root {
    --section-padding: 3rem 0;
    --card-padding: 1rem;
  }
  
  /* Navigation */
  .nav-container {
    padding: 0.75rem 1rem;
  }
  
  .nav-brand {
    font-size: 1rem;
  }
  
  .nav-brand i {
    font-size: 1.25rem;
  }
  
  .nav-menu {
    padding: 1.5rem;
  }
  
  /* Hero */
  .hero-title {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  .hero-description {
    font-size: 0.95rem;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  .stat-label {
    font-size: 0.8rem;
  }
  
  /* Typography */
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  h4 { font-size: 1.125rem; }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .section-subtitle {
    font-size: 1rem;
  }
  
  /* Demo */
  .video-overlay .fa-play-circle {
    font-size: 3rem !important;
  }
  
  .video-overlay h3 {
    font-size: 1.25rem;
  }
  
  .video-overlay p {
    font-size: 0.875rem;
  }
  
  /* Diagram */
  .diagram-placeholder {
    aspect-ratio: 16 / 9;
    padding: 0.5rem;
  }
  
  /* Cards */
  .overview-card,
  .achievement-card,
  .stack-category,
  .result-card,
  .challenge-card,
  .learning-item,
  .improvement-card {
    padding: 1rem;
  }
  
  .feature-card {
    padding: 1rem;
    text-align: left;
  }
  
  .feature-icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }
  
  /* Code Blocks */
  .code-header {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .code-header-left {
    width: 100%;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
  }
  
  .code-header-left span {
    font-size: 0.75rem;
  }
  
  .collapse-btn {
    font-size: 0.7rem;
    padding: 0.3rem 0.5rem;
  }
  
  .code-preview {
    padding: 0.5rem 0.75rem;
    font-size: 0.7rem;
    line-height: 1.5;
  }
  
  .code-content {
    max-height: 0;
  }
  
  .code-block.expanded .code-content {
    max-height: 5000px;
    overflow: visible;
  }
  
  .code-block pre {
    padding: 0.75rem;
    font-size: 0.75rem;
  }
  
  .achievement-header h3 {
    font-size: 1rem;
  }
  
  .difficulty-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
  }
  
  /* Tech Stack */
  .tech-item {
    padding: 0.5rem;
    font-size: 0.875rem;
  }
  
  .tech-item img {
    width: 1.25rem;
    height: 1.25rem;
  }
  
  /* Timeline */
  .timeline-item {
    margin-bottom: 2rem;
    padding-left: 2.5rem;
  }
  
  .timeline-marker {
    left: 0.25rem;
    width: 0.75rem;
    height: 0.75rem;
    font-size: 0.6rem;
  }
  
  .timeline::before {
    left: 0.625rem;
  }
  
  .timeline-content::before {
    left: -0.25rem;
    border-right-width: 0.25rem;
    border-top-width: 0.25rem;
    border-bottom-width: 0.25rem;
  }
  
  .timeline-content h3 {
    font-size: 1rem;
  }
  
  /* Results */
  .results-grid {
    grid-template-columns: 1fr;
  }
  
  .result-number {
    font-size: 1.75rem;
  }
  
  .result-label {
    font-size: 0.95rem;
  }
  
  .result-description {
    font-size: 0.8rem;
  }
  
  /* Improvements */
  .improvement-icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }
  
  /* Footer */
  .footer {
    padding: 1.5rem 0 1rem;
  }
  
  .brand-logo {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
  }
  
  .link-group {
    margin-bottom: 1rem;
  }
  
  .link-group h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }
  
  .link-group a {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
  }
  
  .footer-attribution,
  .footer-copyright {
    font-size: 0.8rem;
  }
  
  /* Back to Top */
  .back-to-top {
    width: 2.5rem;
    height: 2.5rem;
    bottom: 1rem;
    right: 1rem;
  }
  
  /* Lightbox */
  .lightbox-content {
    max-width: 95vw;
    max-height: 85vh;
  }
  
  .lightbox-close {
    top: 0.25rem;
    right: 0.25rem;
    font-size: 1.25rem;
    width: 2rem;
    height: 2rem;
  }
  
  .lightbox-caption {
    font-size: 1rem;
    margin-top: 0.5rem;
  }
}

/* Extra Small Devices */
@media screen and (max-width: 360px) {
  /* Navigation */
  .nav-container {
    padding: 0.5rem 0.75rem;
  }
  
  /* Hero */
  .hero-title {
    font-size: 1.75rem;
  }
  
  .hero-badge {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
  }
  
  /* Typography */
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.125rem; }
  
  .section-title {
    font-size: 1.25rem;
  }
  
  .section-subtitle {
    font-size: 0.95rem;
  }
  
  /* Cards */
  .overview-card,
  .achievement-card,
  .result-card {
    padding: 0.75rem;
  }
  
  .card-icon,
  .achievement-icon,
  .result-icon {
    width: 2rem;
    height: 2rem;
    font-size: 0.875rem;
  }
  
  /* Buttons */
  .btn {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
  }
  
  /* Tech Items */
  .tech-item {
    padding: 0.375rem;
    font-size: 0.8rem;
  }
  
  .tech-item img {
    width: 1rem;
    height: 1rem;
  }
  
  /* Timeline */
  .timeline-content {
    padding: 0.75rem;
  }
  
  .timeline-content h3 {
    font-size: 0.95rem;
  }
  
  .timeline-tech span {
    font-size: 0.65rem;
  }
}

/* Print Styles */
@media print {
  * {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
  }
  
  .navbar,
  .hero-background,
  .hero-particles,
  .loading-screen,
  .lightbox,
  .back-to-top,
  .tech-tooltip {
    display: none !important;
  }
  
  .hero {
    min-height: auto;
    padding: 2rem 0;
    background: white !important;
    color: black !important;
  }
  
  .section-title {
    page-break-after: avoid;
  }
  
  .achievement-card,
  .result-card,
  .overview-card {
    page-break-inside: avoid;
    border: 1px solid #ccc;
    margin-bottom: 1rem;
  }
  
  .code-block {
    border: 1px solid #ccc;
    background: #f5f5f5 !important;
  }
  
  .footer {
    background: white !important;
    color: black !important;
    border-top: 1px solid #ccc;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .hero-particles {
    animation: none;
  }
  
  .loading-spinner {
    animation: none;
  }
  
  .typing-indicator span {
    animation: none;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #0000ff;
    --primary-dark: #000080;
    --text-primary: #000000;
    --text-secondary: #333333;
    --bg-primary: #ffffff;
    --bg-secondary: #f0f0f0;
  }
  
  .btn-primary {
    border: 2px solid #000000;
  }
  
  .btn-secondary {
    border: 2px solid #0000ff;
  }
  
  .feature-card,
  .overview-card,
  .achievement-card,
  .result-card {
    border: 1px solid #000000;
  }
}

/* Landscape Orientation on Mobile */
@media screen and (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 2rem 0;
  }
  
  .hero .container {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .hero-stats {
    flex-direction: row;
    gap: 1rem;
  }
} 