:root {
  --bg: #050608;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.64);
  --faint: rgba(255, 255, 255, 0.42);
  --line: rgba(255, 255, 255, 0.12);
  --panel: rgba(255, 255, 255, 0.045);

  --mint: #ffffff;
  --blue: #ffffff;
  --lilac: #ffffff;
  --amber: #ffffff;
  --green: #ffffff;

  --font-body: 'Manrope', 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --max: 1120px;
  --header-h: 60px;
  --radius: 18px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(55% 45% at 82% -5%, rgba(255, 255, 255, 0.07), transparent 60%),
    radial-gradient(40% 35% at 5% 15%, rgba(255, 255, 255, 0.04), transparent 65%),
    radial-gradient(45% 40% at 50% 110%, rgba(255, 255, 255, 0.03), transparent 60%);
}

::selection {
  background: var(--mint);
  color: #050608;
}

a,
button {
  font: inherit;
  color: inherit;
}

a {
  text-decoration: none;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

img,
svg {
  display: block;
}

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
  border-radius: 6px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.9;
}

.site {
  position: relative;
  z-index: 1;
}

.icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--fill {
  fill: currentColor;
  stroke: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  background: rgba(5, 6, 8, 0.55);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transition:
    background 0.3s ease,
    border-color 0.3s ease;
}

.topbar.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(5, 6, 8, 0.86);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--max);
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
}

.brand-dots {
  display: inline-flex;
  gap: 6px;
}

.brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  opacity: 0.9;
  transition: transform 0.25s var(--ease);
}

.brand:hover .brand-dot {
  transform: translateY(-1px);
}

.brand-dot--red {
  background: #ff5f57;
}
.brand-dot--yellow {
  background: #febc2e;
}
.brand-dot--green {
  background: #28c840;
}

.brand-name {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.nav-link:hover {
  color: var(--text);
  background: var(--panel);
}

.nav-link.is-active {
  color: var(--text);
}

.nav-link.is-active::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--mint);
  transform: translateX(-50%);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-github {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.topbar-github .icon {
  width: 14px;
  height: 14px;
  transition: transform 0.25s var(--ease);
}

.topbar-github:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.4);
  background: var(--panel);
}

.topbar-github:hover .icon {
  transform: translateX(3px);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.icon-button:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.4);
  background: var(--panel);
}

.menu-toggle {
  display: none;
}

.icon-close {
  display: none;
}

.mobile-menu {
  display: none;
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: var(--max);
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  margin: 0 auto;
  padding: clamp(72px, 10vh, 120px) 28px 96px;
}

.hero-inner {
  position: relative;
  top: -24px;
}

.hero-eyebrow {
  margin: 0;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
}

.hero-title {
  margin: 18px 0 22px;
  font-size: clamp(60px, 15vw, 168px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.hero-title .dot {
  color: var(--mint);
}

.hero-handle {
  margin: 0;
  color: var(--muted);
  font-size: clamp(15px, 1.6vw, 18px);
}

.hero-slogan {
  min-height: 1.6em;
  margin: 10px 0 0;
  color: var(--text);
  font-size: clamp(16px, 1.9vw, 21px);
}

#slogan {
  display: inline-block;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

#slogan.is-changing {
  opacity: 0;
  transform: translateY(-6px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
  margin-top: 38px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--text);
  color: #08090b;
  font-size: 14px;
  font-weight: 600;
  transition:
    transform 0.25s var(--ease),
    background 0.25s ease;
}

.primary-button .icon {
  width: 15px;
  height: 15px;
  transition: transform 0.25s var(--ease);
}

.primary-button:hover {
  background: var(--mint);
  transform: translateY(-2px);
}

.primary-button:hover .icon {
  transform: translateX(3px);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.text-link .icon {
  width: 14px;
  height: 14px;
}

.text-link:hover {
  color: var(--text);
  border-color: var(--mint);
}

.hero-footer {
  position: absolute;
  right: 28px;
  bottom: 28px;
  left: 28px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
}

.page-section {
  position: relative;
}

.content-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 110px 28px;
  border-top: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 46px;
}

.section-kicker {
  margin: 0 0 14px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.section-heading h2 span {
  color: var(--mint);
}

.section-heading--split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.heading-note {
  flex: none;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  text-align: right;
}

.desktop-only {
  display: block;
}

.about-grid {
  display: block;
}

.lead-copy {
  max-width: 22ch;
  margin: 0 0 18px;
  color: var(--text);
  font-size: clamp(20px, 2.5vw, 28px);
  line-height: 1.5;
  letter-spacing: -0.015em;
}

.about-copy > p:not(.lead-copy) {
  max-width: 52ch;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s var(--ease);
}

.social-link:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.4);
  background: var(--panel);
  transform: translateY(-1px);
}

.project-list {
  border-top: 1px solid var(--line);
}

.project-state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 40px 14px;
  color: var(--muted);
  font-size: 13px;
}

.project-state a {
  color: var(--text);
  border-bottom: 1px solid var(--line);
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.project-state a:hover {
  color: var(--mint);
  border-color: var(--mint);
}

.project-loader {
  width: 14px;
  height: 14px;
  border: 2px solid var(--line);
  border-top-color: var(--mint);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.project-source {
  margin: 18px 0 0;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.7;
}

.project-source a {
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.project-source a:hover {
  color: var(--mint);
  border-color: var(--mint);
}

.project-item {
  display: grid;
  grid-template-columns: 48px 52px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 18px;
  padding: 24px 14px;
  border-bottom: 1px solid var(--line);
  transition:
    background 0.25s ease,
    padding 0.25s ease,
    transform 0.25s var(--ease);
}

.project-item:hover {
  padding-right: 10px;
  padding-left: 24px;
  background: rgba(255, 255, 255, 0.03);
}

.project-index {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.project-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--mint);
  background: rgba(255, 255, 255, 0.06);
}

.project-icon--blue {
  color: var(--blue);
  background: rgba(255, 255, 255, 0.05);
}

.project-icon--lilac {
  color: var(--lilac);
  background: rgba(255, 255, 255, 0.04);
}

.project-icon--amber {
  color: var(--amber);
  background: rgba(255, 255, 255, 0.05);
}

.project-icon--green {
  color: var(--green);
  background: rgba(255, 255, 255, 0.04);
}

.project-icon--slate {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.project-icon .icon {
  width: 21px;
  height: 21px;
}

.project-name {
  display: block;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.project-desc {
  display: block;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.project-meta {
  display: block;
  margin-top: 7px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.stack-list:empty {
  display: none;
}

.stack-tag {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.stack-tag--warn {
  color: var(--amber);
  border-color: rgba(255, 255, 255, 0.28);
}

.stack-tag--star {
  color: var(--amber);
}

.stack-tag--tech {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.28);
  opacity: 0.65;
}

.project-arrow {
  width: 18px;
  height: 18px;
  color: var(--faint);
  transition:
    color 0.25s ease,
    transform 0.25s var(--ease);
}

.project-item:hover .project-arrow {
  color: var(--mint);
  transform: translateX(4px);
}

.now-section .section-heading {
  margin-bottom: 46px;
}

.now-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.now-item {
  display: block;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  background: var(--panel);
  transition:
    transform 0.3s var(--ease),
    border-color 0.3s ease,
    background 0.3s ease;
}

.now-item:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
}

.now-item .icon {
  width: 20px;
  height: 20px;
  margin-bottom: 20px;
  color: var(--mint);
}

.now-label {
  margin: 0 0 8px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.now-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
}

.now-desc {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.closing-line {
  margin: 72px 0 0;
  color: var(--faint);
  font-size: clamp(24px, 3.4vw, 40px);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.closing-strong {
  color: var(--text);
}

.site-footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 34px 28px;
}

.footer-left {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 18px;
}

.footer-domain {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  transition: color 0.2s ease;
}

.footer-domain:hover {
  color: var(--mint);
}

.footer-copy {
  margin: 0;
  color: var(--faint);
  font-size: 11px;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-link {
  color: var(--faint);
  font-size: 12px;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--text);
}

.back-to-top {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.back-to-top:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.4);
  background: var(--panel);
}

html.js [data-reveal] {
  opacity: 0;
}

@keyframes reveal {
  from {
    opacity: 0;
    translate: 0 20px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

html.js [data-reveal].is-visible {
  animation: reveal 0.8s var(--ease) both;
  animation-delay: var(--delay, 0s);
}

@media (max-width: 900px) {
  .desktop-nav,
  .topbar-github {
    display: none;
  }

  .menu-toggle {
    display: grid;
  }

  .topbar.menu-open .icon-menu {
    display: none;
  }

  .topbar.menu-open .icon-close {
    display: block;
  }

  .topbar.menu-open .mobile-menu {
    display: block;
  }

  .mobile-menu {
    padding: 6px 28px 22px;
    border-top: 1px solid var(--line);
    background: rgba(5, 6, 8, 0.97);
  }

  .mobile-menu nav {
    display: flex;
    flex-direction: column;
  }

  .mobile-menu .nav-link {
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font-size: 15px;
  }

  .mobile-menu .nav-link:hover {
    background: none;
  }

  .mobile-menu .nav-link.is-active::after {
    display: none;
  }

  .mobile-menu-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    padding-top: 18px;
    color: var(--faint);
    font-family: var(--font-mono);
    font-size: 11px;
  }

  .mobile-menu-footer a {
    color: var(--faint);
  }

  .mobile-menu-footer a:hover {
    color: var(--text);
  }
}

@media (max-width: 760px) {
  .content-section {
    padding: 84px 22px;
  }

  .section-heading--split {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .heading-note {
    text-align: left;
  }

  .now-grid {
    grid-template-columns: 1fr;
  }

  .closing-line {
    margin-top: 54px;
  }

  .project-item {
    grid-template-columns: 36px 46px minmax(0, 1fr) 22px;
    gap: 13px;
    padding: 20px 8px;
  }

  .project-item:hover {
    padding-right: 6px;
    padding-left: 14px;
  }

  .project-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .project-name {
    font-size: 16px;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 56px;
  }

  .topbar-inner,
  .hero,
  .footer-inner {
    padding-right: 20px;
    padding-left: 20px;
  }

  .hero {
    padding-top: 64px;
    padding-bottom: 88px;
  }

  .hero-inner {
    top: -12px;
  }

  .hero-title {
    margin-top: 14px;
    margin-bottom: 18px;
  }

  .hero-slogan {
    min-height: 3em;
  }

  .hero-actions {
    gap: 16px;
    margin-top: 30px;
  }

  .hero-footer {
    right: 20px;
    left: 20px;
    font-size: 9px;
    letter-spacing: 0.14em;
  }

  .desktop-only {
    display: none;
  }

  .content-section {
    padding: 76px 20px;
  }

  .project-desc {
    font-size: 13px;
  }

  .stack-list {
    margin-top: 8px;
  }

  .footer-inner {
    align-items: flex-start;
  }

  .footer-left {
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 400px) {
  .hero-title {
    font-size: 56px;
  }

  .project-item {
    grid-template-columns: 28px 40px minmax(0, 1fr) 18px;
    gap: 10px;
  }

  .project-icon {
    width: 38px;
    height: 38px;
  }

  .project-icon .icon {
    width: 18px;
    height: 18px;
  }

  .project-index {
    font-size: 10px;
  }

  .project-arrow {
    width: 18px;
    height: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  html.js [data-reveal] {
    opacity: 1;
  }

  html.js [data-reveal].is-visible {
    animation: none !important;
  }

  .bg-canvas {
    display: none;
  }
}
