/* Home polish for sorahseong.com — three small touches on the home introduction.
   Add after the site's own styles. Scoped to the home profile section only. */

/* 2. A splash of colour behind the portrait:
      a pale lavender block peeking out below-right, a dotted accent frame peeking out above-left */
.chic-profile-portrait {
  position: relative;
  isolation: isolate;
}
.chic-profile-portrait::before,
.chic-profile-portrait::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 6px;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.chic-profile-portrait::before {          /* pale lavender block */
  inset: 22px -22px -22px 22px;
  background: var(--classic-portrait-mat, #eee9f8);
}
.chic-profile-portrait::after {           /* dotted accent frame */
  inset: -14px 14px 14px -14px;
  border: 1.5px dotted var(--portrait-frame, #9b8baa);
}
.chic-profile-portrait:hover::before { transform: translate(5px, 5px); }
.chic-profile-portrait:hover::after { transform: translate(-4px, -4px); }
@media (max-width: 640px) {
  .chic-profile-portrait::before { inset: 12px -12px -12px 12px; }
  .chic-profile-portrait::after { inset: -9px 9px 9px -9px; }
}

/* 3. Links in the introduction: a yellow highlighter sweeps in under the word on hover
      (the blue underline stays as it is) */
.chic-profile .personal-introduction a {
  background-image: linear-gradient(transparent 58%, rgba(255, 227, 77, 0.9) 58%);
  background-repeat: no-repeat;
  background-size: 0% 100%;
  transition: background-size 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.chic-profile .personal-introduction a:hover,
.chic-profile .personal-introduction a:focus-visible {
  background-size: 100% 100%;
}

@media (prefers-reduced-motion: reduce) {
  .chic-profile-portrait::before, .chic-profile-portrait::after,
  .chic-profile .personal-introduction a { transition: none; }
}

body[data-chic-accent="blue"] .chic-profile-portrait { --portrait-frame: #7f9bb7; }
body[data-chic-accent="purple"] .chic-profile-portrait { --portrait-frame: #a28bb6; }
body[data-chic-accent="cherry"] .chic-profile-portrait { --portrait-frame: #b17d92; }

/* Only the Classic portrait mat changes with the accent. */
body[data-site-scene="plain"][data-chic-accent="purple"] .chic-profile-portrait::before { background: var(--classic-portrait-mat, #ffe34d); }
body[data-site-scene="plain"][data-chic-accent="cherry"] .chic-profile-portrait::before { background: var(--classic-portrait-mat, #d7f341); }

/* Classic desktop: one portrait accent, echoed softly in the speech label. */
@media (min-width: 901px) {
  body[data-site-scene="plain"] .forest-landing { --classic-portrait-mat: #eee9f8; }
  body[data-site-scene="plain"][data-chic-accent="purple"] .forest-landing { --classic-portrait-mat: #ffe34d; }
  body[data-site-scene="plain"][data-chic-accent="cherry"] .forest-landing { --classic-portrait-mat: #d7f341; }

  body[data-site-scene="plain"] .forest-landing .chic-profile-portrait::after { content: none; }
  body[data-site-scene="plain"] .forest-landing .speech-label-highlight {
    background: color-mix(in srgb, var(--classic-portrait-mat) 48%, white) !important;
  }
}
