body {
  font-family: 'Segoe UI', 'Pretendard', sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  transition: background 0.3s, color 0.3s;
}

:root {
  --bg: #f5f5f5;
  --text: #333;
  --link: #1e90ff;
  --accent: #007acc;
  --card-bg: #fff;
  --border: #e0e0e0;
}

.dark {
  --bg: #1e1e1e;
  --text: #f5f5f5;
  --link: #4a90e2;
  --accent: #4a90e2;
  --card-bg: #2e2e2e;
  --border: #444;
}

.theme-toggle {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: background 0.3s, transform 0.2s;
  z-index: 1000; /* 버튼이 다른 요소 위에 표시되도록 설정 */
}

.theme-toggle:hover {
  background: #005bb5;
  transform: scale(1.1);
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px; /* 사이드바 너비 확장 */
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  position: sticky;
  top: 0;
  height: 100vh;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1); /* 사이드바 그림자 추가 */
}

.sidebar-header h2 {
  font-size: 1.8rem; /* 헤더 크기 조정 */
  font-weight: bold;
  margin-bottom: 2rem;
  color: var(--accent); /* 강조 색상 */
}

.sidebar-nav a {
  display: block;
  margin: 1rem 0;
  text-decoration: none;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: background 0.3s, color 0.3s;
}

.sidebar-nav a:hover {
  background: var(--accent);
  color: #fff;
}

.sidebar-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 0;
}

.profile-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  margin-bottom: 1rem;
}

.profile-name {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text);
}

.content {
  flex-grow: 1;
  padding: 2rem 3rem;
}

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

.post-card {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* 그림자 추가 */
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color: var(--text);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.post-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15); /* 호버 시 그림자 강조 */
}

.post-meta {
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.post-card h3 {
  margin: 0.5rem 0;
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--text);
}

.post-card p {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.6;
}

.post-container {
  max-width: 720px;
  margin: 4rem auto;
  padding: 0 1.5rem;
  line-height: 1.7;
}

.post-container h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

article img {
  max-width: 100%;
  border-radius: 10px;
  margin: 1.5rem 0;
}

article h2 {
  font-size: 1.6rem;
  margin-top: 2rem;
}

article ul {
  padding-left: 1.5rem;
}

article blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 1rem;
  color: var(--text);
  opacity: 0.8;
  margin: 1.5rem 0;
}

article code {
  background-color: rgba(0,0,0,0.05);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'Menlo', monospace;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}
