:root {
  --purpose-red: #b43a32;
  color: #243b8f;
  background: #fff0c9;
  font-family:
    -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", YuGothic,
    "Noto Sans JP", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  background: #fff0c9;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: #fff0c9;
  color: #243b8f;
}

.svg-filters {
  position: absolute;
  overflow: hidden;
}

h1,
h2,
p,
dl,
dd {
  margin: 0;
}

a {
  color: inherit;
}

.portfolio {
  width: min(100%, 1600px);
  margin-inline: auto;
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  grid-template-rows: auto minmax(260px, 1fr) auto;
  min-height: min(100svh, 760px);
  padding: clamp(32px, 5vw, 80px);
}

.hero h1 {
  position: relative;
  z-index: 2;
  grid-column: 1 / -1;
  grid-row: 1;
  width: 2.72em;
  max-width: 100%;
  margin-left: -0.065em;
  font-size: clamp(132px, 20vw, 300px);
  font-weight: 800;
  line-height: 0.72;
  white-space: nowrap;
  color: transparent;
  animation: name-in 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero h1::after {
  position: absolute;
  top: -0.13em;
  left: 0;
  width: 100%;
  aspect-ratio: 236 / 100;
  background: #243b8f;
  content: "";
  filter: url("#logo-dilate-bold");
  opacity: 1;
  transform: translateY(0) rotate(-1deg);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  -webkit-mask: url("/assets/shiyui-logo.svg") center / contain no-repeat;
  mask: url("/assets/shiyui-logo.svg") center / contain no-repeat;
}

.hero h1:hover {
  color: transparent;
}

.hero h1:hover::after {
  opacity: 1;
  transform: translateY(-0.02em) rotate(1deg) scale(1.01);
}

.portrait {
  position: relative;
  z-index: 1;
  grid-column: 2;
  grid-row: 1 / 4;
  align-self: start;
  justify-self: end;
  width: min(36vw, 520px);
  margin-top: clamp(110px, 9vw, 130px);
  margin-right: clamp(0px, 2.5vw, 36px);
  transition: transform 300ms ease;
  animation: portrait-in 800ms 100ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  background: #fff;
  border: 3px solid #243b8f;
  border-radius: 50%;
  object-fit: cover;
}

.portrait:hover {
  transform: rotate(-2deg) translateY(-6px);
}

.greeting {
  position: absolute;
  top: 8%;
  left: -18%;
  padding: 0.65em 0.85em;
  visibility: hidden;
  background: #243b8f;
  color: #fff0c9;
  font-size: clamp(18px, 1.8vw, 26px);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(10px) rotate(-3deg);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    visibility 180ms;
}

.greeting::after {
  position: absolute;
  right: 18%;
  bottom: -14px;
  width: 0;
  height: 0;
  border-top: 16px solid #243b8f;
  border-left: 16px solid transparent;
  content: "";
}

.portrait:hover .greeting {
  visibility: visible;
  opacity: 1;
  transform: translateY(0) rotate(-3deg);
}

.profession {
  z-index: 3;
  grid-column: 1;
  grid-row: 2;
  align-self: end;
  max-width: 12em;
  padding-bottom: 30px;
  font-size: clamp(32px, 4.2vw, 64px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.08;
}

.profession span {
  display: block;
  white-space: nowrap;
}

.profession span:nth-child(2) {
  margin-left: 1.05em;
}

.profession span:nth-child(3) {
  margin-left: 0.3em;
}

.social-links {
  z-index: 3;
  grid-column: 1 / -1;
  grid-row: 3;
  display: flex;
  flex-wrap: wrap;
  align-self: end;
  gap: 18px 30px;
  padding-right: min(36vw, 520px);
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.42em;
  font-size: clamp(18px, 1.5vw, 22px);
  font-weight: 750;
  line-height: 1.3;
  text-decoration-line: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

.social-links svg {
  width: 1.08em;
  height: 1.08em;
  flex: none;
  fill: currentColor;
}

.x-icon {
  position: relative;
  width: 1.08em;
  height: 1.08em;
  flex: none;
}

.x-icon svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition:
    opacity 160ms ease,
    transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.x-fragment-top {
  clip-path: polygon(0 0, 100% 0, 100% 52%, 0 52%);
}

.x-fragment-bottom {
  clip-path: polygon(0 48%, 100% 48%, 100% 100%, 0 100%);
}

.twitter-icon {
  opacity: 0;
  transform: scale(0.45) rotate(-12deg);
}

.x-label {
  display: inline-grid;
}

.x-label-current,
.twitter-label {
  grid-area: 1 / 1;
}

.x-label-current {
  justify-self: start;
}

.twitter-label {
  display: none;
}

.x-link:is(:hover, :focus-visible) .x-fragment-top {
  opacity: 0;
  transform: translate(38%, -38%) rotate(26deg);
}

.x-link:is(:hover, :focus-visible) .x-fragment-bottom {
  opacity: 0;
  transform: translate(-38%, 38%) rotate(-26deg);
}

.x-link:is(:hover, :focus-visible) .twitter-icon {
  opacity: 1;
  transform: scale(1) rotate(0);
}

.x-link:is(:hover, :focus-visible) .x-label-current {
  display: none;
}

.x-link:is(:hover, :focus-visible) .twitter-label {
  display: inline;
  animation: twitter-label-in 210ms steps(7, end) both;
}

.social-links a:hover {
  text-decoration-thickness: 0.22em;
}

.social-links a:focus-visible {
  outline: 3px solid #243b8f;
  outline-offset: 5px;
}

.profile {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  padding: clamp(120px, 13vw, 200px) clamp(32px, 5vw, 80px);
}

.profile-intro {
  grid-column: 1 / -1;
  width: fit-content;
  margin-bottom: clamp(34px, 4vw, 60px);
  font-size: clamp(18px, 1.45vw, 22px);
  font-weight: 800;
  line-height: 1.5;
}

.profile h2 {
  grid-column: 1 / -1;
  font-size: clamp(50px, 6vw, 96px);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.profile h2 span {
  display: block;
  width: fit-content;
  white-space: nowrap;
}

.profile h2 span:nth-child(2) {
  margin-left: 0.8em;
}

.profile h2 span:nth-child(3) {
  margin-left: 1.55em;
}

.purpose-word {
  position: relative;
  display: inline-block;
  font-style: normal;
}

.purpose-word svg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.45em;
  height: 1.42em;
  overflow: visible;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-1deg);
}

.purpose-word path {
  fill: none;
  stroke: var(--purpose-red);
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-width: 3.4;
  vector-effect: non-scaling-stroke;
}

.profile-copy {
  grid-column: 2;
  max-width: 31em;
  margin-top: clamp(72px, 9vw, 136px);
  font-size: clamp(20px, 1.85vw, 28px);
  font-weight: 700;
  line-height: 1.8;
  text-wrap: pretty;
}

.profile-copy p + p {
  margin-top: clamp(28px, 3vw, 44px);
  font-weight: 800;
}

.career {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(54px, 8vw, 128px);
  min-height: 100svh;
  padding: clamp(100px, 13vw, 200px) clamp(32px, 5vw, 80px);
}

.career h2 {
  align-self: start;
  position: sticky;
  top: clamp(32px, 5vw, 80px);
  font-size: clamp(112px, 15vw, 224px);
  font-weight: 800;
  letter-spacing: -0.08em;
  line-height: 0.72;
}

.career h2 span {
  display: block;
}

.career h2 span + span {
  margin-left: 0.42em;
}

.career dl {
  display: grid;
  align-content: center;
  gap: clamp(72px, 9vw, 128px);
}

.career-item {
  max-width: 760px;
}

.career-item:nth-child(even) {
  margin-left: clamp(0px, 7vw, 96px);
}

.career dt {
  margin-bottom: 20px;
  font-size: clamp(19px, 1.75vw, 25px);
  font-weight: 800;
  line-height: 1.4;
  white-space: nowrap;
}

.career strong {
  display: block;
  font-size: clamp(34px, 4.1vw, 62px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.08;
}

.career-company {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: clamp(30px, 3.4vw, 52px);
  letter-spacing: -0.065em;
}

.career p {
  max-width: 35em;
  margin-top: clamp(20px, 2.6vw, 36px);
  font-size: clamp(18px, 1.55vw, 22px);
  font-weight: 600;
  line-height: 1.9;
  text-wrap: pretty;
}

@keyframes name-in {
  from {
    transform: translateX(-0.18em);
  }
}

@keyframes portrait-in {
  from {
    transform: rotate(4deg) translateY(28px);
  }
}

@keyframes twitter-label-in {
  from {
    clip-path: inset(0 100% 0 0);
  }

  to {
    clip-path: inset(0);
  }
}

@media (min-width: 801px) and (min-height: 1100px) {
  .hero {
    grid-template-rows: auto minmax(360px, 480px) auto;
    align-content: center;
    min-height: 100svh;
  }

  .career {
    min-height: min(100svh, 1200px);
  }
}

@media (min-width: 1800px) {
  .portfolio {
    width: min(100%, 1920px);
  }

  .hero h1 {
    font-size: clamp(300px, 14vw, 360px);
  }

  .portrait {
    width: min(35vw, 640px);
    margin-top: clamp(130px, 7vw, 170px);
    margin-right: clamp(0px, 3vw, 64px);
  }

  .profession {
    font-size: clamp(64px, 3.3vw, 72px);
  }

  .social-links {
    padding-right: min(35vw, 640px);
  }
}

@media (min-width: 3000px) and (min-height: 1400px) {
  .portfolio {
    width: min(100%, 2560px);
  }

  .hero {
    grid-template-rows: auto 650px auto;
  }

  .hero h1 {
    font-size: 480px;
  }

  .portrait {
    width: 780px;
    margin-top: 180px;
    margin-right: 80px;
  }

  .profession {
    font-size: 90px;
  }

  .social-links {
    padding-right: 820px;
  }

  .social-links a {
    font-size: 28px;
  }

  .profile h2 {
    font-size: 140px;
  }

  .profile-intro {
    font-size: 28px;
  }

  .profile-copy {
    font-size: 34px;
  }

  .career h2 {
    font-size: 280px;
  }

  .career dt {
    font-size: 28px;
  }

  .career strong {
    font-size: 76px;
  }

  .career p {
    font-size: 26px;
  }
}

@media (min-width: 801px) and (max-width: 1050px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.9fr);
  }

  .portrait {
    width: min(44vw, 420px);
    margin-top: clamp(120px, 14vw, 160px);
    margin-right: 0;
  }

  .profession {
    align-self: end;
    padding-bottom: clamp(56px, 8vw, 80px);
    font-size: clamp(34px, 4.6vw, 48px);
  }

  .profile h2 {
    font-size: clamp(48px, 6vw, 64px);
  }

  .profile h2 span:nth-child(3) {
    margin-left: 0.9em;
  }

  .profile-copy {
    font-size: clamp(20px, 2.5vw, 24px);
  }

  .career {
    grid-template-columns: minmax(190px, 0.6fr) minmax(0, 1.4fr);
    gap: clamp(44px, 6vw, 72px);
  }

  .career h2 {
    font-size: clamp(112px, 14vw, 160px);
  }

  .career strong {
    font-size: clamp(34px, 4.5vw, 48px);
  }
}

@media (max-width: 800px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    min-height: auto;
    padding: 28px 20px 56px;
  }

  .hero h1 {
    grid-column: 1;
    grid-row: 1;
    width: min(100%, 520px);
    aspect-ratio: 236 / 100;
    margin-left: 0;
    font-size: 0;
    line-height: 0;
    pointer-events: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
  }

  .hero h1::after,
  .hero h1:hover::after {
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    filter: none;
    transform: none;
    transition: none;
  }

  .portrait {
    grid-column: 1;
    grid-row: 2;
    justify-self: center;
    width: min(76vw, 420px);
    margin-top: 14px;
    margin-right: 0;
    pointer-events: none;
    user-select: none;
    transform: none;
    transition: none;
    animation: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
  }

  .portrait img {
    border-width: 2px;
    -webkit-user-drag: none;
  }

  .greeting,
  .portrait:hover .greeting {
    display: none;
  }

  .profession {
    grid-column: 1;
    grid-row: 3;
    max-width: none;
    margin-top: 30px;
    padding: 0;
    font-size: clamp(23px, 7.4vw, 30px);
    line-height: 1.05;
  }

  .profession span:nth-child(2) {
    margin-left: 0.72em;
  }

  .profession span:nth-child(3) {
    margin-left: 0.16em;
  }

  .social-links {
    grid-column: 1;
    grid-row: 4;
    gap: 4px 24px;
    margin-top: 34px;
    padding: 0;
  }

  .social-links a {
    min-height: 44px;
  }

  .profile {
    grid-template-columns: minmax(0, 1fr);
    padding: 72px 20px 88px;
  }

  .profile-intro {
    grid-column: 1;
    margin-bottom: 28px;
    font-size: 17px;
  }

  .profile h2 {
    grid-column: 1;
    font-size: clamp(38px, 11vw, 52px);
    letter-spacing: -0.055em;
    line-height: 1.05;
  }

  .profile h2 span {
    white-space: normal;
  }

  .profile h2 span:nth-child(2) {
    margin-left: 0.35em;
  }

  .profile h2 span:nth-child(3) {
    max-width: 8.5em;
    margin-left: 0.8em;
  }

  .profile-copy {
    grid-column: 1;
    max-width: 34em;
    margin-top: 52px;
    font-size: clamp(18px, 5.2vw, 22px);
    line-height: 1.75;
  }

  .career {
    grid-template-columns: minmax(0, 1fr);
    gap: 56px;
    min-height: auto;
    padding: 64px 20px 92px;
  }

  .career h2 {
    position: static;
    display: flex;
    font-size: clamp(72px, 23vw, 100px);
    line-height: 0.78;
  }

  .career h2 span + span {
    margin-left: 0;
  }

  .career dl {
    gap: 68px;
  }

  .career-item:nth-child(even) {
    margin-left: 0;
  }

  .career strong {
    font-size: clamp(32px, 10vw, 44px);
  }

  .career-company {
    font-size: clamp(27px, 8.2vw, 36px);
  }

  .career p {
    margin-top: 18px;
    line-height: 1.75;
  }
}

@media (max-width: 480px) {
  .social-links {
    display: grid;
    grid-template-columns: max-content max-content;
    justify-content: space-between;
  }

  .social-links a {
    justify-self: start;
  }
}

@media (any-hover: none) {
  .portrait:hover {
    transform: none;
  }

  .greeting {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero h1,
  .portrait {
    animation: none;
  }

  .hero h1,
  .hero h1::after {
    transition: none;
  }

  .hero h1:hover::after {
    transform: translateY(0) rotate(-1deg);
  }

  .portrait {
    transition: none;
  }

  .portrait:hover {
    transform: none;
  }

  .greeting {
    transition: none;
  }

  .x-icon svg {
    transition: none;
  }

  .x-link:is(:hover, :focus-visible) .twitter-label {
    animation: none;
  }

  .x-link:is(:hover, :focus-visible) .x-fragment {
    opacity: 0;
    transform: none;
  }

  .x-link:is(:hover, :focus-visible) .twitter-icon {
    opacity: 1;
    transform: none;
  }
}
