@media screen and (max-width: 1400px) {
  #profile {
    min-height: 100vh;
    height: 100vh;
    margin-bottom: 0;
  }
  .profile-container {
    gap: 3rem;
  }
}

@media screen and (max-width: 1200px) {
  /* Hamburger nav is always visible now */
  #about {
    padding: 4rem 2rem;
  }
  
  .about-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-left: 0;
  }
  
  .about-left {
    display: none;
  }
  
  .about-right {
    text-align: left;
  }
  
  #experience {
    margin-bottom: 0;
  }
  
  .experience-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-left: 0;
  }
  
  .experience-left {
    display: none;
  }
  
  .experience-date-wrapper {
    text-align: left;
    justify-content: flex-start;
    align-items: flex-start;
    align-self: flex-start;
  }
  
  .experience-details-container {
    margin-top: 2rem;
  }
  
  .education-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-left: 0;
  }
  
  .education-left {
    display: none;
  }
  
  .education-right {
    text-align: center;
  }
  .profile-container {
    flex-direction: column;
    text-align: center;
    gap: 3rem;
  }
  .section_text {
    text-align: center;
    max-width: 100%;
  }
  .section_text_p1,
  .title {
    text-align: center;
  }
  .btn-container,
  #socials-container {
    justify-content: center;
  }
  .section__pic-container {
    width: 350px;
    height: 350px;
    margin: 0 auto;
  }
  section {
    height: fit-content;
  }
  section {
    margin: 0 5%;
  }
  
  /* Section titles for tablet */
  #about .title {
    font-size: 3rem;
  }
  
  #experience .title,
  #education .title {
    font-size: 3rem;
  }
}

/* Tablet breakpoint */
@media screen and (max-width: 768px) {
  .title {
    font-size: 3.5rem;
  }
  
  #about .title,
  #experience .title,
  #education .title {
    font-size: 2.5rem;
  }
  
  .section__pic-container {
    width: 300px;
    height: 300px;
  }
  
  .experience-card {
    width: 95%;
    padding: 1.25rem 1.5rem;
    gap: 1.25rem;
  }
  
  
  section {
    margin: 0 3%;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  
  #about,
  #experience,
  #education {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media screen and (max-width: 600px) {
  #profile {
    min-height: 100vh;
    height: 100vh;
    padding: 2rem 1.5rem;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .profile-container {
    flex-direction: column;
    gap: 2.5rem;
    width: 100%;
    max-width: 100%;
    align-items: center;
  }
  .section__pic-container {
    width: 220px;
    height: 220px;
    margin: 0 auto;
  }
  .section_text {
    text-align: center;
    width: 100%;
  }
  .section_text_p1 {
    text-align: center;
    font-size: 0.8rem;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
  }
  .title {
    text-align: center;
    font-size: 2.75rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
  }
  
  .btn-container {
    justify-content: center;
    margin: 0;
  }
  .btn {
    width: auto;
    padding: 0.75rem 2rem;
    font-size: 0.95rem;
  }
  #socials-container {
    justify-content: center;
    margin-top: 1.5rem;
  }
  .logo {
    font-size: 1.5rem;
  }
  
  #about {
    padding: 3.5rem 1.5rem;
    min-height: auto;
  }
  
  #about .title {
    font-size: 2.25rem;
    text-align: left;
    margin-bottom: 1.25rem;
  }
  
  #about .section_text_p1 {
    text-align: left;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
  }
  
  .about-container {
    gap: 2.5rem;
    padding-top: 2rem;
  }
  
  .about-left {
    display: none;
  }
  
  #experience {
    padding: 3.5rem 1rem;
    box-sizing: border-box;
  }
  
  #experience .title {
    font-size: 2.25rem;
    text-align: left;
    margin-bottom: 1.25rem;
  }
  
  #experience .section_text_p1 {
    text-align: left;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
  }
  
  .experience-container {
    gap: 2rem;
    padding-top: 2rem;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
  }
  
  .experience-left {
    display: none;
  }
  
  .experience-details-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .experience-card {
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
    gap: 1.25rem;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    border-radius: 0.75rem;
    box-sizing: border-box;
    overflow: visible;
  }
  
  .experience-content {
    width: 100%;
    text-align: left;
    padding-left: 3.5rem;
    box-sizing: border-box;
    min-width: 0;
  }
  
  .experience-content h3 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    font-weight: 500;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  
  /* Hide mobile break on mobile - keep title on one line */
  .experience-content h3 .mobile-break {
    display: none;
  }
  
  /* Company name stays inline */
  .experience-content h3 .company-name {
    display: inline;
  }
  
  /* Date wrapper positioned at top, aligned with text content */
  .experience-date-wrapper {
    order: -1;
    align-self: flex-start;
    margin-bottom: 0.5rem;
    padding-left: 3.5rem;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
  }
  
  /* Keep company names in education section */
  #education .experience-content h3 .company-name {
    font-size: 0.85rem;
  }
  
  /* Keep education degree names on one line on mobile */
  #education .experience-role {
    font-size: 0.9rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
  }
  
  /* Hide mobile break on mobile - keep titles on one line */
  .mobile-break {
    display: none;
  }
  
  /* Education section also needs dates at top, aligned with text content */
  #education .experience-date-wrapper {
    order: -1;
    align-self: flex-start;
    margin-bottom: 0.5rem;
    padding-left: 3.5rem;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
  }
  
  /* Education section titles should also stay on one line */
  #education .experience-content h3 {
    font-size: 0.9rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  
  /* Education section content */
  #education .experience-content {
    box-sizing: border-box;
    min-width: 0;
  }
  
  .experience-date {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
  }
  
  .experience-points {
    font-size: 0.9rem;
    text-align: left;
    padding-left: 0;
    margin: 0;
    line-height: 1.6;
  }
  
  /* Keep experience points on one line */
  .experience-points li {
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin-bottom: 0.25rem;
  }
  
  .company-logo {
    width: 44px;
    height: 44px;
  }
  
  .logo-container {
    width: 48px;
    height: 48px;
    top: -10px;
    left: -10px;
  }
  
  #education {
    padding: 3.5rem 1rem;
    box-sizing: border-box;
  }
  
  /* Match Experience sizing/flow: prevent Education overflow on mobile */
  #education .education-right,
  #education .education-details-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
    text-align: left;
  }

  #education .experience-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  #education .title {
    font-size: 2.25rem;
    text-align: left;
    margin-bottom: 1.25rem;
  }
  
  #education .section_text_p1 {
    text-align: left;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
  }
  
  .education-container {
    gap: 2rem;
    padding-top: 2rem;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
  }
  
  .education-details-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .education-left {
    display: none;
  }
  
  #about .about-description {
    font-size: 1rem;
    text-align: left;
    line-height: 1.75;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: normal;
    white-space: normal;
    margin-bottom: 1.25rem;
  }
  
  #about .about-description:last-child {
    margin-bottom: 0;
  }
  
  /* Concentration dropdown mobile adjustments */
  .concentration-toggle {
    gap: 0.3rem;
  }
  
  .pointer-icon {
    border-left-width: 4px;
    border-right-width: 4px;
    border-top-width: 6px;
  }
  
  .concentration-content {
    max-width: 300px;
    white-space: normal;
  }
  
  .concentration-toggle.expanded .concentration-content {
    max-width: 300px;
  }
  
  .menu-links a {
    font-size: 1.6rem;
    padding: 1.25rem 1.5rem;
  }
  
  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    padding: 2rem 1rem;
  }
  
  .footer-copyright,
  .footer-credit {
    text-align: center;
    font-size: 0.9rem;
  }
  
  section {
    margin: 0;
    padding-left: 1rem;
    padding-right: 1rem;
    box-sizing: border-box;
  }
  
  .section_text_p1 {
    font-size: 0.8rem;
    letter-spacing: 2px;
  }
  
  /* Improve spacing consistency */
  .experience-role {
    font-size: 0.95rem;
    margin: 0.5rem 0;
  }
  
  /* Better footer spacing */
  footer {
    padding: 2.5rem 1.5rem;
  }
}

#education {
  margin-bottom: 0;
}

/* Very small mobile devices */
@media screen and (max-width: 400px) {
  .title {
    font-size: 2rem;
  }
  
  #about .title,
  #experience .title,
  #education .title {
    font-size: 1.75rem;
  }
  
  .section__pic-container {
    width: 240px;
    height: 240px;
  }
  
  .menu-links a {
    font-size: 1.4rem;
    padding: 1rem 1.25rem;
  }
  
  .logo {
    font-size: 1.25rem;
  }
}