/*
  CYRILLINK — ACCUEIL PORTRAIT
  Une composition éditoriale en une colonne : identité, portrait, puis profil.
  Ce fichier est chargé après responsive.css et ne concerne que le portrait.
*/
@media (max-width: 850px) and (orientation: portrait) {
  html {
    background: #05070a;
  }

  body {
    overflow-x: hidden;
  }

  .site-header {
    height: 64px;
    padding: 0 16px;
  }

  .identity {
    min-width: 0;
  }

  .identity img {
    height: 42px;
  }

  nav {
    top: 64px;
    grid-template-columns: 1fr;
    padding: 8px 16px 14px;
  }

  nav a,
  nav button {
    padding: 13px 6px;
    text-align: left;
  }

  .panel-backdrop {
    inset: 64px 0 0;
  }

  .side-panel {
    top: 64px;
    height: calc(100svh - 64px);
    width: 100%;
    padding: 20px 18px 38px;
  }

  .index-main {
    width: min(100% - 32px, 560px);
    height: auto;
  }

  .hero-v4 {
    min-height: 0;
    padding: 34px 0 46px;
    gap: 34px;
  }

  .portrait-column {
    order: 1;
    width: min(100%, 320px);
    justify-self: center;
  }

  .portrait-wrap {
    aspect-ratio: 4 / 5;
    padding: 9px;
  }

  .portrait-coords {
    bottom: 17px;
    left: 18px;
    font-size: .48rem;
  }

  .photo-switch {
    margin-top: 11px;
    font-size: .5rem;
  }

  .portrait-caption {
    margin-top: 16px;
    padding-left: 11px;
  }

  .portrait-caption span {
    font-size: .72rem;
  }

  .portrait-caption small {
    font-size: .5rem;
    line-height: 1.45;
  }

  .hero-content {
    order: 2;
    max-width: none;
  }

  .terminal {
    margin-bottom: 18px;
    font-size: .56rem;
  }

  .eyebrow {
    gap: 7px;
    margin-bottom: 13px;
    font-size: .5rem;
    letter-spacing: .1em;
  }

  .hero-content h1 {
    font-size: clamp(4.1rem, 20vw, 6.3rem);
    line-height: .73;
  }

  .hero-role {
    margin-top: 25px;
  }

  .hero-role p {
    font-size: 1rem;
  }

  .lead {
    margin-top: 19px;
    font-size: .91rem;
    line-height: 1.72;
  }

  .hero-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 24px;
  }

  .button-main,
  .button-line {
    min-height: 46px;
    padding: 12px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .55rem;
  }

  .button-main b,
  .button-line b {
    margin-left: 8px;
  }

  .profile-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 30px;
  }

  .profile-facts div {
    min-width: 0;
    padding: 12px 8px;
  }

  .profile-facts small,
  .profile-facts strong {
    overflow-wrap: anywhere;
  }

  .quick-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 26px;
  }

  .quick-metrics div {
    min-width: 0;
    padding: 0 8px;
  }

  .quick-metrics strong {
    font-size: .98rem;
    white-space: nowrap;
  }

  .quick-metrics small {
    font-size: .45rem;
    line-height: 1.3;
  }

  .network-art {
    display: none;
  }

  .big-code {
    right: -5%;
    bottom: 0;
    font-size: 29vw;
  }

  .site-footer {
    width: min(100% - 32px, 560px);
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 18px 0 24px;
    font-size: .46rem;
  }

  .footer-right {
    margin-left: 0;
  }
}

@media (max-width: 380px) and (orientation: portrait) {
  .hero-v4 {
    padding-top: 28px;
  }

  .portrait-column {
    width: min(100%, 285px);
  }

  .hero-content h1 {
    font-size: clamp(3.6rem, 19vw, 4.7rem);
  }

  .eyebrow {
    flex-wrap: wrap;
    line-height: 1.6;
  }

  .hero-buttons {
    grid-template-columns: 1fr;
  }
}
