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

body {
  background: #000;
  color: #aaa;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
}

a {
  color: #888;
  text-decoration: none;
}

a:hover {
  color: #ccc;
}

header {
  border-bottom: 1px solid #222;
  padding: 1rem 2rem;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 400;
}

header h1 a {
  color: #ccc;
}

nav a {
  margin-left: 1.5rem;
  font-size: 0.9rem;
  cursor: pointer;
}

#main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

#overview {
  margin-bottom: 3rem;
}

#overview p {
  margin-bottom: 1rem;
  max-width: 800px;
}

.art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.art-card {
  cursor: pointer;
  border: 1px solid #222;
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.art-card:hover {
  border-color: #555;
}

.art-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.art-card .art-title {
  padding: 0.75rem;
  font-size: 0.9rem;
  color: #888;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
}

.overlay.hidden {
  display: none;
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #888;
  font-size: 2rem;
  cursor: pointer;
  z-index: 10;
}

.close-btn:hover {
  color: #fff;
}

.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #333;
  font-size: 3rem;
  cursor: pointer;
  z-index: 10;
  padding: 1rem;
  transition: color 0.2s;
}

.nav-arrow:hover {
  color: #888;
}

.prev-arrow {
  left: 0.5rem;
}

.next-arrow {
  right: 0.5rem;
}

#info-overlay-content {
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  text-align: center;
}

#info-overlay-content h2 {
  color: #ccc;
  font-weight: 400;
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}

.overlay-image-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.overlay-image-container img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  cursor: pointer;
  border: 1px solid #222;
  border-radius: 4px;
  transition: border-color 0.2s;
}

.overlay-image-container img:hover {
  border-color: #555;
}

.overlay-image-container.multi img {
  max-width: 45%;
  max-height: 35vh;
}

#info-overlay-content .description {
  color: #888;
  text-align: left;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

#info-overlay-content .description p {
  margin-bottom: 0.75rem;
}

#image-overlay {
  z-index: 200;
  background: #000;
  cursor: pointer;
}

#image-overlay img {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
}

#docs-view {
  display: flex;
  gap: 2rem;
  min-height: 70vh;
}

.docs-tree {
  width: 280px;
  flex-shrink: 0;
  border-right: 1px solid #222;
  padding-right: 1rem;
}

.docs-tree .folder-label {
  color: #888;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.docs-tree ul {
  list-style: none;
}

.docs-tree li {
  padding: 0.3rem 0;
  cursor: pointer;
  font-size: 0.85rem;
  color: #666;
}

.docs-tree li:hover {
  color: #aaa;
}

.docs-tree li.active {
  color: #ccc;
}

.docs-tree li .type-badge {
  display: inline-block;
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border: 1px solid #333;
  border-radius: 3px;
  margin-left: 0.5rem;
  color: #555;
}

.docs-content {
  flex: 1;
  overflow-x: auto;
}

.docs-content pre {
  background: #0a0a0a;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 0.8rem;
  color: #888;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid #1a1a1a;
}

#contact-view {
  max-width: 600px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #1a1a1a;
}

.contact-label {
  font-size: 0.75rem;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-item a {
  font-size: 0.95rem;
  color: #888;
  word-break: break-all;
}

.contact-item a:hover {
  color: #ccc;
}

@media (max-width: 768px) {
  .art-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }

  .overlay-image-container.multi img {
    max-width: 90%;
  }

  #docs-view {
    flex-direction: column;
  }

  .docs-tree {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #222;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
  }
}
