:root {
  color-scheme: light;
  --paper: #f8faf9;
  --ink: #182622;
  --muted: #4d6058;
  --rule: #dce5e0;
  --accent: #176049;
  --mint: #eaf3ee;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --mono: 'Cascadia Mono', 'SFMono-Regular', Consolas, monospace;
  font-family: 'Microsoft YaHei UI', 'PingFang SC', 'Noto Sans CJK SC', system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; padding: 0; margin: 0; }
section[id] { scroll-margin-top: 1.5rem; }

.wrap { width: min(100% - 4rem, 70rem); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--rule); }
.header-inner, nav, .wordmark { display: flex; align-items: center; }
.header-inner { min-height: 4rem; justify-content: space-between; gap: 1rem; }
.wordmark { gap: .5rem; font: 600 1rem/1 var(--mono); text-decoration: none; }
.mark {
  display: grid;
  place-items: center;
  width: 2rem;
  aspect-ratio: 1;
  border-radius: .5rem;
  background: var(--mint);
  color: var(--accent);
  font-size: 1.15rem;
}
nav { gap: 1.5rem; }
nav a { text-decoration: none; font-size: .9375rem; font-weight: 500; }
nav a:hover { text-decoration: underline; text-underline-offset: .22em; }
.skip-link { position: absolute; top: .5rem; left: .75rem; z-index: 2; padding: .65rem; background: var(--mint); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 21rem); align-items: center; gap: 3rem; padding-block: 6rem 4rem; }
.kicker { color: var(--muted); font-size: .9375rem; font-weight: 500; }
h1 { margin-top: .75rem; font-size: clamp(2.5rem, 5.5vw, 4.5rem); line-height: 1.14; letter-spacing: -.03em; font-weight: 600; }
.intro-copy { max-width: 32rem; margin-block: 1rem 1.5rem; color: var(--muted); font-size: 1.125rem; line-height: 1.75; text-wrap: pretty; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: .5rem 1rem;
  border-radius: .5rem;
  text-decoration: none;
  font-size: .9375rem;
  font-weight: 600;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.button-primary { background: var(--accent); color: #fff; }
.button-primary:hover { background: #104e3b; }
.button-light { background: var(--mint); color: var(--accent); }
.button-light:hover { background: #d8ebdf; }
.button:active { transform: translateY(1px); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--rule); padding-block: 1.5rem; }
.section-head .text-link { flex: none; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.25rem); letter-spacing: -.02em; line-height: 1.2; font-weight: 600; }
.text-link { color: var(--accent); font-size: .9375rem; font-weight: 500; text-underline-offset: .25em; text-decoration-thickness: 1px; }
.text-link:hover { text-decoration-thickness: 2px; }

.pr-section { margin-block: 4rem; }
.mika { border: 1px solid var(--rule); border-radius: 1rem; background: #fff; }
.mika-overview { display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: center; padding: 2rem; }
.mika-logo { width: 6rem; border-radius: .75rem; }
.mika h3 { font: 600 clamp(2.5rem, 5vw, 3.75rem)/1.06 system-ui, sans-serif; letter-spacing: -.045em; }
.mika-summary { max-width: 36rem; margin-top: .75rem; color: var(--muted); line-height: 1.75; }
.mika .project-links { margin-top: .75rem; }
.contributions { border-top: 1px solid var(--rule); padding: 1.5rem 2rem; }
.contributions h4 { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem .75rem; margin: 0 0 .75rem; font-size: 1.125rem; font-weight: 600; }
.contributions h4 span { color: var(--muted); font-size: .875rem; font-weight: 400; }
.contributions li + li { border-top: 1px solid var(--rule); }
.contributions a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 1rem; padding-block: .75rem; text-decoration: none; }
.contributions strong { font-weight: 600; }
.change-note { display: block; margin-top: .25rem; color: var(--muted); font-size: .9375rem; line-height: 1.55; }
.contributions a small { color: var(--accent); font: 500 .8125rem/1.5 var(--mono); text-align: end; text-decoration: underline; text-underline-offset: .25em; }
.contributions a:hover strong { color: var(--accent); }

.feature { display: grid; grid-template-columns: .84fr 1.16fr; overflow: hidden; border: 1px solid var(--rule); border-radius: .85rem; background: #fff; }
.feature-copy { align-self: center; padding: 2rem; }
.project-type { margin-bottom: .5rem; color: var(--muted); font-size: .875rem; font-weight: 500; }
.feature h3 { margin-bottom: .75rem; font: 600 clamp(2rem, 4.3vw, 3.25rem)/1.1 system-ui, sans-serif; letter-spacing: -.04em; }
.feature-copy > p:not(.project-type), .project-copy > p:not(.project-type) { line-height: 1.8; }
.feature-copy > p:not(.project-type) { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: 1rem 1.25rem; }
.tags li { padding: .25rem .5rem; border: 1px solid var(--rule); border-radius: .25rem; font: 500 .8125rem/1.25 var(--mono); }
.project-links { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; }
.feature-visual {
  display: grid;
  place-items: center;
  min-height: 21rem;
  padding: 2rem;
  background: #e8efed;
}
.feature-visual img { width: 100%; border-radius: .5rem; box-shadow: 0 8px 24px #0000000f; }

.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.project { border-bottom: 1px solid var(--rule); padding-bottom: 1.5rem; }
.project-copy { padding-top: 1rem; }
.project h3 { margin-bottom: .5rem; font: 600 clamp(1.5rem, 3vw, 2rem)/1.2 system-ui, sans-serif; letter-spacing: -.025em; }
.project-copy > p:not(.project-type) { max-width: 32rem; color: var(--muted); }
.cover { height: clamp(10rem, 20vw, 15rem); border-radius: .4rem; display: grid; place-items: center; position: relative; overflow: hidden; }
.cover-ipa { background: #e9eff1; color: #36525d; }
.ipa-file, .ipa-shadow {
  grid-area: 1 / 1;
  width: 5.6rem;
  height: 7.15rem;
  clip-path: polygon(0 0, 67% 0, 100% 25%, 100% 100%, 0 100%);
  border-radius: .4rem;
}
.ipa-file { display: grid; align-items: end; padding: .75rem; background: #fafcfc; transform: translate(.65rem, -.1rem) rotate(12deg); }
.ipa-file b { font: 800 1.4rem/1 var(--mono); }
.ipa-shadow { background: #92aeb8; transform: translate(-.9rem, .2rem) rotate(-13deg); }
.fold { position: absolute; inset: 0 0 auto auto; width: 33%; height: 25%; border-radius: 0 0 0 .3rem; background: #c6d9df; }
.cover-location { background-color: #e6f2e9; background-image: linear-gradient(#38634c1f 1px, transparent 1px), linear-gradient(90deg, #38634c1f 1px, transparent 1px); background-size: 1.5rem 1.5rem; background-position: center; color: #204f39; }
.target { display: grid; place-items: center; width: 8rem; aspect-ratio: 1; }
.target i, .target b { grid-area: 1 / 1; width: 100%; aspect-ratio: 1; border: 1px solid #4a755e; border-radius: 50%; }
.target i:nth-child(2) { width: 70%; }
.target i:nth-child(3) { width: 40%; }
.target b { width: 12%; background: #204f39; }
.coordinates { position: absolute; inset: auto 0 1.15rem; text-align: center; font: 750 .78rem/1 var(--mono); letter-spacing: .12em; }

.hero-contact { border-inline-start: 1px solid var(--rule); padding-inline-start: 2rem; }
.hero-contact h2 { margin-bottom: .5rem; font-size: 1.25rem; letter-spacing: 0; }
.contact-list { margin: 0; }
.contact-list > div { display: grid; grid-template-columns: 4rem minmax(0, 1fr); align-items: baseline; gap: .75rem; padding-block: .75rem; }
.contact-list > div + div { border-top: 1px solid var(--rule); }
.contact-list dt { color: var(--muted); font-size: .9375rem; }
.contact-list dd { margin: 0; overflow-wrap: anywhere; font-size: .9375rem; }

.practice { margin-bottom: 4rem; }
.practice-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; max-width: 33rem; margin: 0 0 1.5rem; }
.practice-stats dt { color: var(--muted); font-size: .875rem; }
.practice-stats dd { margin: .25rem 0 0; font-size: clamp(1.25rem, 3vw, 1.75rem); font-weight: 600; font-variant-numeric: tabular-nums; }
.practice-screenshot { width: 100%; border: 1px solid var(--rule); border-radius: 1rem; }
.recommendations { margin-bottom: 3rem; }
.website-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; }
.website-list li { padding-block: 1rem; border-top: 1px solid var(--rule); }
.website-list a { font-size: 1rem; font-weight: 600; }
.website-list p { max-width: 30rem; margin-top: .5rem; color: var(--muted); line-height: 1.65; }
.footer { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-top: 1px solid var(--rule); padding-block: 1.5rem; color: var(--muted); font-size: .875rem; }
.footer-info { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.footer > a { flex: none; }

@media (max-width: 56rem) {
  .wrap { width: calc(100% - 3rem); }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(15rem, .8fr); gap: 2rem; padding-block: 4rem 3rem; }
  .hero-contact { padding-inline-start: 1.5rem; }
  .feature { grid-template-columns: .95fr 1.05fr; }
  .feature-visual { min-height: 0; }
}

@media (max-width: 41rem) {
  .wrap { width: calc(100% - 2rem); }
  .header-inner { min-height: 3.75rem; }
  .wordmark { gap: .5rem; }
  .mark { width: 1.75rem; }
  nav { gap: .75rem; }
  nav a { font-size: .875rem; }
  .feature, .project-grid, .hero, .website-list { grid-template-columns: 1fr; }
  .hero { padding-block: 3rem; }
  .hero-contact { border-inline-start: 0; border-top: 1px solid var(--rule); padding: 1rem 0 0; }
  h1 { font-size: clamp(2.25rem, 8vw, 2.75rem); }
  .intro-copy { font-size: 1rem; }
  .mika-overview, .contributions, .feature-copy, .feature-visual { padding: 1.25rem; }
  .mika-overview { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .mika-logo { width: 3.5rem; }
  .pr-section { margin-block: 3rem; }
  .contributions a { gap: .75rem; }
  .practice { margin-bottom: 3rem; }
  .practice-stats { gap: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .button { transition: none; }
}
