/* Keep all editorial content in normal reading order; only the terrain is animated. */
@media screen {
  .hero {
    --scene-ground: #0f2132;
    --scene-paper: #f9f5ea;
    --scene-gold: #edd5a9;
    --scene-inset: max(var(--gutter), calc((100vw - var(--content)) / 2));
    display: grid;
    width: 100%;
    max-width: none;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 0;
    padding: 0;
    background: var(--scene-ground);
    color: var(--scene-paper);
    isolation: isolate;
  }
  .hero .hero-copy {
    display: block;
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    min-width: 0;
    max-width: none;
    padding: clamp(1.8rem, 4.4vw, 4.25rem) 1.25rem clamp(2.1rem, 4.7vw, 4.5rem) var(--scene-inset);
  }
  .hero .hero-credentials { border-color: #485361; }
  .hero .hero-credential { border-inline-start-color: #c5a76e; }
  .hero :is(h1, .hero-credential strong, .qualification-shortcut) { color: var(--scene-paper); }
  .hero .hero-credential span, .hero .hero-education, .hero .hero-thai { color: #c8d2da; }
  .hero .hero-education a:hover, .hero .hero-education a:focus-visible { color: var(--scene-paper); }
  .hero .eyebrow, .hero .target-role { color: var(--scene-gold); }
  .hero .hero-description { color: #d4dce1; }
  .hero .hero-actions .primary { background: var(--scene-gold); border-color: var(--scene-gold); color: #172838; }
  .hero .hero-actions .primary:hover { background: #fff0d5; }
  .hero .hero-actions .secondary { color: var(--scene-paper); border-color: #758390; }
  .hero .hero-actions .secondary:hover { background: #293a49; }
  .hero .profile-panel { display: contents; }
  .hero .ridge-stage {
    grid-column: 2;
    grid-row: 1;
    height: auto;
    min-height: clamp(28rem, 48vw, 41rem);
    margin: 0;
    border-radius: 0;
    background: radial-gradient(ellipse at 62% 45%, #243b50 0%, #172c3f 50%, var(--scene-ground) 80%);
  }
  .hero .ridge-stage > svg, .scene-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    mask-image: linear-gradient(to right, transparent, black 16%);
  }
  .scene-canvas { opacity: 0; }
  .ridge-stage.has-terrain .scene-canvas { opacity: 1; }
  .ridge-stage.has-terrain > svg { opacity: 0; }
  .scene-replay {
    position: absolute;
    right: var(--scene-inset);
    bottom: clamp(1.4rem, 3.4vw, 3rem);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    min-height: 44px;
    padding: .4rem .9rem;
    color: #f6e7ce;
    border: 1px solid #7b786e;
    border-radius: 2rem;
    background: #142636;
    font-size: .83rem;
  }
  .scene-replay[hidden] { display: none; }
  .scene-replay:hover, .scene-replay:focus-visible { border-color: #f1d2a0; background: #2d3d49; }
  .scene-play-mark { width: 0; height: 0; border-block: .3rem solid transparent; border-left: .48rem solid currentColor; }
  .hero .profile-panel .profile-aside {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: minmax(11rem, 1fr) minmax(0, 3fr);
    align-items: start;
    gap: clamp(1.25rem, 3vw, 3rem);
    margin: 0;
    padding: clamp(1.5rem, 3vw, 2.5rem) var(--scene-inset);
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: var(--paper);
  }
  .hero .profile-panel .profile-aside h2 { color: var(--navy); margin: 0; }
  .hero .profile-panel .profile-aside p { max-width: 46rem; margin: 0; padding: 0; border: 0; color: var(--ink); }
  html[data-motion="full"] .scene-approach-seen > * { animation: approach-arrive .72s var(--ease) both; }
  html[data-motion="full"] .scene-approach-seen > p { animation-delay: .09s; }
  @keyframes approach-arrive {
    from { opacity: .35; transform: translateY(22px); }
    to { opacity: 1; transform: none; }
  }
  #research { border-top: 0; }
}

@media screen and (max-width: 900px) {
  .hero { display: flex; flex-direction: column; align-items: stretch; }
  .hero .hero-copy { display: contents; }
  .hero > .hero-copy > * { margin-inline: var(--scene-inset); }
  .hero .hero-credentials { order: -7; margin-top: 1.2rem; }
  .hero .hero-education { order: -6; }
  .hero .eyebrow { order: -5; align-self: flex-start; margin-block: 1.2rem .65rem; }
  .hero h1 { order: -4; }
  .hero-thai { order: -3; }
  .hero .target-role { order: -2; margin-top: .8rem; }
  .hero .ridge-stage {
    order: -1;
    height: clamp(13.6rem, 41vw, 22rem);
    min-height: 0;
    margin-top: .65rem;
  }
  .hero .ridge-stage > svg, .scene-canvas { mask-image: none; }
  .scene-replay { right: var(--scene-inset); bottom: .25rem; }
  .hero .hero-actions { margin-bottom: 1.65rem; }
  .hero .profile-panel .profile-aside { order: 2; grid-template-columns: 1fr; gap: .85rem; }
}

@media print {
  .scene-replay, .scene-canvas { display: none !important; }
}
