/* --- Variables --- */
:root {
  --bg: #faf9f7;
  --text: #1c1c1c;
  --text-muted: #5a5a5a;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --border: #e5e3e0;
  --card-bg: #ffffff;
  --font-sans: "Pretendard", "Noto Sans KR", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: "Noto Serif KR", Georgia, serif;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.06);
  --shadow-hover: 0 4px 12px rgba(0,0,0,.08);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* --- Layout --- */
.site-header {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
  box-shadow: var(--shadow);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.site-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
}
.site-title a {
  color: var(--text);
  text-decoration: none;
}
.site-nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color .2s;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  padding: 2.5rem 0 4rem;
}

/* --- Typography --- */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.3;
}
h1 { font-size: 1.75rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.25rem; margin: 2rem 0 0.75rem; color: var(--text); }
h3 { font-size: 1.05rem; margin: 1.25rem 0 0.5rem; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

/* --- Section --- */
.section {
  margin-bottom: 2.5rem;
}
.section:last-child { margin-bottom: 0; }

/* --- Buttons & Links --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .2s, box-shadow .2s;
}
.btn:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-hover);
}
.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-outline:hover {
  background: rgba(37, 99, 235, .08);
  color: var(--accent-hover);
  border-color: var(--accent-hover);
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* --- Intro block --- */
.intro-block {
  padding: 1.5rem 0;
}
.intro-block h1 {
  font-size: 1.6rem;
}
.intro-block .subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}
.intro-block .bio {
  color: var(--text);
  max-width: 56ch;
}

/* --- Cards (music, courses) --- */
.card-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.card-list li {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow);
  transition: box-shadow .2s;
}
.card-list li:hover {
  box-shadow: var(--shadow-hover);
}
.card-list li:last-child { margin-bottom: 0; }
.card-title { font-weight: 600; margin: 0 0 0.25rem; }
.card-meta { color: var(--text-muted); font-size: 0.9rem; margin: 0; }

/* --- Course cards (optional links) --- */
.course-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.course-card-body { flex: 1; min-width: 0; }
.course-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex-shrink: 0;
}
.course-links:empty { display: none; }
.course-link {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: color .2s, border-color .2s, background .2s;
}
.course-link:hover {
  color: var(--accent-hover);
  border-color: var(--accent);
  background: rgba(37, 99, 235, .06);
}

/* --- Music cards (with cover + Spotify) --- */
.music-list { list-style: none; margin: 0; padding: 0; }
.music-list li { margin-bottom: 0.75rem; }
.music-list li:last-child { margin-bottom: 0; }
.music-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow);
  transition: box-shadow .2s;
}
.music-card:hover { box-shadow: var(--shadow-hover); }
.music-card-cover {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--border);
}
.music-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.music-card-body { flex: 1; min-width: 0; }
.music-card-title { font-weight: 600; margin: 0 0 0.2rem; font-size: 0.98rem; }
.music-card-meta { color: var(--text-muted); font-size: 0.875rem; margin: 0; }
.music-card-actions { flex-shrink: 0; }
.music-spotify-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .2s;
}
.music-spotify-link:hover { color: #1DB954; }
.music-spotify-link::after { content: "→"; }

/* --- Music list: show 3 (random per visit), expand rest --- */
.music-list-more { display: none; }
.music-section-collapsible.is-expanded .music-list-more { display: block; }
.music-toggle-wrap { margin-top: 0.75rem; }
.music-toggle-more {
  display: none;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  transition: color .2s;
}
.music-section-collapsible:has(.music-list-more) .music-toggle-more { display: inline-flex; }
.music-toggle-more:hover { color: var(--accent-hover); }

/* --- Page title (subpages) --- */
.page-title {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
}
.page-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0 2rem;
}

/* --- Footer --- */
.site-footer {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}
.site-footer a {
  color: var(--accent);
  text-decoration: none;
}
