:root
{
  --bg: #0F1115;
  --bg-soft: #141922;
  --panel: rgba(26, 29, 36, 0.72);
  --panel-strong: rgba(20, 24, 32, 0.92);
  --panel-solid: #1A1D24;
  --text: #FFFFFF;
  --text-soft: #9CA3AF;
  --text-dim: #6B7280;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --primary: #4F8CFF;
  --cyan: #6EE7FF;
  --violet: #A78BFA;
  --success: #34D399;
  --warning: #F59E0B;
  --danger: #FB7185;
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.38);
  --shadow-md: 0 16px 42px rgba(0, 0, 0, 0.28);
  --shadow-sm: 0 10px 24px rgba(0, 0, 0, 0.2);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --max-width: 1440px;
  --header-height: 84px;
  --transition: 320ms cubic-bezier(.2, .8, .2, 1);
  --transition-slow: 620ms cubic-bezier(.16, 1, .3, 1);
  --grid: rgba(255, 255, 255, 0.035);
  --selection: rgba(79, 140, 255, 0.26);
  --tag-bg: rgba(255, 255, 255, 0.06);
  --glass: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  --bg-orb-a: rgba(79, 140, 255, 0.18);
  --bg-orb-b: rgba(167, 139, 250, 0.18);
  --bg-orb-c: rgba(110, 231, 255, 0.12);
  --code-bg: #0A0D13;
}

body.light
{
  --bg: #F7F8FA;
  --bg-soft: #EEF2F7;
  --panel: rgba(255, 255, 255, 0.76);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --panel-solid: #FFFFFF;
  --text: #0F172A;
  --text-soft: #64748B;
  --text-dim: #94A3B8;
  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.14);
  --shadow-lg: 0 30px 70px rgba(15, 23, 42, 0.12);
  --shadow-md: 0 16px 36px rgba(15, 23, 42, 0.1);
  --shadow-sm: 0 8px 22px rgba(15, 23, 42, 0.08);
  --grid: rgba(15, 23, 42, 0.045);
  --selection: rgba(59, 130, 246, 0.18);
  --tag-bg: rgba(15, 23, 42, 0.05);
  --glass: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.82));
  --bg-orb-a: rgba(59, 130, 246, 0.14);
  --bg-orb-b: rgba(139, 92, 246, 0.14);
  --bg-orb-c: rgba(34, 211, 238, 0.12);
  --code-bg: #0F172A;
}

*
{
  box-sizing: border-box;
}

html
{
  scroll-behavior: smooth;
}

body
{
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 18%, var(--bg-orb-a), transparent 24%),
    radial-gradient(circle at 88% 14%, var(--bg-orb-b), transparent 18%),
    radial-gradient(circle at 76% 78%, var(--bg-orb-c), transparent 18%),
    linear-gradient(180deg, var(--bg-soft), var(--bg));
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

body::before
{
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, black, transparent 88%);
  pointer-events: none;
  z-index: -3;
}

body::after
{
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 25% 35%, rgba(79,140,255,.08), transparent 25%),
    radial-gradient(circle at 75% 72%, rgba(167,139,250,.08), transparent 22%),
    radial-gradient(circle at 68% 20%, rgba(110,231,255,.06), transparent 22%);
  filter: blur(42px);
  animation: bgFloat 14s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: -2;
}

@keyframes bgFloat
{
  from
  {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to
  {
    transform: translate3d(0, -18px, 0) scale(1.03);
  }
}

::selection
{
  background: var(--selection);
}

a
{
  color: inherit;
  text-decoration: none;
}

button,
input
{
  font: inherit;
}

img,
svg
{
  display: block;
}

::-webkit-scrollbar
{
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track
{
  background: rgba(255,255,255,.04);
}

::-webkit-scrollbar-thumb
{
  background: linear-gradient(180deg, rgba(79,140,255,.84), rgba(167,139,250,.84));
  border: 3px solid transparent;
  background-clip: padding-box;
  border-radius: 999px;
}

.container
{
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
}

.glass
{
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.loading-screen,
.cursor-glow,
.cursor-dot,
.progress-bar,
.particles
{
  position: fixed;
  pointer-events: none;
}

.particles
{
  inset: 0;
  z-index: -1;
}

.cursor-glow
{
  width: 320px;
  height: 320px;
  top: -160px;
  left: -160px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(110,231,255,.18), rgba(79,140,255,.08) 38%, rgba(167,139,250,0) 72%);
  filter: blur(12px);
  mix-blend-mode: screen;
  opacity: .78;
  z-index: 50;
}

.cursor-dot
{
  width: 11px;
  height: 11px;
  top: -6px;
  left: -6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  box-shadow: 0 0 24px rgba(79,140,255,.72);
  z-index: 51;
}

.progress-bar
{
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  z-index: 70;
  background: linear-gradient(90deg, var(--primary), var(--cyan), var(--violet));
  box-shadow: 0 0 18px rgba(79,140,255,.75);
  transform-origin: left center;
}

.loading-screen
{
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(79,140,255,.18), transparent 25%),
    linear-gradient(180deg, rgba(15,17,21,.98), rgba(15,17,21,1));
  z-index: 100;
  transition: opacity .75s ease, visibility .75s ease;
}

.loading-screen.hidden
{
  opacity: 0;
  visibility: hidden;
}

.loading-core
{
  position: relative;
  width: min(280px, 84vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.loading-ring
{
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
  animation: ringSpin 3.6s linear infinite;
}

.loading-ring::before
{
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border-top: 1px solid rgba(110,231,255,.9);
  border-right: 1px solid rgba(167,139,250,.8);
}

.loading-ring--delay
{
  inset: 28%;
  animation-direction: reverse;
  animation-duration: 2.8s;
}

.loading-text
{
  display: grid;
  gap: 10px;
  text-align: center;
}

.loading-text strong
{
  font-size: 28px;
  letter-spacing: .08em;
}

.loading-text span
{
  font-size: 14px;
  color: #9CA3AF;
}

@keyframes ringSpin
{
  to
  {
    transform: rotate(360deg);
  }
}

.site-header
{
  position: sticky;
  top: 0;
  z-index: 60;
  padding-top: 18px;
}

.nav-shell
{
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 22px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 999px;
  background: rgba(15,17,21,.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

body.light .nav-shell
{
  background: rgba(255,255,255,.76);
}

.site-header.scrolled .nav-shell
{
  background: var(--panel-strong);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.brand
{
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark
{
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--primary), var(--cyan), var(--violet));
  box-shadow: 0 0 20px rgba(79,140,255,.4);
}

.brand strong,
.brand span
{
  display: block;
  line-height: 1.15;
}

.brand strong
{
  font-size: 16px;
}

.brand span
{
  font-size: 12px;
  color: var(--text-soft);
}

.nav-links
{
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link
{
  position: relative;
  padding: 10px 14px;
  color: var(--text-soft);
  border-radius: 999px;
  transition: color var(--transition), background var(--transition), transform var(--transition);
}

.nav-link::after
{
  content: "";
  position: absolute;
  inset: auto 14px 8px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition);
}

.nav-link:hover,
.nav-link.active
{
  color: var(--text);
  background: rgba(255,255,255,.04);
}

.nav-link:hover::after,
.nav-link.active::after
{
  transform: scaleX(1);
}

.nav-actions
{
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-panel
{
  position: relative;
}

.search-box
{
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(320px, 32vw);
  min-width: 220px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.search-box:focus-within
{
  border-color: rgba(79,140,255,.55);
  box-shadow: 0 0 0 4px rgba(79,140,255,.12), 0 0 24px rgba(79,140,255,.18);
  background: rgba(255,255,255,.06);
}

.search-box svg
{
  width: 16px;
  height: 16px;
  fill: currentColor;
  color: var(--text-soft);
}

.search-box input
{
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
}

.search-suggestions
{
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  display: none;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
}

.search-suggestions.show
{
  display: grid;
  gap: 8px;
}

.search-item
{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.03);
  transition: transform var(--transition), background var(--transition);
  cursor: pointer;
}

.search-item:hover
{
  transform: translateY(-2px);
  background: rgba(255,255,255,.06);
}

.search-item strong
{
  font-size: 14px;
}

.search-item span
{
  font-size: 12px;
  color: var(--text-soft);
}

.icon-btn,
.avatar-btn,
.btn
{
  border: 0;
  cursor: pointer;
}

.icon-btn,
.avatar-btn
{
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255,255,255,.05);
  color: var(--text);
  border: 1px solid var(--line);
  transition: transform var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.icon-btn:hover,
.avatar-btn:hover
{
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: rgba(79,140,255,.35);
}

.avatar-btn span
{
  font-weight: 700;
}

.theme-icon
{
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.theme-icon-sun
{
  display: none;
}

body.light .theme-icon-sun
{
  display: block;
}

body.light .theme-icon-moon
{
  display: none;
}

.hero
{
  padding-top: 46px;
}

.hero-grid
{
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, .82fr);
  gap: 24px;
  align-items: stretch;
}

.hero-copy,
.hero-showcase
{
  border-radius: var(--radius-xl);
}

.hero-copy
{
  padding: 34px;
}

.eyebrow,
.section-kicker,
.detail-kicker
{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(79,140,255,.24);
  background: rgba(79,140,255,.1);
  color: #D5E4FF;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body.light .eyebrow,
body.light .section-kicker,
body.light .detail-kicker
{
  color: #2B5EC7;
}

.hero-copy h1
{
  margin: 22px 0 16px;
  font-size: clamp(38px, 4vw, 64px);
  line-height: 1.05;
  letter-spacing: -.03em;
}

.hero-copy h1 span
{
  background: linear-gradient(135deg, var(--cyan), var(--primary), var(--violet));
  -webkit-background-clip: text;
  color: transparent;
}

.hero-copy p,
.section-heading p,
.about-grid p,
.timeline p,
.project-card__summary,
.metric small,
.mini-grid span,
.profile-head p,
.profile-meta span,
.about-cards p,
.site-footer p,
.markdown-body p,
.markdown-body li,
.markdown-body blockquote
{
  color: var(--text-soft);
}

.hero-actions
{
  display: flex;
  gap: 14px;
  margin-top: 28px;
}

.btn
{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 12px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
}

.btn-primary
{
  color: #FFF;
  background: linear-gradient(135deg, var(--primary), var(--violet));
  box-shadow: 0 12px 32px rgba(79,140,255,.28);
}

.btn-primary:hover
{
  transform: translateY(-3px);
  box-shadow: 0 20px 38px rgba(79,140,255,.34);
}

.btn-secondary,
.btn-ghost
{
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
}

.btn-secondary:hover,
.btn-ghost:hover
{
  transform: translateY(-3px);
  border-color: rgba(79,140,255,.35);
  box-shadow: var(--shadow-sm);
}

.hero-stats
{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.hero-stats article
{
  padding: 18px;
  border-radius: 18px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
}

.hero-stats strong
{
  display: block;
  margin-bottom: 6px;
  font-size: 28px;
}

.hero-stats span
{
  font-size: 13px;
  color: var(--text-soft);
}

.hero-panel
{
  min-height: 100%;
}

.hero-showcase
{
  position: relative;
  min-height: 100%;
  padding: 28px;
  overflow: hidden;
}

.hero-orb
{
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  opacity: .6;
}

.hero-orb-a
{
  width: 220px;
  height: 220px;
  top: -70px;
  right: -50px;
  background: radial-gradient(circle, rgba(79,140,255,.28), transparent 66%);
}

.hero-orb-b
{
  width: 240px;
  height: 240px;
  bottom: -90px;
  left: -90px;
  background: radial-gradient(circle, rgba(167,139,250,.22), transparent 66%);
}

.showcase-top,
.showcase-card__header,
.detail-top,
.sidebar-title-row,
.footer-inner,
.profile-head,
.profile-meta,
.project-card__meta,
.project-card__top,
.card-footer,
.metric-row,
.feature-grid,
.detail-layout,
.about-grid,
.about-cards,
.hero-grid,
.timeline article,
.mini-grid,
.floating-tags,
.socials,
.section-heading,
.content-shell,
.project-grid,
.hero-actions,
.detail-layout,
.markdown-grid
{
  display: flex;
}

.hero-grid
{
  display: grid;
}

.showcase-top,
.sidebar-title-row,
.project-card__meta,
.project-card__top,
.card-footer,
.profile-head,
.profile-meta,
.footer-inner,
.section-heading,
.showcase-card__header,
.detail-top,
.timeline article
{
  align-items: center;
  justify-content: space-between;
}

.showcase-card
{
  position: relative;
  z-index: 1;
  margin-top: 22px;
  border-radius: 24px;
  padding: 18px;
  background: rgba(9, 12, 18, .6);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.showcase-card__header span
{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
}

.showcase-card__header
{
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 18px;
}

.metric strong
{
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.mini-grid
{
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.mini-grid > div
{
  min-width: calc(50% - 6px);
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
}

.mini-grid span,
.status-pill,
.chip,
.project-card__badge,
.project-card__status,
.tag,
.recent-item small,
.detail-metric span,
.feature-card span,
.toc-card span,
.markdown-label
{
  font-size: 12px;
}

.mini-grid strong
{
  display: block;
  margin-top: 6px;
  font-size: 15px;
}

.showcase-bars
{
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.showcase-bars span
{
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(79,140,255,.82), rgba(167,139,250,.8));
  animation: pulseBar 2.8s ease-in-out infinite;
}

.showcase-bars span:nth-child(2)
{
  width: 86%;
  animation-delay: .2s;
}

.showcase-bars span:nth-child(3)
{
  width: 72%;
  animation-delay: .4s;
}

.showcase-bars span:nth-child(4)
{
  width: 92%;
  animation-delay: .6s;
}

@keyframes pulseBar
{
  0%,
  100%
  {
    transform: scaleX(.98);
    opacity: .72;
  }
  50%
  {
    transform: scaleX(1);
    opacity: 1;
  }
}

.floating-tags
{
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.floating-tags span,
.chip,
.project-card__badge,
.tag,
.status-pill,
.project-card__status
{
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.05);
}

.chip-glow
{
  box-shadow: 0 0 24px rgba(79,140,255,.22);
}

.status-pill
{
  color: #D8FBEF;
  border-color: rgba(52,211,153,.24);
  background: rgba(52,211,153,.1);
}

body.light .hero-showcase
{
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.9));
  border-color: rgba(148,163,184,.16);
  box-shadow: 0 22px 48px rgba(15,23,42,.10);
}

body.light .showcase-card
{
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.94));
  border-color: rgba(148,163,184,.16);
  box-shadow: 0 16px 34px rgba(15,23,42,.08);
}

body.light .showcase-card__header span
{
  background: rgba(148,163,184,.4);
}

body.light .mini-grid > div
{
  background: rgba(248,250,252,.96);
  border-color: rgba(148,163,184,.18);
}

body.light .floating-tags span,
body.light .chip,
body.light .project-card__badge,
body.light .tag,
body.light .project-card__status
{
  background: rgba(255,255,255,.88);
  border-color: rgba(148,163,184,.18);
}

body.light .status-pill
{
  color: #0F7A53;
  background: rgba(16,185,129,.14);
  border-color: rgba(16,185,129,.22);
}


.category-strip,
.about-section
{
  padding-top: 34px;
}

.section-heading
{
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-heading h2,
.about-grid h2,
.detail-top h2
{
  margin: 12px 0 0;
  font-size: clamp(28px, 3vw, 38px);
}

.section-heading p
{
  max-width: 460px;
  margin: 0;
}

.filter-chips
{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-chip
{
  position: relative;
  overflow: hidden;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-soft);
  background: rgba(255,255,255,.04);
  cursor: pointer;
  transition: transform var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.filter-chip::before
{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.16), transparent);
  transform: translateX(-100%);
}

.filter-chip:hover::before
{
  animation: chipSweep 1.2s ease;
}

@keyframes chipSweep
{
  to
  {
    transform: translateX(100%);
  }
}

.filter-chip.active,
.filter-chip:hover
{
  color: #FFF;
  border-color: transparent;
  background: linear-gradient(135deg, rgba(79,140,255,.92), rgba(167,139,250,.92));
  box-shadow: 0 16px 32px rgba(79,140,255,.22);
}

.content-shell
{
  align-items: flex-start;
  gap: 24px;
  padding-top: 30px;
}

.content-main
{
  flex: 1;
  min-width: 0;
}

.sidebar
{
  width: 340px;
  position: sticky;
  top: calc(var(--header-height) + 22px);
  display: grid;
  gap: 18px;
}

.sidebar-card,
.project-detail,
.about-grid
{
  border-radius: 24px;
}

.sidebar-card
{
  padding: 22px;
}

.profile-avatar
{
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--violet));
  box-shadow: 0 14px 30px rgba(79,140,255,.24);
}

.profile-head
{
  justify-content: flex-start;
  gap: 14px;
}

.profile-head h3,
.sidebar-card h3
{
  margin: 0;
  font-size: 20px;
}

.profile-head p
{
  margin: 6px 0 0;
  font-size: 14px;
}

.profile-meta
{
  margin-top: 18px;
  gap: 14px;
  align-items: stretch;
}

.profile-meta > div
{
  flex: 1;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
}

.profile-meta strong
{
  display: block;
  margin-top: 8px;
  font-size: 14px;
}

.socials
{
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.socials a
{
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  transition: transform var(--transition), border-color var(--transition);
}

.socials a:hover
{
  transform: translateY(-2px);
  border-color: rgba(79,140,255,.36);
}

.sidebar-title-row span,
.recent-item small,
.timeline span
{
  color: var(--text-dim);
}

.tag-cloud
{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-cloud span,
.tag
{
  padding: 10px 12px;
  border-radius: 999px;
  background: var(--tag-bg);
  border: 1px solid var(--line);
}

.recent-list
{
  display: grid;
  gap: 10px;
}

.recent-item
{
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
  cursor: pointer;
}

.recent-item:hover
{
  transform: translateX(4px);
  border-color: rgba(79,140,255,.36);
  background: rgba(255,255,255,.05);
}

.recent-item strong
{
  display: block;
  margin-top: 8px;
  font-size: 14px;
}

.timeline
{
  display: grid;
  gap: 16px;
}

.timeline article
{
  gap: 14px;
  align-items: flex-start;
  justify-content: flex-start;
}

.timeline span
{
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
}

.timeline strong
{
  display: block;
  margin-bottom: 6px;
}

.project-grid
{
  flex-wrap: wrap;
  gap: 18px;
}

.project-card
{
  position: relative;
  width: calc(50% - 9px);
  min-height: 360px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform var(--transition-slow), border-color var(--transition), box-shadow var(--transition);
}

.project-card::before
{
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.16), transparent 36%);
  opacity: 0;
  transition: opacity var(--transition);
}

.project-card:hover
{
  border-color: rgba(79,140,255,.28);
  box-shadow: 0 28px 60px rgba(0,0,0,.32);
}

.project-card:hover::before
{
  opacity: 1;
}

.project-card__cover
{
  position: relative;
  height: 180px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
}

.project-card__cover::after
{
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255,255,255,.14), transparent 34%, rgba(255,255,255,.08) 52%, transparent 66%),
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.08));
}

.cover-grid,
.cover-grid::before,
.cover-grid::after
{
  position: absolute;
  inset: 0;
}

.cover-grid
{
  background-size: cover;
  transform: scale(1);
  transition: transform var(--transition-slow);
}

.project-card:hover .cover-grid
{
  transform: scale(1.06);
}

.cover-grid::before
{
  content: "";
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: .42;
}

.cover-grid::after
{
  content: "";
  background:
    radial-gradient(circle at 24% 30%, rgba(255,255,255,.28), transparent 16%),
    radial-gradient(circle at 78% 70%, rgba(255,255,255,.18), transparent 18%);
}

.project-card__top
{
  gap: 12px;
  margin-top: 18px;
}

.project-card__badge
{
  color: #FFF;
  background: linear-gradient(135deg, rgba(79,140,255,.94), rgba(167,139,250,.94));
  border: 0;
}

.project-card__status
{
  color: var(--text-soft);
}

.project-card h3
{
  margin: 16px 0 10px;
  font-size: 24px;
}

.project-card__summary
{
  margin: 0;
  line-height: 1.75;
}

.project-card__meta
{
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  justify-content: flex-start;
}

.card-footer
{
  margin-top: 18px;
}

.card-footer .meta-line
{
  font-size: 13px;
  color: var(--text-soft);
}

.link-arrow
{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.link-arrow::after
{
  content: "→";
  transition: transform var(--transition);
}

.project-card:hover .link-arrow::after
{
  transform: translateX(4px);
}

.project-detail
{
  margin-top: 22px;
  padding: 26px;
}

.detail-top
{
  gap: 20px;
  align-items: flex-start;
}

.detail-top p
{
  margin: 14px 0 0;
  max-width: 760px;
  color: var(--text-soft);
}

.detail-layout
{
  gap: 24px;
  align-items: flex-start;
  margin-top: 22px;
}

.detail-content
{
  flex: 1;
  min-width: 0;
}

.detail-toc
{
  width: 240px;
  position: sticky;
  top: calc(var(--header-height) + 24px);
}

.toc-card
{
  padding: 18px;
  border-radius: 18px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
}

#tocLinks
{
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.toc-link
{
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text-soft);
  background: transparent;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.toc-link.active,
.toc-link:hover
{
  color: var(--text);
  background: rgba(255,255,255,.05);
  transform: translateX(3px);
}

.markdown-body
{
  display: grid;
  gap: 24px;
}

.markdown-section
{
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.markdown-body h3
{
  margin: 0 0 12px;
  font-size: 24px;
}

.markdown-body p,
.markdown-body ul,
.markdown-body ol,
.markdown-body blockquote
{
  margin: 0;
  line-height: 1.85;
}

.markdown-body ul,
.markdown-body ol
{
  padding-left: 20px;
}

.markdown-grid
{
  flex-wrap: wrap;
  gap: 14px;
}

.detail-metric,
.feature-card,
.shot-card
{
  flex: 1 1 220px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
}

.detail-metric strong,
.feature-card strong,
.shot-card strong
{
  display: block;
  margin-top: 10px;
  font-size: 18px;
}

.feature-grid
{
  gap: 14px;
  flex-wrap: wrap;
}

.markdown-body blockquote
{
  padding: 16px 18px;
  border-left: 3px solid rgba(79,140,255,.6);
  border-radius: 0 14px 14px 0;
  background: rgba(79,140,255,.08);
}

.code-block
{
  border-radius: 20px;
  overflow: hidden;
  background: var(--code-bg);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.code-head
{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
}

.code-dots
{
  display: flex;
  gap: 8px;
}

.code-dots span
{
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
}

.markdown-label
{
  color: #C3D4F8;
}

.code-block pre
{
  margin: 0;
  overflow-x: auto;
  padding: 18px;
  font-size: 13px;
  line-height: 1.75;
}

.code-block code
{
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  color: #E5ECFF;
}

.code-key
{
  color: #8DD8FF;
}

.code-str
{
  color: #B9F27C;
}

.code-fn
{
  color: #FFD479;
}

.code-cm
{
  color: #7A8699;
}

.about-grid
{
  padding: 28px;
  gap: 24px;
  align-items: start;
}

.about-grid > div
{
  flex: 1;
}

.about-cards
{
  gap: 14px;
  flex-wrap: wrap;
}

.about-cards article
{
  flex: 1 1 220px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
}

.site-footer
{
  padding: 36px 0 42px;
}

.footer-inner
{
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.footer-links
{
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a
{
  color: var(--text-soft);
}

.detail-actions
{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.detail-visit-btn.is-disabled
{
  opacity: .58;
  pointer-events: none;
  box-shadow: none;
}

.contact-panel
{
  display: grid;
  gap: 18px;
}

.chat-shell
{
  display: grid;
  gap: 16px;
}

.chat-messages
{
  min-height: 180px;
  max-height: 320px;
  overflow: auto;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  display: grid;
  gap: 12px;
}

body.light .chat-messages
{
  background: rgba(248,250,252,.92);
  border-color: rgba(148,163,184,.18);
}

.chat-bubble
{
  max-width: min(100%, 520px);
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.chat-bubble strong
{
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.chat-bubble p
{
  margin: 0;
  color: var(--text-soft);
  line-height: 1.8;
}

.chat-bubble--assistant,
.chat-bubble--status
{
  background: rgba(255,255,255,.04);
}

.chat-bubble--user
{
  margin-left: auto;
  background: linear-gradient(135deg, rgba(79,140,255,.18), rgba(167,139,250,.18));
  border-color: rgba(79,140,255,.22);
}

body.light .chat-bubble--assistant,
body.light .chat-bubble--status
{
  background: rgba(255,255,255,.88);
  border-color: rgba(148,163,184,.18);
}

body.light .chat-bubble--user
{
  background: linear-gradient(135deg, rgba(79,140,255,.12), rgba(167,139,250,.12));
  border-color: rgba(79,140,255,.18);
}

.chat-form
{
  display: grid;
  gap: 14px;
}

.chat-input-wrap
{
  display: block;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

body.light .chat-input-wrap
{
  background: rgba(255,255,255,.9);
  border-color: rgba(148,163,184,.18);
}

.chat-input-wrap:focus-within
{
  border-color: rgba(79,140,255,.45);
  box-shadow: 0 0 0 4px rgba(79,140,255,.10), 0 0 22px rgba(79,140,255,.14);
}

#chatInput
{
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  line-height: 1.8;
}

#chatInput::placeholder
{
  color: var(--text-soft);
}

.chat-form__footer
{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.chat-tip
{
  font-size: 13px;
  color: var(--text-soft);
}

.chat-send
{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 118px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  color: #FFF;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--primary), var(--violet));
  box-shadow: 0 12px 30px rgba(79,140,255,.24);
}

.chat-send:hover
{
  transform: translateY(-2px);
}

.chat-send:disabled
{
  opacity: .72;
  cursor: wait;
}

.chat-send svg
{
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.reveal
{
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .75s ease, transform .75s ease;
}

.reveal.visible
{
  opacity: 1;
  transform: translateY(0);
}

.delay-1
{
  transition-delay: .08s;
}

.delay-2
{
  transition-delay: .14s;
}

.delay-3
{
  transition-delay: .2s;
}

.delay-4
{
  transition-delay: .26s;
}

@media (max-width: 1220px)
{
  .nav-links
  {
    display: none;
  }

  .content-shell,
  .detail-layout,
  .about-grid,
  .hero-grid
  {
    flex-direction: column;
  }

  .hero-grid
  {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .detail-toc
  {
    width: 100%;
    position: static;
  }

  .project-card
  {
    width: 100%;
  }
}

@media (max-width: 820px)
{
  .container
  {
    width: min(calc(100% - 24px), var(--max-width));
  }

  .site-header
  {
    padding-top: 10px;
  }

  .nav-shell
  {
    height: auto;
    padding: 12px;
    border-radius: 26px;
    flex-wrap: wrap;
  }

  .search-box
  {
    width: 100%;
    min-width: 0;
  }

  .nav-actions
  {
    width: 100%;
    flex-wrap: wrap;
  }

  .search-panel
  {
    width: 100%;
  }

  .hero-copy,
  .hero-showcase,
  .sidebar-card,
  .project-card,
  .project-detail,
  .about-grid
  {
    padding: 20px;
    border-radius: 20px;
  }

  .hero-copy h1
  {
    font-size: 34px;
  }

  .hero-actions,
  .hero-stats,
  .profile-meta,
  .detail-top
  {
    flex-direction: column;
  }

  .hero-stats
  {
    grid-template-columns: 1fr;
  }

  .project-card__cover
  {
    height: 160px;
  }

  .footer-inner
  {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .cursor-glow,
  .cursor-dot
  {
    display: none;
  }
}


@media (max-width: 980px)
{
  .detail-actions
  {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 640px)
{
  .chat-messages
  {
    min-height: 160px;
  }

  .chat-form__footer,
  .detail-actions
  {
    flex-direction: column;
    align-items: stretch;
  }

  .chat-send,
  .detail-visit-btn,
  #detailClose
  {
    width: 100%;
  }
}

@media (max-width: 768px)
{
  .nav-shell
  {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    row-gap: 10px;
  }

  .brand,
  .nav-actions,
  .search-panel,
  .search-box,
  .hero-copy,
  .hero-showcase,
  .project-card,
  .project-detail,
  .sidebar-card,
  .about-grid,
  .contact-panel,
  .about-cards,
  .about-cards article,
  .detail-content,
  .chat-shell,
  .chat-form,
  .chat-input-wrap,
  .chat-form__footer,
  .recent-item
  {
    width: 100%;
  }

  .nav-actions
  {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
  }

  .search-panel
  {
    min-width: 0;
  }

  .search-suggestions
  {
    left: 0;
    right: 0;
  }

  .icon-btn,
  .avatar-btn
  {
    margin: 0;
  }

  .hero-grid,
  .content-shell,
  .detail-layout,
  .about-grid
  {
    gap: 16px;
  }

  .hero-copy,
  .hero-showcase,
  .project-detail,
  .about-grid
  {
    padding: 18px;
  }

  .hero-copy p,
  .detail-top p,
  .section-heading p
  {
    max-width: none;
  }

  .hero-actions
  {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hero-actions .btn,
  .detail-actions .btn,
  .detail-actions a,
  .chat-send
  {
    width: 100%;
  }

  .hero-stats
  {
    gap: 12px;
  }

  .hero-stats article
  {
    width: 100%;
    padding: 16px;
  }

  .showcase-top
  {
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
  }

  .mini-grid
  {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .mini-grid > div
  {
    min-width: 0;
    width: 100%;
  }

  .section-heading
  {
    align-items: flex-start;
    gap: 10px;
  }

  .filter-chips
  {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .filter-chips::-webkit-scrollbar
  {
    display: none;
  }

  .filter-chip
  {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .project-grid
  {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .project-card
  {
    min-height: 0;
  }

  .project-card__top,
  .project-card__meta,
  .card-footer,
  .profile-head,
  .socials,
  .footer-inner
  {
    align-items: stretch;
  }

  .project-card__top,
  .card-footer
  {
    flex-direction: column;
    gap: 10px;
  }

  .project-card__meta
  {
    gap: 8px;
  }

  .detail-top,
  .detail-actions,
  .profile-meta,
  .chat-form__footer,
  .footer-inner
  {
    gap: 12px;
  }

  .toc-card
  {
    padding: 14px;
  }

  .markdown-grid,
  .feature-grid,
  .about-cards
  {
    display: grid;
    grid-template-columns: 1fr;
  }

  .detail-metric,
  .feature-card,
  .shot-card,
  .about-cards article
  {
    width: 100%;
    min-width: 0;
  }

  .socials
  {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .socials a
  {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .timeline article
  {
    gap: 12px;
  }

  .chat-bubble
  {
    max-width: calc(100% - 12px);
  }

  .chat-bubble--user
  {
    margin-left: auto;
  }

  .chat-input-wrap
  {
    padding: 12px;
  }

  #chatInput
  {
    display: block;
    width: 100%;
  }

  .footer-links
  {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 560px)
{
  .container
  {
    width: calc(100% - 18px);
  }

  .nav-shell
  {
    row-gap: 8px;
    padding: 8px;
    border-radius: 18px;
  }

  .nav-actions
  {
    grid-template-columns: minmax(0, 1fr) 42px 42px;
    gap: 8px;
  }

  .search-box
  {
    min-height: 42px;
    padding: 10px 12px;
  }

  .hero,
  .category-strip,
  .about-section,
  .site-footer
  {
    scroll-margin-top: 76px;
  }

  .hero-copy,
  .hero-showcase,
  .project-card,
  .project-detail,
  .sidebar-card,
  .about-grid
  {
    padding: 16px;
    border-radius: 18px;
  }

  .hero-copy h1
  {
    margin: 16px 0 10px;
  }

  .hero-stats
  {
    margin-top: 22px;
  }

  .hero-stats article
  {
    padding: 14px;
  }

  .showcase-card
  {
    margin-top: 16px;
    padding: 12px;
    border-radius: 18px;
  }

  .mini-grid
  {
    grid-template-columns: 1fr;
  }

  .project-card__cover
  {
    height: 132px;
  }

  .project-card h3
  {
    margin: 12px 0 8px;
  }

  .project-card__top,
  .project-card__meta,
  .card-footer,
  .detail-top,
  .detail-actions,
  .profile-meta,
  .footer-inner,
  .chat-form__footer
  {
    gap: 10px;
  }

  .profile-head
  {
    gap: 12px;
  }

  .socials
  {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .tag-cloud,
  .floating-tags
  {
    gap: 8px;
  }

  .chat-messages
  {
    padding: 12px;
    border-radius: 16px;
  }

  .chat-bubble
  {
    max-width: 100%;
    padding: 12px 14px;
    border-radius: 16px;
  }
}

@media (max-width: 420px)
{
  .container
  {
    width: calc(100% - 16px);
  }

  .nav-actions
  {
    grid-template-columns: minmax(0, 1fr) 40px 40px;
  }

  .search-box input,
  .search-item strong,
  .search-item span,
  .filter-chip,
  .project-card__status,
  .project-card__badge,
  .tag,
  .socials a
  {
    font-size: 12px;
  }

  .hero-copy,
  .hero-showcase,
  .project-card,
  .project-detail,
  .sidebar-card,
  .about-grid
  {
    padding: 14px;
  }

  .hero-copy h1
  {
    font-size: 23px;
  }

  .section-heading h2,
  .detail-top h2,
  .about-grid h2
  {
    font-size: 21px;
  }

  .hero-stats strong
  {
    font-size: 24px;
  }

  .project-card__cover
  {
    height: 120px;
  }

  .socials
  {
    grid-template-columns: 1fr;
  }

  .footer-links
  {
    gap: 12px;
  }
}
