/* ============================================================
   Home page — "Nothing Do There"
   Desktop layout is drawn on a 1672px-wide canvas and scaled with --u.
   ============================================================ */

:root {
  --u: clamp(0.62px, calc(100vw / 1672), 1.15px);
  /* Height of the sea block. The sea picture always spans the full width, so on
     monitors wider than the content cap the block grows with the width too;
     otherwise the picture would be cropped to a thin, zoomed-in band. */
  --sea: max(calc(var(--u) * 440), calc(100vw * 0.263));
  --cream: #eeebe4;
  --ink: #14233b;
  --ink-2: #3c4d66;
  --muted: #6d7b8d;
  --accent: #3b4e69;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.home {
  margin: 0;
  min-height: 100vh;
  background: var(--cream);
  color: var(--ink-2);
  font-family: 'DM Sans', system-ui, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- sea + wave ---------- */
.sea {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: var(--sea);
  z-index: 0;
  overflow: hidden;
}
.sea-img {
  position: absolute;
  inset: 0;
  background: url('assets/sea-bg.webp') 0 calc(100vw * -0.0538) / 100% auto no-repeat, #5d86ad;
}
.sea-wave {
  position: absolute;
  left: 0; bottom: -1px;
  width: 100%;
  height: calc(var(--u) * 160);
  fill: var(--cream);
  display: block;
}

/* ---------- leaf shadows (fixed to the viewport bottom) ---------- */
.leaf {
  position: fixed;
  bottom: calc(var(--u) * -60);
  width: calc(var(--u) * 720);
  aspect-ratio: 1;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: 1;
  opacity: 0.9;
  will-change: transform;
}
.leaf-left  { left:  calc(var(--u) * -170); background-image: url('assets/leaves-left.webp');  background-position: left bottom; }
.leaf-right { right: calc(var(--u) * -170); background-image: url('assets/leaves-right.webp'); background-position: right bottom; }

/* ---------- glass ---------- */
.glass {
  background: linear-gradient(135deg, rgba(255,255,255,0.40), rgba(255,255,255,0.16));
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: 0 12px 40px rgba(55,85,125,0.16), inset 0 1px 0 rgba(255,255,255,0.65);
}

/* ---------- header ---------- */
.site-header {
  position: fixed;
  z-index: 50;
  top: calc(var(--u) * 22);
  left: calc(var(--u) * 44);
  right: calc(var(--u) * 44);
  height: calc(var(--u) * 72);
  min-height: 54px;
  border-radius: calc(var(--u) * 24);
  display: flex;
  align-items: center;
  padding: 0 calc(var(--u) * 32) 0 calc(var(--u) * 34);
}
.brand {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 14);
  text-decoration: none;
  color: var(--ink);
}
.brand-jelly {
  height: calc(var(--u) * 46);
  min-height: 34px;
  width: auto;
  color: #fff;
  filter: drop-shadow(0 2px 6px rgba(60,90,130,0.35));
}
.brand-name {
  font-family: 'Bad Script', cursive;
  font-size: max(20px, calc(var(--u) * 33));
  color: #1b2b45;
  white-space: nowrap;
}
.nav {
  display: flex;
  align-items: center;
  gap: max(11px, calc(var(--u) * 30));
  margin-left: max(14px, calc(var(--u) * 56));
  min-width: 0;
}
.nav a {
  position: relative;
  white-space: nowrap;
  text-decoration: none;
  font-size: max(13px, calc(var(--u) * 16));
  color: #7b8aa0;
  transition: color .2s;
  padding: 6px 0;
}
.nav a:hover { color: var(--ink); }
.nav a.soon { cursor: default; }
.nav a.active { color: var(--ink); }
.nav a.active::after {
  content: '';
  position: absolute;
  left: 50%; bottom: -4px;
  width: 4px; height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--ink);
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex: none;
  gap: max(12px, calc(var(--u) * 26));
}
.header-divider {
  width: 1px;
  height: calc(var(--u) * 40);
  background: rgba(60,80,110,0.28);
}
.socials { display: flex; align-items: center; gap: calc(var(--u) * 26); }
.socials a {
  display: block;
  width: max(22px, calc(var(--u) * 30));
  height: max(22px, calc(var(--u) * 30));
  background: #2f4163;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
  opacity: 0.92;
  transition: transform .2s, opacity .2s;
}
.socials a:hover { transform: translateY(-2px); opacity: 1; }

/* language switch (markup injected by lang.js) */
.site-header .lang-switch { gap: 4px; }
.site-header .lang-btn {
  color: #6a7c96;
  font-family: 'DM Sans', sans-serif;
  font-size: max(11px, calc(var(--u) * 13));
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 7px 13px;
  border-radius: 999px;
  opacity: 1;
  transition: background .2s, color .2s;
}
.site-header .lang-btn:hover { color: var(--ink); }
.site-header .lang-btn.active {
  background: rgba(255,255,255,0.8);
  color: #1b2b45;
  box-shadow: 0 2px 8px rgba(60,90,130,0.15);
}
.site-header .lang-sep { color: #6a7c96; opacity: 0.55; }

/* ---------- main ---------- */
.home-main {
  position: relative;
  z-index: 2;
  padding-top: calc(var(--sea) + var(--u) * 16);
}

/* one single vertical column: なにも / しない */
.jp-vertical {
  position: absolute;
  right: calc(var(--u) * 80);
  top: calc(var(--u) * 143);
  writing-mode: vertical-rl;
  text-orientation: upright;
  height: calc(var(--u) * 150);
  padding-left: calc(var(--u) * 22);
  border-left: 1px solid rgba(255,255,255,0.65);
  font-family: 'Noto Serif JP', 'Yu Mincho', 'Hiragino Mincho ProN', serif;
  font-weight: 300;
  font-size: max(13px, calc(var(--u) * 19));
  letter-spacing: 0.4em;
  line-height: 1;
  white-space: nowrap;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 8px rgba(40,70,110,0.3);
}
.jp-gap { display: inline-block; height: 0.9em; }

/* ---------- To Do ---------- */
.todo {
  position: absolute;
  left: calc(var(--u) * 76);
  top: calc(var(--sea) - var(--u) * 262);
  width: calc(var(--u) * 388);
  padding: calc(var(--u) * 26) calc(var(--u) * 36) calc(var(--u) * 30);
  border-radius: calc(var(--u) * 26);
}
.todo-head { display: flex; align-items: center; justify-content: space-between; }
.todo h2 {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-size: max(17px, calc(var(--u) * 24));
  color: #3d4d66;
}
.todo-add {
  width: calc(var(--u) * 34); height: calc(var(--u) * 34);
  min-width: 28px; min-height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(60,80,110,0.38);
  background: rgba(255,255,255,0.25);
  color: #4a5b75;
  font-size: 20px; line-height: 1;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.todo-add:hover { background: rgba(255,255,255,0.7); transform: rotate(90deg); }
.todo-list {
  list-style: none;
  margin: calc(var(--u) * 14) 0 0;
  padding: 0 0 calc(var(--u) * 22);
  border-bottom: 1px solid rgba(60,80,110,0.18);
  /* about three rows; beyond that the list scrolls instead of growing into the project card */
  max-height: calc(var(--u) * 160);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(60,80,110,0.3) transparent;
}
.todo-item {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 12);
  padding: calc(var(--u) * 6) 0;
  cursor: pointer;
  user-select: none;
}
.todo-box {
  flex: none;
  width: max(24px, calc(var(--u) * 30));
  height: max(24px, calc(var(--u) * 30));
  border: 2px solid #50617c;
  border-radius: calc(var(--u) * 7);
  position: relative;
  background: rgba(255,255,255,0.3);
  transition: background .2s;
}
.todo-item:hover .todo-box { background: rgba(255,255,255,0.6); }
.todo-item.checked .todo-box::after {
  content: '';
  position: absolute;
  left: 31%; top: 8%;
  width: 26%; height: 54%;
  border: solid #34466a;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(40deg);
}
.todo-text {
  font-family: 'Bad Script', cursive;
  font-size: max(19px, calc(var(--u) * 30));
  line-height: 1.3;
  color: #435470;
  outline: none;
}
.todo-item.checked .todo-text { text-decoration: line-through; opacity: .6; }

/* ---------- profile ---------- */
.profile {
  position: absolute;
  left: 50%;
  top: calc(var(--sea) - var(--u) * 224);
  width: calc(var(--u) * 620);
  transform: translateX(-50%);
  text-align: center;
}
.avatar {
  width: calc(var(--u) * 124);
  height: calc(var(--u) * 124);
  min-width: 84px; min-height: 84px;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,0.92);
  box-shadow: 0 12px 34px rgba(40,65,100,0.35);
  background: #0e1218;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-name {
  margin: calc(var(--u) * 10) 0 0;
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-size: max(30px, calc(var(--u) * 46));
  color: var(--ink);
  letter-spacing: 0.005em;
}
.profile-rule {
  display: block;
  width: calc(var(--u) * 22);
  height: 1px;
  margin: calc(var(--u) * 4) auto calc(var(--u) * 8);
  background: #8996a8;
}
.profile-bio {
  margin: 0;
  font-size: max(13px, calc(var(--u) * 16));
  color: var(--muted);
  letter-spacing: 0.01em;
}

/* ---------- current project ---------- */
.project {
  width: min(calc(var(--u) * 1426), 92vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: calc(var(--u) * 748) 1fr;
  align-items: start;
  gap: calc(var(--u) * 50);
  padding: calc(var(--u) * 14);
  border-radius: calc(var(--u) * 30);
  background: rgba(247,245,240,0.78);
  border: 1px solid rgba(255,255,255,0.75);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 30px 70px -24px rgba(60,88,125,0.3), inset 0 1px 0 #fff;
}

.project-cover {
  position: relative;
  display: block;
  aspect-ratio: 748 / 412;
  border-radius: calc(var(--u) * 16);
  overflow: hidden;
  background: #6f95b8;
  box-shadow: 0 10px 30px -10px rgba(40,70,110,0.45);
  isolation: isolate;
}
.pc-layer { position: absolute; display: block; user-select: none; -webkit-user-drag: none; pointer-events: none; }
/* Layers keep the hand-drawn cover art. Every layer's own bottom edge sits
   below the card's bottom edge, so a cut-off canvas edge is never visible. */
.pc-bg    { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pc-back  { left: -4%; top: -14%; width: 56%; opacity: 0.85; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.pc-hero  { left: 15%; top: -20%; height: 180%; width: auto; filter: contrast(1.12) brightness(0.97); transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.pc-front { right: -6%; top: -36%; height: 150%; width: auto; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.pc-light { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; mix-blend-mode: soft-light; opacity: 0.9; }
.project-cover:hover .pc-back  { transform: translate(-1.5%, 2%); }
.project-cover:hover .pc-hero  { transform: scale(1.02); }
.project-cover:hover .pc-front { transform: translate(-2%, -2%); }

.project-info {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: calc(var(--u) * 34) calc(var(--u) * 40) calc(var(--u) * 26) 0;
}
.pi-top {
  display: flex;
  justify-content: space-between;
  font-size: max(9px, calc(var(--u) * 11));
  letter-spacing: 0.24em;
  color: #7d8aa0;
}
.pi-count { letter-spacing: 0.12em; }
.pi-rule {
  display: block;
  width: calc(var(--u) * 365);
  max-width: 70%;
  height: 1px;
  margin: calc(var(--u) * 14) 0 calc(var(--u) * 30);
  background: rgba(70,95,130,0.28);
}
.pi-title {
  margin: 0 0 calc(var(--u) * 20);
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-size: max(30px, calc(var(--u) * 52));
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: #101d33;
}
.pi-desc {
  margin: 0;
  max-width: calc(var(--u) * 410);
  font-size: max(13.5px, calc(var(--u) * 16.5));
  line-height: 1.55;
  font-weight: 400;
  color: #66758a;
}
.pi-tags {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--u) * 12);
  max-width: calc(var(--u) * 440);
  margin: calc(var(--u) * 24) 0 calc(var(--u) * 28);
}
.pi-tags span {
  padding: calc(var(--u) * 9) calc(var(--u) * 16);
  border-radius: calc(var(--u) * 8);
  background: rgba(205,215,228,0.5);
  font-size: max(9px, calc(var(--u) * 11));
  letter-spacing: 0.12em;
  color: #53647c;
}
.pi-read {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: calc(var(--u) * 20);
  padding: calc(var(--u) * 17) calc(var(--u) * 44);
  border-radius: 999px;
  background: linear-gradient(180deg, #46597a, var(--accent));
  color: #fff;
  text-decoration: none;
  font-family: 'Bad Script', cursive;
  font-style: normal;
  font-size: max(19px, calc(var(--u) * 32));
  box-shadow: 0 16px 30px -12px rgba(36,58,92,0.65), inset 0 1px 0 rgba(255,255,255,0.18);
  transition: transform .25s, box-shadow .25s;
}
.pi-read svg { width: calc(var(--u) * 24); min-width: 18px; height: auto; }
.pi-read:hover { transform: translateY(-2px); box-shadow: 0 20px 34px -12px rgba(36,58,92,0.7), inset 0 1px 0 rgba(255,255,255,0.22); }

.pi-quote {
  position: absolute;
  right: calc(var(--u) * 44);
  top: calc(var(--u) * 95);
  width: calc(var(--u) * 150);
  height: calc(var(--u) * 280);
  pointer-events: none;
}
.pi-sketch {
  position: absolute;
  right: 0; top: 0;
  width: calc(var(--u) * 150);
  height: calc(var(--u) * 170);
  background: #8ea0b8;
  opacity: 0.32;
  -webkit-mask: url('jellyfish-svgrepo-com.svg') center / contain no-repeat;
  mask: url('jellyfish-svgrepo-com.svg') center / contain no-repeat;
}
.pi-jp {
  position: absolute;
  left: calc(var(--u) * 52);
  top: calc(var(--u) * 150);
  margin: 0;
  writing-mode: vertical-rl;
  text-orientation: upright;
  padding-left: calc(var(--u) * 14);
  border-left: 1px solid rgba(80,100,130,0.35);
  font-family: 'Noto Serif JP', 'Yu Mincho', 'Hiragino Mincho ProN', serif;
  font-weight: 300;
  font-size: max(11px, calc(var(--u) * 13));
  letter-spacing: 0.32em;
  line-height: 1;
  color: #8a97a8;
}
.pi-dots {
  position: absolute;
  right: calc(var(--u) * 54);
  bottom: calc(var(--u) * 30);
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 14);
  color: #7d8aa0;
}
.pi-dots i { display: block; width: calc(var(--u) * 36); height: 1px; background: rgba(80,100,130,0.4); }
.pi-dots b { font-weight: 400; letter-spacing: 0.15em; font-size: 12px; }

/* ---------- home hub: two section tiles ---------- */
.hub {
  width: min(calc(var(--u) * 1426), 92vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(var(--u) * 28);
}
.hub-tile {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: calc(var(--u) * 28);
  overflow: hidden;
  isolation: isolate;
  background: #8fb3cc;
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: 0 30px 70px -26px rgba(60,88,125,0.45);
  color: #fff;
  text-decoration: none;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s;
}
.hub-tile:hover { transform: translateY(-4px); box-shadow: 0 38px 80px -26px rgba(60,88,125,0.55); }
.hub-tile img { position: absolute; display: block; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.hub-bg { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hub-manga .hub-fg { left: 34%; top: -8%; height: 150%; width: auto; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.hub-games .hub-fg { right: 4%; top: 6%; height: 108%; width: auto; filter: drop-shadow(0 8px 24px rgba(0,0,0,.4)); transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.hub-games .hub-bg { filter: saturate(.8) brightness(.78); }
.hub-tile:hover .hub-fg { transform: scale(1.03); }
.hub-tile::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(20,35,60,0.55), rgba(20,35,60,0) 55%);
  z-index: 1;
  pointer-events: none;
}
.hub-label {
  position: absolute;
  left: calc(var(--u) * 40); bottom: calc(var(--u) * 34);
  z-index: 2;
  display: flex; align-items: center; gap: calc(var(--u) * 18);
  font-family: 'Playfair Display', serif;
  font-size: max(24px, calc(var(--u) * 46));
  text-shadow: 0 2px 16px rgba(10,25,50,0.5);
}
.hub-label svg { width: calc(var(--u) * 34); min-width: 22px; height: auto; transition: transform .35s; }
.hub-tile:hover .hub-label svg { transform: translateX(6px); }

/* ---------- footer ---------- */
.footer-socials { display: none; }
.home-footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: calc(var(--u) * 56) 16px calc(var(--u) * 150);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #98a4b3;
}

/* ============================================================
   Narrow screens: single column
   ============================================================ */
@media (max-width: 1180px) {
  .site-header { padding: 0 20px; }
  .brand-name { font-size: 22px; }
  .nav { gap: 13px; margin-left: 14px; }
  .nav a { font-size: 13px; }
  .site-header .socials { gap: 12px; }
  .header-right { gap: 12px; }
}
@media (max-width: 1000px) and (min-width: 901px) {
  .site-header .socials, .header-divider { display: none; }
  .brand-name { font-size: 20px; }
  .nav { gap: 10px; margin-left: 10px; }
}
@media (max-width: 900px) {
  :root { --u: 1px; --sea: 290px; }

  .sea { height: 290px; }
  .sea-img { background: url('assets/sea-bg.webp') 72% 0 / cover no-repeat, #5d86ad; }
  .sea-wave { height: 80px; }
  .leaf { width: 380px; bottom: -30px; }
  .leaf-left { left: -150px; }
  .leaf-right { right: -150px; }

  .site-header { top: 10px; left: 10px; right: 10px; height: 56px; padding: 0 14px; border-radius: 18px; }
  .nav, .header-divider, .site-header .socials { display: none; }
  .brand-jelly { height: 34px; }
  .brand-name { font-size: 22px; }
  .site-header .lang-btn { padding: 6px 10px; }
  .footer-socials { display: flex; justify-content: center; gap: 22px; margin-bottom: 18px; }
  .footer-socials a { width: 24px; height: 24px; }

  .home-main {
    padding-top: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 10px;
  }
  .jp-vertical { display: none; }

  .profile { position: relative; left: auto; top: auto; transform: none; width: 100%; order: 1; padding: 0 16px; }
  .avatar { width: 104px; height: 104px; }
  .profile-name { font-size: 34px; }

  .todo { position: relative; left: auto; top: auto; order: 2; width: calc(100% - 32px); max-width: 440px; margin: 26px 0 0; padding: 22px 26px 22px; }
  .project { order: 3; width: calc(100% - 24px); max-width: 640px; margin-top: 26px; grid-template-columns: 1fr; gap: 10px; padding: 10px; border-radius: 24px; }
  .project-info { padding: 14px 12px 18px; }
  .pi-rule { width: 100%; max-width: 100%; margin-bottom: 18px; }
  .pi-title { font-size: 34px; }
  .pi-desc { max-width: none; }
  .pi-read { padding: 14px 34px; }
  .pi-quote, .pi-dots { display: none; }
  .hub { order: 3; grid-template-columns: 1fr; width: calc(100% - 24px); max-width: 640px; margin-top: 26px; gap: 16px; }
  .hub-label { left: 22px; bottom: 18px; }
  .home-footer { padding: 40px 16px 110px; }
}
