/* Resume page: move the complete fixed navigation clear of the reading surface
   while the visitor progresses, and restore it as soon as they reverse. */
body[data-page="about"] .Header__container {
  will-change: transform, opacity;
}

body[data-page="about"] .Header__container[data-resume-header-state="hidden"] {
  transform: translate3d(0, calc(-100% - 12px), 0) !important;
  opacity: 0 !important;
  pointer-events: none;
}

/* Screenplay archive: preserve the clean reading surface while scrolling. */
body[data-script-page="true"] .Header__container {
  transition: transform .42s cubic-bezier(.2, .8, .2, 1), opacity .28s ease-out !important;
  will-change: transform, opacity;
  pointer-events: auto !important;
}

body[data-script-page="true"][data-script-header-state="hidden"] .Header__container {
  transform: translate3d(0, calc(-100% - 14px), 0) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* The original Alche footer is intentionally removed throughout the portfolio. */
.Footer__footer {
  display: none !important;
}

/* Give the primary header contact action more visual weight while preserving
   the original pill dimensions, color changes, and slot-button animation. */
.Header__container .Header__contact {
  border-width: 2px;
  font-family: ibm-plex-sans-jp, "Microsoft YaHei", sans-serif;
  font-weight: 700;
  letter-spacing: .16em;
}

.Header__container .Header__contact .SlotButton__text,
.Header__container .Header__contact .SlotButton__text_hover {
  font: inherit;
  letter-spacing: inherit;
}

/* Contact identity card --------------------------------------------------- */
.ContactDrawer {
  position: fixed;
  z-index: 1200;
  inset: 0;
  visibility: hidden;
  pointer-events: none;
}

.ContactDrawer[data-contact-drawer-open="true"] {
  visibility: visible;
}

.ContactDrawer__outside {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .74);
  opacity: 0;
  pointer-events: none;
}

.ContactDrawer[data-contact-drawer-open="true"] .ContactDrawer__outside {
  pointer-events: auto;
  will-change: opacity;
}

.ContactDrawer__stage {
  position: absolute;
  inset: 0 clamp(16px, 2.7vw, 44px) 0 auto;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.ContactDrawer__panel {
  position: relative;
  height: min(88svh, 900px);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(235, 244, 250, .12), rgba(13, 20, 28, .46) 34%, rgba(2, 5, 8, .62));
  border: 1px solid rgba(229, 241, 249, .52);
  border-radius: clamp(18px, 1.4vw, 28px);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, .48),
    inset -1px -1px 0 rgba(0, 0, 0, .7),
    3px 5px 0 rgba(4, 8, 12, .72),
    8px 14px 30px rgba(0, 0, 0, .4),
    -22px 30px 80px rgba(0, 0, 0, .56);
  backdrop-filter: blur(20px) saturate(1.28) contrast(1.04);
  -webkit-backdrop-filter: blur(20px) saturate(1.28) contrast(1.04);
  contain: layout paint style;
  isolation: isolate;
  pointer-events: auto;
}

.ContactDrawer__panel::before,
.ContactDrawer__panel::after {
  position: absolute;
  z-index: 6;
  content: "";
  border-radius: inherit;
  pointer-events: none;
}

.ContactDrawer__panel::before {
  inset: 0;
  box-shadow:
    inset 2px 2px 1px rgba(255, 255, 255, .34),
    inset -3px -3px 2px rgba(0, 0, 0, .5),
    inset 0 0 0 5px rgba(207, 228, 240, .045),
    inset 0 18px 28px -28px rgba(255, 255, 255, .82),
    inset 0 -18px 30px -28px rgba(0, 0, 0, .9);
}

.ContactDrawer__panel::after {
  inset: 5px;
  border: 1px solid rgba(216, 234, 244, .13);
  border-radius: calc(clamp(18px, 1.4vw, 28px) - 5px);
}

.ContactDrawer[data-contact-drawer-open="false"] .ContactDrawer__panel {
  content-visibility: hidden;
}

.ContactDrawer[data-contact-drawer-open="true"] .ContactDrawer__panel {
  will-change: transform, opacity;
}

.ContactDrawer__scene,
.ContactDrawer__sceneShade,
.ContactDrawer__marquees,
.ContactDrawer__content {
  position: absolute;
  inset: 0;
}

.ContactDrawer__scene {
  z-index: 0;
  overflow: hidden;
  background-color: rgba(5, 9, 14, .5);
  background-image:
    radial-gradient(circle at 78% 30%, rgba(30, 54, 84, .48), transparent 44%),
    radial-gradient(circle at 17% 76%, rgba(84, 49, 23, .32), transparent 47%),
    repeating-linear-gradient(90deg, rgba(172, 190, 207, .1) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(0deg, rgba(172, 190, 207, .1) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(90deg, transparent 0 109px, rgba(195, 209, 220, .19) 109px 111px),
    repeating-linear-gradient(0deg, transparent 0 109px, rgba(195, 209, 220, .19) 109px 111px);
  pointer-events: none;
}

.ContactDrawer__scene::before,
.ContactDrawer__scene::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.ContactDrawer__scene::before {
  inset: -8%;
  opacity: .72;
  background:
    linear-gradient(112deg, transparent 31%, rgba(69, 103, 142, .08) 48%, transparent 66%),
    repeating-linear-gradient(90deg, transparent 0 131px, rgba(187, 204, 218, .16) 131px 133px),
    repeating-linear-gradient(0deg, transparent 0 131px, rgba(187, 204, 218, .16) 131px 133px);
  transform: translate3d(-1.5%, 0, 0) scale(1.08);
  animation: ContactDrawer__gridDrift 24s linear infinite paused;
}

.ContactDrawer__scene::after {
  inset: 0;
  opacity: .42;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='132' height='132' viewBox='0 0 132 132'%3E%3Cpath d='M66 58v16M58 66h16' stroke='%23d9e4ec' stroke-width='1.2'/%3E%3C/svg%3E");
  background-size: 132px 132px;
  box-shadow: inset 0 0 90px rgba(0, 0, 0, .66);
}

.ContactDrawer[data-contact-drawer-open="true"] .ContactDrawer__scene::before {
  animation-play-state: running;
  will-change: transform;
}

@keyframes ContactDrawer__gridDrift {
  from { transform: translate3d(-1.5%, 0, 0) scale(1.08); }
  to { transform: translate3d(1.5%, -1.5%, 0) scale(1.08); }
}

.ContactDrawer__sceneShade {
  z-index: 1;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, .08), transparent 22%, transparent 68%, rgba(255, 255, 255, .025)),
    linear-gradient(90deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, .02) 52%, rgba(0, 0, 0, .24));
  pointer-events: none;
}

.ContactDrawer__marquees {
  z-index: 2;
  pointer-events: none;
}

.ContactDrawer__logo {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: -100%;
  width: 300%;
  aspect-ratio: 1;
  transform: translate3d(0, -50%, 0);
  pointer-events: none;
}

.ContactDrawer__logo svg {
  display: block;
  width: 100%;
  height: 100%;
}

.ContactDrawer__marquee {
  position: absolute;
  right: 0;
  left: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, .2);
  font-family: acumin-pro, ibm-plex-sans-jp, "Microsoft YaHei", sans-serif;
  font-size: clamp(50px, 5.15vh, 76px);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -.035em;
  white-space: nowrap;
}

.ContactDrawer__marquee:nth-child(1) { top: 29%; }
.ContactDrawer__marquee:nth-child(2) { top: 50.5%; }
.ContactDrawer__marquee:nth-child(3) { top: 68.5%; }

/* Copied from FilmDetail__marquee; only the translation direction is reversed. */
.ContactDrawer__marqueeSizer,
.ContactDrawer__marqueeCopy {
  display: block;
  width: max-content;
}

.ContactDrawer__marqueeSizer {
  visibility: hidden;
}

.ContactDrawer__marqueeCopy {
  position: absolute;
  top: 0;
  left: 0;
}

.ContactDrawer__marqueeCopy[data-item="1"] {
  animation: ContactDrawer__marquee1 calc(var(--title-length) * 15s) linear infinite;
}

.ContactDrawer__marqueeCopy[data-item="2"] {
  animation: ContactDrawer__marquee2 calc(var(--title-length) * 15s) linear infinite;
}

.ContactDrawer[data-contact-drawer-open="false"] .ContactDrawer__marqueeCopy {
  animation-play-state: paused;
}

.ContactDrawer[data-contact-drawer-open="true"] .ContactDrawer__marqueeCopy {
  animation-play-state: running;
  will-change: transform;
}

@keyframes ContactDrawer__marquee1 {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(100%, 0, 0); }
}

@keyframes ContactDrawer__marquee2 {
  from { transform: translate3d(-100%, 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}

.ContactDrawer__close {
  position: absolute;
  z-index: 5;
  top: clamp(15px, 2vh, 24px);
  right: clamp(15px, 2vh, 24px);
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, .22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background-color .22s ease-out, border-color .22s ease-out, transform .14s ease-out;
}

@media (hover: hover) and (pointer: fine) {
  .ContactDrawer__close:hover {
    background: rgba(255, 255, 255, .15);
    border-color: #fff;
  }

  .ContactDrawer__line:hover {
    opacity: .64;
  }
}

.ContactDrawer__close:active {
  transform: scale(.96);
}

.ContactDrawer__close:focus-visible,
.ContactDrawer__line:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.ContactDrawer__close span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 1px;
  background: currentColor;
}

.ContactDrawer__close span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.ContactDrawer__close span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.ContactDrawer__content {
  z-index: 4;
  mix-blend-mode: difference;
}

.ContactDrawer__name {
  position: absolute;
  top: 30.2%;
  left: 11.5%;
  margin: 0;
  color: #fff;
  font-family: acumin-pro, ibm-plex-sans-jp, "Microsoft YaHei", sans-serif;
  font-size: clamp(38px, 4.55vh, 66px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.055em;
  white-space: nowrap;
}

.ContactDrawer__line {
  position: absolute;
  left: 11.5%;
  display: flex;
  align-items: center;
  gap: .28em;
  max-width: 82%;
  color: #fff;
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: clamp(16px, 2vh, 25px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.035em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: opacity .22s ease-out;
}

.ContactDrawer__line--tel { top: 52.7%; }
.ContactDrawer__line--mail { top: 70.7%; }

.ContactDrawer__line span {
  font-weight: 700;
}

.ContactDrawer__line strong { font: inherit; }

@media (max-width: 560px) {
  .ContactDrawer__stage {
    inset: 10px;
    justify-content: center;
  }

  .ContactDrawer__panel {
    width: min(100%, calc((100svh - 20px) * .5625));
    height: min(calc(100svh - 20px), calc((100vw - 20px) * 1.77778));
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="about"] .Header__container {
    transition: color .2s ease-out !important;
  }

  .ContactDrawer__close,
  .ContactDrawer__line {
    transition-duration: .01ms !important;
  }

  .ContactDrawer__marqueeCopy {
    animation-play-state: paused;
  }
}

@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .ContactDrawer__outside {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .ContactDrawer__panel {
    background: rgba(5, 9, 14, .96);
    border-color: rgba(235, 245, 252, .72);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .ContactDrawer__scene {
    background-color: #05090e;
  }
}
