/* Breakpoints are isolated here so section styles stay easy to extend. */
@media (min-width: 1400px) {
  .container,
  .hero-inner {
    max-width: 1200px;
  }
}

@media (max-width: 1100px) {
  .hero-inner {
    gap: 2.5rem;
    padding: 0 2rem;
  }
  .hero-name {
    font-size: clamp(3rem, 6vw, 5rem);
  }
  .hero-photo-frame {
    width: 320px;
    height: 420px;
  }
  .about-grid,
  .value-grid,
  .contact-inner {
    gap: 3rem;
  }
  .tools-grid {
    margin-top: 2rem;
  }
  .tool-card {
    padding: 1.5rem;
  }
  .container {
    padding: 0 2rem;
  }
}

@media (max-width: 900px) {
  nav {
    padding: 1.1rem 1.5rem;
  }
  .nav-links {
    gap: 1.2rem;
  }
  .nav-links a {
    font-size: 0.72rem;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 6rem 1.5rem 4rem;
    text-align: center;
  }
  .hero-ctas {
    justify-content: center;
  }
  .hero-tagline {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-photo-wrap {
    justify-content: center;
    order: -1;
  }
  .hero-photo-frame {
    width: min(320px, 70vw);
    height: min(400px, 85vw);
  }
  .hero-stats {
    position: relative;
    bottom: auto;
    left: auto;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0 0;
    white-space: nowrap;
  }
  .hero-stat-num {
    font-size: 1.4rem;
    margin-bottom: 0;
  }

  .about-grid,
  .value-grid,
  .contact-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .comp-grid {
    grid-template-columns: 1fr;
  }
  .tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .secondary-skills-grid {
    gap: 2rem;
  }
  .workflow-steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  .workflow-steps::before {
    display: none;
  }
  .workflow-principles {
    grid-template-columns: repeat(2, 1fr);
  }
  .container {
    padding: 0 1.5rem;
  }
  section {
    padding: 5rem 0;
  }
  .footer-meta {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
    padding: 1.5rem;
  }
}

@media (max-width: 640px) {
  .js .nav-burger {
    display: flex;
  }
  .js .nav-links {
    display: none;
    position: fixed;
    inset: 0;
    min-height: 100dvh;
    padding: 6rem 1.5rem;
    background: var(--overlay-alpha);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    z-index: 150;
    overflow-y: auto;
  }
  .js .nav-links.open {
    display: flex;
  }
  .nav-links a {
    font-size: 1rem;
    letter-spacing: 0.2em;
  }
  .no-js nav {
    position: relative;
    flex-wrap: wrap;
  }
  .no-js .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    order: 3;
    width: 100%;
  }
}

@media (max-width: 600px) {
  nav {
    padding: 0.5rem 1.2rem;
    gap: 0.5rem;
  }
  .hero-bg-text {
    display: none;
  }
  #hero {
    min-height: unset;
    display: block;
    padding: 0;
  }
  .hero-inner {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    max-width: 100%;
    gap: 0;
    text-align: center;
  }
  .hero-photo-wrap {
    order: 1;
    width: 100%;
    display: block;
    margin-top: 60px;
  }
  .hero-photo-frame {
    width: 100%;
    height: 88vw;
    max-height: 400px;
    overflow: hidden;
  }
  .hero-photo-frame::before,
  .hero-photo-frame::after {
    display: none;
  }
  .hero-photo {
    object-position: center 8%;
    display: block;
  }
  .hero-stats {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    padding: 0.7rem 1rem;
    background: var(--surface-alpha);
    border: 1px solid var(--border);
    width: auto;
    margin: 0;
    z-index: 10;
  }
  .hero-stat-num {
    font-size: 1.5rem;
    line-height: 1;
    margin-bottom: 0.1rem;
  }
  .hero-stat-label {
    font-size: 0.6rem;
    line-height: 1.4;
    text-align: left;
  }
  .hero-content {
    order: 2;
    padding: 2rem 1.5rem 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .hero-name {
    font-size: clamp(2.4rem, 12vw, 3.2rem);
  }
  .hero-title {
    font-size: 0.75rem;
    overflow-wrap: anywhere;
  }
  .hero-tagline {
    font-size: 0.95rem;
  }
  .hero-ctas {
    flex-direction: column;
    width: 100%;
    gap: 0.8rem;
  }
  .btn-primary,
  .btn-ghost {
    width: 100%;
    text-align: center;
    padding: 0.9rem 1rem;
  }
  .section-title {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }
  .about-stat {
    padding: 1rem;
  }
  .about-stat-n {
    font-size: 1.8rem;
  }
  .comp-card {
    padding: 1.8rem 1.2rem;
  }
  .tools-grid {
    grid-template-columns: 1fr;
  }
  .tool-card {
    min-height: 0;
    padding: 1.5rem;
  }
  .tool-card-top {
    margin-bottom: 1rem;
  }
  .secondary-skills-heading {
    flex-direction: column;
    gap: 0.35rem;
  }
  .secondary-skills-label {
    order: 0;
  }
  .secondary-skills-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }
  .workflow-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  .workflow-principles {
    grid-template-columns: 1fr;
  }
  .value-items {
    gap: 1.2rem;
  }
  .value-num {
    font-size: 1.5rem;
    width: 2rem;
  }
  .career-objective {
    padding: 1.5rem;
  }
  .contact-left h2 {
    font-size: clamp(2rem, 8vw, 3rem);
  }
  .avail-box {
    padding: 1.2rem 1.5rem;
  }
  .cases-placeholder {
    padding: 3rem 1.5rem;
  }
  .cases-categories {
    gap: 0.5rem;
  }
  .container {
    padding: 0 1.2rem;
  }
  section {
    padding: 4rem 0;
  }
  .closing-line {
    padding: 2rem 1.2rem;
    font-size: 0.85rem;
  }
  .contact-actions {
    grid-template-columns: 1fr;
  }
  .contact-brand {
    padding: 1.5rem;
  }
}

@media (max-width: 380px) {
  .hero-name {
    font-size: clamp(2.2rem, 12vw, 2.8rem);
  }
  .btn-primary,
  .btn-ghost {
    padding: 0.8rem 1rem;
    font-size: 0.72rem;
  }
  .about-stat-l {
    font-size: 0.65rem;
  }
  .contact-action {
    gap: 0.6rem;
    padding: 0.85rem;
  }
  .contact-action-text {
    overflow-wrap: anywhere;
  }
}

/* Keep every menu item reachable in a short landscape viewport. */
@media (max-width: 640px) and (max-height: 600px) {
  .js .nav-links {
    justify-content: flex-start;
  }
}
