/*
Theme Name: Zyss Theme
Theme URI: https://zyss.blog
Author: Zyss (지쓰) & 랑 (AI Assistant)
Author URI: https://zyss.blog
Description: AI 자동화 블로그를 위한 고품질 워드프레스 테마. 다크모드/라이트모드 지원, 완벽한 반응형 디자인, 눈 피로 최소화에 중점을 둔 가독성 중심 테마.
Version: 1.0.0
License: Private
License URI:
Text Domain: zyss-theme
Tags: blog, dark-mode, responsive, accessibility, ai-powered
*/

/* ===================================
   CSS Variables - 다크/라이트 모드
   =================================== */

:root {
  /* 라이트 모드 (기본) */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #e9ecef;

  --text-primary: #212529;
  --text-secondary: #495057;
  --text-tertiary: #6c757d;

  --border-color: #dee2e6;
  --link-color: #495057;
  --link-hover: #212529;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);

  /* 폰트 크기 (사용자 조절 가능) */
  --font-size-base: 17px;
  --font-size-h1: 2.5em;
  --font-size-h2: 2em;
  --font-size-h3: 1.5em;
  --font-size-h4: 1.25em;

  /* 간격 */
  --line-height: 1.8;
  --paragraph-spacing: 1.2em;
}

/* 다크 모드 */
[data-theme="dark"] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --bg-tertiary: #3a3a3a;

  --text-primary: #e4e4e4;
  --text-secondary: #b4b4b4;
  --text-tertiary: #8a8a8a;

  --border-color: #404040;
  --link-color: #d0d0d0;
  --link-hover: #e4e4e4;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* OS 다크모드 자동 감지 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #3a3a3a;

    --text-primary: #e4e4e4;
    --text-secondary: #b4b4b4;
    --text-tertiary: #8a8a8a;

    --border-color: #404040;
    --link-color: #d0d0d0;
    --link-hover: #e4e4e4;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  }
}

/* ===================================
   Global Reset & Base Styles
   =================================== */

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

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}

body {
  font-family: 'Malgun Gothic', '맑은 고딕', 'Nanum Gothic', '나눔고딕', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: var(--line-height);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   Typography
   =================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 1em;
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }
h4 { font-size: var(--font-size-h4); }

p {
  margin-bottom: var(--paragraph-spacing);
  color: var(--text-primary);
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--link-hover);
}

strong {
  font-weight: 700;
}

em {
  font-style: italic;
}

/* ===================================
   Layout
   =================================== */

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.content-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

.content-wrapper.with-sidebar {
  max-width: none;
}

/* ===================================
   Accessibility
   =================================== */

:focus {
  outline: 2px solid var(--link-color);
  outline-offset: 2px;
}

.screen-reader-text {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ===================================
   Utilities
   =================================== */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

/* 눈 피로 최소화를 위한 이미지 처리 */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

[data-theme="dark"] img {
  opacity: 0.9;
}
