:root {
  --bg: #0b0c0e;
  --bg-radial: #16181c;
  --fg: #d8d7d2;
  --muted: #9a9a95;
  --border: #2a2b2e;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  font-weight: 300;
  overflow-wrap: break-word;
}

a, a:visited {
  color: inherit;
}

/* ---- hero ---- */

.hero {
  position: relative;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 35%, var(--bg-radial) 0%, var(--bg) 70%);
}

#rain-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  opacity: 0;
  animation: fade-in 1.4s ease-out 0.2s forwards;
}

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

.hero h1 {
  margin: 0;
  line-height: 0;
}

.hero .logo {
  width: clamp(220px, 34vw, 420px);
  height: auto;
  filter: url(#hblur);
}

.hero .tagline {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}

.visit-count {
  margin: 0.5rem 0 0;
  font-size: 0.65rem;
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
}

.hero-nav {
  margin-top: 2.5rem;
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  max-width: 100vw;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 1.5rem;
}

.hero-nav::-webkit-scrollbar {
  display: none;
}

.hero-nav.nav-overflow {
  justify-content: flex-start;
}

.hero-nav a {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-decoration: none;
  color: var(--muted);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

@keyframes nav-scroll-hint {
  0%, 33%, 100% { transform: translateX(0); }
  13% { transform: translateX(-15px); }
  23% { transform: translateX(3px); }
}

.hero-nav.nav-hint {
  animation: nav-scroll-hint 3s ease-in-out 1.6s infinite;
}

.hero-nav a:hover {
  color: var(--fg);
  border-color: var(--fg);
}

.scroll-hint {
  position: absolute;
  z-index: 1;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  animation: fade-in 1.4s ease-out 0.8s forwards;
}

.scroll-hint span {
  display: block;
  width: 1px;
  height: 5rem;
  background: var(--border);
  position: relative;
  overflow: hidden;
}

.scroll-hint span::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--muted);
  animation: scroll-drip 3s ease-in-out 1.6s infinite;
}

@keyframes scroll-drip {
  0% { top: -100%; }
  60% { top: 100%; }
  100% { top: 100%; }
}

/* ---- main content ---- */

main {
  max-width: 34rem;
  margin: 0 auto;
  padding: 5rem 1.5rem 4rem;
}

@media (max-width: 480px) {
  main {
    padding: 4rem 1.25rem 3rem;
  }
}

#papers h2 {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 2rem;
}

#papers-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

#papers-list li {
  font-size: 0.9rem;
  line-height: 1.6;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
}

#papers-list li:last-child {
  border-bottom: none;
}

#papers-list a {
  text-decoration: none;
}

#papers-list a:hover {
  text-decoration: underline;
}

.paper-tag {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.68rem;
  color: var(--muted);
  vertical-align: middle;
  white-space: nowrap;
}

.paper-tag-first {
  color: #c98686;
  border-color: #4a3535;
}

.paper-tag-corresponding {
  color: #86b896;
  border-color: #354a3d;
}

.paper-meta {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.3rem;
}

.papers-status {
  color: var(--muted);
}

footer {
  margin-top: 4rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

.footer-home {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-decoration: none;
  color: var(--muted);
  margin-bottom: 1.2rem;
  text-align: left;
}

.footer-home:hover {
  color: var(--fg);
}

.footer-home:hover .back-arrow {
  transform: translateX(-3px);
}


/* ---- subpages ---- */

.stars-page {
  background: #000;
}

#stars-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.stars-page .subheader,
.stars-page main {
  position: relative;
  z-index: 1;
}

.subheader {
  padding: 2rem 1.5rem 0;
  max-width: 34rem;
  margin: 0 auto;
}

.subheader a {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-decoration: none;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.subheader a:hover {
  color: var(--fg);
}

.back-arrow {
  display: inline-block;
  transition: transform 0.2s;
}

.subheader a:hover .back-arrow {
  transform: translateX(-3px);
}

.page-title {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 2.5rem;
  text-transform: uppercase;
}

.page-note {
  font-size: 0.72rem;
  color: var(--muted);
  margin: -1.8rem 0 2.5rem;
}

.profile-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin: -1.8rem 0 2.5rem;
}

.page-note.talks-more {
  margin: 1.5rem 0 0;
  font-size: 0.64rem;
  opacity: 0.55;
}

.profile-block {
  margin-bottom: 2.5rem;
}

.profile-block h2 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
}

.profile-block p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--fg);
  margin: 0 0 0.3rem;
}

.profile-block .placeholder {
  color: var(--muted);
}

.timeline,
.cred-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline li {
  display: flex;
  gap: 1.2rem;
  font-size: 0.88rem;
  line-height: 1.6;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}

.timeline li:last-child {
  border-bottom: none;
}

.timeline-year {
  flex: 0 0 auto;
  width: 5.5rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 480px) {
  .timeline li {
    gap: 0.8rem;
  }
  .timeline-year {
    width: 4.2rem;
  }
}

.cred-list li {
  font-size: 0.88rem;
  line-height: 1.6;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.cred-list li:last-child {
  border-bottom: none;
}

.talks-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.talks-list li {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.talks-list li:last-child {
  border-bottom: none;
}

.talk-date {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.talk-event {
  font-size: 0.78rem;
  color: var(--muted);
}

.talk-title {
  font-size: 0.92rem;
  line-height: 1.6;
}

.talk-tag {
  margin-left: 0.5rem;
  color: #c98686;
  font-size: 0.75rem;
}

.talk-title a {
  text-decoration: none;
}

.talk-title a:hover {
  text-decoration: underline;
}

.talk-with-thumb {
  flex-direction: row !important;
  align-items: center;
  gap: 1.1rem;
}

.talk-thumb {
  width: 108px;
  height: 76px;
  object-fit: cover;
  object-position: left center;
  border-radius: 4px;
  flex-shrink: 0;
  display: block;
  background: var(--bg-radial);
}

.talk-text {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

@media (max-width: 480px) {
  .talk-thumb {
    width: 76px;
    height: 54px;
  }
}

.book-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.book-list li {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1.1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}

.book-list li:last-child {
  border-bottom: none;
}

.book-cover {
  width: 70px;
  height: auto;
  border-radius: 3px;
  flex-shrink: 0;
  display: block;
}

.book-cover-logo {
  height: 95px;
  object-fit: contain;
  object-position: center;
  background: #fff;
  padding: 6px 0;
}

.book-text {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.book-title {
  font-size: 0.92rem;
  line-height: 1.6;
  text-decoration: none;
}

.book-title:hover {
  text-decoration: underline;
}

.book-author {
  font-size: 0.78rem;
  color: var(--muted);
}

.vinyl-icon,
.section-icon {
  vertical-align: middle;
  margin-right: 0.45rem;
  color: var(--muted);
}

.lp-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lp-list li {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}

.lp-list li:last-child {
  border-bottom: none;
}

.lp-artist {
  font-size: 0.78rem;
  color: var(--muted);
}

.lp-title {
  font-size: 0.92rem;
  line-height: 1.5;
}

.game-meta {
  font-size: 0.78rem;
  color: var(--muted);
  opacity: 0.6;
}

.tbc {
  margin-top: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.03em;
  font-size: 0.85rem;
}

.tbc-arrow {
  color: var(--fg);
  flex-shrink: 0;
}
