/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --black: #000;
  --white: #fff;
  --gray: rgba(255,255,255,0.4);
  --gray-line: rgba(255,255,255,0.12);
  --gray-hover: rgba(255,255,255,0.06);
  --font: 'Inter', 'Noto Sans JP', -apple-system, sans-serif;
  --font-display: 'DM Serif Display', serif;
  --sidebar-w: 200px;
  --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--black);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: none;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ===== MOUSE (nezumi) CURSOR ===== */
.mouse-cursor {
  position: fixed;
  z-index: 10001;
  pointer-events: none;
  opacity: 0.8;
}

/* ===== CAT CURSOR ===== */
.cat {
  position: fixed;
  z-index: 10000;
  pointer-events: none;
  color: var(--white);
  opacity: 0.7;
  transition: opacity 0.3s;
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.2));
}

.cat__walk { display: block; }
.cat__sit { display: none; }
.cat--idle .cat__walk { display: none; }
.cat--idle .cat__sit { display: block; }

@media (pointer: coarse) {
  .cat { display: none; }
  .mouse-cursor { display: none; }
  body { cursor: default; }
}

/* ===== SPLASH ===== */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 1s ease, visibility 1s ease;
}

.splash--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash__inner {
  text-align: center;
  position: relative;
}

.splash__name {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 400;
  letter-spacing: 4px;
  opacity: 0;
  transform: translateY(20px);
  animation: splashReveal 1.8s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

.splash__line {
  width: 0;
  height: 1px;
  background: var(--white);
  margin: 24px auto 0;
  animation: splashLineGrow 1.2s cubic-bezier(0.22, 1, 0.36, 1) 1s forwards;
}

@keyframes splashReveal {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes splashLineGrow {
  0% { width: 0; opacity: 0; }
  100% { width: 120px; opacity: 0.5; }
}

/* ===== LAYOUT ===== */
.site {
  display: flex;
  min-height: 100vh;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.site--visible { opacity: 1; }

/* ===== SIDEBAR ===== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  padding: 48px 32px;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.sidebar__logo {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--white);
  margin-bottom: 48px;
  display: block;
  line-height: 1.5;
  opacity: 0;
  animation: fadeSlideIn 0.6s ease 2.8s forwards;
}

.sidebar__nav { display: flex; flex-direction: column; gap: 4px; }

.sidebar__link {
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: 1px;
  color: var(--gray);
  padding: 6px 0;
  transition: var(--transition);
  opacity: 0;
  animation: fadeSlideIn 0.6s ease forwards;
}

.sidebar__nav li:nth-child(1) .sidebar__link { animation-delay: 2.9s; }
.sidebar__nav li:nth-child(2) .sidebar__link { animation-delay: 3.0s; }
.sidebar__nav li:nth-child(3) .sidebar__link { animation-delay: 3.1s; }
.sidebar__nav li:nth-child(4) .sidebar__link { animation-delay: 3.2s; }
.sidebar__nav li:nth-child(5) .sidebar__link { animation-delay: 3.3s; }
.sidebar__nav li:nth-child(6) .sidebar__link { animation-delay: 3.4s; }

.sidebar__link:hover,
.sidebar__link--active { color: var(--white); }

@keyframes fadeSlideIn {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ===== MOBILE HEADER ===== */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 20px 24px;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  align-items: center;
  justify-content: space-between;
}

.mobile-header__logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 2px;
}

.mobile-header__toggle {
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 20px;
  position: relative;
}

.mobile-header__toggle span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--white);
  transition: var(--transition);
}

.mobile-header__toggle span:first-child { top: 4px; }
.mobile-header__toggle span:last-child { bottom: 4px; }

.mobile-header__toggle.active span:first-child {
  top: 50%; transform: rotate(45deg);
}
.mobile-header__toggle.active span:last-child {
  bottom: 50%; transform: rotate(-45deg);
}

/* ===== CONTENT ===== */
.content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 0 80px;
  max-width: 960px;
  position: relative;
  z-index: 1;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 0;
  overflow: hidden;
}

.hero__center {
  position: relative;
  z-index: 3;
  opacity: 0;
  animation: heroFadeIn 1.2s ease 2.6s forwards;
}

@keyframes heroFadeIn {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

.hero__name-ja {
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 8px;
  color: var(--gray);
  margin-bottom: 8px;
}

.hero__name-en {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  font-weight: 300;
  letter-spacing: 2px;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero__roles {
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: 3px;
  color: var(--gray);
}

/* ===== FLOATING BOOK COVERS ===== */
.floats {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  perspective: 1200px;
}

.float-book-wrap {
  position: absolute;
  left: 0;
  top: 0;
  transform-style: preserve-3d;
}

.float-book {
  width: 110px;
  height: auto;
  border-radius: 4px;
  box-shadow: 6px 6px 30px rgba(0,0,0,0.6), 0 0 40px rgba(255,255,255,0.04);
  opacity: 0;
  will-change: transform, opacity;
  transition: opacity 1.5s ease;
  backface-visibility: visible;
}

.float-book.float-book--visible {
  opacity: 0.35;
}

.float-book--round {
  width: 80px;
  border-radius: 18px;
}

/* Rotation counter — centered on book, flashes at milestones */
.spin-badge {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Serif Display', serif;
  font-size: 36px;
  font-weight: 700;
  color: rgba(255, 220, 80, 0.95);
  text-shadow: 0 0 20px rgba(255, 200, 60, 0.9), 0 0 40px rgba(255, 200, 60, 0.5);
  opacity: 0;
  z-index: 10;
  pointer-events: none;
}

.spin-badge.milestone {
  animation: milestoneFlash 5s ease forwards;
}

@keyframes milestoneFlash {
  0%   { opacity: 0; transform: scale(0.3); }
  5%   { opacity: 1; transform: scale(1.3); }
  10%  { transform: scale(1); }
  60%  { opacity: 1; }
  100% { opacity: 0; transform: scale(0.8); }
}

/* App icon placeholder */
.app-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #3a3a5a, #1a1a3a);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 4px 4px 20px rgba(0,0,0,0.5);
}

.app-icon span { font-size: 1.4rem; }
.app-icon small {
  font-size: 0.45rem;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}

/* Large app icon for orbit */
.app-icon--lg {
  width: 96px;
  height: 96px;
  border-radius: 22px;
}

.app-icon--lg span { font-size: 2.2rem; }
.app-icon--lg small { font-size: 0.6rem; letter-spacing: 1px; margin-top: 4px; }

/* Latest teaser */
.hero__latest {
  position: relative;
  z-index: 3;
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-line);
}

.hero__latest-label {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 16px;
}

.hero__latest-item {
  display: flex;
  gap: 24px;
  align-items: baseline;
  padding: 8px 0;
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--gray);
  transition: var(--transition);
}

.hero__latest-item:hover { color: var(--white); }

.hero__latest-item time {
  font-size: 0.7rem;
  letter-spacing: 1px;
  flex-shrink: 0;
  width: 60px;
}

/* ===== FADE-IN ON SCROLL ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== SECTIONS ===== */
.section { padding: 120px 0 80px; }

.section__heading {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 300;
  letter-spacing: 2px;
  margin-bottom: 40px;
}

.section__heading-ja {
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 3px;
  color: var(--gray);
  margin-left: 12px;
}

.divider {
  width: 100%;
  height: 1px;
  background: var(--gray-line);
  margin-bottom: 48px;
}

/* ===== INFORMATION ===== */
.info-list { display: flex; flex-direction: column; }

.info-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--gray-line);
  transition: var(--transition);
}

.info-item:hover {
  background: var(--gray-hover);
  padding-left: 12px;
  margin-left: -12px;
  padding-right: 12px;
  margin-right: -12px;
}

.info-item__date {
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: 2px;
  color: var(--gray);
}

.info-item__text {
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.6;
}

/* ===== WORKS ===== */
.works-list { display: flex; flex-direction: column; }

.works-item {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 28px 0;
  border-bottom: 1px solid var(--gray-line);
  transition: var(--transition);
}

.works-item:hover {
  background: var(--gray-hover);
  padding-left: 16px;
  padding-right: 16px;
  margin-left: -16px;
  margin-right: -16px;
}

.works-item__cat {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 2px;
  color: var(--gray);
  text-transform: uppercase;
}

.works-item__title {
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 4px;
}

a.works-item__title:hover { opacity: 0.6; }

.works-item__desc {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--gray);
  line-height: 1.6;
}

.works-item__arrow {
  font-size: 0.9rem;
  color: var(--gray);
  transition: var(--transition);
}

.works-item:hover .works-item__arrow {
  color: var(--white);
  transform: translateX(4px);
}

/* ===== BOOKS GRID ===== */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 24px;
}

.books-grid__item {
  display: block;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.books-grid__item:hover {
  transform: translateY(-8px) scale(1.05);
}

.books-grid__item img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 4px 4px 20px rgba(0,0,0,0.5), 0 0 30px rgba(255,255,255,0.03);
  display: block;
}

.books-grid__more {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-line);
}

.books-grid__link {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 2px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--gray-line);
  transition: var(--transition);
}

.books-grid__link:hover { border-color: var(--white); }

/* ===== YOUTUBE ===== */
.youtube-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.youtube-card {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 32px 0;
  border-bottom: 1px solid var(--gray-line);
  transition: var(--transition);
}

.youtube-card:hover {
  background: var(--gray-hover);
  padding-left: 16px;
  padding-right: 16px;
  margin-left: -16px;
  margin-right: -16px;
}

.youtube-card__icon {
  width: 48px;
  height: 48px;
  border: 1px solid var(--gray-line);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--gray);
  transition: var(--transition);
}

.youtube-card:hover .youtube-card__icon {
  border-color: var(--white);
  color: var(--white);
}

.youtube-card__name {
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.youtube-card__desc {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--gray);
}

.youtube-card__arrow {
  font-size: 0.9rem;
  color: var(--gray);
  transition: var(--transition);
}

.youtube-card:hover .youtube-card__arrow {
  color: var(--white);
  transform: translateX(4px);
}

/* ===== APPS ===== */
.app-showcase {
  padding: 40px 0;
}

.app-showcase__header {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
}

.app-showcase__icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--gray-line);
  border-radius: 16px;
  overflow: hidden;
}

.app-showcase__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-showcase__name {
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.app-showcase__sub {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--gray);
  letter-spacing: 0.5px;
}

.app-showcase__desc {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--gray);
  line-height: 1.9;
  margin-bottom: 24px;
}

.app-showcase__features {
  margin-bottom: 24px;
}

.app-showcase__features li {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--gray);
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-line);
  letter-spacing: 0.5px;
}

.app-showcase__link {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 2px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--gray-line);
  transition: var(--transition);
}

.app-showcase__link:hover { border-color: var(--white); }

/* ===== COURSES ===== */
.coming-soon {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 300;
  letter-spacing: 4px;
  color: var(--gray);
  padding: 60px 0;
}

/* ===== PROFILE ===== */
.profile__name-en {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.profile__name-ja {
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 6px;
  color: var(--gray);
  margin-bottom: 40px;
}

.profile__list { margin-bottom: 40px; }

.profile__list li {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--gray);
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-line);
  line-height: 1.6;
}

.profile__links { display: flex; flex-direction: column; gap: 8px; }

.profile__links a {
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 1px;
  color: var(--gray);
  padding: 8px 0;
  transition: var(--transition);
}

.profile__links a:hover { color: var(--white); }
.profile__links a::after { content: ' →'; }

/* ===== FOOTER ===== */
.footer { padding: 48px 0 80px; margin-top: 80px; }

.footer__copy {
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 2px;
  color: var(--gray);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar { display: none; }

  .sidebar.mobile-open {
    display: flex;
    position: fixed;
    width: 100%;
    height: 100vh;
    background: var(--black);
    z-index: 150;
    padding-top: 80px;
    align-items: center;
  }

  .sidebar.mobile-open .sidebar__logo { display: none; }
  .sidebar.mobile-open .sidebar__nav { align-items: center; gap: 16px; }
  .sidebar.mobile-open .sidebar__link {
    font-size: 1.2rem;
    opacity: 1;
    animation: none;
  }

  .mobile-header { display: flex; }

  .content {
    margin-left: 0;
    padding: 80px 24px 0;
  }

  .hero__name-en {
    font-size: clamp(2rem, 10vw, 3.5rem);
  }

  .floats { display: none; }

  .info-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .works-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .works-item__arrow { display: none; }

}
