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

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --border-color: #e5e7eb;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.6;
}

body.docs-body {
  overflow: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  z-index: 1000;
  padding: 0;
  height: 65px;
  display: flex;
  align-items: center;
}

.nav-container {
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  width: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  height: auto;
}

.logo.logo-with-icon {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.5rem !important;
  height: auto;
  white-space: nowrap;
  color: transparent;
}

.logo.logo-with-icon span {
  color: #000000 !important;
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1;
  display: inline-block;
}

.logo-icon {
  width: 32px !important;
  height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  vertical-align: middle;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.3s;
}

.nav-menu a:hover {
  color: var(--primary);
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 120px 20px 80px;
}

.hero-content {
  text-align: center;
  color: white;
  max-width: 800px;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.highlight {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.2rem 0.6rem;
  border-radius: 0.375rem;
}

.subtitle {
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.description {
  font-size: 1.125rem;
  opacity: 0.85;
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-primary {
  background: white;
  color: var(--primary);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

section {
  padding: 80px 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text-primary);
}

.about {
  background: var(--bg-secondary);
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-text p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.skill-tag {
  background: white;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary);
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}

.skill-tag:hover {
  transform: translateY(-2px);
}

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

.project-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  border: 1px solid var(--border-color);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.project-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.project-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.project-desc {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.project-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.project-link:hover {
  color: var(--primary-dark);
}

.contact {
  background: var(--bg-secondary);
}

.contact-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-text {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: white;
  border-radius: 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
  box-shadow: var(--shadow);
  transition: all 0.3s;
  min-width: 280px;
}

.contact-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--primary);
}

.contact-icon {
  font-size: 1.5rem;
}

.footer {
  background: var(--text-primary);
  color: white;
  padding: 2rem 0;
  text-align: center;
}

.footer p {
  opacity: 0.8;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .subtitle {
    font-size: 1.25rem;
  }

  .nav-menu {
    gap: 1rem;
    font-size: 0.875rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .section-title {
    font-size: 2rem;
  }

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

@media (max-width: 480px) {
  .nav-container {
    flex-direction: column;
    gap: 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }
}

html {
  scroll-behavior: smooth;
}

.project-detail {
  padding: 120px 0 80px;
  min-height: 100vh;
  background: var(--bg-secondary);
}

.back-link {
  display: inline-block;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 2rem;
  transition: color 0.3s;
}

.back-link:hover {
  color: var(--primary-dark);
}

.project-header {
  text-align: center;
  margin-bottom: 3rem;
}

.project-header .project-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.project-header h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.project-tagline {
  font-size: 1.25rem;
  color: var(--text-secondary);
}

.project-content {
  max-width: 800px;
  margin: 0 auto;
}

.project-section {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.project-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.project-section p {
  color: var(--text-secondary);
  line-height: 1.8;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tech-tag {
  background: var(--bg-secondary);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary);
}

.feature-list,
.highlight-list {
  list-style: none;
  padding: 0;
}

.feature-list li,
.highlight-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.feature-list li::before,
.highlight-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

.screenshot-placeholder {
  background: var(--bg-secondary);
  border: 2px dashed var(--border-color);
  border-radius: 0.5rem;
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-secondary);
}

.project-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.docs-page {
  position: fixed;
  top: 65px;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ffffff;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.docs-layout {
  display: flex;
  height: 100%;
  margin: 0;
  gap: 0;
  background: #ffffff;
  padding: 0;
}

.docs-sidebar-frame {
  flex-shrink: 0;
  width: 260px;
  height: 100%;
  background: #fafafa;
  border-right: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
}

.docs-sidebar {
  width: 100%;
  height: 100%;
  background: transparent;
  box-sizing: border-box;
  padding: 1.5rem 1rem;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
}

.docs-sidebar:hover {
  box-shadow: none;
}

.docs-sidebar .back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border-radius: 6px;
  transition: all 0.2s;
  color: #787774;
  width: fit-content;
}

.docs-sidebar .back-link:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
  transform: none;
}

.sidebar-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #787774;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  border-bottom: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.docs-tree {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  flex: 1;
  overflow: hidden;
}

.tree-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: #37352f;
  text-decoration: none;
  font-size: 0.875rem;
  border-radius: 4px;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tree-item::before {
  display: none;
}

.tree-item:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #37352f;
  transform: none;
}

.tree-item.active {
  background: rgba(35, 131, 226, 0.08);
  color: #2383e2;
  font-weight: 500;
  box-shadow: none;
}

.tree-item.active::before {
  display: none;
}

.docs-main {
  flex: 1;
  min-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  background: white;
  display: block;
  /* Hide scrollbar for Firefox */
  scrollbar-width: none;
}

/* Hide scrollbar for Webkit browsers (Chrome, Safari, Edge) */
.docs-main::-webkit-scrollbar {
  display: none;
}

.docs-main-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  min-width: min-content;
  box-sizing: border-box;
  padding: 2rem 20px 8rem 20px;
  position: relative;
}

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

.doc-content-wrapper {
  flex: 0 1 800px;
  min-width: 0;
  max-width: 800px;
  margin: 0 40px;
  box-sizing: border-box;
}

.doc-view {
  max-width: 800px;
  width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.doc-toc {
  position: sticky;
  top: 100px;
  width: 200px;
  flex-shrink: 0;
  align-self: flex-start;
  background: transparent;
  padding: 0;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  z-index: 50;
}

.toc-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #787774;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #f0f0f0;
  /* Softened border */
}

.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.toc-link {
  display: block;
  text-decoration: none;
  font-size: 0.8125rem;
  color: #787774;
  padding: 0.4rem 0.5rem;
  border-radius: 4px;
  transition: all 0.2s;
  line-height: 1.4;
  border-left: 2px solid transparent;
}

.toc-link:hover {
  color: #37352f;
  background: rgba(0, 0, 0, 0.03);
}

.toc-link.active {
  color: #2383e2;
  font-weight: 500;
  border-left-color: #2383e2;
  background: rgba(35, 131, 226, 0.08);
}

.toc-link.toc-h2 {
  font-weight: 500;
}

.toc-link.toc-h3 {
  padding-left: 1rem;
  font-size: 0.75rem;
}

.toc-empty {
  font-size: 0.8125rem;
  color: #9b9a97;
  padding: 0.5rem;
  text-align: center;
  font-style: italic;
}

.doc-view {
  background: white;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  min-height: calc(100% - 80px);
  margin: 0 auto;
}

.doc-view .doc-body {
  max-width: 100%;
  margin: 0;
}

.doc-view:hover {
  box-shadow: none;
}

.doc-view h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #37352f;
  margin-bottom: 0.5rem;
  padding-bottom: 0;
  border-bottom: none;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
  line-height: 1.2;
}

.doc-view h2 {
  font-size: 1.875rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: #37352f;
  padding-left: 0;
  border-left: none;
  line-height: 1.3;
}

.doc-view h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  color: #37352f;
  line-height: 1.3;
}

.doc-view p {
  margin-bottom: 1rem;
  line-height: 1.7;
  color: #37352f;
  font-size: 1rem;
}

.doc-view ul,
.doc-view ol {
  margin: 1rem 0;
  padding-left: 1.75rem;
  line-height: 1.7;
}

.doc-view li {
  margin-bottom: 0.5rem;
  color: #37352f;
  position: relative;
}

.doc-view ul li::marker {
  color: #37352f;
  font-size: 1em;
}

.doc-view ol li::marker {
  color: #37352f;
  font-weight: 400;
}

.doc-view a {
  color: #2383e2;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.15s;
}

.doc-view a:hover {
  border-bottom-color: #2383e2;
  color: #1a6ec0;
}

.doc-view code {
  background: rgba(135, 131, 120, 0.15);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
  color: #eb5757;
  font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
  border: none;
}

.doc-view pre {
  background: #2f3437;
  color: #e6e6e6;
  padding: 1.25rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.875rem;
  line-height: 1.6;
  box-shadow: none;
  border: 1px solid #e8e7e5;
}

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

.doc-view strong {
  color: #37352f;
  font-weight: 600;
}

.doc-view em {
  color: #37352f;
  font-style: italic;
}

.error-message {
  color: #eb5757;
  font-size: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(235, 87, 87, 0.1);
  border-left: 3px solid #eb5757;
  border-radius: 4px;
  margin: 1rem 0;
}

.error-detail {
  color: #787774;
  font-size: 0.875rem;
  font-family: 'SF Mono', monospace;
  background: #f7f6f3;
  padding: 0.75rem;
  border-radius: 4px;
  margin-top: 0.5rem;
}

.doc-footer-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 4rem;
  margin-bottom: 0;
  padding-top: 2rem;
  border-top: 1px solid #f0f0f0;
  width: 100%;
  max-width: 800px;
  /* match .doc-view max-width */
  margin-left: auto;
  margin-right: auto;
}

.footer-nav-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: white;
  border: 1px solid #e8e7e5;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
  flex: 1;
  max-width: 45%;
}

.footer-nav-btn:hover {
  border-color: #d3d1cb;
  background: #f7f6f3;
  transform: none;
  box-shadow: none;
}

.footer-nav-btn.prev {
  justify-content: flex-start;
}

.footer-nav-btn.next {
  justify-content: flex-end;
  margin-left: auto;
}

.footer-nav-btn .nav-btn-arrow {
  font-size: 1.25rem;
  color: #787774;
  transition: none;
}

.footer-nav-btn:hover .nav-btn-arrow {
  transform: none;
}

.footer-nav-btn.next:hover .nav-btn-arrow {
  transform: none;
}

.footer-nav-btn .nav-btn-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.footer-nav-btn .nav-btn-label {
  font-size: 0.75rem;
  color: #787774;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.footer-nav-btn .nav-btn-title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #37352f;
}

@media (max-width: 1024px) {
  .docs-page {
    position: static;
    height: auto;
    min-height: calc(100vh - 80px);
  }

  .docs-layout {
    flex-direction: column;
    height: auto;
  }

  .docs-sidebar-frame {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #e8e7e5;
  }

  .docs-sidebar {
    max-height: none;
    padding: 1rem;
  }

  .docs-main {
    height: auto;
    overflow-y: visible;
  }

  .doc-toc {
    display: none;
  }

  .doc-view {
    padding: 2rem 1.5rem;
  }

  .doc-view h1 {
    font-size: 2rem;
  }

  .doc-view h2 {
    font-size: 1.5rem;
  }

  .doc-footer-nav {
    flex-direction: column;
  }

  .footer-nav-btn {
    max-width: 100%;
  }
}



@media (max-width: 768px) {
  .doc-view {
    padding: 1.5rem 1rem;
  }

  .doc-view h1 {
    font-size: 1.75rem;
  }

  .doc-view h2 {
    font-size: 1.25rem;
  }

  .doc-view h3 {
    font-size: 1.125rem;
  }
}