:root {
  color-scheme: light;
  --ink: #173247;
  --ink-soft: #677f90;
  --navy: #061a2e;
  --blue: #2f9bff;
  --rose: #c9677e;
  --paper: #eef5f9;
  --line: rgba(34, 80, 108, 0.12);
  font-family: "Zen Kaku Gothic New", "Noto Sans JP", system-ui, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--navy);
}

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 13% 18%, rgba(44, 130, 183, 0.35), transparent 34rem),
    radial-gradient(circle at 86% 70%, rgba(201, 103, 126, 0.11), transparent 25rem),
    #061624;
}

a {
  color: inherit;
  text-decoration: none;
}

.ambient-backdrop {
  position: fixed;
  inset: -54px;
  z-index: 0;
  background:
    linear-gradient(rgba(4, 17, 29, 0.56), rgba(4, 17, 29, 0.84)),
    url("./assets/atri-background.png") center 8% / cover no-repeat;
  filter: blur(30px) saturate(0.8);
  transform: scale(1.09);
}

.profile-page {
  position: relative;
  z-index: 1;
  width: min(100%, 480px);
  min-height: 100svh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 24px 90px rgba(0, 8, 18, 0.5);
}

.hero {
  position: relative;
  min-height: 394px;
  overflow: hidden;
  color: #fff;
  background-color: #173d60;
  background-image: url("./assets/atri-background.png");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 106% auto;
  animation: hero-settle 1.35s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 24, 44, 0.38) 0%, rgba(3, 24, 44, 0.06) 60%, transparent 100%),
    linear-gradient(0deg, var(--paper) 0%, rgba(231, 242, 248, 0.82) 9%, transparent 38%);
  pointer-events: none;
}

.profile-signature {
  position: absolute;
  top: 24px;
  left: 26px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 11px;
  animation: profile-in 520ms 120ms ease both;
}

.avatar-frame {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: 0 8px 20px rgba(0, 21, 37, 0.2);
  backdrop-filter: blur(4px);
}

.avatar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  background: #b8d9e7;
  transform: scale(1.04);
  transform-origin: 43% 52%;
}

.identity {
  min-width: 0;
  padding-bottom: 2px;
}

.name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.identity h1 {
  margin: 0;
  color: #fff;
  font-family: "Klee One", "Zen Kaku Gothic New", sans-serif;
  font-size: clamp(1.2rem, 4.7vw, 1.38rem);
  font-weight: 400;
  line-height: 1.22;
  letter-spacing: 0.035em;
  text-shadow: 0 3px 18px rgba(1, 18, 31, 0.5);
  animation: fade-only 520ms 260ms ease both;
}

.identity p {
  margin: 3px 0 0;
  color: rgba(244, 250, 253, 0.91);
  font-size: 0.98rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 12px rgba(1, 18, 31, 0.6);
  animation: fade-only 520ms 340ms ease both;
}

.verified-badge {
  display: grid;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  place-items: center;
  filter: drop-shadow(0 2px 5px rgba(4, 54, 98, 0.42));
  animation: fade-only 420ms 420ms ease both;
}

.verified-badge svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.verified-badge .badge-shape {
  fill: #2699f5;
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 0.55;
}

.verified-badge .badge-check {
  fill: none;
  stroke: #fff;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bio-card {
  position: absolute;
  top: 105px;
  left: 26px;
  z-index: 2;
  width: min(230px, calc(100% - 52px));
  min-height: 184px;
  padding: 18px 19px 17px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 18px;
  background: rgba(8, 38, 64, 0.16);
  box-shadow:
    0 12px 28px rgba(4, 33, 55, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px) saturate(1.03);
  animation: bio-in 620ms 360ms ease both;
}

.bio-label {
  position: relative;
  margin: 0 0 9px;
  color: rgba(245, 251, 255, 0.72);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.17em;
}

.bio-copy {
  position: relative;
  margin: 0;
  color: rgba(255, 255, 255, 0.96);
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.55;
  letter-spacing: 0.005em;
  text-shadow: 0 2px 13px rgba(0, 20, 35, 0.5);
}

.bio-motion {
  position: absolute;
  right: 17px;
  bottom: 13px;
  left: 19px;
  display: flex;
  align-items: center;
  min-height: 24px;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(242, 250, 254, 0.78);
  font-size: 0.76rem;
  font-weight: 300;
  line-height: 1.45;
  white-space: nowrap;
}

.bio-dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-right: 9px;
  border-radius: 50%;
  background: #8cd4ff;
  box-shadow: 0 0 0 4px rgba(94, 188, 243, 0.12);
  animation: dot-pulse 2s ease-in-out infinite;
}

.caret {
  display: inline-block;
  flex: 0 0 auto;
  width: 1px;
  height: 1.05em;
  margin: 2px 0 0 3px;
  background: rgba(255, 255, 255, 0.86);
  animation: caret-blink 900ms step-end infinite;
}

.social-links {
  position: absolute;
  top: 307px;
  left: 26px;
  z-index: 4;
  display: flex;
  gap: 11px;
}

.social-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.94);
  background: rgba(10, 45, 75, 0.16);
  box-shadow:
    0 12px 26px rgba(5, 36, 59, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px) saturate(1.03);
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
  animation: social-in 540ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.social-button:nth-child(1) {
  animation-delay: 900ms;
}

.social-button:nth-child(2) {
  animation-delay: 1s;
}

.social-button:nth-child(3) {
  animation-delay: 1.1s;
}

.social-button:hover,
.social-button:focus-visible {
  border-color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-3px);
}

.social-button svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  stroke: none;
}

.social-button:nth-child(2) svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.social-button:nth-child(2) .filled-dot {
  fill: currentColor;
  stroke: none;
}

.content-sheet {
  position: relative;
  z-index: 5;
  min-height: 390px;
  margin-top: -22px;
  padding: 28px 20px 0;
  border-radius: 26px 26px 0 0;
  background: rgba(238, 245, 249, 0.96);
  box-shadow: 0 -13px 30px rgba(22, 66, 93, 0.06);
}

.content-sheet::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 50%;
  width: 33px;
  height: 3px;
  border-radius: 99px;
  background: rgba(39, 83, 108, 0.16);
  transform: translateX(-50%);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 3px 14px;
  animation: fade-up 600ms 1.12s ease both;
}

.section-heading h2 {
  margin: 0;
  color: #6b8290;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

.link-stack {
  display: grid;
  gap: 11px;
}

.link-card {
  position: relative;
  display: grid;
  grid-template-columns: 47px minmax(0, 1fr) 30px;
  align-items: center;
  min-height: 76px;
  overflow: hidden;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
  box-shadow:
    0 13px 32px rgba(20, 61, 86, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(15px);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
  animation: card-in 620ms cubic-bezier(0.2, 0.85, 0.2, 1) both;
}

.link-card:nth-child(1) {
  animation-delay: 1.2s;
}

.link-card:nth-child(2) {
  animation-delay: 1.3s;
}

.link-card:nth-child(3) {
  animation-delay: 1.4s;
}

.link-card::before {
  content: "";
  position: absolute;
  top: -60%;
  left: -40%;
  width: 34%;
  height: 220%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  opacity: 0;
  transform: rotate(18deg);
  transition: left 520ms ease, opacity 180ms ease;
  pointer-events: none;
}

.link-card:hover,
.link-card:focus-visible {
  border-color: rgba(47, 103, 133, 0.24);
  box-shadow:
    0 17px 38px rgba(25, 65, 89, 0.14),
    inset 0 1px 0 #fff;
  transform: translateY(-3px);
}

.link-card:hover::before,
.link-card:focus-visible::before {
  left: 112%;
  opacity: 1;
}

.social-button:focus-visible,
.link-card:focus-visible {
  outline: 3px solid rgba(47, 155, 255, 0.34);
  outline-offset: 3px;
}

.link-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: #2d627f;
  background: #e5f0f5;
}

.link-card--whatsapp .link-icon {
  color: #2c7b6e;
  background: #e1f1ed;
}

.link-card--novel .link-icon {
  color: #a64f67;
  background: #f6e6eb;
}

.link-card--contact .link-icon {
  color: #3f6d91;
  background: #e7eef7;
}

.link-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.link-text {
  min-width: 0;
  padding: 0 9px;
}

.link-text strong,
.link-text small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-text strong {
  font-size: 0.94rem;
  font-weight: 500;
}

.link-text small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 300;
}

.arrow {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid rgba(42, 88, 114, 0.09);
  border-radius: 50%;
  color: #5e8196;
  background: rgba(237, 245, 248, 0.75);
  font-size: 0.92rem;
  transition: color 180ms ease, transform 180ms ease;
}

.link-card:hover .arrow {
  color: var(--blue);
  transform: translate(2px, -2px);
}

.footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 34px 7px calc(25px + env(safe-area-inset-bottom));
  color: rgba(49, 82, 102, 0.48);
}

.footer > span {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(51, 92, 116, 0.14));
}

.footer > span:last-child {
  background: linear-gradient(90deg, rgba(51, 92, 116, 0.14), transparent);
}

.footer p {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.07em;
}

.notice {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 10;
  max-width: calc(100vw - 40px);
  padding: 11px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #f4f9fc;
  background: rgba(7, 29, 46, 0.92);
  box-shadow: 0 12px 32px rgba(3, 18, 31, 0.3);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
  backdrop-filter: blur(12px);
  font-size: 0.84rem;
  font-weight: 400;
  white-space: nowrap;
}

.notice.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes hero-settle {
  from {
    background-size: 109% auto;
    filter: brightness(0.87);
  }
  to {
    background-size: 106% auto;
    filter: brightness(1);
  }
}

@keyframes profile-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fade-only {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes bio-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes social-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dot-pulse {
  0%,
  100% {
    opacity: 0.72;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.12);
  }
}

@keyframes caret-blink {
  0%,
  46% {
    opacity: 1;
  }
  47%,
  100% {
    opacity: 0;
  }
}

@media (min-width: 560px) {
  body {
    padding: 24px;
  }

  .profile-page {
    min-height: calc(100svh - 48px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 34px;
  }
}

@media (max-width: 370px) {
  .hero {
    min-height: 386px;
  }

  .profile-signature {
    top: 20px;
    left: 18px;
    gap: 10px;
  }

  .avatar-frame {
    width: 54px;
    height: 54px;
  }

  .verified-badge {
    width: 18px;
    height: 18px;
  }

  .bio-card {
    top: 94px;
    left: 18px;
    width: min(205px, calc(100% - 36px));
    min-height: 190px;
    padding: 17px 17px 16px;
  }

  .bio-copy {
    font-size: 0.88rem;
  }

  .bio-motion {
    right: 15px;
    left: 17px;
    font-size: 0.71rem;
  }

  .social-links {
    top: 301px;
    left: 18px;
  }

  .content-sheet {
    padding-inline: 14px;
  }

  .link-text strong {
    font-size: 0.9rem;
  }

  .link-text small {
    font-size: 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .caret {
    display: none;
  }
}
