:root {
  color-scheme: light;
  --canvas: oklch(96.3% 0.018 91);
  --paper: oklch(98.2% 0.011 91);
  --surface: var(--paper);
  --canvas-glow: oklch(90% 0.06 120 / .72);
  --canvas-edge: oklch(95% 0.026 116);
  --texture-rule: oklch(40% 0.02 120 / .035);
  --ink: oklch(28% 0.055 155);
  --ink-soft: oklch(41% 0.038 152);
  --muted: oklch(48% 0.025 145);
  --moss: oklch(53% 0.09 141);
  --moss-bright: oklch(69% 0.09 124);
  --sage-deep: oklch(83% 0.065 122);
  --line: oklch(83% 0.026 121);
  --focus: oklch(47% 0.12 138);
  --action: var(--ink);
  --action-hover: oklch(35% 0.075 151);
  --on-action: var(--paper);
  --card-start: oklch(94% 0.052 118);
  --card-end: oklch(90% 0.065 124);
  --card-line: oklch(72% 0.065 127 / .48);
  --card-divider: oklch(70% 0.052 126 / .4);
  --card-orbit: oklch(66% 0.08 125 / .35);
  --card-orbit-mid: oklch(85% 0.08 122 / .2);
  --card-orbit-far: oklch(85% 0.08 122 / .1);
  --avatar-shine: oklch(98% 0.02 110 / .65);
  --panel: var(--ink);
  --on-panel: var(--paper);
  --panel-muted: oklch(86% 0.022 123);
  --radius: 14px;
  --shadow-card: 0 22px 55px -30px oklch(28% 0.055 155 / .46), 0 8px 18px -14px oklch(28% 0.055 155 / .25);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: oklch(18% 0.025 155);
  --paper: oklch(92% 0.018 96);
  --surface: oklch(24% 0.03 150);
  --canvas-glow: oklch(27% 0.065 136 / .62);
  --canvas-edge: oklch(20.5% 0.035 151);
  --texture-rule: oklch(80% 0.03 120 / .025);
  --ink: oklch(91% 0.023 105);
  --ink-soft: oklch(78% 0.028 118);
  --muted: oklch(68% 0.025 126);
  --moss: oklch(72% 0.105 128);
  --moss-bright: oklch(78% 0.11 119);
  --sage-deep: oklch(36% 0.07 132);
  --line: oklch(35% 0.035 142);
  --focus: oklch(78% 0.12 119);
  --action: oklch(78% 0.09 122);
  --action-hover: oklch(84% 0.085 116);
  --on-action: oklch(18% 0.035 153);
  --card-start: oklch(27% 0.055 143);
  --card-end: oklch(23% 0.045 153);
  --card-line: oklch(55% 0.065 130 / .52);
  --card-divider: oklch(54% 0.05 132 / .45);
  --card-orbit: oklch(59% 0.08 127 / .25);
  --card-orbit-mid: oklch(47% 0.075 130 / .16);
  --card-orbit-far: oklch(45% 0.07 132 / .09);
  --avatar-shine: oklch(78% 0.08 118 / .18);
  --panel: oklch(12.5% 0.025 158);
  --on-panel: oklch(92% 0.018 96);
  --panel-muted: oklch(76% 0.025 120);
  --shadow-card: 0 24px 60px -30px oklch(5% 0.02 155 / .8), 0 9px 20px -14px oklch(5% 0.02 155 / .7);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 30px; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 84% 12%, var(--canvas-glow) 0, transparent 28rem),
    linear-gradient(115deg, var(--canvas) 0 62%, var(--canvas-edge) 100%);
  color: var(--ink);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background: linear-gradient(90deg, transparent 49.9%, var(--texture-rule) 50%, transparent 50.1%);
  background-size: 32px 100%;
  mask-image: linear-gradient(to bottom, black, transparent 48%);
}
::selection { color: var(--ink); background: var(--sage-deep); }
a { color: inherit; text-decoration: none; text-underline-offset: .25em; }
a:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; border-radius: 5px; }
.wrap { width: min(1080px, calc(100% - 96px)); margin-inline: auto; position: relative; }
.site-header { height: 112px; display: flex; align-items: center; justify-content: space-between; }
.header-actions { display: flex; align-items: center; gap: 16px; }
.brand { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; font-family: Georgia, "Times New Roman", serif; font-size: 44px; font-weight: 700; letter-spacing: -.04em; }
.brand span { color: var(--moss); }
nav { display: flex; align-items: center; gap: 28px; font-size: 14px; }
nav a { min-height: 44px; display: inline-flex; align-items: center; position: relative; }
nav a::after { content: ""; position: absolute; inset: auto 0 7px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .24s cubic-bezier(.22,1,.36,1); }
nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.github-link span { margin-left: 7px; }
.theme-toggle { position: relative; width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer; transition: color .25s, background .25s, border-color .25s, transform .25s cubic-bezier(.22,1,.36,1); }
.theme-toggle:hover { border-color: var(--moss); background: var(--sage-deep); transform: rotate(6deg); }
.theme-toggle:active { transform: rotate(6deg) scale(.92); }
.theme-icon { position: absolute; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; transition: opacity .3s cubic-bezier(.22,1,.36,1), transform .4s cubic-bezier(.22,1,.36,1); }
.moon-icon { opacity: 1; transform: rotate(0) scale(1); }
.sun-icon { opacity: 0; transform: rotate(-55deg) scale(.55); }
:root[data-theme="dark"] .moon-icon { opacity: 0; transform: rotate(55deg) scale(.55); }
:root[data-theme="dark"] .sun-icon { opacity: 1; transform: rotate(0) scale(1); }
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 92px; align-items: center; min-height: 575px; padding: 70px 0 105px; }
h1 { max-width: 9ch; margin: 0 0 26px; font-size: clamp(48px, 5.4vw, 72px); line-height: 1.12; letter-spacing: -.035em; font-weight: 650; text-wrap: balance; }
#profile-name { font-family: Georgia, "Times New Roman", serif; font-size: 1.16em; font-weight: 400; letter-spacing: -.04em; }
.title-dot { color: var(--moss-bright); }
.intro-text { max-width: 31em; margin: 0 0 34px; color: var(--ink-soft); font-size: 16px; line-height: 1.9; white-space: pre-line; }
.hero-actions { display: flex; gap: 22px; align-items: center; font-size: 14px; }
.hero-actions svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.button { min-height: 48px; display: inline-flex; align-items: center; gap: 10px; padding: 12px 19px; border-radius: 9px; background: var(--action); color: var(--on-action); box-shadow: 0 8px 20px -14px var(--ink); transition: background .2s, transform .2s cubic-bezier(.22,1,.36,1), box-shadow .2s; }
.button:hover { background: var(--action-hover); transform: translateY(-2px); box-shadow: 0 12px 24px -14px var(--ink); }
.button:active { transform: translateY(0); box-shadow: 0 5px 12px -10px var(--ink); }
.text-link { min-height: 48px; display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); }
.text-link:hover { color: var(--moss); }
.profile-card { position: relative; padding: 27px 29px; overflow: hidden; transform: rotate(2.25deg); border-radius: var(--radius); background: linear-gradient(145deg, var(--card-start), var(--card-end)); box-shadow: var(--shadow-card); transition: background .35s, box-shadow .35s; }
.profile-card::before { content: ""; position: absolute; inset: 11px; border: 1px solid var(--card-line); border-radius: 9px; pointer-events: none; }
.profile-card::after { content: ""; position: absolute; width: 180px; height: 180px; top: -118px; right: -55px; border: 1px solid var(--card-orbit); border-radius: 50%; box-shadow: 0 0 0 26px var(--card-orbit-mid), 0 0 0 52px var(--card-orbit-far); pointer-events: none; }
.card-top, .card-bottom { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1; }
.card-top { color: var(--ink-soft); font-size: 11px; font-weight: 600; letter-spacing: .17em; }
.card-spark { width: 27px; height: 27px; fill: none; stroke: var(--moss); stroke-width: 1.2; stroke-linecap: round; }
.avatar { width: 116px; height: 116px; margin: 31px auto 18px; padding: 4px; border: 1px solid var(--card-line); border-radius: 50%; background: var(--surface); box-shadow: 0 10px 24px -14px oklch(28% 0.055 155 / .5), inset 0 1px 0 var(--avatar-shine); }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.card-name { text-align: center; font-family: Georgia, "Times New Roman", serif; font-size: 32px; letter-spacing: -.02em; }
.card-caption { margin: 10px 0 36px; text-align: center; color: var(--ink-soft); font-size: 12px; }
.card-bottom { gap: 15px; padding-top: 18px; border-top: 1px solid var(--card-divider); color: var(--ink-soft); font-size: 11px; }
.hitokoto-panel { min-width: 0; margin: 0 0 44px; padding: 20px 0 18px; border-block: 1px solid var(--line); }
.hitokoto-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .15em; }
#hitokoto-refresh { width: 44px; height: 44px; display: inline-grid; place-items: center; margin: -11px -10px -11px 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--moss); cursor: pointer; transition: color .2s, background .2s, transform .35s cubic-bezier(.22,1,.36,1); }
#hitokoto-refresh:hover { background: var(--sage-deep); color: var(--ink); transform: rotate(40deg); }
#hitokoto-refresh:active { transform: rotate(80deg) scale(.92); }
#hitokoto-refresh:disabled { cursor: wait; opacity: .5; }
#hitokoto-refresh svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.hitokoto-content { min-width: 0; transition: opacity .18s; }
.hitokoto-content[aria-busy="true"] { opacity: .58; }
.hitokoto-content blockquote { margin: 17px 0 12px; font-family: Georgia, "Noto Serif SC", "Songti SC", serif; font-size: 17px; line-height: 1.75; }
#hitokoto-text { display: block; overflow-wrap: anywhere; }
#hitokoto-text:hover { color: var(--moss); text-decoration: underline; }
#hitokoto-source { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.explore { padding: 49px 0 72px; border-top: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 31px; }
h2 { margin: 0; font-family: Georgia, "Noto Serif SC", "Songti SC", serif; font-size: clamp(25px, 2.4vw, 33px); line-height: 1.25; font-weight: 500; letter-spacing: -.02em; }
.section-heading > p { margin: 0 0 3px; color: var(--muted); font-size: 13px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr 1.05fr; column-gap: 30px; }
.tile { min-width: 0; padding: 24px 4px 5px; border-top: 1px solid var(--ink); }
.tile-top { display: flex; align-items: center; justify-content: space-between; min-height: 34px; margin-bottom: 22px; }
.tile-icon { width: 25px; height: 25px; fill: none; stroke: var(--moss); stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
.tile-mark { font-family: Georgia, "Songti SC", serif; font-size: 22px; color: var(--moss); }
.badge { padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-soft); font-size: 11px; }
.tiny-label, .tile-label { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .13em; }
h3 { margin: 0 0 10px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.tile p { min-height: 4em; margin: 0 0 28px; color: var(--ink-soft); font-size: 14px; line-height: 1.8; }
.contact-tile { margin: -12px 0 -16px; padding: 36px 28px 25px; border: 0; border-radius: var(--radius); background: var(--panel); color: var(--on-panel); box-shadow: 0 18px 38px -30px oklch(8% 0.02 155 / .65); transition: background .35s, box-shadow .35s; }
.contact-tile .tile-icon { stroke: var(--moss-bright); }
.contact-tile .tiny-label, .contact-tile p { color: var(--panel-muted); }
.contact-tile p { min-height: auto; }
.contact-link { min-height: 44px; display: inline-flex; align-items: center; color: var(--on-panel); font-size: 13px; text-decoration: underline; text-decoration-color: var(--moss-bright); text-decoration-thickness: 1px; text-underline-offset: 6px; overflow-wrap: anywhere; }
.contact-link::after { content: ""; width: 14px; height: 14px; margin-left: 9px; background: currentColor; clip-path: polygon(10% 45%, 68% 45%, 45% 22%, 53% 14%, 90% 50%, 53% 86%, 45% 78%, 68% 55%, 10% 55%); transition: transform .2s cubic-bezier(.22,1,.36,1); }
.contact-link:hover::after { transform: translateX(4px); }
.site-footer { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: center; padding-block: 25px 31px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.site-footer p { margin: 0; }
.footer-note { justify-self: center; letter-spacing: .08em; }
#icp-link { justify-self: end; }
#icp-link:hover { color: var(--ink); text-decoration: underline; }
.skip-link { position: absolute; z-index: 10; left: 20px; top: -100px; padding: 12px 16px; background: var(--ink); color: var(--paper); }
.skip-link:focus { top: 10px; }

@media (min-width: 1450px) { .hero { min-height: 650px; padding-block: 90px 125px; } }
@media (min-width: 1420px) {
  .hitokoto-panel { position: absolute; z-index: 2; top: 248px; right: -160px; width: 142px; margin: 0; padding: 17px 0 15px; }
  .hitokoto-content blockquote { font-size: 15px; line-height: 1.8; }
}
@media (max-width: 850px) {
  .wrap { width: calc(100% - 48px); }
  .hero { gap: 42px; min-height: 0; padding: 64px 0 78px; }
  .profile-card { padding: 25px 23px; }
  .tiles { gap: 18px; }
  .contact-tile { padding-inline: 20px; }
  .hitokoto-panel { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 24px; align-items: start; }
  .hitokoto-content blockquote { margin-top: 0; }
}
@media (max-width: 620px) {
  body::before { display: none; }
  .wrap { width: calc(100% - 40px); }
  .site-header { height: 82px; }
  .header-actions { gap: 8px; }
  nav { gap: 16px; font-size: 13px; }
  .hero { grid-template-columns: 1fr; gap: 50px; padding: 42px 0 64px; }
  h1 { font-size: clamp(48px, 14vw, 58px); }
  .intro-text { font-size: 16px; line-height: 1.85; }
  .hero-actions { gap: 20px; }
  .button { padding-inline: 16px; }
  .profile-card { width: min(335px, 96%); justify-self: center; transform: rotate(1.5deg); }
  .avatar { margin-top: 24px; }
  .card-caption { margin-bottom: 27px; }
  .hitokoto-panel { display: block; margin-bottom: 36px; padding-block: 17px; }
  .hitokoto-content blockquote { margin-top: 13px; font-size: 16px; }
  .explore { padding-block: 38px 50px; }
  .section-heading { align-items: start; margin-bottom: 27px; }
  .section-heading > p { display: none; }
  .tiles { grid-template-columns: 1fr; gap: 0; }
  .tile { padding: 25px 2px 28px; }
  .tile + .tile { border-top-color: var(--line); }
  .tile p { min-height: 0; margin-bottom: 22px; }
  .contact-tile { margin: 10px 0 0; padding: 28px 24px 25px; border-radius: var(--radius); }
  .site-footer { grid-template-columns: 1fr auto; font-size: 11px; }
  .footer-note { justify-self: end; }
  #icp-link { grid-column: 1 / -1; justify-self: center; margin-top: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
