/* Base Styles - Shared across all themes */

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

/* Typography */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Main Content */
.main-content {
  min-height: calc(100vh - 200px);
  padding-bottom: 4rem;
}

/* Header */
.site-header {
  padding: 1.5rem 0;
  margin-bottom: 2rem;
}

.site-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.site-logo {
  text-decoration: none;
}

.site-logo h1 {
  font-size: 1.5rem;
  font-weight: 600;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.site-nav a {
  text-decoration: none;
  transition: color 0.2s;
}

/* Hero */
.hero {
  text-align: center;
  padding: 1.5rem 0;
}

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

.hero-subtitle {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.hero-family {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Post Grid */
.latest-posts {
  padding: 2rem 0;
}

.latest-posts h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Post Card */
.post-card {
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.post-card-image-link {
  display: block;
  overflow: hidden;
}

.post-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s;
}

.post-card:hover .post-card-image {
  transform: scale(1.05);
}

.post-card-content {
  padding: 1.5rem;
}

.post-card-content time {
  font-size: 0.875rem;
}

.post-card-content h3 {
  margin: 0.5rem 0;
  font-size: 1.25rem;
}

.post-card-content h3 a {
  text-decoration: none;
}

.post-excerpt {
  margin: 1rem 0;
}

.post-card-characters {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.read-more {
  display: inline-block;
  margin-top: 1rem;
  text-decoration: none;
}

/* Character Tags */
.character-tag,
.character-tag-small {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
}

.character-tag-small {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
}

/* Post Page */
.post {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  border-radius: 8px;
}

.post-featured-image {
  margin-bottom: 2rem;
}

.post-featured-image img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

.post-featured-image img[data-aspect="portrait"] {
  max-width: 500px;
}

.post-featured-image img[data-aspect="landscape"] {
  max-width: 900px;
}

.post-featured-image img[data-aspect="square"] {
  max-width: 600px;
}

.post-featured-image img[data-aspect="classic"] {
  max-width: 700px;
}

.post-header {
  margin-bottom: 2rem;
}

.post-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.post-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.post-category {
  text-transform: capitalize;
}

.post-characters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.post-content {
  font-size: 1.125rem;
  line-height: 1.8;
}

.post-content p {
  margin-bottom: 1.5rem;
}

.post-content h2,
.post-content h3,
.post-content h4 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.post-content img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: block;
}

.post-content img[data-aspect="portrait"] {
  max-width: 500px;
}

.post-content img[data-aspect="landscape"] {
  max-width: 900px;
}

.post-content img[data-aspect="square"] {
  max-width: 600px;
}

.post-content img[data-aspect="classic"] {
  max-width: 700px;
}

.post-content img + em {
  display: block;
  text-align: center;
  font-size: 0.9rem;
  margin-top: -1rem;
  margin-bottom: 1.5rem;
  font-style: italic;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.post-nav a {
  text-decoration: none;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid;
}

.pagination a {
  text-decoration: none;
  font-weight: 500;
}

.page-number {
  opacity: 0.7;
}

/* Instagram CTA */
.instagram-cta {
  text-align: center;
  padding: 4rem 0;
  margin-top: 4rem;
}

.instagram-cta h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.instagram-cta p {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}

.instagram-button {
  display: inline-block;
  padding: 1rem 2rem;
  text-decoration: none;
  border-radius: 24px;
  font-weight: 600;
  transition: transform 0.2s;
}

.instagram-button:hover {
  transform: scale(1.05);
}

/* Footer */
.site-footer {
  padding: 2rem 0;
  margin-top: 4rem;
}

.site-footer-content {
  text-align: center;
}

.site-footer-content p {
  margin-bottom: 0.5rem;
}

.site-footer-note {
  font-style: italic;
  opacity: 0.9;
}

.site-footer-social {
  margin-top: 1rem;
}

.site-footer-social a {
  text-decoration: none;
}

/* Post Gallery */
.post-gallery {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid;
}

.post-gallery h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  text-align: center;
}

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

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: white;
  padding: 0.5rem;
  font-size: 0.85rem;
  text-align: center;
}

/* About Page */
.about {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  border-radius: 8px;
}

.about h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.about h2 {
  font-size: 1.75rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* Theme Switcher */
.theme-switcher {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
}

.theme-switcher-toggle {
  background: rgba(0, 0, 0, 0.1);
  border: 2px solid currentColor;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
}

.theme-switcher-toggle:hover {
  transform: scale(1.1);
  background: rgba(0, 0, 0, 0.2);
}

.theme-switcher-menu {
  position: absolute;
  top: 60px;
  right: 0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 0.5rem;
  min-width: 120px;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
}

.theme-switcher-menu.active {
  display: flex;
}

.theme-option {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
  font-size: 0.9rem;
}

.theme-option:hover {
  background: rgba(0, 0, 0, 0.05);
}

.theme-option.active {
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .site-header-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  .site-nav {
    flex-direction: column;
    text-align: center;
  }
  
  .hero {
    padding: 1rem 0;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .hero-subtitle {
    font-size: 0.95rem;
  }
  
  .hero-family {
    font-size: 0.85rem;
    gap: 0.5rem;
  }
  
  .post-grid {
    grid-template-columns: 1fr;
  }
  
  .post-title {
    font-size: 2rem;
  }
  
  .post-gallery .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .theme-switcher {
    top: 0.5rem;
    right: 0.5rem;
  }
  
  .theme-switcher-toggle {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .theme-switcher-menu {
    top: 50px;
  }
}
