/* Staggered entrances for the first screen of every page. */
.hero__intro.reveal,
main > section:first-child .section__head.reveal {
  opacity: 1;
  transform: none;
  transition: none;
}
@media (prefers-reduced-motion: no-preference) {
  .hero__intro > *,
  main > section:first-child .section__head > :not(.certificate-jump) {
    animation: page-text-rise 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: var(--entry-delay, 0s);
  }
  .hero__status {
    --entry-delay: 0.05s;
  }
  .hero__title {
    --entry-delay: 0.13s;
  }
  .hero__role {
    --entry-delay: 0.21s;
  }
  .hero__text {
    --entry-delay: 0.29s;
  }
  .hero__actions {
    --entry-delay: 0.37s;
  }
  .hero__stats {
    --entry-delay: 0.45s;
  }
  main > section:first-child .section__head .eyebrow {
    --entry-delay: 0.05s;
  }
  main > section:first-child .section__head .section__title {
    --entry-delay: 0.15s;
  }
  main > section:first-child .section__head > p {
    --entry-delay: 0.25s;
  }
  @keyframes page-text-rise {
    from {
      opacity: 0;
      transform: translateY(24px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
.footer__nav {
  flex-wrap: wrap;
  justify-content: center;
}

/* Compact tablet and phone layouts. Inputs retain 16px text to avoid iOS zoom. */
@media (max-width: 900px) {
  .section {
    padding: 3.5rem 0;
  }
  .section__head {
    margin-bottom: 2rem;
  }
  .section__title {
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    line-height: 1.15;
  }
  .hero__title {
    font-size: clamp(2rem, 5.5vw, 3.5rem);
    line-height: 1.1;
  }
  .hero__grid,
  .about__grid {
    gap: 2rem;
  }
  .content-card,
  .skill,
  .feature {
    padding: 1.25rem;
  }
  .skills,
  .projects,
  .content-grid,
  .process-grid {
    gap: 1rem;
  }
  .page-cta {
    padding: 1.75rem;
    gap: 1.25rem;
  }
  .page-cta h2 {
    font-size: 1.6rem;
  }
  .nav {
    padding-inline: 1.5rem;
    gap: 1rem;
  }
  .nav__links a {
    font-size: 1rem;
    padding-block: 0.65rem;
  }
  .footer {
    padding: 1.75rem 0;
  }
  .footer__inner {
    font-size: 0.8rem;
  }
  .footer__nav {
    gap: 0.35rem 1rem;
    font-size: 0.8rem;
  }
  .footer__nav a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
  }
}
@media (max-width: 600px) {
  :root {
    --radius: 14px;
    --radius-sm: 10px;
    --header-h: 64px;
  }
  body {
    font-size: 0.875rem;
    line-height: 1.65;
  }
  .wrap {
    padding-inline: 1rem;
  }
  .header__inner {
    min-height: 64px;
    padding: 0.6rem 1rem;
    gap: 0.65rem;
  }
  .logo__badge {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 0.95rem;
  }
  .section {
    padding: 2.5rem 0;
  }
  .section__head {
    margin-bottom: 1.5rem;
  }
  .section__head .section__title {
    margin-top: 0.6rem;
  }
  .section__title {
    font-size: clamp(1.6rem, 6vw, 1.95rem);
  }
  .section__head p {
    font-size: 0.875rem;
    margin-top: 0.75rem;
  }
  .eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.13em;
    gap: 0.5rem;
  }
  .eyebrow::before {
    width: 18px;
  }
  .hero {
    padding: 2rem 0 2.5rem;
  }
  .hero__grid {
    gap: 1.75rem;
  }
  .hero__status {
    font-size: 0.68rem;
    padding: 0.35rem 0.6rem;
    margin-bottom: 1rem;
    line-height: 1.5;
  }
  .hero__title {
    font-size: clamp(1.9rem, 8vw, 2.6rem);
  }
  .hero__role {
    font-size: 1.05rem;
    margin-top: 0.7rem;
  }
  .hero__text {
    font-size: 0.875rem;
    margin-top: 1rem;
  }
  .hero__actions {
    margin-top: 1.3rem;
    gap: 0.65rem;
  }
  .hero__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 1.5rem;
  }
  .stat__num {
    font-size: 1.3rem;
  }
  .stat__label {
    font-size: 0.7rem;
    line-height: 1.5;
  }
  .btn {
    font-size: 0.8rem;
    min-height: 44px;
    padding: 0.6rem 0.9rem;
    gap: 0.45rem;
  }
  .code-card__bar {
    padding: 0.65rem 0.8rem;
  }
  .code-card__bar i {
    width: 9px;
    height: 9px;
  }
  .code-card__file {
    font-size: 0.68rem;
  }
  .code-card pre {
    padding: 1rem;
    font-size: 0.7rem;
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  .about__grid {
    gap: 1.5rem;
  }
  .about__text p {
    font-size: 0.875rem;
    margin-bottom: 0.9rem;
  }
  .feature,
  .skill,
  .content-card {
    padding: 1rem;
  }
  .feature__ic {
    width: 36px;
    height: 36px;
    margin-bottom: 0.65rem;
  }
  .feature h3,
  .content-card h3,
  .practice-note h3 {
    font-size: 1rem;
  }
  .feature p,
  .content-card p,
  .skill p,
  .practice-note p {
    font-size: 0.83rem;
  }
  .content-card > i {
    font-size: 1.2rem;
    margin-bottom: 0.85rem;
  }
  .text-link {
    font-size: 0.8rem;
    padding-top: 1rem;
  }
  .skill__name {
    font-size: 1rem;
    gap: 0.4rem;
  }
  .skill__pct {
    font-size: 0.78rem;
  }
  .skill p {
    margin-bottom: 0.75rem;
  }
  .bar {
    height: 5px;
  }
  .also {
    margin-top: 1.75rem;
  }
  .also h3 {
    font-size: 1rem;
    margin-bottom: 0.9rem;
  }
  .chips {
    gap: 0.45rem;
  }
  .chip {
    padding: 0.3rem 0.6rem;
    font-size: 0.72rem;
  }
  .practice-note {
    margin-top: 1.25rem;
    padding: 1rem;
    gap: 0.65rem;
  }
  .practice-note > i {
    font-size: 1.1rem;
  }
  .project__top {
    padding: 0.75rem 0.9rem;
  }
  .browser-bar {
    gap: 0.3rem;
  }
  .browser-bar i {
    width: 8px;
    height: 8px;
  }
  .browser-url {
    font-size: 0.67rem;
    margin-left: 0.3rem;
    padding-inline: 0.45rem;
  }
  .project__body {
    padding: 1rem;
    gap: 0.65rem;
  }
  .project__body h3 {
    font-size: 1.12rem;
  }
  .project__body > p,
  .project__features li {
    font-size: 0.83rem;
  }
  .project__badge {
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.5rem;
  }
  .project__links a {
    font-size: 0.8rem;
    min-height: 40px;
  }
  .tech {
    gap: 0.35rem;
  }
  .tech span {
    font-size: 0.65rem;
    padding: 0.2rem 0.45rem;
  }
  .work-count {
    font-size: 0.8rem;
    gap: 0.4rem;
    margin-top: 0;
    margin-bottom: 1.25rem;
  }
  .contact__card {
    padding: 1.1rem;
    gap: 1.75rem;
  }
  .contact__left h3 {
    font-size: 1.15rem;
    margin-bottom: 1rem;
  }
  .contact__row {
    gap: 0.6rem;
    margin-bottom: 0.9rem;
  }
  .contact__ic {
    width: 34px;
    height: 34px;
  }
  .contact__ic i {
    font-size: 1rem;
  }
  .contact__row a,
  .contact__row p {
    font-size: 0.8rem;
  }
  .contact__right h2 {
    font-size: 1.5rem;
  }
  .contact__right p {
    font-size: 0.83rem;
    margin-bottom: 1rem;
  }
  .socials {
    margin-top: 1.2rem;
    gap: 0.6rem;
  }
  .contact__form {
    margin-top: 0.75rem;
    gap: 0.8rem;
  }
  .field label {
    font-size: 0.7rem;
    letter-spacing: 0.05em;
  }
  .field input,
  .field textarea {
    padding: 0.6rem 0.75rem;
    font-size: 1rem;
  }
  .contact-guide {
    gap: 1.25rem;
  }
  .check-list {
    margin-top: 0.85rem;
    gap: 0.6rem;
    font-size: 0.83rem;
  }
  .faq summary {
    font-size: 0.9rem;
  }
  .faq details {
    padding-block: 1rem;
  }
  .faq details p {
    font-size: 0.83rem;
    padding-top: 0.7rem;
  }
  .page-cta {
    padding: 1.2rem;
    gap: 1rem;
  }
  .page-cta h2 {
    font-size: 1.4rem;
    margin-block: 0.65rem;
  }
  .page-cta p {
    font-size: 0.83rem;
  }
  .footer {
    padding: 1.35rem 0;
  }
  .footer__inner {
    gap: 0.4rem;
    font-size: 0.75rem;
    flex-direction: column;
    text-align: center;
  }
  .footer__nav {
    gap: 0.2rem 0.85rem;
    font-size: 0.75rem;
  }
  .footer small {
    font-size: 0.67rem;
  }
  .to-top {
    width: 42px;
    height: 42px;
    right: 0.75rem;
    bottom: 0.75rem;
  }
}
@media (min-width: 400px) and (max-width: 600px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 360px) {
  .wrap,
  .header__inner {
    padding-inline: 0.8rem;
  }
  .hero__title {
    font-size: 1.9rem;
  }
  .hero__actions {
    gap: 0.5rem;
  }
  .hero__actions .btn {
    padding-inline: 0.75rem;
  }
  .content-card,
  .skill,
  .feature,
  .contact__card {
    padding: 0.9rem;
  }
}
