@font-face {
  font-family: "Letterbloom Playfair";
  src: url("assets/about/letterbloom-playfair.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --cream: #fff3e4;
  --soft: #f6e5d4;
  --ink: #38272b;
  --studio: #281b1a;
  --gutter: clamp(21px, 6vw, 108px);
  --line: rgba(255, 236, 215, .32);
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--studio);
  color: var(--cream);
  font: 16px/1.75 "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}
h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 5px; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
.shell { width: min(1320px, 100% - 2 * var(--gutter)); margin-inline: auto; }

.skip-link {
  position: absolute;
  z-index: 51;
  top: 12px;
  left: 12px;
  padding: 7px 12px;
  background: var(--cream);
  color: var(--ink);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.roof, .studio, .letterbloom {
  height: 100vh;
  height: 100dvh;
}
.roof, .studio { position: relative; isolation: isolate; }
.scene, .roof::before, .studio::before {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.scene { z-index: -2; object-fit: cover; }
.roof::before, .studio::before { z-index: -1; pointer-events: none; content: ""; }

.roof {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: calc(100vh - var(--site-nav-height));
  height: calc(100dvh - var(--site-nav-height));
  background: #613f45;
}

.roof::before {
  background:
    linear-gradient(180deg, rgba(43, 28, 34, .71), transparent 24%),
    radial-gradient(ellipse 61% 76% at 30% 50%, rgba(43, 25, 34, .76), rgba(47, 26, 33, .58) 40%, transparent 78%);
}

.roof-music {
  display: flex;
  justify-content: flex-end;
  padding-top: clamp(10px, 2vh, 20px);
}
.roof-music iframe {
  display: block;
  width: min(100%, 308px);
  height: 42px;
  border: 0;
  border-radius: 6px;
  background: var(--cream);
  box-shadow: 0 4px 16px rgba(40, 27, 26, .24);
}

#intro, #practice { scroll-margin-top: var(--site-nav-height); }

.identity {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
  padding: clamp(20px, 4vh, 35px) 0 clamp(22px, 6vh, 96px) clamp(0px, 5.5vw, 96px);
}

.identity-copy {
  max-width: 720px;
  margin-block: auto;
  font-size: clamp(17px, 1.42vw, 23px);
  line-height: 1.6;
}
.identity h1 { font-size: clamp(39px, 5.3vw, 80px); font-weight: 650; letter-spacing: .045em; line-height: 1.12; }
.education { margin-top: 17px; }
.study-period, .courses { color: var(--soft); font-size: clamp(15px, 1.22vw, 20px); }
.goal, .courses { margin-top: 12px; }
.learning { margin-top: 3px; }
.goal strong { font-weight: 650; }
.identity-links { display: flex; flex-wrap: wrap; align-items: center; gap: 11px 24px; margin-top: 24px; font-size: clamp(15px, 1.15vw, 19px); }
.identity-contact { margin-top: clamp(11px, 2vh, 19px); font-size: clamp(14px, 1.2vw, 17px); }
.identity-contact h2 { font-size: 14px; font-weight: 650; margin-bottom: 4px; }
.identity-contact dl { display: flex; flex-wrap: wrap; gap: 3px 19px; margin: 0; }
.identity-contact dl div { display: flex; align-items: baseline; gap: 6px; }
.identity-contact dt { color: var(--soft); font-size: 12px; }
.identity-contact dd { margin: 0; overflow-wrap: anywhere; }

.identity-music {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 15px;
  width: fit-content;
  margin-top: clamp(11px, 2vh, 19px);
  padding: 4px 12px;
  border-inline-start: 1px solid var(--line);
  background: rgba(40, 27, 26, .45);
  color: var(--soft);
  font-size: clamp(13px, 1vw, 15px);
}
.identity-music a { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; color: var(--cream); }
.identity-music a:hover { color: #fffbf5; }

.resume-link {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 11px;
  min-height: 47px;
  padding: 8px 16px;
  background: var(--cream);
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
}
.resume-link:hover { background: #fffbf5; }
.resume-link:focus-visible { outline-color: var(--cream); }
.email-link { overflow-wrap: anywhere; }

.studio {
  background: var(--studio);
  border-top: 1px solid rgba(255, 226, 195, .24);
}

.studio-scene {
  object-position: 50% 53%;
  filter: saturate(1.06);
}

.studio::before {
  background:
    linear-gradient(90deg, rgba(31, 19, 21, .79), rgba(31, 19, 21, .74) 37%, rgba(31, 19, 21, .41) 47%, transparent 58%),
    radial-gradient(ellipse 29% 38% at 72% 53%, rgba(255, 177, 86, .21), rgba(255, 177, 86, .09) 32%, transparent 76%),
    radial-gradient(ellipse 34% 25% at 63% 84%, rgba(255, 158, 78, .16), transparent 76%);
}

.studio::after {
  position: absolute;
  z-index: -1;
  inset: 0 0 auto 43%;
  height: 69%;
  background: linear-gradient(180deg, rgba(31, 19, 21, .77), rgba(31, 19, 21, .64) 65%, rgba(31, 19, 21, .30) 86%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 19%);
  pointer-events: none;
  content: "";
}

.studio-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  gap: clamp(16px, 1.6vw, 24px) clamp(46px, 8vw, 138px);
  align-items: start;
  height: 100%;
  overflow: auto;
  padding-block: clamp(22px, 4.2vh, 68px);
}

:where(.identity, .studio-inner):focus-visible {
  outline: 1px solid var(--line);
  outline-offset: -1px;
}

.studio-inner > h2 {
  grid-column: 1 / -1;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 650;
  line-height: 1.22;
}

.letterbloom {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 42px var(--gutter);
  border-top: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 78% 90%, rgba(187, 100, 54, .38), transparent 62%),
    radial-gradient(ellipse at 13% 0%, rgba(123, 78, 107, .42), transparent 68%),
    linear-gradient(155deg, #32232e, #32201c 74%, #211716);
}

.letterbloom h2 {
  text-align: center;
  font: 600 clamp(50px, 10vw, 160px)/1.06 "Letterbloom Playfair", Georgia, serif;
}

.letterbloom h2 span { display: block; margin-top: .35em; font-size: .69em; }
.letterbloom[data-painted] h2 { color: transparent; }
.letterbloom canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.text-cursor-trail {
  position: fixed;
  z-index: 3;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  color: #fff;
  font: 600 clamp(15px, 1.1vw, 19px)/1 "Letterbloom Playfair", Georgia, serif;
  text-shadow: 0 1px 5px #352018;
}

.text-cursor-trail span {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  white-space: pre;
}

.practice { min-width: 0; }
.practice article { padding-block: 14px; border-top: 1px solid var(--line); }
.practice article:last-child { padding-bottom: 0; }
.practice h3 { margin-bottom: 6px; font-size: clamp(17px, 1.7vw, 23px); line-height: 1.4; }
.practice p { color: var(--soft); line-height: 1.65; text-wrap: pretty; }
.practice p + p { margin-top: 6px; }

@media (prefers-reduced-motion: no-preference) {
  .about-reveal {
    opacity: 0;
    animation-delay: var(--reveal-delay, 0s);
  }
  .about-reveal.is-in {
    opacity: 1;
    animation-name: about-text-in;
    animation-duration: 1.65s;
    animation-timing-function: cubic-bezier(.24, .55, .32, 1);
    animation-fill-mode: backwards;
  }
  .about-reveal:focus-within { opacity: 1 !important; }
  .identity-copy :is(.education, .study-period) { --reveal-delay: .16s; }
  .identity-copy :is(.goal, .learning) { --reveal-delay: .3s; }
  .identity-copy .courses { --reveal-delay: .44s; }
  .identity-links { --reveal-delay: .56s; }
  .practice article:nth-child(2) { --article-delay: .12s; }
  .practice article:nth-child(3) { --article-delay: .24s; }
  .practice .about-reveal { --reveal-delay: calc(var(--article-delay, 0s) + var(--paragraph-delay, 0s)); }
  .practice p { --paragraph-delay: .12s; }
  .practice p:nth-of-type(2) { --paragraph-delay: .24s; }
  .practice p:nth-of-type(3) { --paragraph-delay: .36s; }

  @keyframes about-text-in {
    from { opacity: 0; transform: translateY(26px); }
    to { opacity: 1; transform: none; }
  }
}

@media (max-width: 1000px) {
  .studio { display: grid; grid-template-rows: auto minmax(0, 1fr); }
  .studio::before, .studio::after { content: none; }
  .studio-scene {
    position: static;
    z-index: auto;
    height: auto;
    max-height: 39vh;
    max-height: 39dvh;
  }
  .studio-inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    gap: 16px;
    min-height: 0;
    max-width: 720px;
    padding-block: 28px 45px;
  }
}

@media (min-width: 1001px) and (max-height: 800px) {
  .studio-inner { row-gap: 11px; padding-block: 21px; }
  .practice article { padding-block: 9px; }
  .practice p { font-size: 15px; line-height: 1.55; }
}

@media (max-width: 720px) {
  .roof-scene { object-position: 66% 50%; }
  .roof::before {
    background: linear-gradient(180deg, rgba(43, 28, 34, .76), rgba(43, 28, 34, .50) 24%, rgba(43, 28, 34, .68) 63%, rgba(43, 28, 34, .33));
  }
  .identity { padding: 20px 0 26px; }
  .identity-links { gap: 8px 15px; margin-top: 17px; }

  .studio-inner {
    direction: rtl;
    padding-left: 10px;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #b2876e #362421;
  }
  .studio-inner > * { direction: ltr; }
  .studio-inner::-webkit-scrollbar { width: 5px; }
  .studio-inner::-webkit-scrollbar-track { background: #362421; }
  .studio-inner::-webkit-scrollbar-thumb { background: #b2876e; border-radius: 999px; }
  .practice article { padding-block: 16px; }
}

@media (max-width: 360px) and (max-height: 700px) {
  .identity { padding-top: 12px; }
  .identity-copy { font-size: 16px; line-height: 1.45; }
  .identity-music { margin-top: 10px; }
}

