/* ==========================================
   seamspace Blog - Light Purple Theme
   ========================================== */

:root {
  --purple: #9B7FD4;
  --purple-light: #C4B5E3;
  --purple-lighter: #EDE8F5;
  --purple-lightest: #F7F5FB;
  --purple-dark: #6B4FA0;
  --purple-darker: #4A3570;
  --text-primary: #1A1A2E;
  --text-secondary: #555570;
  --text-muted: #8888A0;
  --bg: #FFFFFF;
  --bg-alt: #FAFAFE;
  --border: #E8E5F0;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(107, 79, 160, 0.08);
  --shadow-hover: 0 8px 30px rgba(107, 79, 160, 0.15);
  --max-width: 720px;
  --max-width-wide: 1080px;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: dark) {
  .logo-light {
    display: none;
  }

  .logo-dark {
    display: block;
  }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  display: block;
  height: 28px;
  width: auto;
}

.logo-dark {
  display: none;
}


.site-nav {
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover { color: var(--purple-dark); }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--purple-lightest);
  color: var(--purple-dark);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}

.lang-switch:hover {
  background: var(--purple-lighter);
}

/* Main Content */
.site-content {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 24px;
}

/* Hero */
.hero {
  text-align: center;
  padding: 60px 0 40px;
}

.hero h1 {
  font-size: 36px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 16px;
}


/* Category Tabs */
.category-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.category-tab {
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.category-tab:hover,
.category-tab.active {
  background: var(--purple-lightest);
  color: var(--purple-dark);
  border-color: var(--purple-light);
}

/* Post Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  padding: 20px 0 60px;
}

.post-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.post-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: var(--purple-light);
}

.card-thumbnail {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--purple-lightest);
}

.card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.post-card:hover .card-thumbnail img {
  transform: scale(1.03);
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-category {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--purple-dark);
  background: var(--purple-lightest);
  padding: 4px 10px;
  border-radius: 12px;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
}

.card-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.card-date {
  font-size: 13px;
  color: var(--text-muted);
}

.card-views {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Single Post */
.post {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 0 80px;
}

.post-header {
  margin-bottom: 32px;
}

.post-category {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--purple-dark);
  background: var(--purple-lightest);
  padding: 6px 14px;
  border-radius: 16px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

.post-description {
  margin-top: 12px;
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.post-meta {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.post-thumbnail {
  margin-bottom: 32px;
  border-radius: var(--radius);
  overflow: hidden;
}

.post-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}

/* Post Content */
.post-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-primary);
}

.post-content h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 48px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--purple-lighter);
  color: var(--text-primary);
}

.post-content h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 36px 0 12px;
  color: var(--text-primary);
}

.post-content p {
  margin-bottom: 16px;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 24px 0;
  box-shadow: var(--shadow);
}

.post-content a {
  color: var(--purple-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-content a:hover {
  color: var(--purple);
}

.post-content blockquote {
  border-left: 3px solid var(--purple);
  padding: 16px 20px;
  margin: 24px 0;
  background: var(--purple-lightest);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
  font-style: italic;
}

.post-content code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  background: var(--purple-lightest);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
  color: var(--purple-darker);
}

.post-content pre {
  background: var(--text-primary);
  color: #E8E5F0;
  padding: 20px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 24px 0;
}

.post-content pre code {
  background: none;
  color: inherit;
  padding: 0;
}

.post-content ul, .post-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.post-content li {
  margin-bottom: 8px;
}

/* Post Footer */
.post-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.post-meta-bottom {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}

.post-views {
  font-size: 13px;
  color: var(--text-muted);
}

.view-icon {
  width: 14px;
  height: 14px;
  color: currentColor;
  vertical-align: -2px;
  margin-right: 4px;
  opacity: 0.7;
}

.footer-visitors {
  color: var(--text-muted);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-size: 13px;
  color: var(--purple-dark);
  background: var(--purple-lightest);
  padding: 4px 12px;
  border-radius: 16px;
  font-weight: 500;
}

.post-lang-switch {
  margin-top: 20px;
  padding: 16px;
  background: var(--purple-lightest);
  border-radius: var(--radius-sm);
  text-align: center;
}

.post-lang-switch a {
  color: var(--purple-dark);
  font-weight: 600;
  text-decoration: none;
}

.post-lang-switch a:hover {
  text-decoration: underline;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  background: var(--bg-alt);
}

.site-footer a {
  color: var(--purple-dark);
  text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 28px; }
  .post-title { font-size: 26px; }
  .posts-grid { grid-template-columns: 1fr; }
  .header-inner { padding: 12px 16px; }
  .site-content { padding: 0 16px; }
}
