/* The document keeps its native scroll; the introduction uses one sticky stage. */
.portfolio-journey {
  --journey-nav: 80px;
  --journey-ink: #f7f3ff;
  --journey-muted: #d0cbe2;
  --device-metal: #484759;
  background: var(--bg-primary);
}
.journey-intro { position: relative; background: #101021; color: var(--journey-ink); }
.journey-stage {
  position: relative; min-height: 740px; height: calc(100svh - var(--journey-nav));
  max-height: 980px; overflow: clip; isolation: isolate;
  background: radial-gradient(ellipse at 78% 80%, #39275c 0, #18142b 40%, #101021 75%);
}
.journey-light { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 35%, #9185c414 64%, transparent 84%); }
.journey-intro .hero-copy {
  position: relative; z-index: 3; width: 48%; max-width: 680px;
  padding: clamp(5rem, 10vh, 8rem) 0 7rem;
  margin-left: max(2rem, calc((100vw - 1320px) / 2));
}
.journey-intro .hero-name { margin: 0; color: #fff; font-size: clamp(2.5rem, 4.5vw, 4.75rem); font-weight: 750; letter-spacing: -.035em; line-height: 1.03; }
.journey-intro .hero-name-line, .journey-intro .hero-name-group { display: flex; flex-wrap: wrap; column-gap: .23em; }
.journey-intro .hero-name-line { flex-direction: column; gap: .08em; }
.journey-intro .hero-name-gradient { color: #c5b7f5; }
.journey-intro .hero-word { display: inline-flex; white-space: nowrap; overflow: clip; padding: .12em 0; margin: -.12em 0; }
.journey-intro .hero-letter { display: inline-block; transform-origin: 50% 100%; }
.journey-intro .hero-greeting { color: #efe9ff; font-size: clamp(1.15rem, 1.65vw, 1.5rem); line-height: 1.45; margin: 1.6rem 0 1.35rem; }
.journey-intro .hero-role { color: #eee9fb; font-size: clamp(1.05rem, 1.7vw, 1.35rem); line-height: 1.5; margin: 0; }
.journey-intro .hero-rotate-words { display: inline-block; color: #f5f3ff; font-weight: 600; }
.journey-intro .hero-subtitle { display: block; color: #c4bcd9; font-size: .95rem; margin-top: .3rem; }
.journey-intro .hero-description { color: #cfc8de; font-size: 1rem; line-height: 1.75; max-width: 45ch; margin: 1.1rem 0 1.8rem; }
.journey-intro .hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.journey-open, .journey-skip { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; gap: .65rem; text-decoration: none; }
.journey-open { background: #c4b5fd; color: #201137; padding: .8rem 1.35rem; border-radius: 10px; font-weight: 700; transition: background-color 180ms, color 180ms; }
.journey-open:hover { background: #ded5ff; color: #201137; }
.journey-skip { color: #e2d8f3; font-size: .9rem; text-decoration: underline; text-underline-offset: .3em; transition: color 180ms; }
.journey-skip:hover { color: #fff; }
.journey-open:focus-visible, .journey-skip:focus-visible { outline: 2px solid #fff; outline-offset: 5px; }
.journey-visual { position: absolute; z-index: 2; right: 4%; bottom: 100px; width: min(42vw, 590px); height: min(67vh, 640px); min-height: 480px; pointer-events: none; }
.journey-person { position: absolute; bottom: 34px; left: 50%; width: min(74%, 390px); transform: translateX(-50%); }
.journey-person img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; transform-origin: 50% 80%; }
.journey-person-present { position: absolute; inset: 0; opacity: 0; }
.laptop-rig { position: absolute; width: 100%; height: auto; aspect-ratio: 1.63; bottom: 0; left: 0; perspective: 1600px; transform-origin: 50% 48%; }
.laptop-lid { position: absolute; inset: 0 4% 12%; border: 2px solid #77748a; border-bottom-width: 3px; border-radius: 15px 15px 6px 6px; background: #14141b; padding: 13px 10px 19px; transform-origin: 50% 100%; transform-style: preserve-3d; box-shadow: 0 18px 40px #06041055; }
.laptop-camera { position: absolute; top: 4px; left: calc(50% - 2px); width: 4px; height: 4px; border-radius: 50%; background: #638098; box-shadow: 0 0 0 1px #353343; }
.laptop-brand { position: absolute; bottom: 2px; left: 0; width: 100%; text-align: center; color: #aaa7ba; font-size: 8px; letter-spacing: .12em; }
.laptop-display { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 3px; background: #101021; }
.laptop-preview { height: 100%; background: var(--bg-primary); color: var(--text-primary); }
.laptop-preview-bar { display: flex; gap: 4px; align-items: center; height: 19px; padding: 0 8px; background: var(--bg-secondary); color: var(--text-secondary); font-size: 6px; }
.laptop-preview-bar i { width: 4px; height: 4px; border-radius: 50%; background: #9684ba; }
.laptop-preview-bar span { margin: auto; }
.laptop-preview-body { padding: 5% 6%; }
.laptop-preview-title { text-align: center; color: var(--primary-color); font-size: clamp(9px, 1.15vw, 16px); font-weight: 700; }
.laptop-preview-rule { width: 28px; height: 2px; background: #8060bd; margin: 7px auto 14px; }
.laptop-preview-profile { display: grid; grid-template-columns: 28% 1fr; gap: 7%; align-items: center; }
.laptop-preview-profile img { width: 100%; height: auto; max-height: 120px; object-fit: contain; }
.laptop-preview-profile b { font-size: clamp(8px, .85vw, 12px); line-height: 1.3; color: var(--text-primary); }
.laptop-preview-profile p { color: var(--text-secondary); font-size: clamp(6px, .6vw, 9px); line-height: 1.5; margin: 6px 0; }
.laptop-preview-skills { display: flex; flex-wrap: wrap; gap: 4px; font-size: 6px; }
.laptop-preview-skills span { padding: 3px 4px; background: #e8dff9; color: #614395; border-radius: 3px; }
.laptop-preview-nav { display: flex; justify-content: space-around; margin-top: 9px; padding-top: 7px; border-top: 1px solid var(--border-primary); color: var(--primary-color); font-size: 7px; }
.laptop-screen-shade { position: absolute; inset: 0; background: #11111c; opacity: 0; }
.laptop-screen-reflection { position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, #ffffff12 50%, transparent 51%); pointer-events: none; }
.laptop-keyboard { position: absolute; left: 1%; bottom: 1%; width: 98%; height: 26%; transform: rotateX(62deg); transform-origin: 50% 100%; background: linear-gradient(#9996a7, #626170); border: 1px solid #aea9bc; border-radius: 3px 3px 14px 14px; }
.laptop-key-grid { width: 77%; height: 43%; margin: 4% auto 0; border-radius: 3px; background: repeating-linear-gradient(90deg, transparent 0 5%, #85818f 5% 6%), repeating-linear-gradient(0deg, #282731 0 25%, #85818f 25% 31%); }
.laptop-trackpad { width: 24%; height: 30%; margin: 3% auto; border: 1px solid #aaa6b5; border-radius: 3px; }
.laptop-base { position: absolute; left: -2%; bottom: -2%; width: 104%; height: 13px; background: linear-gradient(#a6a3b4, #62606d 65%, #393744); border-radius: 2px 2px 50% 50% / 2px 2px 90% 90%; box-shadow: 0 12px 20px #04030b66; }
.laptop-base span { display: block; margin: 0 auto; width: 15%; height: 4px; background: #514e5f; border-radius: 0 0 5px 5px; }
.journey-scroll-cue { position: absolute; z-index: 4; bottom: 32px; left: 0; width: 100%; display: grid; justify-items: center; gap: 13px; color: #dbd1ee; font-size: .875rem; text-align: center; padding-inline: 16px; }
[data-journey-cue]:not([data-journey-cue="welcome"]) { display: none; }
.journey-progress { width: 110px; height: 2px; background: #ffffff24; overflow: hidden; }
.journey-progress > span { display: block; height: 100%; background: #c7b4f4; transform: scaleX(0); transform-origin: left; }
.portfolio-journey[data-journey-ready="true"][data-journey-mode="full"] .journey-intro { height: 245svh; }
.portfolio-journey[data-journey-mode="full"] .journey-stage { position: sticky; top: var(--journey-nav); min-height: 0; max-height: none; }
.portfolio-journey[data-journey-phase="opening"] [data-journey-cue], .portfolio-journey[data-journey-phase="inside"] [data-journey-cue] { display: none; }
.portfolio-journey[data-journey-phase="opening"] [data-journey-cue="opening"], .portfolio-journey[data-journey-phase="inside"] [data-journey-cue="inside"] { display: block; }
.portfolio-journey:not([data-journey-past-intro="true"]) .ai-greeting { display: none; }
.portfolio-device { position: relative; width: calc(100% - 32px); max-width: 1280px; margin: 2.5rem auto 3rem; border: 8px solid var(--device-metal); border-radius: 22px 22px 14px 14px; background: #282634; box-shadow: 0 28px 65px #1009281c; }
.device-chrome { position: sticky; top: var(--journey-nav); z-index: 20; min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 4px 18px; background: #272532; color: #e7e2f1; border-bottom: 1px solid #454052; border-radius: 12px 12px 0 0; }
.device-camera { width: 7px; height: 7px; border-radius: 50%; background: #697682; box-shadow: inset 0 0 0 2px #171721; }
.device-address { color: #c9bfd9; font-size: .8rem; white-space: nowrap; }
.device-current { display: flex; align-items: center; gap: 9px; margin-left: auto; font-size: .85rem; }
.device-guide-face { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: #454052; flex-shrink: 0; }
.device-guide-face img { display: block; width: 60px; max-width: none; height: 90px; margin-left: -12px; margin-top: -3px; }
.device-current [data-guide-section], .portfolio-guide [data-guide-section] { display: none; }
[data-active-section="about"] [data-guide-section="about"], [data-active-section="skills"] [data-guide-section="skills"], [data-active-section="experience"] [data-guide-section="experience"], [data-active-section="projects"] [data-guide-section="projects"], [data-active-section="education"] [data-guide-section="education"], [data-active-section="languages"] [data-guide-section="languages"], [data-active-section="contact"] [data-guide-section="contact"] { display: inline; }
.portfolio-screen { position: relative; background: var(--bg-primary); overflow: clip; }
.portfolio-screen section { scroll-margin-top: calc(var(--journey-nav) + 64px); }
.portfolio-screen > section > .container { max-width: 100%; }
.device-base { position: sticky; bottom: 0; z-index: 21; height: 18px; margin: 0 -12px -8px; border-radius: 0 0 32px 32px / 0 0 12px 12px; background: linear-gradient(#b1acbe, #706a7f 60%, #4b4658); }
.device-base::before { content: ""; display: block; margin: 0 auto; width: 14%; height: 5px; background: #5d586c; border-radius: 0 0 6px 6px; }
.portfolio-guide { display: none; position: fixed; z-index: 24; width: 138px; left: 16px; bottom: 50px; opacity: 0; visibility: hidden; pointer-events: none; }
.portfolio-guide-portrait img { width: 100%; height: auto; display: block; }
.portfolio-guide-caption { color: var(--text-primary); font-size: .86rem; font-weight: 500; line-height: 1.6; text-align: center; margin: 8px 0 14px; }
.portfolio-guide-line { display: block; width: 34px; height: 2px; background: var(--primary-color); margin: auto; }
@media (min-width: 1200px) {
  .portfolio-device { width: calc(100% - 208px); margin-left: auto; margin-right: max(32px, calc((100vw - 1540px) / 2)); }
  .portfolio-guide { display: block; left: max(16px, calc((100vw - 1580px) / 2)); }
}
@media (min-width: 760px) and (max-width: 1050px) {
  .journey-intro .hero-copy { margin-left: 24px; width: 50%; }
  .journey-intro .hero-name { font-size: clamp(2.2rem, 4.1vw, 3rem); }
  .journey-visual { right: 1%; width: 45vw; min-height: 420px; }
  .journey-intro .hero-description { max-width: 35ch; }
}
@media (max-width: 759px) {
  .journey-stage { min-height: 760px; height: auto; max-height: none; padding-top: 22px; padding-bottom: 340px; }
  .journey-intro .hero-copy { width: auto; max-width: 600px; margin: 0 auto; padding: 0 20px; text-align: center; }
  .journey-intro .hero-name { font-size: clamp(1.85rem, 8.8vw, 3.45rem); line-height: 1.07; }
  .journey-intro .hero-name-group { justify-content: center; }
  .journey-intro .hero-greeting { font-size: 1.05rem; margin: 12px 0 10px; }
  .journey-intro .hero-role { font-size: .94rem; line-height: 1.4; }
  .journey-intro .hero-subtitle { font-size: .8rem; margin-top: 4px; }
  .journey-intro .hero-description { display: none; }
  .journey-intro .hero-actions { justify-content: center; margin-top: 16px; gap: 6px 18px; }
  .journey-open { min-height: 44px; padding: 9px 14px; font-size: .9rem; }
  .journey-skip { font-size: .78rem; min-height: 44px; }
  .journey-visual { width: min(78vw, 380px); height: 310px; min-height: 0; right: 50%; bottom: 65px; transform: translateX(50%); }
  .journey-person { width: clamp(200px, 27svh, 240px); bottom: 18px; }
  .laptop-rig { width: 100%; bottom: 0; }
  .laptop-lid { border-radius: 9px 9px 4px 4px; padding: 8px 6px 12px; }
  .laptop-brand { font-size: 5px; bottom: 1px; }
  .laptop-camera { top: 2px; width: 3px; height: 3px; }
  .laptop-preview-title { font-size: 10px; }
  .laptop-preview-rule { margin: 4px auto 7px; }
  .laptop-preview-profile b { font-size: 8px; }
  .laptop-preview-profile p { font-size: 6px; line-height: 1.4; }
  .laptop-preview-profile img { max-height: 72px; }
  .laptop-preview-skills { display: none; }
  .laptop-preview-nav { margin-top: 5px; padding-top: 4px; font-size: 6px; }
  .laptop-preview-bar { height: 13px; font-size: 5px; }
  .laptop-base { height: 8px; }
  .journey-scroll-cue { bottom: 23px; font-size: .78rem; gap: 9px; }
  .portfolio-journey[data-journey-ready="true"][data-journey-mode="full"] .journey-intro { height: 190svh; }
  .portfolio-journey[data-journey-mode="full"] .journey-stage { height: calc(100svh - var(--journey-nav)); min-height: 660px; padding-bottom: 0; }
  .portfolio-device { width: calc(100% - 16px); border-width: 5px; border-radius: 14px; margin-top: 1rem; }
  .device-chrome { min-height: 46px; padding: 4px 9px; gap: 7px; border-radius: 8px 8px 0 0; }
  .device-camera { display: none; }
  .device-address { font-size: .65rem; }
  .device-current { font-size: .72rem; gap: 6px; }
  .device-base { height: 12px; margin: 0 -6px -5px; }
  .portfolio-screen section { scroll-margin-top: calc(var(--journey-nav) + 54px); }
}
@media (max-height: 720px) and (min-width: 760px) {
  .journey-intro .hero-copy { padding-top: 40px; }
  .journey-intro .hero-name { font-size: clamp(2.2rem, 3.9vw, 3.4rem); }
  .journey-intro .hero-greeting { margin-block: 1rem; }
  .journey-intro .hero-description { font-size: .9rem; margin-bottom: 1rem; }
  .journey-visual { height: 440px; min-height: 0; bottom: 66px; width: min(40vw, 510px); }
  .journey-person { width: 300px; }
}
@media (prefers-reduced-motion: reduce) {
  .journey-stage { position: relative !important; }
  .journey-progress, .journey-scroll-cue { display: none; }
  .portfolio-guide, .journey-person-wave { display: none; }
  .journey-person-present { position: relative; opacity: 1; }
  .journey-visual *, .device-guide-face { animation: none !important; transition: none !important; }
}
@media print {
  .journey-intro, .portfolio-guide, .device-chrome, .device-base { display: none !important; }
  .portfolio-device { width: 100%; max-width: none; border: 0; margin: 0; box-shadow: none; }
  .portfolio-screen { overflow: visible; }
}
