/* ============================================================
   VISUAL UPGRADE — 既存の style.css より後に読み込んでください。
   色・文章・画像の内容を変更せず、表示と動きを更新します。
   ============================================================ */
:root {
  --depth-text: #f5f5f3;
  --depth-muted: #b4b4b1;
  --depth-line: rgb(255 255 255 / 17%);
  --depth-radius: 24px;
  --depth-scroll: 0;
}
html { background: #050505; scroll-padding-top: 7rem; }
body {
  margin: 0;
  color: var(--depth-text);
  background:
    radial-gradient(ellipse at 88% 9%, #292929 0, transparent 32rem),
    radial-gradient(ellipse at 0 45%, #141414 0, transparent 40rem), #050505;
  overflow-wrap: anywhere;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgb(255 255 255 / 2%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 2%) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(#000, transparent 85%);
  pointer-events: none;
  z-index: 0;
}
.profile {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 1260px;
  margin-inline: auto;
  padding: 24px clamp(20px, 5vw, 64px) 100px;
  counter-reset: depth-section;
}
/* ナビゲーションは上部に残り、現在の項目が明るくなります。 */
.navigation {
  position: sticky;
  top: 14px;
  z-index: 50;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  margin: 0;
  padding: 8px;
  border: 1px solid rgb(255 255 255 / 19%);
  border-radius: 16px;
  background: rgb(15 15 15 / 90%);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 28px #0008, inset 0 1px rgb(255 255 255 / 8%);
  scrollbar-width: thin;
  scrollbar-color: #666 transparent;
}
.navigation a {
  flex: 1 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 10px;
  color: #bcbcb9;
  font-size: 12px;
  letter-spacing: .015em;
  white-space: nowrap;
  text-decoration: none;
  transition: color .2s, background .2s;
}
.navigation a:hover,
.navigation a[aria-current="location"] {
  color: #080808;
  background: #efefeb;
  text-decoration: none;
}
[id] { scroll-margin-top: 7rem; }
:focus-visible { outline: 2px solid #fff; outline-offset: 5px; }
.depth-progress {
  position: fixed;
  z-index: 100;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: #fff;
  transform: scaleX(var(--depth-scroll));
  transform-origin: left;
  pointer-events: none;
}
/* ヒーロー。大きな光の輪と傾いた写真枠で奥行きを作ります。 */
.profile__header {
  position: relative;
  overflow: clip;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 36px;
  min-height: 540px;
  margin: 0;
  padding: 100px 30px 110px;
  perspective: 1000px;
}
.profile__header::before {
  content: "PORTFOLIO";
  position: absolute;
  top: 40px; left: 32px;
  color: #ababaa;
  font: 10px/1.5 ui-monospace, monospace;
  letter-spacing: .28em;
}
.profile__header::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -4%; top: 13%;
  width: min(48vw, 570px);
  aspect-ratio: 1;
  border: 1px solid #ffffff24;
  border-radius: 50%;
  transform: rotateX(64deg) rotateZ(-28deg);
  box-shadow: 0 0 0 26px #ffffff03, 0 0 0 27px #ffffff14,
    0 0 0 75px #ffffff02, 0 0 0 76px #ffffff0c;
  pointer-events: none;
}
.profile__identity { position: relative; min-width: 0; }
.profile__name {
  margin: 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif;
  font-size: clamp(2.45rem, 7vw, 5.6rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -.045em;
  text-shadow: 0 8px 24px #0008;
}
.profile__reading { margin: 20px 0 0; color: #b7b7b4; font-size: 12px; letter-spacing: .28em; }
.profile__affiliation { margin: 32px 0 0; font-size: 14px; line-height: 1.9; }
.portrait {
  --tilt-x: 5deg;
  --tilt-y: -12deg;
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(150px, 23vw, 275px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid #929292;
  border-radius: var(--portrait-radius, 50%);
  background: radial-gradient(circle at 28% 20%, #565656, #191919 62%, #080808);
  box-shadow: 5px 7px 0 #353535, 9px 12px 0 #131313,
    10px 13px 0 #606060, 22px 34px 42px #000a,
    inset 0 1px 1px #fffa;
  transform: perspective(850px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transition: transform .25s ease;
  filter: none !important;
}
.portrait img {
  position: absolute;
  inset: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  border-radius: inherit;
  object-fit: cover;
  object-position: center;
  transform: none;
  filter: none !important;
}
.portrait__placeholder { color: #dededb; font-size: 11px; letter-spacing: .2em; }
/* 各項目を独立した大きな面にし、側面と光を追加します。 */
.section {
  position: relative;
  counter-increment: depth-section;
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 2.5fr);
  align-items: start;
  gap: clamp(28px, 4vw, 56px);
  margin: 0 0 46px;
  padding: clamp(30px, 5vw, 58px);
  border: 1px solid #ffffff30;
  border-top-color: #ffffff57;
  border-radius: var(--depth-radius);
  background: linear-gradient(125deg, #242424 0%, #141414 48%, #101010 100%);
  box-shadow: 0 6px 0 #070707, 0 7px 0 #ffffff25,
    0 24px 50px #0009, inset 0 1px 0 #ffffff13;
}
.section::before {
  content: counter(depth-section, decimal-leading-zero);
  position: absolute;
  top: 18px; right: 26px;
  color: #82827f;
  font: 10px/1.5 ui-monospace, monospace;
  letter-spacing: .12em;
}
.section__heading {
  margin: 0;
  color: #fafaf6;
  font-size: clamp(20px, 2.2vw, 27px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -.035em;
}
.section__heading::after {
  content: "";
  display: block;
  width: 28px; height: 2px;
  margin-top: 22px;
  background: #eee;
}
.section__body, .content-group, .work, .skill, .timeline__content { min-width: 0; }
.content-stack { display: grid; gap: 38px; }
.group__heading { margin: 0 0 18px; font-size: 16px; font-weight: 500; }
.body-text { margin: 0; font-size: 14px; line-height: 2; color: #c8c8c5; }
.item__title { margin: 0; font-size: 18px; font-weight: 500; line-height: 1.65; letter-spacing: -.02em; }
.item__title + .body-text { margin-top: 12px; }
.category { margin: 0 0 15px; color: #aaa; font-size: 10px; letter-spacing: .13em; text-transform: uppercase; }
.details { display: grid; gap: 15px; margin: 0; }
.details > div { display: grid; grid-template-columns: minmax(0, 135px) minmax(0, 1fr); gap: 8px 22px; align-items: baseline; }
.details dt { color: #ababaa; font-size: 12px; line-height: 1.8; }
.details dd { margin: 0; min-width: 0; color: #ededeb; font-size: 14px; line-height: 1.9; }
.details--compact { margin-top: 17px; }
.details--compact > div { grid-template-columns: minmax(0, 1fr); gap: 6px; }
/* 小さな面にも傾きとマウス位置に応じた光を与えます。 */
.skills-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; padding: 0; margin: 0; list-style: none; }
.skill, .work, .work + .work {
  position: relative;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid #ffffff28;
  border-top-color: #ffffff58;
  border-radius: 15px;
  background: radial-gradient(circle at var(--light-x, 18%) var(--light-y, 0%), #ffffff16, transparent 65%),
    linear-gradient(150deg, #292929, #121212);
  box-shadow: 0 4px 0 #080808, 0 5px 0 #ffffff18, 0 16px 20px #0005, inset 0 1px #ffffff0a;
  transform: perspective(1100px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform .25s ease, border-color .25s ease;
}
.skill:hover, .work:hover {
  border-color: #ffffff65;
  transform: perspective(1100px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
}
.portrait:hover img { transform: none; }
.skill .item__title { font-size: 16px; }
.work .details { margin-top: 22px; }
.work__figure {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  margin: 26px 0 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid #ffffff25;
  border-radius: 10px;
  background: linear-gradient(145deg, #050505, #191919);
  box-shadow: inset 0 3px 12px #0009, 0 1px 0 #ffffff1a;
}
.work__figure::after { content: none; }
.work__placeholder { color: #a9a9a7; font-size: 11px; letter-spacing: .15em; }
.work__image { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: contain; filter: none; }
.timeline { display: grid; gap: 0; padding: 0; margin: 0; list-style: none; }
.timeline__item { position: relative; display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 24px; padding: 0 0 30px; border: 0; }
.timeline__item + .timeline__item { padding: 28px 0 30px; border-top: 1px solid var(--depth-line); }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__year { color: #aaa; font-size: 12px; font-variant-numeric: tabular-nums; }
.text-link[href] { color: #fff; text-decoration: underline; text-decoration-color: #888; text-underline-offset: 5px; }
.text-link[href]:hover { text-decoration-color: #fff; }
.social-links { display: flex; flex-wrap: wrap; gap: 18px 30px; padding: 0; margin: 0; list-style: none; }
.social-links .text-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; }
/* JSが動作した項目だけを隠します。JS無効時も本文は読めます。 */
.section.depth-reveal {
  transition: opacity .8s ease, transform .9s cubic-bezier(.2,.7,.2,1);
}
.section.depth-reveal:not(.is-revealed):not(:focus-within) {
  opacity: 0;
  transform: perspective(1400px) translate3d(0, 44px, -24px) rotateX(3deg);
  pointer-events: none;
}
.section.depth-reveal.is-revealed { opacity: 1; transform: none; }
@media (min-width: 1500px) { .profile__header { min-height: 590px; } }
@media (max-width: 760px) {
  .profile { padding: 14px 18px 60px; }
  .navigation { top: 8px; border-radius: 13px; }
  .navigation a { flex: 0 0 auto; padding-inline: 12px; }
  .profile__header { min-height: 440px; padding: 80px 8px 68px; gap: 24px; }
  .profile__header::before { top: 30px; left: 8px; }
  .profile__header::after { right: 0; top: 26%; width: 240px; }
  .portrait { width: 145px; }
  .section { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 32px 24px; margin-bottom: 28px; border-radius: 20px; }
  .section__heading { font-size: 24px; }
  .section__heading::after { margin-top: 14px; }
  .content-stack { gap: 32px; }
}
@media (max-width: 480px) {
  .profile__header { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-bottom: 56px; }
  .portrait { justify-self: end; width: 154px; margin: 0 20px 10px 0; }
  .profile__header::after { top: 45%; right: 2%; }
  .profile__name { font-size: clamp(2.45rem, 10vw, 3.5rem); }
  .skills-list { grid-template-columns: minmax(0, 1fr); }
  .details > div { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .timeline__item { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .skill, .work, .work + .work { padding: 22px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .section.depth-reveal, .portrait, .skill, .work { transition: none !important; }
  .section.depth-reveal, .section.depth-reveal:not(.is-revealed) { opacity: 1; transform: none; pointer-events: auto; }
  .skill, .work, .skill:hover, .work:hover { transform: none; }
}
