:root {
  --ink: #1a1210;
  --cream: #f6ecda;
  --cream-soft: rgba(246, 236, 218, 0.88);
  --gold: #e8c07a;
  --gold-bright: #f4d7a0;
  --gold-dim: rgba(232, 192, 122, 0.28);
  --crimson: #b4333c;
  --panel: rgba(14, 9, 8, 0.58);
  --panel-border: rgba(244, 215, 160, 0.2);
  --muted: rgba(246, 236, 218, 0.62);
  --text: #f8f0e2;
  --shadow: 0 30px 70px rgba(0, 0, 0, 0.48);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --mx: 50%;
  --my: 18%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  color-scheme: dark;
}

body {
  min-height: 100dvh;
  font-family: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", sans-serif;
  color: var(--text);
  background: #090706;
  overflow-x: hidden;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    url("assets/bg.jpg") center / cover no-repeat;
  transform: scale(1.04);
  animation: drift 28s var(--ease) infinite alternate;
}

@media (min-aspect-ratio: 1/1) {
  .atmosphere {
    background-image: url("assets/og.jpg");
  }
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 28%, rgba(18, 10, 8, 0.18), rgba(8, 5, 4, 0.72) 72%),
    linear-gradient(180deg, rgba(8, 5, 4, 0.2), rgba(8, 5, 4, 0.55));
}

.grain,
.grain::after {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1;
}

.grain {
  opacity: 0.18;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.page {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding: max(2rem, env(safe-area-inset-top)) 1.15rem max(2.4rem, env(safe-area-inset-bottom));
}

.panel {
  position: relative;
  width: min(100%, 26.5rem);
  padding: 2.1rem 1.25rem 1.4rem;
  border: 1px solid var(--panel-border);
  border-radius: 1.7rem;
  background:
    linear-gradient(180deg, rgba(28, 16, 14, 0.42), rgba(10, 7, 6, 0.72));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 244, 220, 0.12);
  backdrop-filter: blur(22px) saturate(1.25);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
  overflow: hidden;
  isolation: isolate;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(26rem circle at var(--mx) var(--my), rgba(232, 192, 122, 0.14), transparent 46%);
  pointer-events: none;
  z-index: 0;
}

.panel > * {
  position: relative;
  z-index: 1;
}

.watermark {
  position: absolute;
  right: -1.2rem;
  top: -1.4rem;
  width: 11rem;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}

.profile {
  display: grid;
  justify-items: center;
  text-align: center;
}

.avatar-wrap {
  position: relative;
  width: 7.2rem;
  height: 7.2rem;
  margin-bottom: 1.15rem;
}

.avatar-wrap::before,
.avatar-wrap::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  pointer-events: none;
}

.avatar-wrap::before {
  background: radial-gradient(circle, rgba(232, 192, 122, 0.38), transparent 68%);
  filter: blur(8px);
}

.avatar-wrap::after {
  inset: -3px;
  border: 1px solid rgba(244, 215, 160, 0.55);
  box-shadow: 0 0 0 5px rgba(180, 51, 60, 0.16);
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  background: #fffaf3;
  border: 3px solid #f4ead6;
}

.kicker {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

h1 {
  margin: 0.45rem 0 0.15rem;
  font-family: "Shippori Mincho", "Yu Mincho", serif;
  font-size: clamp(2.15rem, 8vw, 2.7rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1;
  text-indent: 0.18em;
}

.handle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.85rem 0 0;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--gold-dim);
  color: var(--gold-bright);
  background: rgba(232, 192, 122, 0.08);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.handle:hover,
.handle:focus-visible {
  border-color: var(--gold);
  background: rgba(232, 192, 122, 0.16);
}

.bio {
  max-width: 20rem;
  margin: 0.95rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
  font-family: "Shippori Mincho", serif;
}

.rule {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 1.35rem 0 1.15rem;
  color: var(--gold);
}

.rule::before,
.rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

.rule span {
  width: 0.4rem;
  height: 0.4rem;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(232, 192, 122, 0.45);
}

.links {
  display: grid;
  gap: 0.7rem;
}

.link {
  --accent: var(--gold);
  display: grid;
  grid-template-columns: 2.7rem minmax(0, 1fr) 1.6rem;
  align-items: center;
  gap: 0.85rem;
  min-height: 3.7rem;
  padding: 0.7rem 0.9rem;
  border-radius: 1.05rem;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 244, 228, 0.045);
  border: 1px solid rgba(246, 236, 218, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease), box-shadow 0.35s var(--ease);
  animation: rise 0.8s var(--ease) both;
}

.link:nth-child(1) { animation-delay: 0.05s; }
.link:nth-child(2) { animation-delay: 0.12s; }
.link:nth-child(3) { animation-delay: 0.19s; }
.link:nth-child(4) { animation-delay: 0.26s; }
.link:nth-child(5) { animation-delay: 0.33s; }
.link:nth-child(6) { animation-delay: 0.4s; }
.link:nth-child(7) { animation-delay: 0.47s; }
.link:nth-child(8) { animation-delay: 0.54s; }
.link:nth-child(9) { animation-delay: 0.61s; }

.link:hover,
.link:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 55%, white 10%);
  background: rgba(255, 244, 228, 0.09);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.link-icon {
  width: 2.7rem;
  height: 2.7rem;
  display: grid;
  place-items: center;
  border-radius: 0.85rem;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
}

.link-icon svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: currentColor;
}

.link-icon.is-logo {
  padding: 0;
  background: transparent;
  border: 0;
  overflow: hidden;
}

.link-icon.is-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.link-icon.is-mark {
  background: #fffaf3;
  border: 1px solid rgba(246, 236, 218, 0.22);
}

.link-icon.is-mark img {
  width: 58%;
  height: 58%;
  object-fit: contain;
  margin: auto;
}

.link-icon.is-wide img {
  width: 74%;
  height: 74%;
}

.link-icon.is-dark {
  background: #161018;
  border: 1px solid rgba(183, 148, 246, 0.22);
}

.link-icon.is-dark img {
  width: 86%;
  height: 86%;
}

.link-text {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}

.link-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.link-desc {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.link-go {
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  color: var(--gold-bright);
  opacity: 0.78;
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}

.link-go svg {
  width: 0.95rem;
  height: 0.95rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.link:hover .link-go,
.link:focus-visible .link-go {
  opacity: 1;
  transform: translate(2px, -2px);
}

.foot {
  margin: 1.25rem 0 0;
  text-align: center;
  color: rgba(246, 236, 218, 0.46);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
}

@keyframes drift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.1) translate3d(0, -1.4%, 0); }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .atmosphere,
  .link,
  .link-go {
    animation: none;
    transition: none;
  }
}

@media (max-width: 430px) {
  .page {
    padding: max(0.85rem, env(safe-area-inset-top)) 0.8rem max(0.95rem, env(safe-area-inset-bottom));
  }

  .panel {
    padding: 1.15rem 0.85rem 1.05rem;
    border-radius: 1.4rem;
  }

  .avatar-wrap {
    width: 5.1rem;
    height: 5.1rem;
    margin-bottom: 0.55rem;
  }

  h1 {
    font-size: 1.92rem;
    letter-spacing: 0.12em;
    text-indent: 0.12em;
  }

  .handle {
    margin-top: 0.55rem;
  }

  .bio {
    margin-top: 0.55rem;
    font-size: 0.84rem;
  }

  .rule {
    margin: 0.75rem 0 0.7rem;
  }

  .links {
    gap: 0.48rem;
  }

  .link {
    min-height: 3.05rem;
    padding: 0.48rem 0.68rem;
    gap: 0.65rem;
  }

  .link-icon {
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 0.72rem;
  }

  .foot {
    display: none;
  }
}
