@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  --bg: #e6e1d7;
  --bg-deep: #d9d2c6;
  --ink: #202226;
  --muted: #77736d;
  --line: rgba(32, 34, 38, .2);
  --line-strong: rgba(32, 34, 38, .65);
  --cream: #f4f0e7;
  --coral: #d77f70;
  --blue: #87b0b9;
  --yellow: #e4c66d;
  --violet: #a9a3c4;
  --max: 1280px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #17191d;
    --bg-deep: #101216;
    --ink: #f0ece3;
    --muted: #a4a09a;
    --line: rgba(240, 236, 227, .2);
    --line-strong: rgba(240, 236, 227, .7);
    --cream: #282b30;
    --coral: #c87569;
    --blue: #6f9ca5;
    --yellow: #c4a95c;
    --violet: #8984a8;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Noto Sans SC', sans-serif;
  line-height: 1.6;
}
::selection { color: var(--cream); background: var(--coral); }
a, button { font: inherit; }
a { color: inherit; }

/* Fine paper grain keeps the flat planes from feeling sterile. */
.site-noise {
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: .04;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.site-header {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(calc(100% - 96px), var(--max));
  margin: auto;
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  width: fit-content;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.wordmark i { color: var(--coral); font-style: normal; }
.wordmark-mark {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  color: var(--cream);
  background: var(--ink);
  font: 500 14px/1 'DM Mono', monospace;
  transform: rotate(45deg);
}
.wordmark-mark::after {
  position: absolute;
  content: 'A';
  transform: rotate(-45deg);
}
.wordmark-mark { color: transparent; }
.site-nav { display: flex; gap: 30px; }
.site-nav a, .header-index {
  color: var(--muted);
  font: 500 10px/1 'DM Mono', monospace;
  letter-spacing: .15em;
  text-decoration: none;
  text-transform: uppercase;
}
.site-nav a:hover { color: var(--coral); }
.header-index { justify-self: end; }

.section-frame { width: min(calc(100% - 96px), var(--max)); margin: auto; }
.hero {
  position: relative;
  display: grid;
  grid-template-columns: .84fr 1.16fr;
  align-items: center;
  min-height: calc(100vh - 80px);
  min-height: 760px;
  padding: 50px 0 80px;
}
.hero::after {
  position: absolute;
  right: 0;
  bottom: 38px;
  width: 43%;
  height: 1px;
  background: var(--line);
  content: '';
}
.hero-copy {
  position: relative;
  z-index: 4;
  padding-left: clamp(0px, 4vw, 58px);
  opacity: 0;
  transform: translateY(22px);
}
.page-ready .hero-copy { animation: copy-in .9s .1s cubic-bezier(.2,.75,.25,1) forwards; }
.hero::before {
  position: absolute;
  top: 14%;
  right: -5%;
  z-index: -3;
  width: 58%;
  height: 67%;
  background: color-mix(in srgb, var(--coral) 22%, transparent);
  clip-path: polygon(34% 0, 100% 17%, 82% 100%, 0 76%);
  content: '';
}
.section-marker, .place-number, .header-index, .site-footer {
  font-family: 'DM Mono', monospace;
}
.hero h1 {
  display: block;
  width: max-content;
  margin: 0;
  font-size: clamp(4.5rem, 8.8vw, 9.2rem);
  font-weight: 600;
  letter-spacing: -.13em;
  line-height: .92;
}
.hero h1 span { display: block; white-space: nowrap; }
.hero h1 small {
  display: block;
  margin: 18px 0 0 7px;
  color: var(--coral);
  font: 400 clamp(1.7rem, 3.2vw, 3.5rem)/1 'DM Mono', monospace;
  letter-spacing: -.1em;
}
.hero-note {
  max-width: 280px;
  margin: 45px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.3rem);
  line-height: 1.9;
}
.hero-copy::after {
  display: block;
  width: 105px;
  height: 8px;
  margin-top: 38px;
  background: linear-gradient(90deg, var(--coral) 0 33%, var(--blue) 33% 66%, var(--yellow) 66%);
  content: '';
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-top: 52px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ink);
  font: 500 10px/1 'DM Mono', monospace;
  letter-spacing: .14em;
  text-decoration: none;
}
.text-link span { color: var(--coral); font-size: 20px; }
.text-link:hover { color: var(--coral); border-color: var(--coral); }

/* A single visual symbol: a window, a path, and generous negative space. */
.monument {
  position: relative;
  width: min(100%, 800px);
  aspect-ratio: 1 / .92;
  justify-self: end;
  isolation: isolate;
  transform: translate3d(var(--pointer-x, 0px), var(--pointer-y, 0px), 0);
  transition: transform .8s cubic-bezier(.2,.7,.2,1);
  animation: scene-in 1.15s .12s cubic-bezier(.2,.75,.25,1) both;
}
.art-field {
  position: absolute;
  inset: 5% 3% 5% 9%;
  z-index: -3;
  border: 1px solid var(--line);
  background: var(--bg-deep);
  clip-path: polygon(12% 0, 100% 8%, 91% 100%, 0 91%);
  animation: field-breathe 12s ease-in-out infinite alternate;
}
.art-field::after {
  position: absolute;
  inset: 9%;
  border: 1px solid var(--line);
  content: '';
  clip-path: polygon(12% 0, 100% 10%, 90% 100%, 0 90%);
  animation: frame-pulse 10s ease-in-out infinite alternate;
}
.art-sun {
  position: absolute;
  top: 12%;
  right: 16%;
  width: 23%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 14px color-mix(in srgb, var(--yellow) 18%, transparent);
  animation: sun-pulse 7s ease-in-out infinite;
}
.art-panel {
  position: absolute;
  border: 1px solid var(--ink);
}
.art-panel-left {
  top: 26%;
  left: 8%;
  width: 28%;
  height: 54%;
  background: var(--violet);
  clip-path: polygon(0 12%, 100% 0, 100% 82%, 0 100%);
  animation: panel-in 1s .35s cubic-bezier(.2,.75,.25,1) both;
}
.art-panel-bottom {
  right: 4%;
  bottom: 8%;
  width: 71%;
  height: 17%;
  background: var(--blue);
  clip-path: polygon(8% 0, 100% 22%, 92% 100%, 0 78%);
  animation: panel-in 1s .45s cubic-bezier(.2,.75,.25,1) both;
}
.art-window {
  position: absolute;
  top: 17%;
  left: 35%;
  display: grid;
  place-items: center;
  width: 38%;
  height: 64%;
  padding: 15px;
  border: 1px solid var(--ink);
  background: var(--coral);
  clip-path: polygon(13% 0, 87% 5%, 100% 100%, 0 100%);
  animation: window-in 1s .25s cubic-bezier(.2,.75,.25,1) both;
}
.art-window::before {
  position: absolute;
  inset: 15px;
  border: 1px solid var(--ink);
  background: var(--bg);
  content: '';
  clip-path: polygon(13% 0, 87% 5%, 100% 100%, 0 100%);
}
.avatar-frame {
  position: relative;
  z-index: 1;
  width: 61%;
  aspect-ratio: 1;
  padding: 9px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--cream);
  box-shadow: 12px 12px 0 var(--blue);
}
.avatar { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; animation: avatar-breathe 8s ease-in-out infinite; }
.art-path {
  position: absolute;
  right: 4%;
  bottom: 20%;
  z-index: 2;
  width: 43%;
  height: 30%;
  transform: skewY(-14deg);
  animation: path-in 1s .55s cubic-bezier(.2,.75,.25,1) both;
}
.art-path i {
  position: absolute;
  right: 0;
  display: block;
  height: 20%;
  border: 1px solid var(--ink);
}
.art-path i:nth-child(1) { bottom: 0; width: 100%; background: var(--yellow); }
.art-path i:nth-child(2) { bottom: 26%; width: 76%; background: var(--coral); }
.art-path i:nth-child(3) { bottom: 52%; width: 52%; background: var(--violet); }
.art-path i:nth-child(4) { bottom: 78%; width: 28%; background: var(--blue); }
.art-path i:nth-child(1) { animation: step-shift 6s ease-in-out infinite; }
.art-path i:nth-child(2) { animation: step-shift 6s .45s ease-in-out infinite; }
.art-path i:nth-child(3) { animation: step-shift 6s .9s ease-in-out infinite; }
.art-path i:nth-child(4) { animation: step-shift 6s 1.35s ease-in-out infinite; }
.art-mark {
  position: absolute;
  top: 23%;
  left: 18%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--ink);
  background: var(--yellow);
  font: 500 14px/1 'DM Mono', monospace;
  transform: rotate(45deg);
}
.art-mark::after { position: absolute; content: 'A'; transform: rotate(-45deg); }
.art-mark { color: transparent; animation: mark-float 6s 1s ease-in-out infinite; }
.about, .places { border-top: 1px solid var(--line); opacity: 0; transform: translateY(24px); }
.about.is-visible, .places.is-visible { animation: section-in .9s cubic-bezier(.2,.75,.25,1) forwards; }
.about { position: relative; padding: 105px 0 175px; }
.section-marker { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 10px; letter-spacing: .15em; }
.section-marker i { width: 45px; height: 1px; background: var(--coral); }
.about-layout { display: grid; grid-template-columns: .92fr 1.08fr; gap: 10%; margin: 75px 0 0; }
.about h2, .places h2 { margin: 0; font-size: clamp(3rem, 7vw, 7.3rem); font-weight: 500; letter-spacing: -.12em; line-height: .87; }
.about h2 strong { color: var(--coral); font-weight: 500; }
.about-copy { max-width: 520px; padding-top: 4px; }
.about-lead { margin: 0 0 24px; font-size: 1.27rem; }
.about-copy > p:not(.about-lead) { margin: 0; color: var(--muted); font-size: 1.05rem; line-height: 2; }
.about-copy > p + p { margin-top: 8px; }
.about-copy .about-alias { margin-top: 28px; color: var(--muted); font-size: .88rem; }
.about-copy .about-alias::before { display: inline-block; width: 24px; height: 1px; margin: 0 10px 4px 0; background: var(--coral); content: ''; }
.signal-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 58px; }
.signal-list span { padding-top: 13px; border-top: 1px solid var(--line); font-size: 11px; }
.signal-list b { display: block; margin-bottom: 10px; color: var(--coral); font: 400 10px/1 'DM Mono', monospace; }
.about-shape { position: absolute; right: 0; bottom: 43px; display: flex; gap: 8px; align-items: end; opacity: .65; }
.about-shape span { display: block; width: 14px; border: 1px solid var(--ink); }
.about-shape span:nth-child(1) { height: 25px; background: var(--blue); }
.about-shape span:nth-child(2) { height: 49px; background: var(--coral); }
.about-shape span:nth-child(3) { height: 78px; background: var(--yellow); }
.about-shape span:nth-child(4) { height: 42px; background: var(--violet); }
.about-shape span:nth-child(5) { height: 19px; background: var(--blue); }

.places { padding: 105px 0 140px; }
.places-heading { display: flex; align-items: end; justify-content: space-between; margin: 70px 0 44px; }
.places-heading h2 { font-size: clamp(3.3rem, 8vw, 8rem); }
.places-heading p { margin: 0 0 10px; color: var(--muted); font-size: .9rem; }
.places-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.place {
  position: relative;
  display: flex;
  min-height: 270px;
  flex-direction: column;
  justify-content: end;
  overflow: hidden;
  padding: 25px;
  border: 1px solid var(--ink);
  text-decoration: none;
  opacity: 0;
  transform: translateY(18px);
  transition: transform .3s ease, box-shadow .3s ease;
}
.place.is-visible { animation: place-in .7s cubic-bezier(.2,.75,.25,1) forwards; }
.place:nth-child(2).is-visible { animation-delay: .08s; }
.place:nth-child(3).is-visible { animation-delay: .16s; }
.place:nth-child(4).is-visible { animation-delay: .24s; }
.place::before { position: absolute; top: 15%; right: -18%; width: 75%; aspect-ratio: 1; border: 1px solid var(--ink); transform: rotate(45deg); content: ''; opacity: .55; }
.place::after { position: absolute; top: 20px; right: 20px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); content: ''; }
.place:hover { box-shadow: 8px 8px 0 var(--ink); transform: translate(-4px, -4px); }
.place-number { position: absolute; top: 21px; left: 23px; font-size: 10px; }
.place-symbol { position: relative; z-index: 1; align-self: end; margin-bottom: auto; font-size: 23px; }
.place strong, .place small { position: relative; z-index: 1; }
.place strong { font-size: 1.6rem; font-weight: 600; }
.place small { margin-top: 6px; font-size: 11px; }
.place-blog { background: var(--blue); }
.place-tools { background: var(--yellow); }
.place-bilibili { background: var(--coral); }
.place-github { background: var(--violet); }
.contact-line { display: flex; justify-content: space-between; align-items: center; margin-top: 65px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.contact-line a { color: var(--ink); text-decoration: none; }
.contact-line a:hover { color: var(--coral); }
.contact-line b { margin-left: 15px; color: var(--coral); font-size: 1.3rem; }
.site-footer { display: flex; justify-content: space-between; width: min(calc(100% - 96px), var(--max)); margin: auto; padding: 26px 0 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; letter-spacing: .06em; }

.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 22px; }
.modal-backdrop { position: absolute; inset: 0; background: color-mix(in srgb, var(--ink) 52%, transparent); backdrop-filter: blur(9px); }
.modal-box { position: relative; width: min(100%, 490px); padding: 48px; border: 1px solid var(--ink); background: var(--cream); box-shadow: 14px 14px 0 var(--coral), -7px -7px 0 var(--blue); }
.modal-close { position: absolute; top: 16px; right: 18px; width: 34px; height: 34px; border: 1px solid transparent; color: var(--muted); background: transparent; cursor: pointer; font-size: 24px; line-height: 1; }
.modal-close:hover { border-color: var(--line); color: var(--ink); }
.modal-number { display: block; margin-bottom: 42px; color: var(--muted); font: 400 10px/1 'DM Mono', monospace; letter-spacing: .16em; }
.modal-box h2 { margin: 0; font-size: 2.3rem; font-weight: 500; letter-spacing: -.08em; line-height: 1.08; }
.modal-box h2 em { color: var(--coral); font-style: normal; }
.modal-box p { margin: 22px 0 34px; color: var(--muted); }
.modal-actions { display: flex; gap: 10px; }
.modal-actions a, .modal-actions button { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 17px; border: 1px solid var(--ink); cursor: pointer; font-size: 12px; text-decoration: none; }
.modal-primary { flex: 1.3; color: var(--cream); background: var(--ink); }
.modal-primary:hover { color: var(--cream); background: var(--coral); border-color: var(--coral); }
.modal-secondary { flex: 1; color: var(--ink); background: transparent; }
.modal-secondary:hover { background: var(--bg-deep); }
.modal button:focus-visible, .modal a:focus-visible, .site-nav a:focus-visible, .wordmark:focus-visible, .place:focus-visible, .text-link:focus-visible { outline: 2px solid var(--coral); outline-offset: 4px; }

@keyframes copy-in { to { opacity: 1; transform: translateY(0); } }
@keyframes scene-in { from { opacity: 0; transform: translate3d(var(--pointer-x, 0px), calc(var(--pointer-y, 0px) + 18px), 0) scale(.96); } to { opacity: 1; transform: translate3d(var(--pointer-x, 0px), var(--pointer-y, 0px), 0) scale(1); } }
@keyframes field-breathe { from { transform: scale(1); } to { transform: scale(1.018) rotate(-.35deg); } }
@keyframes frame-pulse { from { opacity: .55; } to { opacity: 1; } }
@keyframes sun-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes panel-in { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: translateX(0); } }
@keyframes window-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
@keyframes avatar-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025); } }
@keyframes path-in { from { opacity: 0; transform: skewY(-14deg) translateX(18px); } to { opacity: 1; transform: skewY(-14deg) translateX(0); } }
@keyframes step-shift { 0%, 100% { translate: 0 0; } 50% { translate: -6px -2px; } }
@keyframes mark-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes section-in { to { opacity: 1; transform: translateY(0); } }
@keyframes place-in { to { opacity: 1; transform: translateY(0); } }

@media (max-width: 900px) {
  .site-header, .section-frame, .site-footer { width: min(calc(100% - 56px), var(--max)); }
  .hero { grid-template-columns: 1fr; min-height: auto; gap: 32px; padding: 65px 0 100px; }
  .hero-copy { padding-left: 0; }
  .monument { grid-row: 1; justify-self: center; width: min(108%, 700px); margin-right: 0; }
  .hero-copy { grid-row: 2; }
  .places-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .site-header, .section-frame, .site-footer { width: calc(100% - 36px); }
  .site-header { grid-template-columns: 1fr auto; padding: 20px 0; }
  .site-nav { grid-column: 1 / -1; grid-row: 2; gap: 22px; margin-top: 24px; }
  .header-index { display: none; }
  .hero { padding: 56px 0 78px; }
  .hero h1 { width: auto; font-size: clamp(4.2rem, 19vw, 6rem); }
  .hero h1 small { margin-top: 16px; font-size: 1.65rem; }
  .hero-note { margin-top: 30px; }
  .monument { width: 116%; margin-left: -8%; margin-right: 0; }
  .about, .places { padding-top: 72px; padding-bottom: 98px; }
  .about-layout { grid-template-columns: 1fr; gap: 40px; margin-top: 52px; }
  .about h2, .places h2 { font-size: 3.65rem; }
  .signal-list { gap: 8px; margin-top: 40px; }
  .signal-list span { font-size: 10px; }
  .places-heading { display: block; margin-top: 52px; }
  .places-heading p { margin-top: 18px; }
  .places-grid { grid-template-columns: 1fr; }
  .place { min-height: 180px; }
  .contact-line { display: block; line-height: 2.5; }
  .contact-line a { display: block; }
  .site-footer { display: block; line-height: 2; }
  .site-footer span { display: block; }
  .modal-box { padding: 38px 26px 28px; }
  .modal-actions { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
