:root {
  color-scheme: light dark;

  --bg: #f6eeee;
  --bg-soft: #efe4e4;
  --panel: #f8f1f1;
  --text: #181414;
  --muted: #5e5555;
  --line: #d9caca;

  --name-bg: #111111;
  --name-text: #f4efef;

  --ny3-text: #ffffff;
  --ny3-bg: #000000;

  --namdam-text: #111111;
  --namdam-glow: rgba(255, 255, 255, 0.22);
  --namdam-glow-low: rgba(255, 255, 255, 0.05);

  --nai: #6988b7;
  --qzcz: #b67d4d;

  --fluid-main: rgba(255, 255, 255, 0.82);
  --fluid-soft: rgba(255, 215, 228, 0.72);
  --fluid-glow: rgba(180, 115, 145, 0.28);
  --fluid-glow-strong: rgba(255, 255, 255, 0.52);
  --word-hover-text: #070606;

  --item-hover: rgba(255, 255, 255, 0.26);
  --item-hover-line: rgba(105, 80, 88, 0.18);

  --popover-bg: rgba(248, 240, 241, 0.78);
  --popover-line: rgba(33, 25, 27, 0.14);
  --popover-shadow: rgba(46, 31, 36, 0.18);
  --popover-soft: rgba(255, 255, 255, 0.38);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121011;
    --bg-soft: #181416;
    --panel: #151214;
    --text: #ece4e4;
    --muted: #aea1a4;
    --line: #2a2326;

    --name-bg: #0d0b0c;
    --name-text: #f1ebeb;

    --ny3-text: #ffffff;
    --ny3-bg: #000000;

    --namdam-text: #f5efef;
    --namdam-glow: rgba(255, 255, 255, 0.16);
    --namdam-glow-low: rgba(255, 255, 255, 0.035);

    --nai: #8aa3d0;
    --qzcz: #c89263;

    --fluid-main: rgba(255, 255, 255, 0.92);
    --fluid-soft: rgba(255, 220, 235, 0.42);
    --fluid-glow: rgba(255, 225, 235, 0.16);
    --fluid-glow-strong: rgba(255, 255, 255, 0.38);
    --word-hover-text: #ffffff;

    --item-hover: rgba(255, 255, 255, 0.035);
    --item-hover-line: rgba(255, 255, 255, 0.08);

    --popover-bg: rgba(20, 16, 18, 0.78);
    --popover-line: rgba(255, 255, 255, 0.10);
    --popover-shadow: rgba(0, 0, 0, 0.40);
    --popover-soft: rgba(255, 255, 255, 0.04);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  background:
    linear-gradient(to bottom, transparent 0, rgba(255, 255, 255, 0.13) 50%, transparent 100%);
  background-size: 100% 5px;
  mix-blend-mode: soft-light;
}

.page {
  width: 100%;
  animation: page-in 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero {
  padding: 72px 24px 36px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.hero h1 {
  max-width: 860px;
  margin: 0 auto;
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.content {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 24px 120px;
}

.section {
  padding: 56px 0 64px;
  border-bottom: 1px solid var(--line);
  animation: section-in 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.section:nth-child(2) {
  animation-delay: 70ms;
}

.section:nth-child(3) {
  animation-delay: 120ms;
}

.section:last-child {
  border-bottom: none;
}

.section h2 {
  margin: 0 0 24px;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: none;
}

.section-body {
  max-width: 760px;
}

.section-body p {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 1rem;
}

.thanks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.thanks-item {
  position: relative;
  margin-left: -12px;
  padding: 12px 12px 18px;
  border-bottom: 1px solid var(--line);
  transition:
    background-color 220ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 220ms ease,
    filter 220ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.thanks-item:hover {
  background: var(--item-hover);
  border-bottom-color: var(--item-hover-line);
  filter: brightness(1.035);
  transform: translateX(2px);
}

.thanks-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.name {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 8px 4px;
  background: var(--name-bg);
  color: var(--name-text);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.name.ny3 {
  background: var(--ny3-bg);
  color: var(--ny3-text);
}

.name.namdam {
  color: var(--namdam-text);
  text-shadow:
    0 0 2px var(--namdam-glow-low),
    0 0 5px var(--namdam-glow);
  animation: namdam-flicker 5.6s infinite;
}

.name.nai {
  color: var(--nai);
}

.name.qzcz {
  color: var(--qzcz);
}

/* social popover trial: Namdam */
.social-wrap {
  position: relative;
  display: inline-block;
  z-index: 35;
}

.social-wrap::before {
  content: "";
  position: absolute;
  top: -18px;
  right: 100%;
  width: 18px;
  height: calc(100% + 36px);
}

.social-wrap .name {
  cursor: default;
}

.social-popover {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  z-index: 40;
  display: grid;
  grid-template-columns: 52px 1fr;
  grid-template-rows: auto auto;
  column-gap: 11px;
  row-gap: 8px;
  width: 245px;
  min-height: 92px;
  padding: 10px;
  border: 1px solid var(--popover-line);
  background: var(--popover-bg);
  box-shadow: 0 14px 34px var(--popover-shadow);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  opacity: 0;
  visibility: hidden;
  transform: translate(-6px, -50%) scale(0.985);
  pointer-events: none;
  transition:
    opacity 190ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 190ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 190ms;
}

.social-wrap:hover .social-popover,
.social-wrap:focus-within .social-popover {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%) scale(1);
  pointer-events: auto;
}

.social-top {
  display: contents;
}

.social-avatar {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 52px;
  height: 52px;
  object-fit: cover;
  border: 1px solid var(--popover-line);
  background: var(--name-bg);
}

.social-text {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
}

.social-name {
  font-size: 0.95rem;
  font-weight: 700;
}

.social-sub {
  color: var(--muted);
  font-size: 0.72rem;
}

.social-actions {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-self: start;
}

.social-link {
  display: block;
  width: fit-content;
  max-width: 100%;
  color: var(--text);
  text-decoration: none;
  font-size: 0.82rem;
  line-height: 1.25;
  border-bottom: 1px solid transparent;
  padding: 1px 0;
  opacity: 0;
  transform: translateX(-4px);
  transition:
    opacity 220ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 160ms ease,
    filter 160ms ease;
}

.social-link:hover {
  border-bottom-color: var(--text);
  filter: brightness(1.08);
}

.social-wrap:hover .social-link,
.social-wrap:focus-within .social-link {
  opacity: 1;
  transform: translateX(0);
}

.social-wrap:hover .social-link:nth-child(1),
.social-wrap:focus-within .social-link:nth-child(1) {
  transition-delay: 60ms;
}

.social-wrap:hover .social-link:nth-child(2),
.social-wrap:focus-within .social-link:nth-child(2) {
  transition-delay: 135ms;
}

.social-wrap-ny3 .social-popover {
  background: rgba(4, 4, 4, 0.88);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.45),
    0 0 22px rgba(255, 255, 255, 0.04);
  color: #f3f3f3;
}

.social-wrap-ny3 .social-avatar {
  border-color: rgba(255, 255, 255, 0.16);
  filter: grayscale(1) contrast(1.06);
}

.social-wrap-ny3 .social-name,
.social-wrap-ny3 .social-link {
  color: #f3f3f3;
}

.social-wrap-ny3 .social-sub {
  color: rgba(255, 255, 255, 0.54);
}

.social-wrap-ny3 .social-link:hover {
  border-bottom-color: #f3f3f3;
}

.social-wrap-ny3 .social-top {
  border-color: rgba(255, 255, 255, 0.12);
}

.links-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.text-link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  width: fit-content;
  padding-bottom: 1px;
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 180ms ease,
    filter 180ms ease;
}

.text-link:hover {
  transform: translateX(8px) scale(1.02);
  filter: brightness(1.04);
  border-bottom-color: var(--text);
}

/* fluid word interaction only for Thanks text */
.word-line {
  display: block;
}

.word {
  display: inline-block;
  position: relative;
  z-index: 0;
  padding: 0.14em 0.11em;
  margin: -0.14em -0.11em;
  border-radius: 0;
  transform: translateX(0) translateY(0) translateZ(0) scale(1);
  transform-origin: center;
  transition:
    transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 240ms cubic-bezier(0.22, 1, 0.36, 1),
    color 240ms ease,
    text-shadow 240ms ease;
  will-change: transform;
}

.word::before,
.word::after {
  content: attr(data-word);
  position: absolute;
  inset: 0.14em 0.11em;
  pointer-events: none;
  opacity: 0;
  border: none;
  background: none;
  box-shadow: none;
  transform-origin: center;
  transition:
    opacity 180ms ease,
    transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.word::before {
  z-index: -1;
  color: var(--fluid-main);
  filter: blur(5px);
  transform: translateY(0.02em) scaleX(1.06) scaleY(1.18);
  text-shadow:
    0 0 8px var(--fluid-glow-strong),
    0 0 18px var(--fluid-glow);
}

.word::after {
  z-index: 1;
  color: transparent;
  background:
    linear-gradient(
      105deg,
      transparent 0%,
      var(--fluid-soft) 24%,
      var(--fluid-main) 45%,
      var(--fluid-soft) 64%,
      transparent 100%
    );
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  filter: blur(0.15px);
}

.word.is-active {
  color: var(--word-hover-text);
  transform: translateX(7px) translateY(-1px) scale(1.045);
  filter: brightness(1.06);
  text-shadow:
    0 0 6px var(--fluid-glow-strong),
    0 0 16px var(--fluid-glow);
  z-index: 3;
}

.word.is-active::before {
  opacity: 0.85;
  animation: fluid-pulse 740ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.word.is-active::after {
  opacity: 1;
  animation: text-shine 760ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.word.is-pushed {
  transform: translateX(12px);
}

.tiny-note {
  margin-top: -4px;
  margin-left: 2px;
  font-size: 0.88rem !important;
  color: var(--muted) !important;
  letter-spacing: 0.02em;
}

@keyframes text-shine {
  from {
    background-position: 165% 0;
  }

  to {
    background-position: -65% 0;
  }
}

@keyframes fluid-pulse {
  0% {
    transform: translateY(0.02em) scaleX(0.96) scaleY(1.04);
    filter: blur(7px);
  }

  55% {
    transform: translateY(0.01em) scaleX(1.14) scaleY(1.22);
    filter: blur(5px);
  }

  100% {
    transform: translateY(0.02em) scaleX(1.06) scaleY(1.18);
    filter: blur(5px);
  }
}

@keyframes namdam-flicker {
  0%, 18%, 20%, 22%, 57%, 59%, 100% {
    opacity: 0.94;
    text-shadow:
      0 0 2px var(--namdam-glow-low),
      0 0 5px var(--namdam-glow);
  }

  19%, 21%, 58% {
    opacity: 0.68;
    text-shadow:
      0 0 1px var(--namdam-glow-low),
      0 0 2px var(--namdam-glow-low);
  }

  61% {
    opacity: 0.82;
    text-shadow:
      0 0 2px var(--namdam-glow-low),
      0 0 4px var(--namdam-glow);
  }
}

@keyframes page-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes section-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.site-footer {
  display: flex;
  max-width: 860px;
  margin: -44px auto 38px;
  padding: 0 24px;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  opacity: 0.42;
  gap: 12px;
  justify-content: space-between;
  align-items: baseline;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-footer a:hover {
  border-bottom-color: currentColor;
}

.search-summary {
  max-width: 520px;
}

.footer-credit {
  white-space: nowrap;
}

/* external-link transition */
.transition-stage {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  background: rgba(0, 0, 0, 0);
}

.transition-panel {
  width: min(72vw, 620px);
  height: min(44vh, 360px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(
      180deg,
      rgba(255, 235, 241, 0.14),
      rgba(255, 255, 255, 0.03)
    );
  box-shadow:
    0 0 44px rgba(255, 225, 235, 0.08),
    inset 0 0 40px rgba(255, 255, 255, 0.035);
  opacity: 0;
  transform: scale(0.72);
}

body.is-leaving {
  overflow: hidden;
}

body.is-leaving .page {
  animation: page-leave 720ms cubic-bezier(0.7, 0, 1, 1) both;
  transform-origin: center;
}

body.is-leaving .transition-stage {
  opacity: 1;
  animation: blackout 760ms cubic-bezier(0.7, 0, 1, 1) both;
}

body.is-leaving .transition-panel {
  animation: back-page-zoom 760ms cubic-bezier(0.7, 0, 1, 1) both;
}

@keyframes page-leave {
  0% {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1) blur(0);
  }

  36% {
    opacity: 0.86;
    transform: scale(0.92);
    filter: brightness(0.82) blur(0.3px);
  }

  100% {
    opacity: 0;
    transform: scale(1.08);
    filter: brightness(0) blur(5px);
  }
}

@keyframes blackout {
  0% {
    background: rgba(0, 0, 0, 0);
  }

  34% {
    background: rgba(0, 0, 0, 0.18);
  }

  100% {
    background: rgba(0, 0, 0, 1);
  }
}

@keyframes back-page-zoom {
  0% {
    opacity: 0;
    transform: scale(0.72);
  }

  36% {
    opacity: 0.34;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(2.15);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .page,
  .section,
  .word.is-active::before,
  .word.is-active::after,
  .name.namdam,
  body.is-leaving .page,
  body.is-leaving .transition-stage,
  body.is-leaving .transition-panel {
    animation: none;
  }

  .word,
  .word::before,
  .word::after,
  .text-link,
  .thanks-item,
  .social-popover,
  .social-link {
    transition: none;
  }
}

@media (max-width: 700px) {
  .hero {
    padding: 56px 18px 28px;
  }

  .content {
    padding: 18px 18px 88px;
  }

  .site-footer {
    margin-top: -28px;
    padding: 0 18px;
    flex-direction: column;
    gap: 4px;
  }

  .footer-credit {
    white-space: normal;
  }

  .section {
    padding: 42px 0 50px;
  }

  .section-body p {
    font-size: 0.97rem;
  }

  .thanks-item {
    margin-left: -8px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .social-wrap::before {
    display: none;
  }

  .social-popover {
    left: 0;
    right: auto;
    top: calc(100% + 10px);
    width: min(245px, calc(100vw - 44px));
    transform: translateY(-4px) scale(0.985);
  }

  .social-wrap:hover .social-popover,
  .social-wrap:focus-within .social-popover {
    transform: translateY(0) scale(1);
  }

  .word.is-active {
    transform: translateX(5px) translateY(-1px) scale(1.025);
  }

  .word.is-pushed {
    transform: translateX(8px);
  }

  .text-link:hover {
    transform: translateX(5px) scale(1.01);
  }
}

/* cursor */
.word,
.name,
.text-link,
.social-link {
  cursor: pointer;
}
