/* =========================================================
   Halam Kim — design tokens
   Two worlds, one person: the warm wood/brass of a viola,
   and the cool, exact grid of the code she also writes.
   ========================================================= */
:root {
  --paper: #eeece5;
  --paper-raised: #f6f4ef;
  --ink: #201d1a;
  --ink-soft: #55504a;
  --wood: #5c2a27;      /* viola varnish */
  --wood-deep: #3e1c1a;
  --brass: #a98a4c;     /* tailpiece / fittings */
  --slate: #33514c;     /* the DevOps side */
  --rule: rgba(32, 29, 26, 0.14);
  --max: 780px;
  --gutter: 6vw;

  --display: "Cormorant Garamond", Georgia, serif;
  --body: "Work Sans", -apple-system, Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", "Courier New", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

a { color: var(--wood); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.3em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.05; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.25rem; letter-spacing: 0.01em; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
}

/* the "string" rule — the site's recurring signature.
   A single bowed line under headings on music pages. */
.string-rule {
  width: 72px;
  height: 14px;
  margin: 0.6em 0 1.4em;
}
.string-rule path {
  fill: none;
  stroke: var(--wood);
  stroke-width: 1.6;
}

/* the "commit line" — same idea, dashed, used only on the
   coding-projects page to mark the shift into that world. */
.commit-rule {
  width: 72px;
  border: none;
  border-top: 2px dashed var(--slate);
  margin: 0.6em 0 1.4em;
}

/* ---------- layout shell ---------- */
header.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem var(--gutter);
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
  gap: 0.8rem;
}
.wordmark {
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.wordmark span { color: var(--wood); }

nav.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
}
nav.site-nav a { color: var(--ink-soft); }
nav.site-nav a[aria-current="page"] { color: var(--wood); font-weight: 600; }

main { max-width: var(--max); margin: 0 auto; padding: 4.5rem var(--gutter) 5rem; }
main.wide { max-width: 980px; }

section { margin-bottom: 3.5rem; }

footer.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2rem var(--gutter) 3rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
footer.site-footer .socials a { margin-left: 1rem; color: var(--ink-soft); }

/* ---------- home hero ---------- */
.hero {
  padding-top: 2rem;
  padding-bottom: 1rem;
}
.hero .eyebrow { display: block; margin-bottom: 0.8rem; }
.hero .mission {
  max-width: 56ch;
  font-size: 1.05rem;
  color: var(--ink-soft);
}
.hero blockquote {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--wood-deep);
  margin: 1.6rem 0 1.6rem;
  padding-left: 1.1rem;
  border-left: 2px solid var(--brass);
}

/* ---------- bio / teaching prose ---------- */
.prose p { max-width: 66ch; margin: 0 0 1.1em; }
.prose h3 { margin-top: 1.6em; }

/* ---------- video / gallery grids ---------- */
.video-grid, .gallery-grid {
  display: grid;
  gap: 2.4rem;
}
.video-card figure { margin: 0; }
.video-card .frame {
  position: relative;
  padding-top: 56.25%;
  background: var(--wood-deep);
  overflow: hidden;
}
.video-card .frame iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.video-card figcaption { margin-top: 0.7rem; }
.video-card figcaption .title { font-family: var(--display); font-size: 1.1rem; }
.video-card figcaption .with { color: var(--ink-soft); font-size: 0.9rem; }

.gallery-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.gallery-grid .frame {
  aspect-ratio: 3/4;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-align: center;
  padding: 1rem;
}
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- coding projects: the other world ---------- */
main.code-mode {
  background: var(--ink);
  color: #dfe6e4;
  border-radius: 2px;
}
main.code-mode .eyebrow { color: #7fb3ab; }
main.code-mode h1, main.code-mode h2, main.code-mode h3 { color: #f2efe8; }
main.code-mode a { color: #9fd3ca; }
main.code-mode .prose p { color: #b9c2bf; }

.project-card {
  border: 1px solid rgba(255,255,255,0.12);
  padding: 1.6rem;
  margin-bottom: 1.6rem;
  font-family: var(--body);
}
.project-card h3 { font-family: var(--mono); font-size: 1.05rem; }
.project-card ul { margin: 0.8rem 0; padding-left: 1.1rem; }
.project-card .stack {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: #7fb3ab;
  margin-top: 0.6rem;
}
.project-card .repo { display: inline-block; margin-top: 0.8rem; font-family: var(--mono); font-size: 0.85rem; }

/* ---------- contact ---------- */
.contact-details { font-size: 1.1rem; margin-bottom: 2.2rem; }
.contact-details a { color: var(--wood); }
form.contact-form { display: grid; gap: 1rem; max-width: 480px; }
form.contact-form label { font-size: 0.8rem; color: var(--ink-soft); display: block; margin-bottom: 0.3rem; }
form.contact-form input, form.contact-form textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--rule);
  background: var(--paper-raised);
  font-family: var(--body);
  font-size: 0.95rem;
  color: var(--ink);
}
form.contact-form textarea { min-height: 130px; resize: vertical; }
form.contact-form button {
  justify-self: start;
  background: var(--wood);
  color: #fff;
  border: none;
  padding: 0.75rem 1.6rem;
  font-family: var(--body);
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  cursor: pointer;
}
form.contact-form button:hover { background: var(--wood-deep); }
.form-note { font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.8rem; }

@media (min-width: 640px) {
  .video-grid { grid-template-columns: 1fr 1fr; }
}
