/* style.css — Global Styles */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Line clamp utility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Font */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Nav link active */
nav a.active {
  color: #111827;
  font-weight: 600;
}

/* Article body image */
.article-body img {
  max-width: 100%;
  height: auto;
}

/* Lazy load fade-in */
img.lazy {
  opacity: 0;
  transition: opacity 0.3s ease;
}
img.lazy.loaded {
  opacity: 1;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Modal animation */
#item-modal:not(.hidden) {
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Sidebar scrollbar */
#collections-nav {
  max-height: calc(100vh - 280px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

/* Table hover smooth */
tbody tr {
  transition: background-color 0.1s ease;
}

/* Code font */
.font-mono {
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
}

/* Peer checkbox custom style */
.peer:checked ~ .peer-checked\:bg-indigo-600 {
  background-color: #4f46e5;
}
.peer:checked ~ div.peer-checked\:after\:translate-x-4::after {
  transform: translateX(1rem);
}
