:root {
  color-scheme: dark;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --page-bg: #08090c;
  --text: #fff;
  --text-muted: #d1dbe9;
  --card-radius: 24px;
  --glass-blur: 12px;
  --content-width: 1104px;
  --page-gutter: clamp(16px, 5vw, 64px);
  --glass-line: rgb(224 236 255 / .22);
  color: var(--text);
  background: var(--page-bg);
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }

body {
  isolation: isolate;
  min-width: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  margin: 0;
  padding: max(clamp(16px, 3.7svh, 36px), env(safe-area-inset-top))
    max(var(--page-gutter), env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom))
    max(var(--page-gutter), env(safe-area-inset-left));
}

.light-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.light-field::before {
  content: "";
  position: absolute;
  inset: -8%;
  background:
    radial-gradient(ellipse 46% 17% at 20% 71%, rgb(206 200 187 / .36), transparent 76%),
    radial-gradient(ellipse 28% 16% at 80% 28%, rgb(189 207 225 / .44), transparent 78%),
    radial-gradient(ellipse 53% 61% at 62% 46%, #204a7e, transparent 90%),
    radial-gradient(ellipse 43% 31% at 6% 78%, #244872, transparent 90%),
    var(--page-bg);
}

.light-field canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  visibility: hidden;
}

.light-field.is-rendering::before { visibility: hidden; }
.light-field.is-rendering canvas { visibility: visible; }

@media (prefers-reduced-motion: no-preference) {
  .light-field:not(.is-rendering)::before {
    animation: light-drift 16s ease-in-out infinite alternate;
  }
}

@keyframes light-drift {
  from { transform: translate3d(-3%, 2%, 0) rotate(-3deg); }
  to { transform: translate3d(3%, -2%, 0) rotate(3deg); }
}

.site-header,
.showcase,
.site-footer {
  width: min(100%, var(--content-width));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-mark {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgb(0 0 0 / .24);
}

.blog-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-inline: 16px;
  border: 1px solid var(--glass-line);
  border-radius: 100px;
  background: rgb(8 9 12 / .26);
  color: var(--text);
  font-size: .875rem;
  text-decoration: none;
}

.blog-link:hover { background: rgb(255 255 255 / .13); }

.link-arrow {
  display: inline-block;
  font: 400 1.15em/1 system-ui, sans-serif;
}

.showcase {
  align-self: center;
  padding-block: clamp(18px, 5svh, 52px);
}

.intro {
  margin-bottom: clamp(24px, 6.6svh, 64px);
}

.intro h1 {
  margin: 0;
  font-size: clamp(3.125rem, 8.5vw, 7rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.07em;
  text-wrap: balance;
}

.intro p {
  margin: clamp(10px, 2.4svh, 20px) 0 0;
  color: var(--text-muted);
  font-size: clamp(.9375rem, 1.55vw, 1.25rem);
  line-height: 1.5;
  letter-spacing: .035em;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 16px;
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .08em;
}

.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--glass-line);
}

.works {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.8vw, 22px);
}

.work {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  min-width: 0;
  min-height: 232px;
  border: 1px solid var(--glass-line);
  border-radius: var(--card-radius);
  background:
    linear-gradient(145deg, rgb(229 241 255 / .11), transparent 72%),
    rgb(8 13 24 / .5);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .12),
    0 18px 44px rgb(2 5 12 / .22);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  color: inherit;
  text-decoration: none;
  transition: transform .32s ease, filter .32s ease, border-color .32s ease;
}

.work-copy {
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: start;
  min-width: 0;
  padding: 26px 4px 24px 26px;
}

.work-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}

.work-icon {
  display: block;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 25%;
  box-shadow: 0 4px 12px rgb(0 0 0 / .23);
}

.work h3 {
  margin: 0;
  font-size: clamp(1.125rem, 3.35vw, 1.875rem);
  font-weight: 650;
  line-height: 1.14;
  letter-spacing: -.036em;
  overflow-wrap: anywhere;
}

.work p {
  max-width: 16em;
  margin: 14px 0 16px;
  color: var(--text-muted);
  font-size: .875rem;
  line-height: 1.58;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  color: var(--text);
  font-size: .875rem;
  font-weight: 600;
}

.action .link-arrow {
  transition: transform .32s ease;
}

.work-preview {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border-radius: 0 calc(var(--card-radius) - 1px) calc(var(--card-radius) - 1px) 0;
  background: radial-gradient(ellipse at center, rgb(113 160 222 / .30), transparent 72%);
  pointer-events: none;
}

.work-preview img {
  position: absolute;
  left: 50%;
  display: block;
  border: 1px solid rgb(222 234 255 / .32);
  border-radius: 10px;
  box-shadow: 0 8px 22px rgb(3 8 15 / .46);
  transform: translateX(-50%) rotate(-8deg);
  transform-origin: center top;
}

.work--counter .work-preview img {
  top: 18%;
  width: min(62%, 150px);
  height: auto;
  border-radius: clamp(12px, 1.3vw, 17px);
}

.work--search .work-preview img {
  top: 28%;
  width: min(calc(100% - 32px), 260px);
  height: 100%;
  object-fit: cover;
  filter: brightness(.89);
  transform: translateX(calc(-50% - 7px)) rotate(-5deg);
}

.work::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(
    ellipse clamp(170px, 27vw, 380px) clamp(140px, 23vw, 320px)
      at var(--spot-x, 50%) var(--spot-y, 50%),
    rgb(218 233 255 / .23), transparent
  );
  opacity: 0;
  transition: opacity .32s ease;
}

@media (hover: hover) and (pointer: fine) {
  .work:hover {
    z-index: 1;
    transform: translateY(-4px) scale(1.015);
  }

  .works:has(.work:hover) .work:not(:hover):not(:focus-visible) {
    filter: brightness(.78);
  }
}

.work:is(:hover, :focus-visible) { border-color: rgb(231 241 255 / .60); }
.work:is(:hover, :focus-visible)::before { opacity: 1; }
.work:is(:hover, :focus-visible) .action .link-arrow { transform: translate(2px, -2px); }

a:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}

.site-footer {
  padding-block: 12px 2px;
  border-top: 1px solid var(--glass-line);
  font-size: .75rem;
  line-height: 1.6;
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer a:hover { text-decoration: underline; }

@media (min-width: 701px) and (max-width: 1000px) {
  .work-copy { padding-left: 16px; }
  .work h3 { font-size: clamp(1rem, 2.25vw, 1.5rem); }
  .work--counter .work-preview img { top: 30%; }
}

@media (max-width: 700px), (pointer: coarse) and (max-height: 480px) {
  .works { grid-template-columns: minmax(0, 1fr); }

  .work {
    grid-template-columns: minmax(0, 1.28fr) minmax(0, 1fr);
    min-height: 160px;
  }

  .work-copy { padding: 16px 0 14px 16px; }
  .work-heading { gap: 8px; }
  .work-icon { width: 32px; height: 32px; }
  .work p { margin-block: 8px 10px; }
  .work--counter .work-preview img { top: 20%; width: min(62%, 128px); }
  .work--search .work-preview img { top: 32%; width: min(calc(100% - 28px), 208px); }
}

@media (max-width: 360px) {
  .work { min-height: 144px; }
  .work-copy { padding-left: 12px; }
  .work-icon { width: 28px; height: 28px; }
}

@media (max-width: 520px) {
  :root { --card-radius: 18px; }
  .brand-mark { width: 36px; height: 36px; }
  .intro h1 { font-size: clamp(2.85rem, 12.8vw, 4rem); }
  .section-title { margin-bottom: 10px; }
  .work p { font-size: .8125rem; }
  .action { font-size: .8125rem; }
}

@media (max-height: 520px) {
  .showcase { padding-block: 8px; }
  .intro { margin-bottom: 16px; }
  .intro h1 { font-size: clamp(2.4rem, 10svh, 3.25rem); }
  .intro p { margin-top: 6px; }
  .section-title { margin-bottom: 8px; }
  .site-footer { padding-top: 8px; }
}

@media (max-height: 440px) and (min-width: 481px) {
  body {
    padding-top: max(10px, env(safe-area-inset-top));
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }

  .intro { margin-bottom: 10px; }
  .intro h1 { font-size: clamp(2.125rem, 9svh, 3rem); }
  .intro p { margin-top: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .work,
  .work::before,
  .action .link-arrow { transition: none; }

  .work:hover,
  .work:is(:hover, :focus-visible) .action .link-arrow { transform: none; }
}
