:root {
  --paper: #f3efe4;
  --paper-deep: #e7dfcf;
  --ink: #1d1d1d;
  --muted: #585858;
  --line: rgba(33, 33, 33, 0.14);
  --shadow: rgba(26, 25, 20, 0.2);
  --highlight: #8b6a45;
  --accent: #3e5f7a;
  --bg-deep: #1d1d1d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "Hiragino Sans", "Yu Gothic", sans-serif;
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.08), transparent 30%),
    var(--bg-deep);
  color: var(--ink);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  min-height: 100vh;
  padding: 48px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.note-stage {
  width: min(1200px, 100%);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 38px;
}

.note-shell {
  position: relative;
  width: min(860px, 100%);
  aspect-ratio: 210 / 297;
  max-height: 88vh;
  min-height: 560px;
  perspective: 1800px;
  transform-style: preserve-3d;
}

.book-pages,
.note-cover {
  position: absolute;
  inset: 0;
}

.page-sheet,
.note-cover {
  border-radius: 14px 14px 18px 18px;
  background: var(--paper);
  border: 1px solid rgba(32, 32, 32, 0.18);
  box-shadow: 14px 18px 34px rgba(0, 0, 0, 0.2);
}

.book-pages {
  z-index: 2;
  perspective: 1800px;
  transform-style: preserve-3d;
  touch-action: pan-y;
}

.book-pages img {
  -webkit-user-drag: none;
  user-select: none;
}

.page-sheet {
  position: absolute;
  inset: 0;
  overflow: hidden;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  transform-origin: left center;
  transform: rotateY(0deg);
  transition:
    transform 850ms cubic-bezier(0.645, 0.045, 0.355, 1),
    box-shadow 850ms ease;
  background: var(--paper);
  box-shadow: 14px 18px 34px rgba(0, 0, 0, 0.2);
  will-change: transform;
}

.page-sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.045), transparent 12%),
    linear-gradient(270deg, rgba(0,0,0,0.08), transparent 18%);
  opacity: 0.35;
  pointer-events: none;
  transition: opacity 850ms ease;
}

.page-sheet.is-current {
  pointer-events: auto;
  cursor: grab;
}

.book-pages.is-dragging,
.book-pages.is-dragging .page-sheet.is-current {
  cursor: grabbing;
  user-select: none;
}

.page-sheet:not(.is-current) {
  pointer-events: none;
}

.page-sheet.is-turned {
  transform: rotateY(-180deg);
  box-shadow: -12px 16px 28px rgba(0, 0, 0, 0.14);
}

.page-sheet.is-turning,
.page-sheet.is-turning-back {
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.28);
}

.page-sheet.is-turning::before,
.page-sheet.is-turning-back::before {
  opacity: 1;
}

.note-cover {
  z-index: 100;
  transform-origin: left center;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.24), rgba(0,0,0,0.04)),
    linear-gradient(180deg, rgba(255,255,255,0.4), rgba(0,0,0,0.03)),
    var(--paper-deep);
  transition: transform 1.15s cubic-bezier(0.645, 0.045, 0.355, 1), box-shadow 1.15s ease;
  box-shadow: 10px 12px 24px rgba(0, 0, 0, 0.18);
  will-change: transform;
}

.note-shell.is-opened .note-cover {
  transform: rotateY(-180deg);
  box-shadow: -12px 14px 24px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}

.note-shell.is-opened .cover-inner {
  opacity: 0;
  transform: translateX(-12px);
  filter: blur(1.5px);
  pointer-events: none;
}

.note-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.03), rgba(0,0,0,0.01) 18%, transparent 18%);
  pointer-events: none;
}

.cover-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 42px 48px;
  text-align: center;
  transition: opacity 0.7s ease, transform 0.7s ease, filter 0.7s ease;
}

.cover-brand {
  width: 120px;
  margin-bottom: 16px;
}

.cover-kicker {
  margin: 0;
  color: var(--muted);
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  text-transform: uppercase;
}

.cover-inner h1 {
  margin: 18px 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: clamp(2.8rem, 4vw, 4.2rem);
  letter-spacing: 0.08em;
  color: var(--ink);
}

.cover-subtitle {
  margin: 0;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 0.8rem;
}

.cover-rule {
  width: 100%;
  max-width: 220px;
  height: 1px;
  background: rgba(29,29,29,0.5);
  margin: 28px auto 22px;
}

.cover-note {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.9;
  letter-spacing: 0.08em;
}

.note-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 44px 14px;
  background: linear-gradient(180deg, rgba(243,239,228,0.96), rgba(243,239,228,0.76) 80%, rgba(243,239,228,0.0));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(4px);
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}

.header-label {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.page-body {
  padding: 32px 44px 60px;
  overflow: auto;
  height: calc(100% - 74px);
}

.section {
  padding: 18px 0 26px;
  border-bottom: 1px solid var(--line);
}

.section:last-child {
  border-bottom: none;
}

.section-heading {
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
}

h2 {
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  line-height: 1.3;
  margin-bottom: 16px;
  font-family: Georgia, "Times New Roman", serif;
}

h3 {
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1.4;
  font-family: Georgia, "Times New Roman", serif;
}

h4 {
  font-size: 1.05rem;
  margin-bottom: 10px;
}

p {
  margin: 0;
  line-height: 1.9;
  color: var(--ink);
}

.profile-grid {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}

.profile-image-wrap {
  width: 180px;
  aspect-ratio: 1;
  background: rgba(255,255,255,0.3);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 20px rgba(0,0,0,0.08);
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.text-blocks {
  display: grid;
  gap: 8px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.info-card {
  border: 1px solid rgba(29,29,29,0.1);
  border-radius: 14px;
  padding: 18px 18px 16px;
  background: rgba(255,255,255,0.12);
  box-shadow: 0 10px 18px rgba(14, 12, 9, 0.03);
}

.skill-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.skill-group {
  border: 1px solid rgba(29,29,29,0.1);
  border-radius: 12px;
  padding: 16px 18px;
  background: rgba(255,255,255,0.08);
}

.skill-group ul {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-group li {
  background: rgba(62,95,122,0.08);
  color: var(--ink);
  border: 1px solid rgba(62,95,122,0.18);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.focus-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.focus-list > div {
  padding: 18px 18px 14px;
  border: 1px solid rgba(29,29,29,0.08);
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
}

.focus-list strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
}

.contact-box {
  border: 1px solid rgba(29,29,29,0.1);
  border-radius: 16px;
  padding: 20px 22px;
  background: rgba(255,255,255,0.1);
}

.contact-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.contact-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: baseline;
  padding-top: 10px;
  border-top: 1px solid rgba(29,29,29,0.08);
}

.contact-list span {
  display: inline-block;
  min-width: 90px;
  color: var(--muted);
}

.contact-list a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.index-panel {
  width: 190px;
  flex-shrink: 0;
  padding-top: 120px;
}

.index-card {
  position: sticky;
  top: 20px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  box-shadow: 0 14px 28px rgba(0,0,0,0.16);
  padding: 18px 14px;
}

.index-label {
  margin: 0 0 14px;
  text-align: center;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.7);
}

.index-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.index-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.86);
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  background: rgba(255,255,255,0.02);
  transition: transform 0.18s ease, background 0.18s ease;
}

.index-nav a:hover,
.index-nav a:focus-visible {
  background: rgba(255,255,255,0.08);
  transform: translateX(-2px);
}

.index-nav a[aria-current="page"] {
  color: #fff;
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.35);
}

.page-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.page-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 34px;
  padding: 6px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  color: rgba(255,255,255,0.88);
  background: rgba(255,255,255,0.04);
  font: inherit;
  font-size: 0.7rem;
  white-space: nowrap;
  cursor: pointer;
}

.page-control:hover:not(:disabled),
.page-control:focus-visible {
  background: rgba(255,255,255,0.12);
}

.page-control:disabled {
  opacity: 0.3;
  cursor: default;
}

.page-position {
  min-width: 36px;
  color: rgba(255,255,255,0.68);
  font-size: 0.68rem;
  text-align: center;
}

@media (max-width: 980px) {
  .note-stage {
    flex-direction: column;
    align-items: center;
  }

  .index-panel {
    width: min(100%, 400px);
    padding-top: 0;
  }

  .index-card {
    position: static;
  }

  .index-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 28px 18px;
  }

  .note-shell {
    height: 680px;
  }

  .page-sheet,
  .note-cover {
    border-radius: 10px 10px 14px 14px;
  }

  .note-header,
  .page-body {
    padding-left: 20px;
    padding-right: 20px;
  }

  .profile-grid,
  .card-grid,
  .skill-groups,
  .focus-list {
    grid-template-columns: 1fr;
  }

  .profile-grid {
    gap: 18px;
  }

  .profile-image-wrap {
    width: 140px;
  }

  .cover-brand {
    width: 92px;
  }

  .cover-inner h1 {
    font-size: 2.6rem;
  }

  .cover-note {
    font-size: 0.86rem;
    line-height: 1.7;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .page-sheet,
  .note-cover,
  .cover-inner {
    transition-duration: 1ms !important;
  }
}
