@media (max-width: 1320px) {
  .container-lg {
    max-width: 1200px;
  }

  .header-nav {
    padding: 0 10px;
  }

  .profile-section .container,
  .professional-journey-section .container,
  .highlights-section .container,
  .photo-strip .container,
  .contact .container,
  .footer .container {
    max-width: 1240px;
  }

  .hero-content {
    padding: 0 10px;
  }
}

@media (max-width: 1200px) {
  .title {
    font-size: 40px;
  }

  .profile-section,
  .professional-journey-section,
  .highlights-section,
  .contact {
    padding: 80px 0;
  }

  .profile-row {
    gap: 36px;
  }

  .journey-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }

  .journey-card-large {
    grid-column: span 2;
  }

  .journey-grid .journey-card:nth-child(3) {
    grid-column: span 2;
  }

  .journey-grid .journey-card:nth-child(4) {
    grid-column: auto;
  }

  .journey-dual-layout {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 992px) {

  /* FIXED: separated flex and grid behaviors */
  .profile-row {
    flex-direction: column;
  }

  .journey-dual-layout {
    grid-template-columns: 1fr;
  }

  .profile-content,
  .profile-skills,
  .journey-left,
  .journey-right {
    width: 100%;
  }

  .profile-services {
    grid-template-columns: 1fr;
  }

  .journey-grid {
    grid-template-columns: 1fr;
  }

  .journey-card-large,
  .journey-grid .journey-card:nth-child(3),
  .journey-grid .journey-card:nth-child(4) {
    grid-column: span 1;
  }

  .journey-left .timeline,
  .journey-right .journey-bottom-grid {
    max-width: 100%;
  }

  .timeline-title h3,
  .journey-side-title h3,
  .journey-right .info-panel h3 {
    text-align: center;
  }

  .tech-stack-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .tech-stack-list li {
    width: auto;
    text-align: center;
  }
}

@media (max-width: 977px) {
  .title {
    font-size: 36px;
  }

  .header {
    height: 80px;
  }

  .header-nav {
    height: 80px;
  }

  .hero {
    padding-top: 140px;
  }

  .hero-row {
    flex-direction: column;
    row-gap: 32px;
  }

  .hero-content {
    text-align: center;
    padding: 0;
  }

  .hero-img {
    justify-content: center;
    align-items: center;
  }

  .hero-img img {
    max-width: 520px;
  }

  .about-social-list {
    display: block;
  }

  .nav-list {
    display: none;
  }

  .nav-btn {
    display: block;
    position: relative;
    z-index: 1001;
  }

  .nav.open .nav-list {
    position: fixed;
    inset: 0;
    background-color: #fff;
    z-index: 1000;
    padding: 100px 30px 40px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    text-align: center;
    row-gap: 24px;
    font-size: 32px;
    font-weight: 500;
    overflow-y: auto;
  }

  .nav-link {
    color: #565a5b;
  }

  .nav-link.active {
    color: #0c1618;
  }

  .social-links-row {
    column-gap: 18px;
    margin: 28px 0;
    flex-wrap: wrap;
  }

  .btn {
    font-size: 11px;
    padding: 0 20px;
  }

  .profile-section,
  .professional-journey-section,
  .highlights-section,
  .contact {
    padding: 5rem 0;
  }

  .title {
    margin-bottom: 30px;
  }

  .journey-intro {
    margin-bottom: 35px;
    padding: 0 10px;
  }

  .journey-card {
    padding: 24px;
  }

  .journey-card h3 {
    font-size: 22px;
  }

  .timeline-title h3,
  .journey-side-title h3 {
    font-size: 28px;
    margin-bottom: 24px;
  }

  .journey-left .timeline {
    padding-left: 24px;
  }

  .journey-left .timeline-content {
    padding: 22px 20px;
  }

  .journey-left .timeline-content h4 {
    font-size: 19px;
  }

  .journey-right .info-panel {
    padding: 24px 22px;
  }

  .journey-right .info-panel h3 {
    font-size: 19px;
  }
}

@media (max-width: 768px) {

  .container,
  .photo-viewport {
    padding-left: 20px;
    padding-right: 20px;
  }

  .title {
    font-size: 32px;
    line-height: 1.3;
  }

  .hero-heading {
    font-size: clamp(2.6rem, 8vw, 3.4rem);
  }

  .hero-heading-subtitle {
    font-size: 1rem;
    line-height: 1.6;
  }

  .hero-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .btn {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 0 0 14px;
  }

  .profile-descr,
  .service-card p,
  .journey-intro p,
  .journey-card p,
  .journey-left .timeline-content p {
    font-size: 14px;
  }

  .skill-panel,
  .journey-card,
  .journey-right .info-panel,
  .journey-left .timeline-content {
    border-radius: 16px;
  }

  .journey-intro p {
    line-height: 1.8;
  }

  .journey-card {
    padding: 22px 18px;
  }

  .journey-card h3 {
    font-size: 20px;
  }

  .journey-tag {
    font-size: 11px;
    padding: 7px 12px;
  }

  .journey-left .timeline-title h3,
  .journey-side-title h3 {
    font-size: 24px;
  }

  .journey-left .timeline {
    padding-left: 20px;
  }

  .journey-left .timeline::before {
    left: 6px;
  }

  .journey-left .timeline-dot {
    left: -24px;
    width: 16px;
    height: 16px;
    border-width: 4px;
  }

  .journey-left .timeline-content {
    padding: 18px 16px;
  }

  .journey-left .timeline-date {
    font-size: 11px;
    line-height: 1.6;
  }

  .journey-left .timeline-content h4 {
    font-size: 17px;
  }

  .journey-right .info-panel {
    padding: 20px 18px;
  }

  .journey-right .info-panel h3 {
    font-size: 18px;
    margin-bottom: 14px;
  }

  .journey-right .info-panel ul li {
    font-size: 13.5px;
    line-height: 1.7;
    margin-bottom: 14px;
  }

  .journey-right .info-panel span {
    font-size: 11px;
  }

  .brand-logos {
    grid-template-columns: repeat(2, minmax(100px, 1fr));
    gap: 12px;
  }

  .brand-logo-item {
    min-height: 66px;
    padding: 10px;
  }

  .brand-logo-item img {
    max-height: 30px;
  }

  .photo-set img {
    width: 140px;
    height: 140px;
  }

  .photo-set img:hover {
    transform: translateY(-8px) scale(1.14);
  }

  .contact-button {
    display: flex;
    justify-content: center;
  }

  .contact-button .btn {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 540px) {

  .container,
  .photo-viewport {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero {
    padding-top: 125px;
  }

  .hero-row {
    row-gap: 24px;
  }

  .hero-img img {
    max-width: 340px;
  }

  .nav.open .nav-list {
    font-size: 28px;
    row-gap: 20px;
  }

  .title {
    font-size: 28px;
  }

  .journey-card h3 {
    font-size: 18px;
  }

  .journey-left .timeline-title h3,
  .journey-side-title h3 {
    font-size: 22px;
  }

  .journey-left .timeline {
    padding-left: 18px;
  }

  .journey-left .timeline-content h4 {
    font-size: 16px;
  }

  .journey-right .info-panel h3 {
    font-size: 17px;
  }

  .journey-right .info-panel ul li {
    font-size: 13px;
  }

  .social-links-row img {
    width: 34px;
    height: 34px;
  }

  .photo-set img {
    width: 120px;
    height: 120px;
  }

  .photo-set img:hover {
    transform: translateY(-6px) scale(1.1);
  }

  .industry-track span {
    font-size: 13px;
  }
}

@media (max-width: 406px) {
  .hero-img {
    flex: 1 1 100%;
  }

  .hero-img img {
    max-width: 280px;
  }

  .btn {
    max-width: 100%;
  }

  .journey-card,
  .journey-right .info-panel,
  .journey-left .timeline-content,
  .skill-panel {
    padding-left: 14px;
    padding-right: 14px;
  }

  .journey-left .timeline-date {
    font-size: 10px;
  }

  .brand-logos {
    grid-template-columns: 1fr 1fr;
  }

  .brand-showcase-title {
    font-size: 12px;
  }
}

/* Touch devices */
@media (hover: none) and (pointer: coarse) {
  .photo-track {
    animation-duration: 160s;
  }

  .photo-set img:hover {
    transform: none;
    box-shadow: 0 10px 24px rgba(12, 22, 24, 0.06);
  }

  .industry-strip:hover .industry-track {
    animation-play-state: running;
  }

  .social-links-row a:hover,
  .brand-logo-item:hover,
  .journey-card:hover,
  .journey-right .info-panel:hover,
  .skill-tag-list li:hover {
    transform: none;
  }
}