:root {
  color-scheme: dark;

  --bg: #050507;
  --text: #f5f5f7;
  --text-2: rgba(245, 245, 247, 0.7);
  --text-3: rgba(245, 245, 247, 0.46);

  --glass-1: rgba(255, 255, 255, 0.075);
  --glass-2: rgba(255, 255, 255, 0.025);
  --glass-hover: rgba(255, 255, 255, 0.115);
  --stroke: rgba(255, 255, 255, 0.1);
  --stroke-2: rgba(255, 255, 255, 0.2);
  --highlight: rgba(255, 255, 255, 0.14);
  --panel: #0e0e14;
  --code-bg: #09090d;

  --orb-1: #6d4aff;
  --orb-2: #00b3ff;
  --orb-3: #ff3d9a;
  --orb-4: #19e3b1;

  --radius-lg: 28px;
  --radius: 20px;
  --radius-sm: 12px;
  --blur: 24px;

  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", "SF Mono", Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
  scrollbar-gutter: stable;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
  overflow-x: hidden;
}

html.modal-open,
html.modal-open body { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

::selection { background: rgba(124, 92, 255, 0.45); }

:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 3px;
}

.icon { flex: none; display: block; }

.bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg);
}

.bg::before,
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
}

.bg::before {
  background:
    radial-gradient(circle 46vmax at 6% 4%, rgba(109, 74, 255, 0.5), rgba(109, 74, 255, 0.2) 40%, transparent 72%),
    radial-gradient(circle 38vmax at 98% 46%, rgba(0, 179, 255, 0.36), rgba(0, 179, 255, 0.13) 40%, transparent 72%),
    radial-gradient(circle 36vmax at 38% 108%, rgba(255, 61, 154, 0.3), rgba(255, 61, 154, 0.11) 40%, transparent 72%),
    radial-gradient(circle 22vmax at 76% 84%, rgba(25, 227, 177, 0.18), transparent 70%);
}

.bg::after {
  background:
    radial-gradient(circle 46vmax at 14% 10%, rgba(163, 71, 255, 0.46), rgba(163, 71, 255, 0.18) 40%, transparent 72%),
    radial-gradient(circle 38vmax at 92% 38%, rgba(34, 216, 208, 0.34), rgba(34, 216, 208, 0.12) 40%, transparent 72%),
    radial-gradient(circle 36vmax at 46% 102%, rgba(255, 107, 87, 0.28), rgba(255, 107, 87, 0.1) 40%, transparent 72%),
    radial-gradient(circle 22vmax at 68% 78%, rgba(74, 168, 255, 0.2), transparent 70%);
  opacity: 0;
  will-change: opacity;
  animation: bg-shift 20s steps(100) infinite alternate;
}

@keyframes bg-shift { to { opacity: 1; } }

html.modal-open .bg::after { animation-play-state: paused; }

.glass {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(145deg, var(--glass-1), var(--glass-2)),
    rgba(14, 14, 22, 0.28);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 0 var(--highlight),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03),
    0 14px 34px -22px rgba(0, 0, 0, 0.7);
}

.glass-interactive {
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s ease;
}

.glass-interactive::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.11), transparent 45%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.glass-interactive:hover {
  transform: translateY(-3px);
  border-color: var(--stroke-2);
  background:
    linear-gradient(145deg, var(--glass-hover), var(--glass-2)),
    rgba(14, 14, 22, 0.28);
}

.glass-interactive:hover::before { opacity: 1; }
.glass-interactive:active { transform: translateY(-1px) scale(0.995); }

.container {
  width: min(920px, calc(100% - 32px));
  margin-inline: auto;
  padding: clamp(32px, 7vw, 72px) 0 40px;
  display: flex;
  flex-direction: column;
  gap: 44px;
}

.reveal {
  animation: rise 0.7s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 55ms);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
}

.topbar {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 6px;
  width: min(920px, calc(100% - 24px));
  padding: 7px 7px 7px 9px;
  border-radius: 18px;
  background: rgba(16, 16, 24, 0.88);
  opacity: 0;
  transform: translate(-50%, -140%);
  transition: transform 0.5s var(--ease), opacity 0.35s ease;
}

.topbar.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  padding: 2px 10px 2px 2px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.topbar-brand img {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid var(--stroke-2);
}

.topbar-links { display: flex; gap: 2px; }

.topbar-links a {
  padding: 7px 12px;
  border-radius: 11px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}

.topbar-links a:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 100;
  padding: 11px 18px;
  border: 1px solid var(--stroke-2);
  border-radius: 14px;
  background: rgba(24, 24, 32, 0.96);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.8);
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity 0.3s ease, transform 0.4s var(--ease);
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.profile-share {
  position: absolute;
  top: 16px;
  right: 16px;
}

.profile {
  border-radius: var(--radius-lg);
  padding: 40px 28px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.avatar-wrap {
  position: relative;
  width: 112px;
  height: 112px;
  margin-bottom: 20px;
}

.avatar-wrap::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 34px;
  background: conic-gradient(from 0deg, var(--orb-1), var(--orb-2), var(--orb-4), var(--orb-3), var(--orb-1));
  filter: blur(16px);
  opacity: 0.55;
}

.avatar {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 30px;
  border: 1px solid var(--stroke-2);
  background: #0a0a0a;
  object-fit: cover;
}


.name {
  margin: 0;
  font-size: clamp(32px, 6vw, 42px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.035em;
  background: linear-gradient(180deg, #fff 30%, rgba(255, 255, 255, 0.62));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.handle {
  margin: 6px 0 0;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text-3);
}

.bio {
  max-width: 54ch;
  text-wrap: pretty;
  margin: 14px auto 0;
  color: var(--text-2);
  font-size: 15.5px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.meta:empty { display: none; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-2);
  font-size: 13px;
}

.status-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
}

.status-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  from { transform: scale(1); opacity: 0.7; }
  to { transform: scale(2.8); opacity: 0; }
}

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.socials:empty { display: none; }

.social {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--text-2);
}

.social:hover { color: var(--text); }

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px 4px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}

.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--stroke), transparent);
}

.count {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11.5px;
  letter-spacing: 0;
  color: var(--text-2);
}

.count:empty { display: none; }

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

.link-block {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  padding: 16px 18px;
}

.link-block.is-wide { grid-column: 1 / -1; }

.link-icon {
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent, #ffffff) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #ffffff) 28%, transparent);
  color: color-mix(in srgb, var(--accent, #ffffff) 75%, #ffffff);
  box-shadow: 0 8px 24px -10px color-mix(in srgb, var(--accent, #000000) 60%, transparent);
}

.link-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.link-title {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.link-desc {
  overflow: hidden;
  font-size: 13.5px;
  color: var(--text-3);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.link-arrow {
  flex: none;
  color: var(--text-3);
  transition: transform 0.35s var(--ease), color 0.35s ease;
}

.link-block:hover .link-arrow {
  color: var(--text);
  transform: translate(2px, -2px);
}

.link-block.is-disabled,
.social.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.6);
}

.social.is-disabled:hover { color: var(--text-2); }

.project-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 16px;
}

.project-tools:has(> .search[hidden]):has(> .filters:empty) { display: none; }

.search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 1 280px;
  min-width: 200px;
  height: 40px;
  padding: 0 10px 0 38px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(20, 20, 28, 0.5);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.search:focus-within {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(28, 28, 38, 0.7);
}

.search .icon {
  position: absolute;
  left: 12px;
  color: var(--text-3);
  pointer-events: none;
}

.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}

.search input::placeholder { color: var(--text-3); }
.search input::-webkit-search-cancel-button { filter: invert(1) opacity(0.5); }

.search kbd {
  padding: 1px 7px;
  border: 1px solid var(--stroke-2);
  border-radius: 6px;
  color: var(--text-3);
  font: 12px var(--mono);
}

.search:focus-within kbd { display: none; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filters:empty { display: none; }

.notice .btn { margin-top: 12px; }

.chip {
  padding: 7px 14px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(20, 20, 28, 0.5);
  color: var(--text-2);
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.chip:hover { color: var(--text); border-color: var(--stroke-2); }

.chip-more {
  border-style: dashed;
  background: transparent;
  color: var(--text-3);
}

.filters .chip.reveal { animation-duration: 0.4s; animation-delay: calc(var(--i, 0) * 30ms); }

.chip[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.92);
  border-color: transparent;
  color: #0a0a0f;
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}

.project-card {
  display: flex;
  flex-direction: column;
  padding: 10px;
}

.pc-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.pc-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.project-card:hover .pc-cover img { transform: scale(1.04); }

.placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.88);
  background:
    radial-gradient(circle at 25% 20%, color-mix(in srgb, var(--lang, #7c5cff) 55%, transparent), transparent 60%),
    radial-gradient(circle at 85% 90%, rgba(0, 179, 255, 0.32), transparent 55%),
    rgba(255, 255, 255, 0.03);
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(10, 10, 15, 0.72);
  font-size: 12px;
  font-weight: 600;
}

.badge .icon { color: #fcd34d; }

.pc-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 14px 8px 6px;
}

.pc-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pc-title .icon { color: var(--text-3); }

.pc-summary {
  display: -webkit-box;
  margin: 6px 0 0;
  overflow: hidden;
  font-size: 14px;
  color: var(--text-2);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.pc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.14);
  border: 1px solid rgba(124, 92, 255, 0.28);
  color: #c9bcff;
  font-size: 12px;
}

.pc-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin-top: auto;
  padding-top: 14px;
  font-size: 12.5px;
  color: var(--text-3);
}

.lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lang-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lang, #8b8b99);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25);
}

.notice {
  margin: 0;
  padding: 18px 20px;
  border: 1px dashed var(--stroke-2);
  border-radius: var(--radius);
  color: var(--text-2);
  text-align: center;
  font-size: 14.5px;
}

.notice code {
  font-family: var(--mono);
  font-size: 0.9em;
}

.footer {
  padding-top: 8px;
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--stroke-2);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s var(--ease), border-color 0.25s ease;
}

.btn:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-1px); }

.btn-primary {
  border-color: transparent;
  background: #f5f5f7;
  color: #0a0a0f;
}

.btn-primary:hover { background: #fff; }

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

.icon-btn:hover { background: rgba(255, 255, 255, 0.12); color: var(--text); }

dialog { color: inherit; }

.project-dialog {
  width: min(960px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.project-dialog::backdrop { background: rgba(4, 4, 8, 0.78); }

.project-dialog[open] { animation: dialog-in 0.38s var(--ease); }
.project-dialog[open]::backdrop { animation: fade 0.32s ease-out; }
.project-dialog.is-closing { animation: dialog-out 0.2s ease-in forwards; }
.project-dialog.is-closing::backdrop { animation: fade-out 0.2s ease-in forwards; }
@keyframes fade { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(18px) scale(0.98); } }
@keyframes dialog-out { to { opacity: 0; transform: translateY(12px) scale(0.98); } }

.pd {
  max-height: calc(100dvh - 32px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--stroke-2);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: inset 0 1px 0 var(--highlight), 0 24px 60px -30px rgba(0, 0, 0, 0.9);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.pd:focus { outline: none; }

.pd-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 12px 22px;
  border-bottom: 1px solid var(--stroke);
  background: #101016;
}

.pd-head-actions { display: flex; gap: 8px; flex: none; }

.pd-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--text-3);
  white-space: nowrap;
}

.pd-crumb strong {
  overflow: hidden;
  color: var(--text);
  font-weight: 600;
  text-overflow: ellipsis;
}

.pd-content {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 24px;
}

.pd-hero h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.pd-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.pd-summary {
  max-width: 68ch;
  margin: 12px 0 0;
  color: var(--text-2);
}

.pd-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--text-3);
}

.pd-meta > span { display: inline-flex; align-items: center; gap: 6px; }

.pd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.gallery { display: flex; flex-direction: column; gap: 10px; }

.gallery-main {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.35);
  cursor: zoom-in;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-caption {
  margin: 0;
  font-size: 13px;
  color: var(--text-3);
  text-align: center;
}

.thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.thumb {
  flex: none;
  width: 96px;
  aspect-ratio: 16 / 10;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0.55;
  cursor: pointer;
  transition: opacity 0.25s ease, border-color 0.25s ease;
}

.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { opacity: 0.85; }
.thumb[aria-current="true"] { opacity: 1; border-color: rgba(255, 255, 255, 0.7); }

.pd-box {
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.18);
}

.pd-box-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 10px 0 16px;
  border-bottom: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
}

.pd, .project-card { --project-accent: #8ab4ff; }

.project-card .pc-title .icon { color: var(--project-accent); }

.md {
  --tint: color-mix(in srgb, var(--project-accent) 45%, var(--text));
  padding: 20px 24px 8px;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.7;
}

.md p, .md ul, .md ol, .md pre { margin: 0 0 14px; }

.md h3, .md h4 {
  margin: 26px 0 12px;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.35;
  scroll-margin-top: 80px;
}

.md h3 {
  font-size: 19px;
  padding-bottom: 10px;
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, color-mix(in srgb, var(--project-accent) 55%, transparent), var(--stroke) 45%, transparent) 1;
}

.md h3::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 0.85em;
  margin-right: 10px;
  border-radius: 2px;
  background: linear-gradient(var(--project-accent), color-mix(in srgb, var(--project-accent) 40%, transparent));
  vertical-align: -0.06em;
}

.md h3.md-h1 { font-size: 24px; }
.md h4 { font-size: 16px; color: var(--tint); }
.md-center { margin: 0 0 14px; text-align: center; }
.md-center > :last-child { margin-bottom: 0; }
.md > .md-center:first-child > :first-child { margin-top: 0; }
.md > :first-child { margin-top: 0; }
.md ul, .md ol { padding-left: 22px; }
.md li { margin: 4px 0; }
.md li > ul, .md li > ol { margin: 4px 0 6px; }
.md li::marker { color: var(--project-accent); }
.md strong { color: var(--tint); font-weight: 600; }
.md a { color: var(--tint); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--project-accent) 45%, transparent); text-underline-offset: 3px; }
.md a:hover { text-decoration-color: currentColor; }

.md code {
  padding: 2px 6px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--project-accent) 13%, rgba(255, 255, 255, 0.04));
  color: color-mix(in srgb, var(--project-accent) 30%, var(--text));
  font-family: var(--mono);
  font-size: 0.86em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.md pre {
  padding: 14px 16px;
  overflow-x: auto;
  border: 1px solid var(--stroke);
  border-left: 2px solid color-mix(in srgb, var(--project-accent) 60%, transparent);
  border-radius: 12px;
  background: var(--code-bg);
  font: 13.5px/1.7 var(--mono);
  tab-size: 4;
}

.md pre code { padding: 0; background: none; color: inherit; font-size: inherit; }

.md-img { display: inline-block; max-width: 100%; height: auto; vertical-align: middle; }
.md-img-link { display: inline-block; margin-right: 2px; text-decoration: none; line-height: 0; }

.md-table { margin: 0 0 16px; overflow-x: auto; border: 1px solid var(--stroke); border-radius: 12px; }
.md table { width: 100%; border-collapse: collapse; font-size: 14px; }
.md th, .md td { padding: 9px 14px; border-bottom: 1px solid var(--stroke); text-align: left; }
.md th { background: color-mix(in srgb, var(--project-accent) 10%, transparent); color: var(--text); font-weight: 600; white-space: nowrap; }
.md tbody tr:last-child td { border-bottom: 0; }
.md tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.025); }
.md th.is-center, .md td.is-center { text-align: center; }
.md th.is-right, .md td.is-right { text-align: right; }

.md .md-figure { margin: 4px 0 18px; text-align: center; }

.md-figure .md-img {
  border: 1px solid color-mix(in srgb, var(--project-accent) 30%, var(--stroke));
  border-radius: 14px;
  box-shadow: 0 18px 40px -24px color-mix(in srgb, var(--project-accent) 70%, #000);
}

.md blockquote {
  margin: 0 0 14px;
  padding: 2px 0 2px 14px;
  border-left: 3px solid var(--stroke-2);
  color: var(--text-3);
}

.md blockquote > :last-child, .md-alert > :last-child, .md-details-body > :last-child { margin-bottom: 0; }

.md-alert {
  --alert: #4493f8;
  margin: 0 0 14px;
  padding: 10px 16px;
  border-left: 3px solid var(--alert);
  border-radius: 4px 10px 10px 4px;
  background: color-mix(in srgb, var(--alert) 7%, transparent);
}

.md.pd-disclaimer { padding: 0; font-size: 14px; }
.pd-disclaimer .md-alert { margin: 0; padding: 14px 18px; }

.md-alert.is-tip { --alert: #3fb950; }
.md-alert.is-important { --alert: #ab7df8; }
.md-alert.is-warning { --alert: #d29922; }
.md-alert.is-caution { --alert: #f85149; }

.md .md-alert-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  color: var(--alert);
  font-weight: 600;
}

.md-details {
  margin: 0 0 14px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.25s ease;
}

.md-details[open] { border-color: color-mix(in srgb, var(--project-accent) 35%, var(--stroke)); }

.md-details > summary {
  padding: 10px 14px;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

.md-details > summary::marker { color: var(--project-accent); }
.md-details > summary:hover { color: var(--tint); }
.md-details-body { padding: 14px; border-top: 1px solid var(--stroke); }

.code-head { padding: 0 8px 0 0; }

.code-tabs {
  flex: 1;
  display: flex;
  min-width: 0;
  align-self: stretch;
  overflow-x: auto;
  scrollbar-width: none;
}

.code-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--text-3);
  font: 13px var(--mono);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.code-tab:hover { color: var(--text-2); }

.code-tab[aria-selected="true"] {
  color: var(--text);
  border-bottom-color: #fff;
}

.code-lang {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  white-space: nowrap;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--stroke);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.copy-btn:hover { background: rgba(255, 255, 255, 0.12); color: var(--text); }
.copy-btn.is-done { color: #6ee7b7; border-color: rgba(110, 231, 183, 0.4); }

.code-area {
  display: grid;
  grid-template-columns: max-content minmax(max-content, 1fr);
  max-height: 540px;
  overflow: auto;
  background: var(--code-bg);
  font: 13.5px/1.7 var(--mono);
  tab-size: 4;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.code-gutter {
  position: sticky;
  left: 0;
  z-index: 1;
  padding: 16px 12px 16px 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: rgb(12, 12, 17);
  color: rgba(255, 255, 255, 0.22);
  text-align: right;
  white-space: pre;
  user-select: none;
}

.code-pre {
  margin: 0;
  padding: 16px 20px;
  color: #e6edf3;
  white-space: pre;
}

.tok-k { color: #ff7b72; }
.tok-s { color: #a5d6ff; }
.tok-c { color: #8b949e; font-style: italic; }
.tok-n { color: #79c0ff; }
.tok-f { color: #d2a8ff; }
.tok-t { color: #ffa657; }

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

.pd-nav-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.pd-nav-item:hover { background: rgba(255, 255, 255, 0.07); border-color: var(--stroke-2); }
.pd-nav-item.is-next { grid-column: 2; text-align: right; align-items: flex-end; }

.pd-nav-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: var(--text-3);
}

.pd-nav-title {
  overflow: hidden;
  max-width: 100%;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.lightbox::backdrop { background: rgba(0, 0, 0, 0.9); }

.lightbox[open] { animation: fade 0.25s ease; }

.lb-inner {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 64px 76px;
}

.lb-figure { margin: 0; text-align: center; }

.lb-img {
  max-width: 100%;
  max-height: calc(100dvh - 160px);
  margin: 0 auto;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
}

.lb-caption {
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-2);
}

.lb-caption:empty { display: none; }

.lb-btn {
  position: fixed;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--stroke-2);
  border-radius: 50%;
  background: rgba(40, 40, 48, 0.9);
  cursor: pointer;
  transition: background 0.2s ease;
}

.lb-btn:hover { background: rgba(255, 255, 255, 0.18); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { top: 50%; left: 16px; transform: translateY(-50%); }
.lb-next { top: 50%; right: 16px; transform: translateY(-50%); }

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  margin: 0;
  padding: 14px 18px;
  border: 1px solid var(--stroke-2);
  border-radius: 14px;
  background: rgba(20, 20, 28, 0.95);
  text-align: center;
}

@media (max-width: 600px) {
  .container { gap: 36px; }
  .profile { padding: 32px 20px 24px; }
  .profile-share { top: 12px; right: 12px; }
  .topbar-links a { padding: 7px 9px; font-size: 13.5px; }
  .search { flex-basis: 100%; }
  .pd-nav { grid-template-columns: 1fr; }
  .pd-nav-item.is-next { grid-column: auto; }
  .links { grid-template-columns: 1fr; }
  .link-block { min-height: 70px; padding: 14px 16px; }
  .projects { grid-template-columns: 1fr; }

  .project-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); }
  .pd { max-height: calc(100dvh - 16px); border-radius: 22px; }
  .pd-head { padding-left: 16px; }
  .pd-content { padding: 18px 16px; }
  .gallery-main { aspect-ratio: 4 / 3; }
  .md { padding: 16px 16px 4px; }
  .code-lang { display: none; }

  .lb-inner { padding: 64px 12px 88px; }
  .lb-prev, .lb-next { top: auto; bottom: 20px; transform: none; }
  .lb-prev { left: calc(50% - 56px); }
  .lb-next { right: calc(50% - 56px); }
}

@media (max-width: 400px) {
  .topbar-brand span { display: none; }
}

@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;
  }
}
