:root {
  --bg: #fffffe;
  --text: #272343;
  --muted: #2d334a;
  --primary: #ffd803;
  --primary-fg: #272343;
  --border: #d1d5db;
  --card: rgba(255,255,255,.72);
  --soft: #f3f4f6;
  color-scheme: light;
}
.dark {
  --bg: #16161a;
  --text: #fffffe;
  --muted: #94a1b2;
  --primary: #7f5af0;
  --primary-fg: #fffffe;
  --border: #242629;
  --card: rgba(22,22,26,.78);
  --soft: #242629;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html {
  font-family: Inter,system-ui,sans-serif;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  background-image: radial-gradient(var(--border) 1px,transparent 1px);
  background-size: 24px 24px;
  background-attachment: fixed;
  transition: background-color .3s,color .3s;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input {
  font: inherit;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  max-width: 896px;
  margin: auto;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb,var(--bg) 70%,transparent);
  backdrop-filter: blur(12px);
}
.brand {
  font: 700 18px "JetBrains Mono",monospace;
}
.brand:hover,
.site-header a:hover,
.site-footer a:hover {
  color: var(--primary);
}
.header-actions,
.header-actions nav,
.header-tools,
.site-footer span {
  display: flex;
  align-items: center;
}
.header-actions {
  gap: 24px;
}
.header-actions nav {
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.header-tools {
  gap: 12px;
  padding-left: 20px;
  border-left: 1px solid var(--border);
}
.icon-button {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
}
.theme-icon::before {
  content: "☾";
}
.dark .theme-icon::before {
  content: "☀";
}
main {
  max-width: 896px;
  min-height: calc(100vh - 180px);
  margin: auto;
  padding: 48px 24px;
}
.site-footer {
  max-width: 896px;
  margin: auto;
  padding: 32px 24px;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font: 14px "JetBrains Mono",monospace;
}
.site-footer span {
  gap: 16px;
}
.hero {
  padding: 60px 0 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
}
.hero h1 {
  font-size: 56px;
  line-height: 1.05;
  margin: 0 0 24px;
  letter-spacing: -.04em;
}
.hero h1 span {
  background: linear-gradient(90deg,#6366f1,#9333ea);
  background-clip: text;
  color: transparent;
}
.hero p {
  font-size: 20px;
  line-height: 1.65;
  color: var(--muted);
}
.hero strong {
  color: var(--text);
}
.hero-art {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.hero-art div {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: linear-gradient(45deg,var(--primary),#a855f7);
  filter: blur(60px);
  opacity: .24;
  animation: pulse 8s infinite;
}
.hero-art img {
  position: relative;
  width: 65%;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 25px 25px rgba(0,0,0,.22));
}
.button-row,
.project-links {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}
.primary-button,
.secondary-button {
  display: inline-flex;
  padding: 11px 20px;
  border-radius: 9px;
  font-weight: 600;
}
.primary-button {
  background: #18181b;
  color: #fff;
}
.dark .primary-button {
  background: #fff;
  color: #18181b;
}
.secondary-button {
  background: var(--soft);
  border: 1px solid var(--border);
}
.tech {
  margin-bottom: 80px;
}
.tech > p {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}
.tech > div {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  font-size: 20px;
  font-weight: 700;
  opacity: .78;
}
.section {
  margin-bottom: 80px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-title h2,
.section > h2 {
  font-size: 24px;
}
.section-title a,
.page-header a {
  color: #4f46e5;
  font-size: 14px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 24px;
}
.project-card {
  position: relative;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  backdrop-filter: blur(18px);
  transition: .25s;
  overflow: hidden;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 20px 35px rgba(0,0,0,.12);
}
.project-card > .card-link {
  position: absolute;
  inset: 0;
}
.project-card > img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 12px;
}
.project-card h2,
.project-card p,
.card-top,
.project-card .tags {
  position: relative;
  pointer-events: none;
}
.project-card h2 {
  font-size: 20px;
  margin: 4px 0;
}
.project-card p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.badge,
.stat {
  padding: 4px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
}
.badge-app {
  color: #2563eb;
  background: #eff6ff;
}
.badge-research {
  color: #9333ea;
  background: #faf5ff;
}
.badge-other,
.badge-project {
  color: #059669;
  background: #ecfdf5;
}
.stat {
  font-family: "JetBrains Mono",monospace;
  color: var(--muted);
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
}
.tags a {
  position: relative;
  z-index: 2;
  color: var(--muted);
  font: 12px "JetBrains Mono",monospace;
  pointer-events: auto;
}
.post-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.post-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px;
  margin: 0 -16px;
  border-radius: 12px;
}
.post-row:hover {
  background: color-mix(in srgb,var(--soft) 65%,transparent);
}
.post-row h3 {
  margin: 0 0 7px;
  font-size: 16px;
}
.post-row p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.post-row img {
  width: 128px;
  height: 128px;
  flex: none;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 9px;
}
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
  color: var(--muted);
  font: 12px "JetBrains Mono",monospace;
}
.read-more {
  display: block;
  margin-top: 10px;
  color: #4f46e5;
  font-size: 14px;
  opacity: 0;
  transform: translateX(-8px);
  transition: .2s;
}
.post-row:hover .read-more {
  opacity: 1;
  transform: none;
}
.page-header {
  max-width: 672px;
  margin-bottom: 48px;
}
.page-header h1 {
  font-size: 36px;
  margin: 0 0 16px;
}
.page-header p {
  color: var(--muted);
  line-height: 1.6;
}
.article {
  max-width: 672px;
  margin: auto;
}
.article-header {
  text-align: center;
  margin-bottom: 40px;
}
.article-header h1 {
  font-size: 42px;
  line-height: 1.15;
  margin: 18px 0;
}
.article-header > p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}
.article-meta {
  display: flex;
  justify-content: center;
  gap: 9px;
  color: var(--muted);
  font: 13px "JetBrains Mono",monospace;
}
.article-back,
.comments,
.connect {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.prose {
  font-size: 16px;
  line-height: 1.8;
}
.prose h2 {
  margin-top: 2em;
  font-size: 27px;
}
.prose h3 {
  margin-top: 1.8em;
  font-size: 21px;
}
.prose p,
.prose li {
  color: color-mix(in srgb,var(--text) 86%,var(--muted));
}
.prose a {
  color: #4f46e5;
  text-decoration: underline;
}
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}
.prose pre {
  overflow: auto;
  padding: 20px;
  border-radius: 10px;
  background: #18181b;
  color: #e4e4e7;
}
.prose code {
  font-family: "JetBrains Mono",monospace;
}
.code-wrapper {
  position: relative;
}
.copy-code {
  position: absolute;
  right: 8px;
  top: 8px;
  padding: 6px 9px;
  border: 0;
  border-radius: 6px;
  background: #27272a;
  color: #d4d4d8;
  cursor: pointer;
}
.badges {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.project-detail .tags,
.project-detail .project-links {
  justify-content: center;
}
.archive section {
  margin-bottom: 42px;
}
.archive h2 {
  display: flex;
  align-items: center;
  gap: 16px;
}
.archive h2 span {
  height: 1px;
  background: var(--border);
  flex: 1;
}
.archive ul {
  list-style: none;
  padding: 0;
}
.archive li a {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
}
.archive time {
  font: 14px "JetBrains Mono",monospace;
  color: var(--muted);
}
.about {
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.about h1 {
  font-size: 32px;
}
.stack {
  display: grid;
  gap: 12px;
  padding: 0;
  list-style: none;
}
.stack li::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 50%;
  background: #6366f1;
}
.timeline {
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline article {
  position: relative;
  display: flex;
  gap: 20px;
  margin: 24px 0;
}
.timeline-dot {
  z-index: 1;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
}
.timeline article > div {
  flex: 1;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}
.timeline header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.timeline time {
  color: var(--primary);
  font: 12px "JetBrains Mono",monospace;
}
.timeline p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.not-found {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.not-found img {
  width: 192px;
  opacity: .8;
}
.not-found p {
  max-width: 448px;
  color: var(--muted);
}
dialog {
  width: min(640px,calc(100% - 32px));
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--card);
  color: var(--text);
  backdrop-filter: blur(20px);
  box-shadow: 0 25px 60px rgba(0,0,0,.35);
}
dialog::backdrop {
  background: rgba(0,0,0,.35);
}
.command-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 10px;
  border-bottom: 1px solid var(--border);
}
.command-search input {
  width: 100%;
  height: 40px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}
.command-list {
  max-height: 400px;
  overflow: auto;
  padding: 8px;
}
.command-list p {
  padding: 5px 8px;
  margin: 5px 0;
  color: var(--muted);
  font-size: 12px;
}
.command-list a {
  display: block;
  padding: 9px;
  border-radius: 6px;
  font-size: 14px;
}
.command-list a:hover,
.command-list a.active {
  background: var(--soft);
  color: var(--primary);
}
.mobile-search {
  display: none;
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 18;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-fg);
  font-size: 24px;
}
@keyframes float {
  50% {
    transform: translateY(-20px);
  }
}
@keyframes pulse {
  50% {
    opacity: .34;
    transform: scale(1.1);
  }
}
@media (max-width:700px) {
  .site-header {
    padding: 16px 24px;
    flex-wrap: wrap;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  .header-actions nav {
    gap: 16px;
  }
  .header-tools {
    padding-left: 14px;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 24px 0 60px;
  }
  .hero > div:first-child {
    order: 2;
  }
  .hero-art {
    max-width: 210px;
    margin: auto;
  }
  .hero h1 {
    font-size: 40px;
  }
  .hero p {
    font-size: 18px;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .site-footer {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
  .post-row img {
    width: 96px;
    height: 96px;
  }
  .mobile-search {
    display: block;
  }
  .article-header h1 {
    font-size: 34px;
  }
  .timeline header {
    flex-direction: column;
  }
  .tech > div {
    gap: 18px;
  }
  .section {
    margin-bottom: 60px;
  }
}
