:root {
  --ink: #141414;
  --bg: #ffffff;
  --muted: #5c5c5c;
  --header: 4.25rem;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  position: fixed;
  inset: 0;
  width: 100%;
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--ink);
  color: #fff;
}

:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 3px;
}

button,
input,
textarea {
  font: inherit;
}

.shell {
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "header"
    "body"
    "footer";
  background: var(--bg);
}

.header { grid-area: header; }
.body { grid-area: body; }
.footer { grid-area: footer; }

.header {
  position: relative;
  z-index: 3;
  min-height: var(--header);
  background: var(--ink);
  color: #fff;
}

.footer {
  position: relative;
  z-index: 2;
  background: var(--ink);
  color: #fff;
  border-top: 1px solid #fff;
}

.body {
  display: flex;
  flex-direction: column;
  overflow: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  background: var(--bg);
  scrollbar-width: thin;
  scrollbar-color: var(--ink) var(--bg);
}

#sections {
  display: contents;
}

.bar {
  width: min(1040px, calc(100% - 2.5rem));
  height: 100%;
  min-height: var(--header);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer .bar {
  min-height: 3rem;
  font-size: 0.92rem;
}

.footer p {
  margin: 0;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 5;
  background: #fff;
  color: var(--ink);
  padding: 0.4rem 0.7rem;
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  top: 0.7rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #fff;
  text-decoration: none;
  font-family: Syne, "PingFang SC", sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.04em;
}

.logo i {
  width: 0.55rem;
  height: 0.55rem;
  background: #fff;
}

.nav {
  display: flex;
  gap: 0.15rem;
}

.nav a {
  width: fit-content;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  padding: 0.4rem 0.7rem;
}

.nav a:hover,
.nav a.is-active {
  background: #fff;
  color: var(--ink);
}

.menu-btn {
  display: none;
  font-weight: 700;
  color: #fff;
  background: transparent;
  border: 1px solid #fff;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
}

.menu-btn:hover {
  background: #fff;
  color: var(--ink);
}

.noscript {
  width: min(1040px, calc(100% - 2.5rem));
  margin: 1.5rem auto;
}

.hero {
  flex: 0 0 auto;
  min-height: 100%;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: safe center;
  align-items: center;
  padding: 2.5rem 0;
  background: var(--bg);
}

.hero-grid {
  width: min(1040px, calc(100% - 2.5rem));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

.hero-grid.has-portrait {
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr);
}

.hero-copy {
  display: grid;
  gap: 1rem;
  align-content: center;
}

.kicker {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

h1,
h2,
h3 {
  font-weight: 700;
  letter-spacing: -0.03em;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 7vw, 5.4rem);
  line-height: 1.02;
}

h1 em {
  font-family: Syne, "PingFang SC", sans-serif;
  font-style: normal;
  font-weight: 800;
}

.line {
  display: block;
}

.role {
  margin: 0;
}

.role span {
  display: inline-block;
  border: 1px solid var(--ink);
  padding: 0.12rem 0.45rem;
  font-weight: 700;
}

.lead {
  margin: 0;
  max-width: 40rem;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--muted);
  text-wrap: pretty;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid var(--ink);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn-solid {
  background: var(--ink);
  color: #fff;
}

.btn:hover {
  background: var(--ink);
  color: #fff;
}

.btn-solid:hover {
  background: #fff;
  color: var(--ink);
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 700;
  font-size: 0.95rem;
}

.hero-portrait[hidden] {
  display: none;
}

.hero-portrait img {
  display: block;
  width: 100%;
  height: min(460px, 58vh);
  object-fit: cover;
  border: 1px solid var(--ink);
}

.band {
  flex: 0 0 auto;
  min-height: 100%;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: safe center;
  align-items: center;
  background: var(--bg);
  color: var(--ink);
}

.band--ink {
  background: var(--ink);
  color: #f5f5f5;
}

.band--ink .lead {
  color: #c8c8c8;
}

.band--ink .btn {
  border-color: #fff;
  background: transparent;
  color: #fff;
}

.band--ink .btn-solid,
.band--ink .btn:hover,
.band--ink .btn-solid:hover {
  background: #fff;
  color: var(--ink);
}

.band-inner {
  width: min(1040px, calc(100% - 2.5rem));
  margin-inline: auto;
  padding-block: 2.5rem;
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.idx {
  margin: 0.35rem 0 0;
  font-family: Syne, "PingFang SC", sans-serif;
  font-weight: 800;
  letter-spacing: 0.08em;
}

h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.15;
}

h3 {
  margin: 0;
  font-size: 1.05rem;
}

.stack {
  display: grid;
  gap: 0.9rem;
}

.skill-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}

.skill-groups > li {
  border: 1px solid var(--ink);
  padding: 0.9rem;
}

.skill-groups h3 {
  margin-bottom: 0.7rem;
}

.skill-groups ul {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skill-groups li li {
  border: 1px solid var(--ink);
  padding: 0.3rem 0.45rem;
  font-size: 0.92rem;
}

.skill-groups li li:hover {
  background: var(--ink);
  color: #fff;
}

.band--ink .skill-groups > li,
.band--ink .skill-groups li li,
.band--ink .work-item {
  border-color: #fff;
}

.band--ink .skill-groups li li:hover,
.band--ink .work-item:hover {
  background: #fff;
  color: var(--ink);
}

.work-list {
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}

.work-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  padding: 1.1rem 0;
  border-top: 1px solid var(--ink);
}

.work-item:last-child {
  border-bottom: 1px solid var(--ink);
}

.work-item p {
  margin: 0.35rem 0 0;
  max-width: 40rem;
}

.work-item:hover {
  background: var(--ink);
  color: #fff;
}

.num {
  font-family: Syne, "PingFang SC", sans-serif;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.band--photos {
  justify-content: flex-start;
  align-items: stretch;
}

.band--photos::before {
  content: "";
  flex: 0 0 6vh;
}

.band--photos .band-inner {
  width: min(1360px, calc(100% - 3rem));
}

.band--photos .band-inner > div {
  display: contents;
}

.band--photos .stack {
  grid-column: 2;
}

.photo-grid {
  --fan-count: 5;
  --fan-gap: 16px;
  --fan-open: 120px;
  --fan-overlap: 210px;
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  width: 100%;
  min-width: 0;
  margin: 0.75rem 0 0;
  padding: 4.5rem 0 2.6rem;
  list-style: none;
}

.photo-grid > li {
  display: none;
  position: relative;
  flex: none;
}

.photo-grid > li.is-on {
  display: block;
  width: calc((100% - (var(--fan-count) - 1) * var(--fan-gap)) / var(--fan-count));
  margin-left: var(--fan-gap);
  z-index: var(--z, 1);
}

.photo-grid > li.is-lead {
  margin-left: 0;
}

.photo-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform: translateX(calc(var(--shift, 0) * 100%)) rotate(var(--fan, 0deg));
  transform-origin: center 120%;
  transition: transform 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

.photo-grid:hover .photo-button,
.photo-grid:focus-within .photo-button {
  transform: none;
}

.photo-grid:hover > li.is-on:hover .photo-button,
.photo-grid:focus-within > li.is-on:hover .photo-button {
  transform: translateY(-12px) scale(1.03);
}

.photo-button img,
.hero-portrait img {
  display: block;
}

.photo-button img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.photo-grid .caption {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.4rem);
  margin: 0;
  text-align: center;
  opacity: 0;
  transition: opacity 180ms linear;
}

.photo-grid:hover .caption,
.photo-grid:focus-within .caption {
  opacity: 1;
}

.caption {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.band--ink .caption {
  color: #c8c8c8;
}

.mail-line {
  margin: 0.2rem 0 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.mail-line a {
  color: inherit;
  text-underline-offset: 3px;
}

.contact-form {
  display: grid;
  gap: 0.85rem;
  max-width: 36rem;
  margin-top: 0.4rem;
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 700;
  font-size: 0.95rem;
}

input,
textarea {
  width: 100%;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 0.7rem 0.75rem;
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

.contact-form .btn {
  justify-self: start;
}

.form-note {
  min-height: 1.5em;
  margin: 0;
  font-weight: 700;
}

.lightbox {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 4rem 1.5rem 2rem;
  border: 0;
  background: #000;
  color: #fff;
}

.lightbox::backdrop {
  background: #000;
}

.lightbox img {
  display: block;
  max-width: min(1100px, calc(100vw - 3rem));
  max-height: calc(100vh - 8rem);
  margin: 0;
  object-fit: contain;
}

.lightbox-caption {
  max-width: 1100px;
  margin: 0.8rem auto 0;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: #fff;
  background: transparent;
  border: 1px solid #fff;
  padding: 0.35rem 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

.lightbox-close:hover {
  background: #fff;
  color: #000;
}

.js .reveal {
  opacity: 0;
}

.js .reveal.is-in {
  animation: fade 200ms linear forwards;
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 900px) {
  .skill-groups {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 800px) {
  .band--photos .stack,
  .band--photos .photo-grid {
    grid-column: 1;
  }

  .photo-grid {
    justify-content: flex-start;
    --fan-overlap: 120px;
    --fan-open: 64px;
  }

  .photo-grid > li.is-on {
    width: calc((100% - (var(--fan-count) - 1) * var(--fan-gap)) / var(--fan-count));
  }

  .hero-grid.has-portrait {
    grid-template-columns: 1fr;
  }

  .hero-portrait {
    order: -1;
  }

  .hero-portrait img {
    height: 220px;
  }

  .band-inner {
    grid-template-columns: 1fr;
    gap: 0.6rem;
    padding-block: 2.75rem;
  }
}

@media (max-width: 720px) {
  .menu-btn {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 0.4rem 1.25rem 0.8rem;
    background: var(--ink);
    border-top: 1px solid #fff;
  }

  .nav.is-open {
    display: grid;
  }

  .nav a {
    padding: 0.75rem 0.15rem;
    font-size: 1.1rem;
  }

  .nav-open .body {
    overflow: hidden;
  }

  .footer .bar {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
    padding-block: 0.7rem;
  }
}

@media (max-width: 640px) {
  .skill-groups {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .body {
    scroll-behavior: auto;
    scroll-snap-type: none;
  }

  .js .reveal,
  .js .reveal.is-in {
    opacity: 1;
    animation: none;
  }

  .photo-button,
  .photo-grid:hover .photo-button,
  .photo-grid:focus-within .photo-button,
  .photo-grid:hover > li.is-on:hover .photo-button,
  .photo-grid:focus-within > li.is-on:hover .photo-button {
    transform: none;
    transition: none;
  }

  .photo-grid .caption {
    position: static;
    margin-top: 0.35rem;
    opacity: 1;
  }
}
