:root {
  color-scheme: light;
  --bg: #f6f4ef;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --text: #1d2525;
  --muted: #66706f;
  --line: #d9ddd8;
  --accent: #0f766e;
  --accent-strong: #0a4f4a;
  --accent-soft: #d8ece8;
  --warm: #c75f3a;
  --shadow: 0 18px 45px rgba(20, 31, 31, 0.1);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121615;
  --surface: #1c2220;
  --surface-strong: #252c2a;
  --text: #eef4f1;
  --muted: #a7b1ad;
  --line: #37413e;
  --accent: #66c9bd;
  --accent-strong: #98e0d5;
  --accent-soft: #203f3b;
  --warm: #f0a076;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.26);
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  overflow-x: clip;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.11), transparent 28rem),
    linear-gradient(315deg, rgba(199, 95, 58, 0.11), transparent 24rem), var(--bg);
  color: var(--text);
  line-height: 1.6;
}

@keyframes home-enter-rise {
  0% {
    opacity: 0;
    transform: translate3d(0, 64px, 0);
    filter: blur(7px);
  }

  45% {
    opacity: 1;
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

@keyframes projects-slide-in {
  0% {
    opacity: 0.1;
    transform: translate3d(104vw, 0, 0);
    filter: blur(3px);
  }

  36% {
    opacity: 1;
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .js .home-stage .profile-copy,
  .js .home-stage .profile-side,
  .js .home-stage .metric {
    opacity: 0;
    transform: translate3d(0, 64px, 0);
    filter: blur(7px);
    will-change: opacity, transform, filter;
  }

  .js.is-ready .home-stage .profile-copy {
    animation: home-enter-rise 1320ms cubic-bezier(0.12, 0.78, 0.18, 1) 180ms both;
  }

  .js.is-ready .home-stage .profile-side {
    animation: home-enter-rise 1380ms cubic-bezier(0.12, 0.78, 0.18, 1) 340ms both;
  }

  .js.is-ready .home-stage .metric {
    animation: home-enter-rise 1260ms cubic-bezier(0.12, 0.78, 0.18, 1) both;
  }

  .js.is-ready .home-stage .metric:nth-child(1) {
    animation-delay: 560ms;
  }

  .js.is-ready .home-stage .metric:nth-child(2) {
    animation-delay: 660ms;
  }

  .js.is-ready .home-stage .metric:nth-child(3) {
    animation-delay: 760ms;
  }

  .js .intro-switch-sticky {
    overflow: hidden;
  }

  .js .intro-switch .scene-track {
    position: absolute;
    inset: 0;
    display: flex;
    width: 400vw;
    height: 100%;
    transform: translate3d(var(--scene-x, 0vw), 0, 0);
    transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
  }

  .js .intro-switch .home-stage,
  .js .intro-switch #projects,
  .js .intro-switch #experience,
  .js .intro-switch .portfolio-page {
    flex: 0 0 100vw;
    width: 100vw;
    height: 100%;
    padding-right: max(18px, calc((100vw - 1120px) / 2));
    padding-left: max(18px, calc((100vw - 1120px) / 2));
    will-change: opacity, filter;
  }

  .js .intro-switch #projects,
  .js .intro-switch #experience,
  .js .intro-switch .portfolio-page {
    opacity: 0.1;
    filter: blur(3px);
    pointer-events: none;
  }

  .js .intro-switch .portfolio-page {
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  .js.is-ready .intro-switch .home-stage {
    opacity: var(--home-opacity, 1);
    filter: blur(var(--home-blur, 0px));
    transition:
      opacity 220ms cubic-bezier(0.16, 1, 0.3, 1),
      filter 220ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .js.is-ready .intro-switch #projects {
    opacity: var(--project-opacity, 0.1);
    filter: blur(var(--project-blur, 3px));
    transition:
      opacity 220ms cubic-bezier(0.16, 1, 0.3, 1),
      filter 220ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .js.is-ready .intro-switch #experience {
    opacity: var(--experience-opacity, 0.1);
    filter: blur(var(--experience-blur, 3px));
    transition:
      opacity 220ms cubic-bezier(0.16, 1, 0.3, 1),
      filter 220ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .js.is-ready .intro-switch .portfolio-page {
    opacity: var(--portfolio-opacity, 0.1);
    filter: blur(var(--portfolio-blur, 3px));
    transition:
      opacity 220ms cubic-bezier(0.16, 1, 0.3, 1),
      filter 220ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .js.is-ready #projects.is-visible,
  .js.is-ready #experience.is-visible,
  .js.is-ready .portfolio-page.is-visible {
    pointer-events: auto;
  }

  .js.is-ready.home-exiting .home-stage,
  .js.is-ready.projects-exiting #projects,
  .js.is-ready.experience-exiting #experience {
    pointer-events: none;
  }
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  min-height: 72px;
  padding: 0 clamp(18px, 5vw, 64px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--accent-strong);
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.1);
}

.brand-text {
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: clamp(12px, 3vw, 28px);
  justify-content: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav a {
  padding: 8px 2px;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
}

.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
}

.toolbox-wrap {
  position: relative;
}

.language-switch {
  display: inline-flex;
  height: 38px;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.language-switch button {
  min-width: 34px;
  height: 30px;
  border: 0;
  border-radius: calc(var(--radius) - 3px);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.language-switch button:hover,
.language-switch button:focus-visible,
.language-switch button.is-active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.toolbox-trigger rect {
  fill: currentColor;
  stroke: none;
}

.audio-button {
  overflow: hidden;
  color: var(--text);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.audio-button.is-collapsed {
  border-color: #050807;
  background: #050807;
  color: #f7faf8;
}

.audio-button .sound-wave-icon {
  width: 21px;
  height: 21px;
}

.audio-button .sound-bar {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  transition:
    transform 260ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 180ms ease;
}

.audio-button.is-collapsed .sound-bar-1 {
  transform: translateX(5px) scaleY(0.45);
}

.audio-button.is-collapsed .sound-bar-2 {
  transform: translateX(2.5px) scaleY(0.58);
}

.audio-button.is-collapsed .sound-bar-3 {
  transform: scaleY(0.68);
}

.audio-button.is-collapsed .sound-bar-4 {
  transform: translateX(-2.5px) scaleY(0.58);
}

.audio-button.is-collapsed .sound-bar-5 {
  transform: translateX(-5px) scaleY(0.45);
}

.toolbox-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 30;
  width: 224px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 12px 28px rgba(20, 31, 31, 0.12);
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, -14px, 0) scale(0.96);
  transform-origin: top right;
  transition:
    opacity 220ms ease,
    transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.toolbox-popover.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
}

.toolbox-popover[hidden] {
  display: none;
}

.toolbox-title {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  font-size: 0.72rem;
  font-weight: 900;
}

.toolbox-title span:last-child {
  height: 1px;
  background: color-mix(in srgb, var(--accent-strong) 55%, var(--line));
}

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

.toolbox-links a {
  display: grid;
  width: 82px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: #050807;
  color: #fff;
  text-align: center;
}

.toolbox-links img {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.toolbox-links a:hover,
.toolbox-links a:focus-visible {
  background: color-mix(in srgb, #050807 82%, var(--accent));
  outline: 2px solid color-mix(in srgb, var(--accent-strong) 42%, transparent);
  outline-offset: 2px;
}

main {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

.intro-switch {
  position: relative;
  width: 100vw;
  min-height: calc((100svh - 72px) * 3.2);
  margin-left: calc(50% - 50vw);
}

.intro-switch-sticky {
  position: sticky;
  top: 72px;
  height: calc(100svh - 72px);
}

.home-stage {
  display: grid;
  width: min(1120px, calc(100% - 36px));
  min-height: calc(100svh - 72px);
  align-content: space-between;
  gap: clamp(26px, 4vw, 44px);
  padding: 0 0 clamp(46px, 7vw, 72px);
}

.profile-section {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(260px, 0.72fr);
  gap: clamp(28px, 6vw, 76px);
  align-items: center;
  min-height: calc(100svh - 112px);
  padding: clamp(44px, 8vw, 92px) 0 36px;
}

.home-stage .profile-section {
  min-height: 0;
  padding: clamp(46px, 7vw, 84px) 0 clamp(28px, 4vw, 42px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(3rem, 9vw, 6.6rem);
  line-height: 0.96;
  letter-spacing: 0;
  white-space: pre-line;
}

html[lang="ja"] h1 {
  max-width: 7ch;
  font-size: clamp(4.2rem, 8vw, 5.8rem);
  line-height: 1.02;
}

h2 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.06rem;
  line-height: 1.28;
}

.role {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--accent-strong);
  font-size: clamp(1.16rem, 2.6vw, 1.55rem);
  font-weight: 700;
}

.alias-line {
  display: grid;
  gap: 4px;
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--text);
  font-size: 1rem;
}

.alias-line span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.alias-line strong {
  color: var(--accent-strong);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.common-name {
  max-width: 760px;
  margin: 8px 0 0;
  color: color-mix(in srgb, var(--muted) 78%, var(--surface-strong));
  font-size: 0.96rem;
  font-weight: 700;
}

.summary {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.contact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.contact-strip a,
.contact-strip span,
.primary-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
}

.contact-strip a,
.contact-strip span {
  padding: 8px 12px;
}

.contact-strip a:hover,
.contact-strip a:focus-visible,
.primary-link:hover,
.primary-link:focus-visible {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.profile-side {
  display: grid;
  justify-items: center;
  gap: 14px;
}

.profile-visual {
  display: flex;
  justify-content: center;
}

.portrait-frame {
  width: min(100%, 300px);
  aspect-ratio: 1 / 1.14;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, var(--accent-soft), transparent 54%),
    linear-gradient(315deg, color-mix(in srgb, var(--warm) 24%, transparent), transparent 45%),
    var(--surface);
  box-shadow: var(--shadow);
}

.portrait-card {
  display: grid;
  height: 100%;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  border-radius: calc(var(--radius) - 2px);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--line) 36%, transparent) 1px, transparent 1px),
    linear-gradient(color-mix(in srgb, var(--line) 36%, transparent) 1px, transparent 1px),
    color-mix(in srgb, var(--surface-strong) 72%, transparent);
  background-size: 34px 34px;
  text-align: center;
}

.portrait-image {
  display: block;
  width: min(180px, 70%);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: 0 16px 34px rgba(20, 31, 31, 0.12);
  object-fit: cover;
}

.portrait-line {
  width: 68px;
  height: 4px;
  border-radius: 999px;
  background: var(--warm);
}

.portrait-caption {
  width: min(190px, 72%);
  color: var(--muted);
  font-size: 0.92rem;
}

.local-time-card {
  display: grid;
  width: min(100%, 300px);
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 12px 28px rgba(20, 31, 31, 0.07);
}

.local-time-header {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
}

.local-time-label {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 900;
}

.local-time-zone {
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.local-time-value {
  color: var(--text);
  font-size: clamp(1.7rem, 4vw, 2.18rem);
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  line-height: 1;
}

.local-time-date {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0 0 clamp(58px, 9vw, 96px);
}

.home-stage .section-grid {
  padding-bottom: 0;
}

.metric,
.project-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 10px 28px rgba(20, 31, 31, 0.06);
}

.metric {
  display: grid;
  gap: 4px;
  min-height: 112px;
  align-content: center;
  padding: 18px;
}

.metric-value {
  color: var(--accent-strong);
  font-size: 1.58rem;
  font-weight: 900;
}

.metric-label,
.muted {
  color: var(--muted);
}

.content-section {
  padding: clamp(58px, 9vw, 96px) 0;
  border-top: 1px solid var(--line);
}

.intro-switch .content-section {
  width: min(1120px, calc(100% - 36px));
  padding: clamp(44px, 7vw, 72px) 0 0;
  border-top: 0;
}

.intro-switch .portfolio-page #skills {
  padding-bottom: clamp(60px, 8vw, 96px);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(160px, 0.36fr) 1fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 30px;
}

.section-heading.stacked-heading {
  display: block;
  margin-bottom: 28px;
}

.section-heading.stacked-heading .eyebrow {
  margin-bottom: 10px;
}

.section-heading.title-first-heading h2 {
  margin-bottom: 10px;
}

.section-heading.title-first-heading .eyebrow {
  margin-bottom: 0;
}

.timeline {
  display: grid;
  gap: 20px;
}

.timeline-item {
  display: grid;
  grid-template-columns: minmax(130px, 0.22fr) 1fr;
  gap: 28px;
}

.timeline-date {
  color: var(--muted);
  font-weight: 800;
}

.timeline-body {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.timeline-body p {
  margin: 0 0 12px;
  color: var(--muted);
}

.timeline-body .project-role {
  margin: 0;
  color: var(--accent-strong);
  font-weight: 800;
}

.intro-switch #experience .timeline {
  gap: 14px;
}

.intro-switch #experience .timeline-body {
  padding-bottom: 15px;
}

.timeline-body ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.15rem;
}

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

.featured-project {
  max-width: 760px;
  margin: 0 0 22px;
}

.featured-project h3 {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.featured-project p:not(.project-tag) {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.project-card {
  display: flex;
  min-height: 360px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.project-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-bottom: 1px solid var(--line);
  object-fit: cover;
}

.project-card > div {
  display: grid;
  gap: 8px;
  padding: 20px;
}

.project-tag {
  margin: 0 0 12px;
  color: var(--warm);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.project-card p:not(.project-tag) {
  margin: 0;
  color: var(--muted);
}

.project-card a {
  margin-top: 22px;
  color: var(--accent-strong);
  font-weight: 800;
}

.works-block + .works-block {
  margin-top: clamp(34px, 6vw, 58px);
}

.subsection-heading {
  display: grid;
  gap: 6px;
  max-width: 720px;
  margin-bottom: 18px;
}

.subsection-heading h3 {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 1.7rem);
}

.subsection-heading p {
  margin: 0;
  color: var(--muted);
}

.music-list {
  display: grid;
  gap: 12px;
}

.music-item {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 18px;
  align-items: center;
  min-height: 98px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 10px 28px rgba(20, 31, 31, 0.05);
}

.music-item:hover,
.music-item:focus-visible {
  border-color: var(--accent);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.music-index {
  color: var(--warm);
  font-size: 0.9rem;
  font-weight: 900;
}

.music-item h4,
.illustration-card h4 {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.35;
}

.music-item p,
.illustration-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

.music-meta {
  justify-self: end;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.illustration-masonry {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 8px;
  gap: 16px;
  align-items: start;
}

.illustration-card {
  display: block;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 10px 28px rgba(20, 31, 31, 0.06);
}

.illustration-card:hover,
.illustration-card:focus-visible {
  border-color: var(--accent);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.illustration-card img {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--line);
}

.illustration-card > div {
  padding: 14px;
}

.empty-note {
  display: block;
  width: 100%;
  margin: 0;
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  color: var(--muted);
  font-weight: 800;
}

.work-detail-main {
  padding: clamp(44px, 8vw, 86px) 0;
}

.work-detail {
  max-width: 980px;
  margin: 0 auto;
}

.work-detail h1 {
  max-width: none;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
}

.work-detail-meta {
  margin: 0 0 24px;
  color: var(--accent-strong);
  font-size: 1.08rem;
  font-weight: 900;
}

.work-detail-figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.work-detail-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.split-section {
  display: grid;
  grid-template-columns: 0.36fr 1fr;
  gap: 28px;
}

.split-section .section-heading {
  display: block;
  margin: 0;
}

.skill-columns {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chips span {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-weight: 700;
}

.education-list {
  display: grid;
  gap: 14px;
}

.education-item {
  display: grid;
  gap: 4px;
}

.education-period {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.education-line {
  margin: 0;
  font-weight: 800;
}

.contact-section {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  margin-bottom: 44px;
  padding: clamp(30px, 6vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.contact-section h2 {
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  line-height: 1.18;
}

.contact-section p:not(.eyebrow) {
  max-width: 640px;
  margin: 12px 0 0;
  color: var(--text);
  font-size: 1.06rem;
  font-weight: 650;
  line-height: 1.7;
}

.contact-section strong {
  color: var(--accent-strong);
  font-weight: 900;
}

.primary-link {
  justify-content: center;
  min-width: 118px;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  color: var(--text);
  font-weight: 800;
}

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: auto auto;
  }

  .nav {
    grid-column: 1 / -1;
    order: 3;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 10px;
  }

  .toolbar {
    justify-content: end;
  }

  .toolbox-popover {
    width: min(224px, calc(100vw - 36px));
  }

  .profile-section,
  .split-section,
  .skill-columns,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .profile-section {
    min-height: auto;
  }

  .intro-switch {
    min-height: auto;
    width: auto;
    margin-left: 0;
  }

  .intro-switch-sticky {
    position: static;
    height: auto;
  }

  .js .intro-switch .scene-track {
    position: static;
    display: block;
    width: auto;
    height: auto;
    transform: none;
    transition: none;
  }

  .js .intro-switch .home-stage,
  .js .intro-switch #projects,
  .js .intro-switch #experience,
  .js .intro-switch .portfolio-page {
    position: static;
    display: grid;
    flex: none;
    width: 100%;
    height: auto;
    padding-right: 0;
    padding-left: 0;
    opacity: 1;
    transform: none;
    filter: none;
    pointer-events: auto;
  }

  .js .intro-switch .portfolio-page {
    overflow: visible;
  }

  .intro-switch .content-section {
    padding: clamp(58px, 9vw, 96px) 0;
    border-top: 1px solid var(--line);
  }

  .home-stage {
    min-height: auto;
    padding-bottom: clamp(44px, 10vw, 72px);
  }

  .profile-side {
    justify-items: start;
  }

  .profile-visual {
    justify-content: flex-start;
  }

  .section-heading,
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .project-grid,
  .section-grid {
    grid-template-columns: 1fr;
  }

  .illustration-masonry {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-card {
    min-height: 210px;
  }

  .primary-link {
    width: 100%;
  }
}

@media (max-width: 520px) {
  main {
    width: min(100% - 28px, 1120px);
  }

  .site-header {
    gap: 12px;
    padding: 12px 14px 0;
  }

  .brand-text {
    display: none;
  }

  .contact-strip {
    display: grid;
  }

  .contact-strip a,
  .contact-strip span {
    width: 100%;
  }

  .portrait-frame {
    width: 100%;
  }

  .local-time-card {
    width: 100%;
  }

  .music-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .music-meta {
    justify-self: start;
  }

  .illustration-masonry {
    grid-template-columns: 1fr;
  }
}

@media print {
  body {
    background: #fff;
  }

  .site-header,
  .toolbar,
  .toast,
  .profile-visual,
  .primary-link {
    display: none !important;
  }

  main {
    width: 100%;
  }

  .profile-section,
  .content-section,
  .contact-section {
    min-height: auto;
    padding: 20px 0;
    border: 0;
    box-shadow: none;
  }

  h1 {
    font-size: 48px;
  }
}
