/* Blog index page - retro window style */

.blog-index-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem clamp(1rem, 5vw, 4rem);
}

.blog-index-layout {
  display: grid;
  grid-template-columns: 2.5fr 1fr;
  gap: 2rem;
  align-items: start;
}

.blog-index-window {
  width: 100%;
  max-width: 100%;
}

.sidebar-container {
  position: sticky;
  top: 2rem;
}

/* Blog main area */
.blog-main-area {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Blog header window */
.blog-header-window {
  background: #f5f5f5;
  border: 3px solid #000;
  border-radius: 8px;
  box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

[data-theme="dark"] .blog-header-window {
  background: #2a2a2a;
  border-color: #e0e0e0;
  box-shadow: 6px 6px 0px rgba(255, 255, 255, 0.15);
}

.blog-header-window-header {
  padding: 0.75rem 1.5rem;
  background: #fff176;
  border-bottom: 3px solid #000;
}

[data-theme="dark"] .blog-header-window-header {
  background: #1e3a5f;
  border-bottom-color: #e0e0e0;
}

.blog-header-window-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #000;
  font-family: monospace;
  letter-spacing: 0.02em;
}

[data-theme="dark"] .blog-header-window-title {
  color: #fff;
}

.blog-header-window-content {
  padding: 1.5rem;
  background: #ffffff;
}

[data-theme="dark"] .blog-header-window-content {
  background: #2a2a2a;
}

.blog-index-intro {
  margin: 0;
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Sidebar container */
.sidebar-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Sidebar windows */
.sidebar-window {
  background: #f5f5f5;
  border: 3px solid #000;
  border-radius: 8px;
  box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

[data-theme="dark"] .sidebar-window {
  background: #2a2a2a;
  border-color: #e0e0e0;
  box-shadow: 6px 6px 0px rgba(255, 255, 255, 0.15);
}

.sidebar-window-header {
  padding: 0.75rem 1.5rem;
  border-bottom: 3px solid #000;
}

[data-theme="dark"] .sidebar-window-header {
  border-bottom-color: #e0e0e0;
}

/* RSS window - orange header, clickable */
.rss-window {
  text-decoration: none;
  cursor: pointer;
  transition: all 0.1s ease;
}

.rss-window .sidebar-window-header {
  background: #ffb74d;
  border-bottom: none;
  transition: all 0.1s ease;
}

[data-theme="dark"] .rss-window .sidebar-window-header {
  background: #5a3a1a;
}

.rss-window:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .rss-window:hover {
  box-shadow: 8px 8px 0px rgba(255, 255, 255, 0.15);
}

.rss-window:hover .sidebar-window-header {
  background: #000;
}

[data-theme="dark"] .rss-window:hover .sidebar-window-header {
  background: #fff;
}

.rss-window:hover .sidebar-window-title {
  color: #ffb74d;
}

[data-theme="dark"] .rss-window:hover .sidebar-window-title {
  color: #5a3a1a;
}

.rss-window:active {
  transform: translate(0, 0);
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.2);
}

/* Tags window - yellow header (same as posts) */
.tags-window .sidebar-window-header {
  background: #fff176;
}

[data-theme="dark"] .tags-window .sidebar-window-header {
  background: #1e3a5f;
}

/* Posts window - yellow header */
.posts-window .sidebar-window-header {
  background: #fff176;
}

[data-theme="dark"] .posts-window .sidebar-window-header {
  background: #1e3a5f;
}

.sidebar-window-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #000;
  font-family: monospace;
  letter-spacing: 0.02em;
}

[data-theme="dark"] .sidebar-window-title {
  color: #fff;
}

.sidebar-window-content {
  padding: 1.5rem;
  background: #ffffff;
}

[data-theme="dark"] .sidebar-window-content {
  background: #2a2a2a;
}

/* Sidebar list */
.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-list li {
  margin-bottom: 0.75rem;
}

.sidebar-list a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.4;
  display: block;
  padding: 0.5rem 0;
}

/* Post list */
.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

/* Post windows */
.post-window {
  display: block;
  background: #f5f5f5;
  border: 3px solid #000;
  border-radius: 8px;
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transition: all 0.1s ease;
  text-decoration: none;
}

[data-theme="dark"] .post-window {
  background: #2a2a2a;
  border-color: #e0e0e0;
  box-shadow: 4px 4px 0px rgba(255, 255, 255, 0.1);
}

.post-window:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .post-window:hover {
  box-shadow: 6px 6px 0px rgba(255, 255, 255, 0.15);
}

.post-window-header {
  padding: 0.75rem 1rem;
  background: #fff176;
  border-bottom: 3px solid #000;
}

[data-theme="dark"] .post-window-header {
  background: #1e3a5f;
  border-bottom-color: #e0e0e0;
}

.post-window-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #000;
  font-family: monospace;
  letter-spacing: 0.02em;
}

[data-theme="dark"] .post-window-title {
  color: #fff;
}

.post-window-content {
  padding: 1rem;
  background: #ffffff;
}

[data-theme="dark"] .post-window-content {
  background: #2a2a2a;
}

.post-window-image {
  margin: -1rem -1rem 1rem -1rem;
  border-bottom: 3px solid #000;
}

[data-theme="dark"] .post-window-image {
  border-bottom-color: #e0e0e0;
}

.post-thumb {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
  border: none;
}

.post-window-date {
  font-family: monospace;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0 0 0.75rem 0;
}

.post-window-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.tag-badge-small {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  background: #f5f5f5;
  border: 2px solid #000;
  border-radius: 3px;
  font-family: monospace;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #000;
  box-shadow: 1px 1px 0px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .tag-badge-small {
  background: #1a1a1a;
  border-color: #e0e0e0;
  color: #fff;
  box-shadow: 1px 1px 0px rgba(255, 255, 255, 0.1);
}

.post-window-intro {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}


/* Tag cloud */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.75rem;
  background: #f5f5f5;
  border: 2px solid #000;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #000;
  text-decoration: none;
  transition: all 0.1s ease;
  box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .tag-badge {
  background: #1a1a1a;
  border-color: #e0e0e0;
  color: #fff;
  box-shadow: 2px 2px 0px rgba(255, 255, 255, 0.1);
}

.tag-badge:hover {
  background: #8B5CF6;
  color: #fff;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .tag-badge:hover {
  background: #4A2C7B;
  border-color: #e0e0e0;
  box-shadow: 3px 3px 0px rgba(255, 255, 255, 0.15);
}

.tag-badge.active {
  background: #8B5CF6;
  color: #fff;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .tag-badge.active {
  background: #4A2C7B;
  border-color: #e0e0e0;
  color: #fff;
  box-shadow: 3px 3px 0px rgba(255, 255, 255, 0.15);
}

.tag-count {
  opacity: 0.7;
  font-size: 0.8em;
}

.filter-notice {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #fff176;
  border: 2px solid #000;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #000;
}

[data-theme="dark"] .filter-notice {
  background: #1e3a5f;
  border-color: #e0e0e0;
  color: #fff;
}

.clear-filter {
  margin-left: 0.5rem;
  color: #000;
  text-decoration: underline;
  font-weight: 700;
}

[data-theme="dark"] .clear-filter {
  color: #fff;
}

/* Responsive */
@media (max-width: 1024px) {
  .blog-index-layout {
    grid-template-columns: 1fr;
  }

  .sidebar-container {
    position: static;
  }
}

@media (max-width: 768px) {
  .blog-index-container {
    padding: 2rem 1rem;
  }

  .blog-index-window-content,
  .sidebar-window-content {
    padding: 1.5rem;
  }

  .blog-index-window-title {
    font-size: 1.2rem;
  }

  .post-list {
    grid-template-columns: 1fr;
  }
}
