/* Responsive layouts and reduced-motion preferences. */

@media (max-width: 1000px) {
  .hero-layout { grid-template-columns: 1fr .78fr; gap: 32px; min-height: 590px; }
  .hero h1 { font-size: clamp(43px, 5.4vw, 58px); }
  .portrait-card img { height: 390px; }
  .chip-top { left: -22px; }
  .chip-bottom { right: -13px; }
  .proof-grid { grid-template-columns: .95fr 1fr 1.1fr 1fr; }
  .proof-item { gap: 9px; padding-left: 16px; }
  .proof-item strong { font-size: 27px; }
  .experience-layout, .about-layout { gap: 55px; }
  .expertise-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .expertise-card { min-height: 210px; }
  .expertise-card p { min-height: 52px; }
  .workflow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-inline: 16px; }
  .workflow-step:nth-child(2) { border-right: 0; }
  .workflow-step:nth-child(3), .workflow-step:nth-child(4) { border-top: 1px solid rgb(255 255 255 / 10%); }
  .workflow-step:nth-child(3)::after { top: 28px; right: -4px; bottom: auto; left: auto; transform: rotate(45deg); }
  .workflow-step:nth-child(2)::after { top: auto; right: 50%; bottom: -4px; left: auto; transform: rotate(135deg); }
}

@media (max-width: 1000px) and (min-width: 901px) {
  .brand { gap: 8px; }
  .main-nav { gap: 12px; }
  .main-nav a { font-size: 12px; }
  .main-nav .nav-contact { padding-inline: 11px; }
  .theme-toggle { gap: 5px; padding-inline: 8px; font-size: 10px; }
}

@media (max-width: 900px) {
  html { scroll-padding-top: 72px; }
  .container, .nav-wrap { width: min(100% - 36px, var(--container)); }
  .nav-wrap { min-height: 68px; }
  .brand-mark { width: 35px; height: 35px; }
  .brand-name { font-size: 12px; }
  .menu-toggle { display: grid; width: 42px; height: 42px; place-content: center; gap: 5px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); cursor: pointer; }
  .menu-toggle span { width: 16px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .2s ease; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .main-nav { position: absolute; top: calc(100% + 8px); right: 0; left: 0; display: none; align-items: stretch; flex-direction: column; gap: 0; padding: 8px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow); }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 12px 11px; }
  .main-nav .nav-indicator { display: none; }
  .main-nav a.is-active:not(.nav-contact) { border-radius: 8px; background: var(--nav-active-surface); }
  .main-nav a.is-active:not(.nav-contact)::before { position: absolute; top: 10px; bottom: 10px; left: 0; width: 2px; border-radius: 2px; background: var(--blue); content: ""; }
  .main-nav .nav-contact.is-active { background: var(--nav-active-surface); }
  .main-nav .nav-contact { justify-content: space-between; margin-top: 4px; }
  .main-nav .theme-toggle { width: 100%; justify-content: flex-start; margin: 3px 0; padding: 10px 11px; border-color: transparent; background: transparent; color: var(--nav-text); }
  .main-nav .theme-toggle:hover { border-color: var(--line); background: var(--nav-active-surface); color: var(--ink); }
  .hero-layout { grid-template-columns: 1fr; gap: 52px; padding-block: 64px 68px; }
  .hero-copy { max-width: 610px; }
  .hero h1 { font-size: clamp(41px, 11vw, 58px); }
  .hero-intro { font-size: 15px; }
  .hero-portrait-wrap { width: min(78%, 340px); justify-self: center; }
  .portrait-card img { height: auto; aspect-ratio: 3 / 4; }
  .orbit-one { width: 108%; height: auto; aspect-ratio: 1; left: -4%; }
  .orbit-two { width: 124%; height: auto; aspect-ratio: 1; left: -12%; }
  .chip-top { left: -36px; }
  .chip-bottom { right: -29px; }
  .proof-grid { grid-template-columns: repeat(3, 1fr); gap: 18px 12px; padding-block: 22px; }
  .proof-intro { grid-column: 1 / -1; }
  .proof-item { padding-left: 11px; }
  .proof-item:first-of-type { border-left: 0; padding-left: 0; }
  .proof-item strong { font-size: 25px; }
  .proof-item > span { font-size: 9px; }
  .section { padding-block: 73px; }
  .heading-row { display: block; }
  .section-heading { margin-bottom: 32px; }
  .section-heading h2, .experience-intro h2, .about-copy h2 { font-size: clamp(34px, 9vw, 44px); }
  .section-lead { margin-top: 19px; font-size: 13px; }
  .project-grid { grid-template-columns: 1fr; gap: 16px; }
  .project-visual { height: 180px; }
  .project-content p { min-height: auto; }
  .workflow-steps { grid-template-columns: 1fr; padding: 12px 17px; }
  .workflow-step, .workflow-step:nth-child(2) { min-height: 0; padding: 17px 4px; border-right: 0; border-top: 0; border-bottom: 1px solid rgb(255 255 255 / 10%); }
  .workflow-step:last-child { border-bottom: 0; }
  .workflow-step:not(:last-child)::after, .workflow-step:nth-child(2)::after, .workflow-step:nth-child(3)::after { top: auto; right: auto; bottom: -4px; left: 15px; transform: rotate(135deg); }
  .workflow-step code { min-height: 0; }
  .workflow-footer { flex-wrap: wrap; justify-content: flex-start; gap: 8px 15px; padding: 13px 19px; font-size: 7px; }
  .experience-layout { grid-template-columns: 1fr; gap: 44px; }
  .experience-intro .section-lead { max-width: 500px; }
  .timeline { margin-left: 7px; }
  .timeline-heading h3 { font-size: 19px; }
  .impact-note { margin-top: 29px; }
  .expertise-heading { margin-bottom: 31px; }
  .expertise-heading .section-lead { margin-top: 18px; }
  .expertise-grid { gap: 10px; }
  .expertise-card { min-height: 225px; padding: 17px 14px; }
  .expertise-card h3 { min-height: 39px; font-size: 13px; }
  .expertise-card p { min-height: 78px; font-size: 10px; }
  .expertise-tags span { font-size: 7px; }
  .about-layout { grid-template-columns: 1fr; gap: 28px; }
  .education-card { min-height: 185px; padding: 22px 18px; }
  .contact-layout { grid-template-columns: 1fr; gap: 32px; padding-block: 69px; }
  .contact-section h2 { font-size: clamp(38px, 10vw, 49px); }
  .footer-layout { flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 17px; }
  .footer-layout > p { order: 3; width: 100%; }
}

@media (max-width: 420px) {
  .container, .nav-wrap { width: calc(100% - 30px); }
  .hero-layout { padding-block: 53px 60px; }
  .hero h1 { font-size: 40px; }
  .eyebrow { font-size: 9px; }
  .hero-actions { gap: 18px; }
  .button-primary { min-height: 48px; padding-inline: 13px; font-size: 11px; }
  .hero-location { font-size: 10px; line-height: 1.7; }
  .hero-portrait-wrap { width: 82%; }
  .float-chip { font-size: 9px; }
  .chip-top { left: -24px; }
  .chip-bottom { right: -20px; }
  .proof-grid { gap: 12px 6px; }
  .proof-item { gap: 6px; padding-left: 7px; }
  .proof-item strong { font-size: 22px; }
  .proof-item > span { font-size: 8px; }
  .project-topline { padding-inline: 16px; }
  .project-visual { margin-inline: 14px; }
  .project-content { padding-inline: 17px; }
  .workflow-shell-bar { gap: 8px; padding-inline: 12px; }
  .workflow-shell-bar code { font-size: 9px; }
  .workflow-shell-label { font-size: 7px; letter-spacing: .06em; }
  .workflow-step p { font-size: 10px; }
  .timeline-heading { display: block; }
  .timeline-current { display: inline-block; margin-top: 12px; }
  .expertise-grid { grid-template-columns: 1fr 1fr; }
  .expertise-card { min-height: 246px; padding: 15px 12px; }
  .expertise-card h3 { min-height: 34px; font-size: 12px; }
  .expertise-card p { min-height: 98px; font-size: 9px; }
  .expertise-tags { gap: 4px; }
  .education-card { gap: 12px; }
  .education-card h3 { font-size: 15px; }
  .button-contact, .button-outline { min-height: 62px; padding-inline: 13px; }
  .button-contact span, .button-outline span { font-size: 11px; }
  .footer-brand .brand-name { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; transition-delay: 0ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .motion-ready [data-reveal] { opacity: 1; transform: none; }
}
