:root {
  --bg: #09090b;
  --card: #0f0f12;
  --line: rgba(255, 255, 255, 0.08);
  --line-hi: rgba(255, 255, 255, 0.18);
  --text: #f2f2f4;
  --sub: #9e9ea8;
  --dim: #60606a;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: var(--bg);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

.bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.bg-img {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(1760px, 100%);
  height: 540px;
  background-image: url('./assets/header-banner.webp');
  background-size: cover;
  background-position: 62% 28%;
  opacity: 0.24;
  filter: contrast(1.08) brightness(0.78);
  -webkit-mask-image:
    radial-gradient(ellipse 82% 90% at 50% 0%, #000 20%, transparent 95%),
    linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.5) 52%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(ellipse 82% 90% at 50% 0%, #000 20%, transparent 95%),
    linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.5) 52%, transparent 100%);
  mask-composite: intersect;
}

#rain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.65;
}

.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 750px;
  margin: auto;
  padding: 48px 28px 56px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.fade {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.55s var(--ease) forwards;
}

.d1 { animation-delay: 0.04s; }
.d2 { animation-delay: 0.14s; }

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

.intro {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.profile {
  display: flex;
  align-items: center;
  gap: 15px;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 13px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--card);
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  transition: transform 0.3s var(--ease), border-color 0.25s ease;
}

.avatar:hover {
  transform: scale(1.04);
  border-color: rgba(255, 255, 255, 0.22);
}

.meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

h1 {
  font-size: 29px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--text);
}

.tag {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--dim);
  letter-spacing: -0.01em;
}

.socials {
  display: flex;
  align-items: center;
  gap: 9px;
}

.social {
  --c-bg: rgba(24, 24, 30, 0.88);
  --c-bd: rgba(255, 255, 255, 0.13);
  --c-fg: #d8d8e2;
  --c-hbg: rgba(36, 36, 45, 0.95);
  --c-hbd: rgba(255, 255, 255, 0.28);
  --c-hfg: #ffffff;
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--c-bd);
  background: var(--c-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--c-fg);
  display: grid;
  place-items: center;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.32);
  transition:
    transform 0.24s var(--ease),
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.24s ease;
}

.social svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  transition: transform 0.24s var(--ease);
}

.social img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform 0.24s var(--ease);
}

.social.github {
  --c-bg: rgba(240, 246, 252, 0.07);
  --c-bd: rgba(240, 246, 252, 0.18);
  --c-fg: #e6edf3;
  --c-hbg: rgba(240, 246, 252, 0.14);
  --c-hbd: rgba(240, 246, 252, 0.36);
  --c-hfg: #ffffff;
}

.social.dima {
  --c-bg: rgba(245, 197, 66, 0.08);
  --c-bd: rgba(245, 197, 66, 0.24);
  --c-hbg: rgba(245, 197, 66, 0.16);
  --c-hbd: rgba(245, 197, 66, 0.45);
}

.social.steam {
  --c-bg: rgba(102, 192, 244, 0.10);
  --c-bd: rgba(102, 192, 244, 0.25);
  --c-fg: #66c0f4;
  --c-hbg: rgba(102, 192, 244, 0.18);
  --c-hbd: rgba(102, 192, 244, 0.48);
  --c-hfg: #8fd4fc;
}

.social.discord {
  --c-bg: rgba(88, 101, 242, 0.12);
  --c-bd: rgba(88, 101, 242, 0.28);
  --c-fg: #7983f5;
  --c-hbg: rgba(88, 101, 242, 0.22);
  --c-hbd: rgba(121, 131, 245, 0.52);
  --c-hfg: #9ea6ff;
}

.social.kofi {
  --c-bg: rgba(255, 94, 91, 0.10);
  --c-bd: rgba(255, 94, 91, 0.25);
  --c-fg: #ff6b68;
  --c-hbg: rgba(255, 94, 91, 0.19);
  --c-hbd: rgba(255, 107, 104, 0.48);
  --c-hfg: #ff8986;
}

.social:hover,
.social:focus-visible {
  transform: translateY(-2px);
  background: var(--c-hbg);
  border-color: var(--c-hbd);
  color: var(--c-hfg);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  outline: none;
}

.social:hover img,
.social:focus-visible img {
  transform: scale(1.07);
}

.social:active {
  transform: translateY(0) scale(0.96);
}

.social.copied {
  background: rgba(59, 165, 93, 0.18);
  border-color: rgba(59, 165, 93, 0.52);
  color: #57d17c;
}

.social::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 5px 9px;
  border-radius: 7px;
  background: #18181e;
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: var(--text);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
  transition: opacity 0.18s ease, transform 0.22s var(--ease);
  z-index: 10;
}

.socials > :last-child::after {
  left: auto;
  right: 0;
  transform: translateX(0) translateY(4px);
}

.social:hover::after,
.social:focus-visible::after,
.social.copied::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.socials > :last-child:hover::after,
.socials > :last-child:focus-visible::after {
  transform: translateX(0) translateY(0);
}

.bio {
  display: flex;
  flex-direction: column;
  gap: 11px;
  color: var(--sub);
  font-size: 14.5px;
  line-height: 1.68;
}

.bio strong {
  color: var(--text);
  font-weight: 500;
}

.favorites {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.label {
  font-size: 12px;
  font-weight: 500;
  color: var(--dim);
  letter-spacing: 0.02em;
}

.animes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 334px;
}

.anime {
  position: relative;
  flex: 1 1 0%;
  min-height: 68px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  overflow: hidden;
  isolation: isolate;
  cursor: default;
  transition:
    flex-grow 0.52s var(--ease),
    border-color 0.3s ease,
    opacity 0.35s ease;
}

.anime:focus-visible {
  outline: 1px solid var(--line-hi);
  outline-offset: 2px;
}

.animes.focused .anime {
  flex-grow: 0.82;
  opacity: 0.56;
}

.animes.focused .anime.open {
  flex-grow: 1.85;
  opacity: 1;
  border-color: var(--line-hi);
}

.banner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
  transform: scale(1.04) translate3d(0, 0, 0);
  filter: brightness(0.72) contrast(1.04) saturate(0.88);
  will-change: transform, filter;
  transition: filter 0.45s var(--ease);
  user-select: none;
  -webkit-user-drag: none;
}

.anime.open .banner {
  filter: brightness(0.96) contrast(1.03) saturate(1.06);
}

.shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(9, 9, 11, 0.88) 0%, rgba(9, 9, 11, 0.44) 45%, rgba(9, 9, 11, 0.08) 100%),
    linear-gradient(0deg, rgba(9, 9, 11, 0.72) 0%, rgba(9, 9, 11, 0) 68%);
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.anime.open .shade {
  opacity: 0.82;
}

.info {
  position: absolute;
  inset: 0;
  padding: 15px 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.jp {
  font-size: 11px;
  font-weight: 500;
  color: rgba(242, 242, 244, 0.62);
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.anime.open .jp {
  opacity: 1;
  transform: translateY(0);
}

.title {
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
  transition: transform 0.35s var(--ease);
}

.num {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(242, 242, 244, 0.55);
  transition: color 0.3s ease;
}

.anime.open .num {
  color: rgba(242, 242, 244, 0.9);
}

@media (max-width: 600px) {
  .wrap {
    margin: 0 auto;
    padding: 40px 18px 54px;
    gap: 30px;
  }

  .top {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .social::after {
    display: none;
  }

  .animes {
    height: 294px;
  }

  .info {
    padding: 12px 15px;
  }

  .title {
    font-size: 15px;
  }
}

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