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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background-color: #0d1117;
  color: #e6edf3;
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: #58a6ff;
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: #79c0ff;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(22, 27, 34, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #30363d;
  height: 64px;
}

.navbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: #e6edf3 !important;
  letter-spacing: -0.02em;
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.navbar-toggle .hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #e6edf3;
  position: relative;
  transition: background-color 0.2s ease;
}
.navbar-toggle .hamburger::before, .navbar-toggle .hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #e6edf3;
  transition: transform 0.2s ease;
}
.navbar-toggle .hamburger::before {
  top: -7px;
}
.navbar-toggle .hamburger::after {
  top: 7px;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  color: #8b949e !important;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.nav-link:hover {
  color: #e6edf3 !important;
  background-color: rgba(88, 166, 255, 0.1);
}

.locale-switcher {
  display: flex;
  margin-left: 0.75rem;
  border: 1px solid #30363d;
  border-radius: 4px;
  overflow: hidden;
}

.locale-btn {
  background: none;
  border: none;
  color: #8b949e;
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.locale-btn:hover {
  color: #e6edf3;
  background-color: rgba(88, 166, 255, 0.1);
}
.locale-btn.active {
  color: #58a6ff;
  background-color: rgba(88, 166, 255, 0.1);
}
.locale-btn + .locale-btn {
  border-left: 1px solid #30363d;
}

.page {
  padding-top: 1rem;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
}

.page-subtitle {
  color: #8b949e;
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.hero {
  display: flex;
  align-items: center;
  min-height: 60vh;
}

.hero-content {
  max-width: 640px;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: #8b949e;
  margin-bottom: 1.5rem;
}

.hero-bio {
  color: #8b949e;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.hero-links {
  display: flex;
  gap: 1rem;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.25rem;
  border: 1px solid #30363d;
  border-radius: 8px;
  color: #e6edf3 !important;
  font-weight: 500;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.hero-link:hover {
  border-color: #58a6ff;
  background-color: rgba(88, 166, 255, 0.1);
}

.blog-grid {
  display: grid;
  gap: 1.25rem;
}

.blog-card {
  background-color: #1c2128;
  border: 1px solid #30363d;
  border-radius: 8px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.blog-card:hover {
  border-color: #58a6ff;
  background-color: #21262d;
}

.blog-card-link {
  display: block;
  padding: 1.5rem;
  color: #e6edf3 !important;
}

.blog-card-date {
  display: block;
  font-size: 0.85rem;
  color: #6e7681;
  margin-bottom: 0.5rem;
}

.blog-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.blog-card-summary {
  color: #8b949e;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background-color: rgba(88, 166, 255, 0.1);
  color: #58a6ff;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.blog-post-page {
  max-width: 760px;
  margin: 0 auto;
}

.blog-post-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #30363d;
}

.blog-post-title {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.blog-post-date {
  color: #6e7681;
  font-size: 0.9rem;
}

.markdown-body {
  line-height: 1.8;
  color: #e6edf3;
}
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.markdown-body h1 {
  font-size: 1.75rem;
}
.markdown-body h2 {
  font-size: 1.5rem;
}
.markdown-body h3 {
  font-size: 1.25rem;
}
.markdown-body p {
  margin-bottom: 1rem;
}
.markdown-body ul, .markdown-body ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}
.markdown-body li {
  margin-bottom: 0.25rem;
}
.markdown-body code {
  font-family: "JetBrains Mono", "Fira Code", "Cascadia Code", monospace;
  font-size: 0.875em;
  background-color: rgba(110, 118, 129, 0.2);
  padding: 0.15em 0.35em;
  border-radius: 4px;
}
.markdown-body pre {
  background-color: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}
.markdown-body pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.6;
}
.markdown-body blockquote {
  border-left: 3px solid #58a6ff;
  padding-left: 1rem;
  color: #8b949e;
  margin-bottom: 1rem;
}
.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}
.markdown-body table th, .markdown-body table td {
  border: 1px solid #30363d;
  padding: 0.5rem 0.75rem;
  text-align: left;
}
.markdown-body table th {
  background-color: #161b22;
  font-weight: 600;
}
.markdown-body img {
  border-radius: 8px;
  margin: 1rem 0;
}
.markdown-body hr {
  border: none;
  border-top: 1px solid #30363d;
  margin: 2rem 0;
}

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

.project-card {
  background-color: #1c2128;
  border: 1px solid #30363d;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.project-card:hover {
  border-color: #58a6ff;
  transform: translateY(-2px);
}

.project-card-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
}
.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card-content {
  padding: 1.25rem;
}

.project-card-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.project-card-desc {
  color: #8b949e;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.project-card-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.tech-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background-color: rgba(63, 185, 80, 0.1);
  color: #3fb950;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.project-card-links {
  display: flex;
  gap: 0.75rem;
}

.project-link {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border: 1px solid #30363d;
  border-radius: 4px;
  color: #e6edf3 !important;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.project-link:hover {
  border-color: #58a6ff;
  background-color: rgba(88, 166, 255, 0.1);
}

.project-link-live {
  background-color: rgba(88, 166, 255, 0.1);
  border-color: #58a6ff;
  color: #58a6ff !important;
}

.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.wishlist-card {
  background-color: #1c2128;
  border: 1px solid #30363d;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
  position: relative;
}
.wishlist-card:hover {
  border-color: #58a6ff;
  transform: translateY(-2px);
}
.wishlist-card.reserved {
  opacity: 0.6;
}

.wishlist-card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background-color: #161b22;
}
.wishlist-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wishlist-card-content {
  padding: 1.25rem;
}

.wishlist-card-name {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.wishlist-card-price {
  color: #58a6ff;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.wishlist-card-link {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border: 1px solid #30363d;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #e6edf3 !important;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.wishlist-card-link:hover {
  border-color: #58a6ff;
  background-color: rgba(88, 166, 255, 0.1);
}

.wishlist-reserved-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.2rem 0.6rem;
  background-color: rgba(210, 153, 34, 0.15);
  color: #d29922;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.not-found-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  text-align: center;
}

.not-found-code {
  font-size: 6rem;
  font-weight: 700;
  color: #6e7681;
  line-height: 1;
  margin-bottom: 1rem;
}

.not-found-text {
  color: #8b949e;
  font-size: 1.15rem;
  margin-bottom: 2rem;
}

.not-found-link {
  padding: 0.6rem 1.25rem;
  border: 1px solid #30363d;
  border-radius: 8px;
  color: #e6edf3 !important;
  font-weight: 500;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.not-found-link:hover {
  border-color: #58a6ff;
  background-color: rgba(88, 166, 255, 0.1);
}

.loading {
  color: #6e7681;
  text-align: center;
  padding: 3rem 0;
  font-style: italic;
}

.empty-state {
  color: #8b949e;
  text-align: center;
  padding: 3rem 0;
}

.error {
  color: #f85149;
  text-align: center;
  padding: 2rem 0;
}

.footer {
  border-top: 1px solid #30363d;
  padding: 2rem 0;
  margin-top: 3rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
}

.footer-text {
  color: #8b949e;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.footer-copy {
  color: #6e7681;
  font-size: 0.8rem;
}

@media (max-width: 768px) {
  .navbar-toggle {
    display: block;
  }
  .navbar-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: #161b22;
    border-bottom: 1px solid #30363d;
    padding: 1rem;
    gap: 0.25rem;
  }
  .navbar-links.open {
    display: flex;
  }
  .locale-switcher {
    margin-left: 0;
    margin-top: 0.5rem;
    align-self: flex-start;
  }
  .hero-title {
    font-size: 2rem;
  }
  .hero-subtitle {
    font-size: 1.05rem;
  }
  .page-title {
    font-size: 1.75rem;
  }
  .projects-grid,
  .wishlist-grid {
    grid-template-columns: 1fr;
  }
  .blog-post-title {
    font-size: 1.75rem;
  }
  .toc {
    position: static;
    float: none;
    width: 100%;
    margin-bottom: 2rem;
  }
}
.toc-wrapper {
  margin-bottom: 2rem;
}

.toc {
  background-color: #1c2128;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 2rem;
}

.toc-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #e6edf3;
}

.toc ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.toc ul ul {
  padding-left: 1.25rem;
}

.toc li {
  margin-bottom: 0.3rem;
}

.toc a {
  color: #8b949e;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}
.toc a:hover {
  color: #58a6ff;
}

.heading-anchor {
  color: #6e7681 !important;
  font-weight: 400;
  margin-left: 0.4rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  text-decoration: none;
  font-size: 0.85em;
}

.markdown-body h1:hover .heading-anchor, .markdown-body h2:hover .heading-anchor, .markdown-body h3:hover .heading-anchor, .markdown-body h4:hover .heading-anchor, .markdown-body h5:hover .heading-anchor, .markdown-body h6:hover .heading-anchor {
  opacity: 1;
}

.admonition {
  border-left: 4px solid;
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  background-color: #1c2128;
}
.admonition p:last-child {
  margin-bottom: 0;
}

.admonition-title {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admonition-note {
  border-color: #58a6ff;
  background-color: rgba(88, 166, 255, 0.06);
}
.admonition-note .admonition-title {
  color: #58a6ff;
}

.admonition-tip {
  border-color: #3fb950;
  background-color: rgba(63, 185, 80, 0.06);
}
.admonition-tip .admonition-title {
  color: #3fb950;
}

.admonition-important {
  border-color: #a371f7;
  background-color: rgba(163, 113, 247, 0.06);
}
.admonition-important .admonition-title {
  color: #a371f7;
}

.admonition-warning {
  border-color: #d29922;
  background-color: rgba(210, 153, 34, 0.06);
}
.admonition-warning .admonition-title {
  color: #d29922;
}

.admonition-caution {
  border-color: #f85149;
  background-color: rgba(248, 81, 73, 0.06);
}
.admonition-caution .admonition-title {
  color: #f85149;
}

.mermaid {
  background-color: #1c2128;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: center;
  overflow-x: auto;
}
.mermaid svg {
  max-width: 100%;
  height: auto;
}

.math-inline {
  font-size: 1em;
}

.math-display {
  margin: 1.5rem 0;
  overflow-x: auto;
  text-align: center;
}

.katex-display {
  margin: 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.footnote-definition {
  font-size: 0.9rem;
  color: #8b949e;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  position: relative;
}
.footnote-definition::before {
  position: absolute;
  left: 0;
}
.footnote-definition p {
  display: inline;
}

.markdown-body .footnote-reference {
  font-size: 0.75em;
  vertical-align: super;
}
.markdown-body .footnote-reference a {
  color: #58a6ff;
  text-decoration: none;
}
.markdown-body .footnote-reference a:hover {
  text-decoration: underline;
}
.markdown-body section.footnotes {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #30363d;
  font-size: 0.9rem;
  color: #8b949e;
}
.markdown-body section.footnotes ol {
  padding-left: 1.5rem;
}
.markdown-body section.footnotes li {
  margin-bottom: 0.5rem;
}
