:root {
  --bg: #f7f2ec;
  --bg-2: #eee5dc;
  --panel: #fffaf5;
  --card: #fffdf9;
  --text: #453d3a;
  --text-soft: #8f817a;
  --accent: #d98792;
  --accent-2: #eabf83;
  --line: #eaded5;
  --orb-a: #f3c5ca;
  --orb-b: #c9deda;
}

html[data-theme="dusk"] {
  --bg: #242433;
  --bg-2: #302f43;
  --panel: #302e40;
  --card: #373447;
  --text: #f6edf0;
  --text-soft: #bdb2bd;
  --accent: #e7a6b7;
  --accent-2: #d8bf91;
  --line: #51495a;
  --orb-a: #76556d;
  --orb-b: #4d6670;
}

html[data-theme="mint"] {
  --bg: #edf6f1;
  --bg-2: #deeee6;
  --panel: #f8fffb;
  --card: #ffffff;
  --text: #354843;
  --text-soft: #78928a;
  --accent: #72b9a5;
  --accent-2: #e6bd78;
  --line: #d2e5dc;
  --orb-a: #b9dfd1;
  --orb-b: #d7e9b8;
}

html[data-theme="lavender"] {
  --bg: #f3f0f8;
  --bg-2: #e7e0f1;
  --panel: #fbf9ff;
  --card: #ffffff;
  --text: #494258;
  --text-soft: #9188a3;
  --accent: #a895d2;
  --accent-2: #e7b2a9;
  --line: #e1d9ed;
  --orb-a: #d1c0eb;
  --orb-b: #f0c9c4;
}

html[data-theme="mono"] {
  --bg: #eeeeeb;
  --bg-2: #dfdfda;
  --panel: #fafaf7;
  --card: #ffffff;
  --text: #373735;
  --text-soft: #858580;
  --accent: #777773;
  --accent-2: #a7a79f;
  --line: #d8d8d1;
  --orb-a: #c8c8c0;
  --orb-b: #b8c0bc;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  position: relative;
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--bg) 90%, var(--bg-2)), var(--bg)),
    var(--bg);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  line-height: 1.75;
  transition:
    color 420ms ease,
    background-color 420ms ease,
    background 420ms ease;
  animation: page-in 900ms both ease-out;
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  pointer-events: none;
  content: "";
  opacity: .32;
  filter: blur(12px);
  animation: orb-drift-a 18s ease-in-out infinite alternate;
}

body::before {
  top: -14rem;
  left: -10rem;
  background: radial-gradient(circle, color-mix(in srgb, var(--orb-a) 75%, transparent), transparent 68%);
}

body::after {
  right: -12rem;
  bottom: -16rem;
  background: radial-gradient(circle, color-mix(in srgb, var(--orb-b) 75%, transparent), transparent 68%);
  animation-name: orb-drift-b;
  animation-duration: 23s;
}

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

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

button {
  font: inherit;
}

.site-nav {
  position: sticky;
  z-index: 20;
  top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 2rem));
  min-height: 64px;
  margin: 1rem auto 0;
  padding: .65rem .75rem .65rem 1.15rem;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 74%, transparent);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--text) 5%, transparent);
  backdrop-filter: blur(20px) saturate(125%);
  transition:
    background-color 420ms ease,
    border-color 420ms ease,
    box-shadow 350ms ease,
    transform 350ms ease;
}

.site-nav.is-scrolled {
  box-shadow:
    0 16px 38px color-mix(in srgb, var(--text) 13%, transparent),
    0 2px 0 color-mix(in srgb, var(--accent) 18%, transparent);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .04em;
  white-space: nowrap;
}

.logo::before {
  width: .7rem;
  height: .7rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 .3rem color-mix(in srgb, var(--accent) 16%, transparent);
  content: "";
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(.8rem, 2vw, 1.6rem);
  margin-left: auto;
  padding: 0 1.1rem;
}

.nav-links a {
  position: relative;
  color: var(--text-soft);
  font-size: .88rem;
  transition: color 240ms ease;
}

.nav-links a::after {
  position: absolute;
  right: 50%;
  bottom: -.35rem;
  left: 50%;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
  transition: right 260ms ease, left 260ms ease;
}

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

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  right: 0;
  left: 0;
}

.theme-switcher {
  position: relative;
}

.theme-toggle {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  background: color-mix(in srgb, var(--card) 72%, transparent);
  cursor: pointer;
  transition:
    color 240ms ease,
    background-color 420ms ease,
    transform 240ms ease;
}

.theme-toggle:hover {
  color: var(--accent-2);
  transform: rotate(12deg) scale(1.05);
}

.theme-toggle::before {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: 6px -4px 0 -3px var(--card);
  content: "";
}

.theme-menu {
  position: absolute;
  top: calc(100% + .7rem);
  right: 0;
  display: grid;
  min-width: 140px;
  gap: .25rem;
  padding: .5rem;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: 0 18px 35px color-mix(in srgb, var(--text) 12%, transparent);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(.96);
  transform-origin: top right;
  transition:
    opacity 220ms ease,
    visibility 220ms ease,
    transform 220ms ease,
    background-color 420ms ease;
  backdrop-filter: blur(18px);
}

.theme-switcher:hover .theme-menu,
.theme-switcher:focus-within .theme-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.theme-menu button {
  padding: .45rem .7rem;
  border: 0;
  border-radius: .75rem;
  color: var(--text-soft);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: color 200ms ease, background-color 200ms ease;
}

.theme-menu button:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 13%, transparent);
}

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

.hero {
  position: relative;
  display: grid;
  min-height: min(720px, calc(100vh - 4rem));
  align-content: center;
  padding: 7rem 0 6rem;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .12em;
}

.eyebrow::before {
  width: 2rem;
  height: 1px;
  background: var(--accent);
  content: "";
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--text);
  font-size: clamp(3.1rem, 9vw, 7.6rem);
  font-weight: 800;
  letter-spacing: -.08em;
  line-height: 1.04;
}

.hero h1 span {
  display: block;
  width: fit-content;
  background: linear-gradient(115deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.type-line {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 1.6rem 0 0;
  overflow: hidden;
  color: var(--text-soft);
  font-size: clamp(1rem, 2vw, 1.25rem);
  white-space: nowrap;
  border-right: 2px solid var(--accent);
  animation:
    typing 4.8s steps(25, end) .4s both,
    caret-blink .8s step-end infinite;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: 2rem;
}

.chip {
  padding: .42rem .85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  background: color-mix(in srgb, var(--card) 62%, transparent);
  font-size: .78rem;
  transition:
    color 240ms ease,
    border-color 240ms ease,
    transform 240ms ease,
    background-color 420ms ease;
}

.chip:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px);
}

.hero-avatar {
  position: absolute;
  right: 5%;
  bottom: 15%;
  display: grid;
  width: clamp(150px, 24vw, 260px);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 42% 58% 55% 45% / 45% 42% 58% 55%;
  background:
    radial-gradient(circle at 35% 28%, color-mix(in srgb, var(--panel) 76%, transparent), transparent 30%),
    linear-gradient(145deg, color-mix(in srgb, var(--orb-a) 64%, var(--panel)), color-mix(in srgb, var(--orb-b) 60%, var(--panel)));
  box-shadow:
    0 25px 55px color-mix(in srgb, var(--accent) 18%, transparent),
    inset 0 0 0 10px color-mix(in srgb, var(--panel) 18%, transparent);
  animation: avatar-float 6s ease-in-out infinite;
}

.hero-avatar::before {
  width: 38%;
  aspect-ratio: 1;
  border-radius: 45% 55% 50% 50%;
  background: color-mix(in srgb, var(--panel) 74%, var(--accent));
  box-shadow:
    30px 4px 0 -10px var(--text),
    0 0 0 5px color-mix(in srgb, var(--panel) 22%, transparent);
  content: "";
}

.hero-avatar::after {
  position: absolute;
  width: 18%;
  height: 7%;
  border-bottom: 3px solid var(--text);
  border-radius: 50%;
  content: "";
  transform: translateY(32px);
}

.section {
  padding: 5rem 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  letter-spacing: -.04em;
}

.section-heading p {
  margin: 0;
  color: var(--text-soft);
  font-size: .9rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.card,
.diary-entry,
.timeline-item {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--text) 5%, transparent);
  transition:
    color 420ms ease,
    border-color 420ms ease,
    background-color 420ms ease,
    box-shadow 300ms ease,
    transform 300ms ease;
}

.card {
  min-height: 210px;
  padding: 1.5rem;
  border-radius: 1.8rem;
}

.card:hover,
.diary-entry:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow:
    0 18px 38px color-mix(in srgb, var(--accent) 14%, transparent),
    0 0 0 5px color-mix(in srgb, var(--accent) 6%, transparent);
  transform: translateY(-7px);
}

.card-icon {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 1.1rem;
  place-items: center;
  border-radius: 1rem;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 13%, transparent);
}

.card h3,
.diary-entry h3 {
  margin: 0 0 .45rem;
  font-size: 1.08rem;
}

.card p,
.diary-entry p {
  margin: 0;
  color: var(--text-soft);
  font-size: .9rem;
}

.diary-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.diary-entry {
  padding: 1.4rem 1.5rem;
  border-radius: 1.5rem;
}

.diary-date {
  display: block;
  margin-bottom: .55rem;
  color: var(--accent);
  font-size: .76rem;
  letter-spacing: .08em;
}

.timeline {
  position: relative;
  max-width: 760px;
  margin: auto;
  padding-left: 2rem;
}

.timeline::before {
  position: absolute;
  top: .7rem;
  bottom: .7rem;
  left: .35rem;
  width: 1px;
  background: var(--line);
  content: "";
}

.timeline-item {
  position: relative;
  margin-bottom: 1.15rem;
  padding: 1.1rem 1.3rem;
  border-radius: 1.4rem;
  animation: timeline-in 700ms both ease-out;
}

.timeline-item:nth-child(1) {
  animation-delay: .15s;
}

.timeline-item:nth-child(2) {
  animation-delay: .35s;
}

.timeline-item:nth-child(3) {
  animation-delay: .55s;
}

.timeline-item:nth-child(4) {
  animation-delay: .75s;
}

.timeline-item::before {
  position: absolute;
  top: 1.35rem;
  left: -2rem;
  width: .7rem;
  height: .7rem;
  border: 3px solid var(--bg);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
  content: "";
  animation: dot-pulse 900ms both ease-out;
}

.timeline-item:nth-child(1)::before {
  animation-delay: .15s;
}

.timeline-item:nth-child(2)::before {
  animation-delay: .35s;
}

.timeline-item:nth-child(3)::before {
  animation-delay: .55s;
}

.timeline-item:nth-child(4)::before {
  animation-delay: .75s;
}

.timeline-item time {
  color: var(--accent);
  font-size: .78rem;
}

.timeline-item p {
  margin: .2rem 0 0;
  color: var(--text-soft);
  font-size: .9rem;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.site-footer {
  width: min(1120px, calc(100% - 2rem));
  margin: 4rem auto 0;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
  font-size: .82rem;
  text-align: center;
}

.site-footer strong {
  color: var(--accent);
  font-weight: 700;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes orb-drift-a {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(9rem, 5rem, 0) scale(1.12);
  }
}

@keyframes orb-drift-b {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(-8rem, -4rem, 0) scale(1.15);
  }
}

@keyframes avatar-float {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }

  50% {
    transform: translateY(-18px) rotate(4deg);
  }
}

@keyframes typing {
  from {
    max-width: 0;
  }

  to {
    max-width: 100%;
  }
}

@keyframes caret-blink {
  50% {
    border-color: transparent;
  }
}

@keyframes timeline-in {
  from {
    opacity: 0;
    transform: translateX(-14px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes dot-pulse {
  from {
    opacity: 0;
    transform: scale(.35);
  }

  70% {
    opacity: 1;
    transform: scale(1.18);
  }

  to {
    transform: scale(1);
  }
}

@media (max-width: 900px) {
  .hero-avatar {
    right: 2%;
    bottom: 12%;
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 620px) {
  .site-nav {
    top: .55rem;
    width: calc(100% - 1rem);
    margin-top: .55rem;
  }

  .nav-links {
    display: none;
  }

  main {
    width: calc(100% - 1.5rem);
  }

  .hero {
    min-height: 680px;
    padding: 6rem 0 4rem;
  }

  .hero h1 {
    font-size: clamp(3.2rem, 18vw, 5rem);
  }

  .type-line {
    max-width: calc(100vw - 2rem);
    font-size: .92rem;
  }

  .hero-avatar {
    right: 4%;
    bottom: 5%;
    width: 145px;
  }

  .section {
    padding: 3.5rem 0;
  }

  .section-heading {
    display: block;
  }

  .section-heading p {
    margin-top: .45rem;
  }

  .card-grid,
  .diary-list {
    grid-template-columns: 1fr;
  }

  .card:last-child {
    grid-column: auto;
  }

  .card {
    min-height: auto;
  }

  .timeline {
    padding-left: 1.65rem;
  }

  .timeline-item::before {
    left: -1.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  body {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .type-line {
    max-width: 100%;
    border-right-color: transparent;
  }
}