/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

  :root {
    --side: 22px;
  }


  .header {
    height: 72px;

    grid-template-columns:
      1fr auto;
  }


  .nav,
  .header__index {
    display: none;
  }


  .menu-toggle {
    display: flex;

    width: 40px;
    height: 40px;

    flex-direction: column;

    justify-content: center;

    gap: 6px;
  }


  .menu-toggle span {
    display: block;

    width: 25px;
    height: 1px;

    background: currentColor;
  }


  /* HERO */

  .hero {
    min-height: 700px;
  }


  .hero__top {
    top: 90px;
  }


  .hero__first {
    top: 25%;
  }


  .hero__first > span {
    font-size: 14.5vw;
  }


  .hero__photo {
    width: 78vw;

    aspect-ratio: 4 / 3;

    left: 50%;
    top: 49%;

    transform:
      translate(-50%, -50%);
  }


  .hero__image {
    object-position:
      61% 46%;
  }


  .hero__middle {
    left: 2%;
    top: 47%;
  }


  .hero__middle span {
    font-size: 14vw;
  }


  .hero__last {
    top: 61%;
    right: -2%;
  }


  .hero__last > span {
    font-size: 14.8vw;
  }


  .hero__footer {
    grid-template-columns:
      1fr
      auto;
  }


  .hero__fields {
    display: none;
  }


  /* ABOUT */

  .about {
    min-height: auto;
  }


  .about__layout {
    grid-template-columns:
      1fr;

    gap: 50px;
  }


  .about__aside {
    display: grid;

    grid-template-columns:
      1fr
      150px;

    align-items: start;
  }


  .about__portrait {
    margin: 0;

    justify-self: end;

    width: 150px;
  }


  .about__headline {
    font-size:
      clamp(43px, 9vw, 76px);
  }


  .about__details {
    grid-template-columns:
      1fr;

    gap: 40px;
  }


  .arrow-link {
    justify-self: start;
  }


  /* CURSOR */

  .cursor {
    display: none;
  }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 560px) {

  .hero {
    height: 100svh;
    min-height: 630px;
  }


  .hero__top span:last-child {
    display: none;
  }


  .hero__first {
    top: 25%;
  }


  .hero__first > span {
    font-size: 15.5vw;
  }


  .hero__photo {
    width:
      calc(100vw - 44px);

    aspect-ratio: 1 / 1.06;

    top: 49%;
  }


  .hero__image {
    object-position:
      64% center;
  }


  .hero__middle {
    top: 46%;
  }


  .hero__middle span {
    font-size: 17vw;
  }


  .hero__last {
    top: 65%;
  }


  .hero__last > span {
    font-size: 16vw;
  }


  .hero__last::after {
    height: 2px;

    bottom: -9px;
  }


  .hero__photo-meta {
    display: none;
  }


  .hero__footer {
    bottom: 22px;
  }


  .hero__identity {
    display: block;
  }


  .hero__identity .micro {
    display: block;

    margin-bottom: 7px;
  }


  .hero__identity p {
    font-size: 11px;
  }


  .hero__scroll > span {
    display: none;
  }


  .hero__scroll > i {
    width: 43px;
    height: 43px;
  }


  /* ABOUT */

  .about {
    padding-top: 100px;
  }


  .about__layout {
    margin-top: 65px;
  }


  .about__aside {
    grid-template-columns:
      1fr
      110px;
  }


  .about__portrait {
    width: 110px;
  }


  .about__headline {
    font-size: 11.2vw;

    line-height: .98;
  }


  .about__details {
    margin-top: 45px;
  }


  .ticker {
    margin-top: 100px;

    padding: 20px 0;
  }


  .next-scene {
    min-height: 70vh;

    padding-top: 70px;
    padding-bottom: 50px;
  }


  .next-scene__title {
    font-size: 15vw;
  }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }


  *,
  *::before,
  *::after {
    animation-duration:
      .01ms !important;

    animation-iteration-count:
      1 !important;

    transition-duration:
      .01ms !important;
  }


  .intro {
    display: none !important;
  }


  .header,
  .hero__top,
  .hero__first > span,
  .hero__middle,
  .hero__last > span,
  .hero__footer,
  .reveal,
  .line-mask > span {
    opacity: 1 !important;

    transform:
      none !important;
  }


  .hero__photo-reveal {
    clip-path:
      inset(0) !important;
  }


  .hero__image {
    transform:
      none !important;
  }

}


/* =========================================================
   FINAL POLISH 03 — RESPONSIVE SYSTEM
   Keeps the approved editorial composition while improving
   readability, spacing and touch ergonomics on smaller screens.
========================================================= */

/* Fluid gutters across laptop / tablet / mobile. */
@media (max-width: 1200px) {
  .container,
  .nav,
  .hero__inner,
  .site-footer {
    --page-gutter: clamp(24px, 4vw, 56px);
  }
}

@media (max-width: 900px) {
  /* Keep section rhythm generous without wasting vertical space. */
  section {
    scroll-margin-top: 76px;
  }

  /* Long descriptive lines should never span the full viewport. */
  .career-item p,
  .profile-data__value,
  .contact-location address p {
    max-width: 68ch;
  }

  /* Touch targets: visual size stays compact, hit area becomes safer. */
  .nav__links a,
  .nav__cv,
  .contact-link,
  .site-footer__navigation a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* Prevent long email/address strings from breaking the layout. */
  .contact-primary__value,
  .contact-link__value,
  .contact-location address,
  .site-footer a {
    overflow-wrap: anywhere;
    word-break: normal;
  }
}

@media (max-width: 700px) {
  /*
    Preserve the dramatic headings, but keep them inside the viewport.
    Existing section-specific sizes still control the visual hierarchy.
  */
  .hero__title,
  .profile__statement,
  .training__title,
  .contact__title,
  .recognition__title,
  .education__title {
    max-width: 100%;
    overflow-wrap: normal;
  }

  /* More comfortable reading measure on phones. */
  .career-item p {
    max-width: 100%;
  }

  .course__source,
  .profile-data__caption {
    line-height: 1.55;
  }

  /* Skill rows need breathing room for label + percentage. */
  .capability {
    padding-block: clamp(16px, 4vw, 22px);
  }

  .capability__top {
    gap: 16px;
    align-items: baseline;
  }
}

@media (max-width: 560px) {
  /* Global phone gutter. */
  :root {
    --mobile-gutter: 20px;
  }

  /* Avoid accidental horizontal scroll from oversized editorial elements. */
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }

  /* Improve mobile section rhythm. */
  .section-head {
    margin-bottom: clamp(24px, 7vw, 40px);
  }

  /* Make metadata readable while preserving its compact editorial role. */
  .profile__top-meta,
  .training__range,
  .contact__top-meta {
    line-height: 1.5;
  }

  .career-item p,
  .profile-data__value,
  .profile-fact__value,
  .contact-location address p {
    line-height: 1.7;
  }

  /* Interactive links should be easy to tap. */
  .contact-link,
  .site-footer__navigation a,
  .nav__cv {
    min-height: 44px;
  }

  /* Keep percentages aligned even with longer skill labels. */
  .capability__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 14px;
  }

  .capability__top > span:nth-child(2) {
    min-width: 0;
  }

  .capability__top strong {
    white-space: nowrap;
  }
}

@media (max-width: 380px) {
  /*
    Very small phones: protect the design from clipping without
    shrinking informative text back to unreadable sizes.
  */
  .contact-primary__value,
  .contact-link__value {
    font-size: clamp(1rem, 5.2vw, 1.2rem);
  }

  .capability__top {
    column-gap: 10px;
  }
}

/* Device accessibility preferences. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
}

/* Better output if the page is printed or saved as PDF. */
@media print {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  nav,
  .scroll-cue,
  .cursor,
  .cursor-dot {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #111 !important;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}

/* Mobile layout and motion safeguards */
html { overflow-x: clip; }
@media (max-width: 900px) {
 .career__sticky,.career__sidebar {position:relative!important;top:auto!important;}
 .career__year,.career__year-wrap {max-width:100%;} .career__year {font-size:clamp(30px,7vw,54px);}
 .contact-link,.contact-links,.contact-link__value {min-width:0;max-width:100%;}
 .contact-link strong,.contact-link__value,.contact-primary__value {overflow-wrap:anywhere;line-height:1.25;}
 .contact-name__main {font-size:clamp(50px,13vw,120px);letter-spacing:-.085em;margin-left:0;}
 .site-footer {overflow:hidden;}
}
/* Preserve content when system requests reduced motion */
@media (prefers-reduced-motion: reduce) {
 .intro {display:none!important;} body.is-loading {overflow:auto!important;}
 .header,.hero__top,.hero__middle,.hero__footer,.reveal {opacity:1!important;transform:none!important;}
 .hero__first>span,.hero__last>span,.line-mask>span {transform:none!important;}
 .hero__photo-reveal {clip-path:none!important;}
}
