/* =================================================================
   1024px BREAKPOINT - LAPTOPS
   ================================================================= */

@media (max-width: 1024px) {
  body {
    overflow-x: hidden;
  }
  
  .hero-content {
    padding: 8rem 2rem;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .hero-title {
    margin: 0 auto 1rem;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .typewriter-text {
    margin: 0 auto;
    max-width: 100%;
    box-sizing: border-box;
    word-break: break-word;
    min-height: 4rem;
    line-height: 1.1;
    font-size: 3.5rem;
  }
  
  .hero-subtitle {
    margin: 2rem auto 0;
    max-width: 700px;
    box-sizing: border-box;
    font-size: 1.2rem;
    line-height: 1.5;
    padding: 0 1rem;
  }
  
  /* Process Timeline Fixes */
  .process-item {
    max-width: 350px;
  }
  
  .process-item:nth-child(odd) {
    margin-right: 60%;
  }
  
  .process-item:nth-child(even) {
    margin-left: 60%;
  }
  
  /* Hide Scroll to Top Button */
  .scroll-top-btn {
    display: none;
  }

  .about-container {
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 0 5rem;
    box-sizing: border-box;
  }

  .about-text {
    order: 1;
    margin-bottom: 3rem;
  }

  .about-image {
    order: 2;
    align-self: center;
    margin: 0 auto;
    }

  .about-image img {
    max-width: 500px;
    width: 100%;
    height: auto;
    border-radius: 12px;
  }

  .experience-container,
  .projects-container,
  .leadership-container,
  .skills-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  #experience,
  #projects,
  #leadership,
  #contact,
  #skills {
    padding-top: 10rem;
  }
}

/* =================================================================
   768px BREAKPOINT - TABLETS
   ================================================================= */

@media (max-width: 768px) {
  .hero-content {
    padding: 6rem 5rem;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .typewriter-text {
    font-size: 2.2rem;
    min-height: 2rem;
    height: auto;
    line-height: 1.2;
    word-break: normal;
    white-space: pre-wrap;
    overflow: visible;
    display: block;
    width: 100%;
    text-align: center;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 1rem;
    margin-top: 4rem;
  }
  
  /* About Me Section - Stack Layout */
  .about-container {
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 0 5rem;
    box-sizing: border-box;
  }
  
  .about-text {
    order: 1;
    margin-bottom: 3rem;
  }
  
  .about-image {
    order: 2;
    align-self: center;
    margin: 0 auto;
  }
  
  .about-image img {
    max-width: 500px;
    width: 100%;
    height: auto;
    border-radius: 12px;
  }

  /* All Container Sections - Consistent 5rem Edge Spacing */
  .experience-container,
  .projects-container,
  .leadership-container,
  .skills-container,
  .contact-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 5rem;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  /* Section Spacing */
  #experience,
  #projects,
  #leadership,
  #contact,
  #skills {
    padding-top: 10rem;
  }

  /* List and Grid Items */
  .experience-list,
  .project-list,
  .leadership-list,
  .skills-categories {
    width: 100%;
    box-sizing: border-box;
  }

  /* Individual Items */
  .experience-item,
  .project-item,
  .leadership-item {
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Skills Section Specific */
  .skills-categories {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .skills-category {
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
    box-sizing: border-box;
  }

  /* Text Sizing */
  .experience-title,
  .project-title,
  .leadership-title {
    font-size: 1.1rem;
    line-height: 1.3;
    word-wrap: break-word;
  }

  .experience-description,
  .project-description,
  .leadership-description {
    font-size: 0.95rem;
    line-height: 1.5;
    word-wrap: break-word;
  }

  /* Contact Section - Better Width */
  .contact-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 3rem;
    box-sizing: border-box;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  #contact {
    padding-top: 10rem;
  }
  
  .contact-line {
    width: 100%;
    max-width: 500px;
    align-self: flex-start;
    margin-left: calc(50% - 250px);
  }
  
  .contact-container h2 {
    width: 100%;
    max-width: 500px;
    text-align: left;
    margin: 0;
    align-self: flex-start;
    margin-left: calc(50% - 250px);
  }
  
  .contact-container p {
    width: 100%;
    max-width: 500px;
    text-align: left;
    margin: 0 0 2rem 0;
    font-size: 0.95rem;
    line-height: 1.5;
    align-self: flex-start;
    margin-left: calc(50% - 250px);
  }
  
  .contact-form {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    box-sizing: border-box;
  }
  
  .contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
  }
  
  .contact-form input,
  .contact-form textarea {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    box-sizing: border-box;
    border-radius: 6px;
    font-size: 0.95rem;
  }
  
  .contact-form button {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    box-sizing: border-box;
  }

  /* Hero Section Arvest */
  .hero-content {
    padding: 6rem 2rem;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .typewriter-text {
    font-size: 3rem;
    min-height: 3.5rem;
    height: 3.5rem;
    line-height: 1.1;
    word-break: break-word;
    margin: 0 auto;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
    line-height: 1.4;
    margin-top: 2rem;
    max-width: 600px;
  }
  
  .hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
  }
  
  .stat-item {
    min-width: 120px;
    width: 400px;
    height: 100px;
    padding: 1rem;
    box-sizing: border-box;
    flex-shrink: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  
  .stat-number {
    font-size: 1.8rem;
    line-height: 1;
  }
  
  .stat-label {
    font-size: 0.8rem;
    line-height: 1.2;
  }

  .overview-container,
  .projects-container,
  .skills-container,
  .gallery-container,
  .documents-container {
    padding: 0 5rem;
    box-sizing: border-box;
  }

  .program-grid,
  .projects-grid,
  .skills-grid,
  .gallery-grid,
  .documents-grid {
    width: 100%;
    box-sizing: border-box;
  }

  /* Personal Brand Page - Remove Timeline and Center Boxes */
  .process-timeline::before {
    display: none;
  }
  
  .process-item {
    width: 100%;
    max-width: none;
    margin: 0;
    align-self: stretch;
    position: relative;
    padding: 2rem;
    box-sizing: border-box;
  }
  
  .process-timeline {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2rem;
    width: 100%;
  }
  
  .process-item:nth-child(odd),
  .process-item:nth-child(even) {
    margin-left: 0 ;
    margin-right: 0;
    align-self: stretch;
    width: 100%;
  }
  
  .process-item::before {
    display: none;
  }

  .personal-container {
    padding: 0 5rem;
    box-sizing: border-box;
  }
  
  .overview-container {
    padding: 0 5rem;
    box-sizing: border-box;
  }
  
  .design-container {
    padding: 0 5rem;
    box-sizing: border-box;
  }

  .process-container {
    padding: 0 5rem;
    box-sizing: border-box;
  }

  .analysis-container,
  .data-container,
  .overview-container,
  .insights-container {
    padding: 0 5rem;
    box-sizing: border-box;
  }

  /* Grid Layouts */
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .insights-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Table Responsive */
  .table-stats {
    justify-content: center;
  }

  .table-info {
    justify-content: center;
    text-align: center;
  }

  /* Navigation Adjustments */
  .menu-toggle {
    left: 1rem;
  }

  .contact-btn {
    right: 1rem;
  }

  /* Text and Code Adjustments */
  .section-title {
    font-size: 2rem;
  }

  .sql-code {
    font-size: 0.75rem;
  }

  /* Table Overflow Fix */
  .table-wrapper {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 3rem;
    overflow-x: auto;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .data-table,
  .results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    table-layout: auto;
    margin: 0;
  }
  
  .data-table th,
  .data-table td,
  .results-table th,
  .results-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 150px;
  }
  
  /* Specific column widths for better control */
  .data-table th:nth-child(1),
  .data-table td:nth-child(1) {
    width: 35%;
    max-width: 200px;
  }
  
  .data-table th:nth-child(2),
  .data-table td:nth-child(2),
  .data-table th:nth-child(3),
  .data-table td:nth-child(3),
  .data-table th:nth-child(4),
  .data-table td:nth-child(4) {
    width: 22%;
    max-width: 120px;
    text-align: right;
  }

  .takeaways-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 5rem;
    box-sizing: border-box;
  }
  
  .takeaways-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 4rem;
  }
  
  .takeaway-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
  }
  
  .takeaway-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #fff;
  }
  
  .skills-list li {
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
  }
  
  .skill-name {
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
  }
  
  .skill-detail {
    color: #ccc;
    font-size: 0.85rem;
    line-height: 1.4;
  }
  
  .accomplishments-list li {
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 4px solid #764ba2;
    color: #ccc;
    line-height: 1.5;
    font-size: 0.9rem;
  }

  .tools-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 5rem;
    box-sizing: border-box;
  }
  
  .tools-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 4rem;
  }
  
  .tools-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
  }
  
  .tools-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #fff;
  }
  
  .tools-list li {
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    color: #ccc;
    line-height: 1.5;
    font-size: 0.9rem;
  }
  
  .tools-list li strong {
    color: #fff;
    font-size: 0.95rem;
  }
  
  .impact-list li {
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 4px solid #764ba2;
    color: #ccc;
    line-height: 1.5;
    font-size: 0.9rem;
  }

  /* Fix process container alignment and prevent horizontal scroll */
  .process-container {
    padding: 0 5rem;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .process-timeline {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .process-item {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 1.5rem 0 !important;
    box-sizing: border-box;
    padding: 1.5rem;
  }

  /* Ensure no elements cause horizontal overflow */
  body {
    overflow-x: hidden;
  }
}

/* =================================================================
   425px BREAKPOINT - MOBILE L
   ================================================================= */

@media (max-width: 425px) {
  /* Hide Contact Button in Navigation */
  .contact-btn {
    display: none;
  }
    
  /* Reduce hero content padding further */
  .hero-content {
    padding: 4rem 1.5rem;
  }
    
  /* Smaller typewriter text */
  .typewriter-text {
    font-size: 1.6rem;
    min-height: 6rem;
    line-height: 1.2;
    word-break: break-word;
    overflow: visible;
  }
    
  /* Smaller hero title */
  .hero-title {
    font-size: 2rem;
  }

  .hero-role {
    font-size: 1rem;
  }
    
  /* Reduce container padding */
  .about-container,
  .experience-container,
  .projects-container,
  .leadership-container,
  .skills-container,
  .contact-container,
  .personal-container,
  .overview-container,
  .design-container,
  .process-container,
  .analysis-container,
  .data-container,
  .insights-container,
  .takeaways-container,
  .gallery-container,
  .documents-container,
  .tools-container {
    padding: 0 1.5rem;
  }
    
  /* Stack hero stats vertically with smaller sizing */
  .hero-stats {
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
  }
    
  .stat-item {
    min-width: 100px;
    width: 100%;
    max-width: 280px;
    height: 80px;
    padding: 0.8rem;
  }
    
  .stat-number {
    font-size: 1.5rem;
  }
    
  .stat-label {
    font-size: 0.75rem;
  }
    
  /* Adjust navigation positioning */
  .menu-toggle {
    left: 0.5rem;
  }
    
  /* Smaller section titles */
  .section-title {
    font-size: 1.8rem;
  }
    
  /* Reduce form and contact spacing */
  .contact-form {
    max-width: 100%;
  }
    
  .contact-line {
    margin-left: 0;
    max-width: 100%;
  }
    
  .contact-container h2 {
    margin-left: 0;
    max-width: 100%;
  }
    
  .contact-container p {
    margin-left: 0;
    max-width: 100%;
  }

  /* Create wrapper around tables for horizontal scroll */
  .analysis-item .results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    table-layout: fixed;
    margin: 1rem 0;
    min-width: 1300px;
    display: table;
  }
  
  .analysis-item .results-table thead,
  .analysis-item .results-table tbody,
  .analysis-item .results-table tr {
    display: table-row-group;
  }
  
  .analysis-item .results-table tr {
    display: table-row;
  }
  
  .results-table th,
  .results-table td {
    padding: 0.75rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    font-size: 0.8rem;
    display: table-cell;
    min-width: 150px;
  }
  
  .results-table th {
    background: rgba(255, 255, 255, 0.1);
    font-weight: 600;
    color: #fff;
  }
  
  .results-table td {
    color: #ccc;
  }
  
  /* Create a simple scroll container */
  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
  }
  
  /* SQL Code block improvements */
  .sql-code {
    font-size: 0.7rem;
    line-height: 1.3;
    padding: 1rem;
    overflow-x: auto;
    white-space: pre;
    -webkit-overflow-scrolling: touch;
  }

  .process-container {
    padding: 0 1.5rem;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
   }
   
   .process-timeline {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
   }
   
   .process-item {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 1.5rem 0 !important;
    box-sizing: border-box;
    padding: 1.5rem;
   }
   
   /* Ensure no elements cause horizontal overflow */
   body {
    overflow-x: hidden;
   }
}

/* =================================================================
   320px BREAKPOINT - MOBILE S
   ================================================================= */

   @media (max-width: 320px) {
    html {
      background-color: red !important;
    }
  }