/* Jihwan Lee — personal site. Light-only by design. */

:root {
  --bg: #fffdf8;
  --card: #ffffff;
  --ink: #1a1a1f;
  --muted: #5d6070;
  --line: #e8e4da;
  --accent: #0b7468;
  --accent-dark: #085d54;
  color-scheme: light;

  /* Topic tags: same colors as the CV */
  --t-Speech: #2457c5;       --t-Speech-bg: #e9effc;
  --t-Brain: #6b6a12;        --t-Brain-bg: #f3f2dc;
  --t-Articulatory: #b4540a; --t-Articulatory-bg: #fcebdc;
  --t-Biosignal: #7a2b93;    --t-Biosignal-bg: #f3e6f8;
  --t-Streaming: #0b7468;    --t-Streaming-bg: #dcf2ef;
  --t-Music: #b3237a;        --t-Music-bg: #fbe4f1;
  --t-Award: #b42318;        --t-Award-bg: #fdeceb;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .theme { transition: none; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, system-ui, sans-serif; font-size: 16px; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1040px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }

/* ---------- header ---------- */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: rgba(255, 253, 248, .88);
  backdrop-filter: saturate(1.4) blur(8px); -webkit-backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.brand { font-weight: 600; color: var(--ink); text-decoration: none; }
.site-nav { display: flex; align-items: center; gap: 1.3rem; }
.site-nav a { color: var(--ink); text-decoration: none; opacity: .7; font-size: .9rem; }
.site-nav a:hover { opacity: 1; }
.site-nav a.cv-btn { opacity: 1; background: var(--accent); color: #fff; font-weight: 600; font-size: .85rem;
  padding: .45rem .95rem; border-radius: 999px; }
.site-nav a.cv-btn:hover { background: var(--accent-dark); }

/* ---------- hero ---------- */
.hero { border-bottom: 1px solid var(--line); background: var(--bg); }
.hero-grid { display: grid; grid-template-columns: 1fr 210px; gap: 3rem; align-items: start; padding-top: 48px; padding-bottom: 64px; }
.hero h1 { font-family: Literata, Georgia, serif; font-weight: 500; font-size: 3.1rem; line-height: 1.08;
  margin: 0 0 1.1rem; letter-spacing: -.02em; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero h1.name { font-size: 3rem; line-height: 1.05; margin: 0; }
.hero p.ipa { font-family: "Charis SIL", "Gentium Plus", "Noto Serif", "Times New Roman", serif; font-size: 1.15rem;
  color: var(--muted); margin: .15rem 0 1.3rem; line-height: 1.2; letter-spacing: .02em; }
.hero .native { display: inline-block; font-family: "Noto Serif KR", "Apple SD Gothic Neo", "Malgun Gothic", serif;
  font-size: .42em; font-weight: 500; color: var(--muted); letter-spacing: .02em; vertical-align: .35em; }
.hero p { color: #3d4050; line-height: 1.65; max-width: 620px; margin: 0 0 1rem; }
.hero img { width: 210px; height: 210px; object-fit: cover; border-radius: 18px; box-shadow: 0 10px 30px rgba(20, 20, 30, .10); }
.profile { display: flex; flex-direction: column; gap: 1rem; }
.contact { font-style: normal; display: flex; flex-direction: column; gap: .15rem; font-size: .85rem; line-height: 1.45; color: var(--muted); }
.contact a { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; margin-bottom: .2rem; }
.contact a:hover { text-decoration: underline; }
.hero-links { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.hero-links a { color: var(--ink); background: rgba(255, 255, 255, .75); text-decoration: none; font-size: .85rem;
  border: 1px solid rgba(26, 26, 31, .14); border-radius: 999px; padding: .4rem .9rem; }
.hero-links a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- sections ---------- */
section { padding: 56px 0 8px; scroll-margin-top: 64px; }
h2 { font-family: Literata, Georgia, serif; font-weight: 500; font-size: 2rem; margin: 0 0 .4rem; letter-spacing: -.01em; }
.sub { color: var(--muted); margin: 0 0 1.4rem; }

.themes { display: grid; grid-template-columns: repeat(6, 1fr); gap: .9rem; margin-top: 1.2rem; }
.theme { all: unset; box-sizing: border-box; display: flex; flex-direction: column; text-align: left; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-top: 2px solid var(--c); border-radius: 14px;
  padding: 1.1rem 1.1rem 1rem; transition: transform .15s, box-shadow .15s; }
.theme:hover, .theme:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, .08); }
.theme h3 { margin: 0 0 .35rem; font-size: 1.02rem; }
.theme p { margin: 0; font-size: .85rem; color: var(--muted); line-height: 1.45; }

.two { display: grid; grid-template-columns: 1fr 1.7fr; gap: 3rem; }

/* ---------- news & background ---------- */
.news, .timeline { list-style: none; margin: 0; padding: 0; }
.news li { display: grid; grid-template-columns: 5.2rem 1fr; gap: .8rem; padding: .4rem 0; font-size: .95rem; line-height: 1.45; }
.news .date, .timeline .when { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .85rem; padding-top: .1rem; }
.background { margin-top: 2.2rem; }
.background h3 { font-family: Literata, Georgia, serif; font-weight: 500; font-size: 1.3rem; margin: 0 0 .6rem; }
.timeline li { display: grid; grid-template-columns: 5.2rem 1fr; gap: .8rem; padding: .35rem 0; font-size: .92rem; line-height: 1.45; }
.timeline .what { color: var(--muted); }
.timeline .what strong { color: var(--ink); font-weight: 600; }

/* ---------- publications ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .5rem 0 1rem; }
.chip { font: inherit; font-size: .8rem; border: 1px solid var(--line); background: transparent; color: var(--ink);
  border-radius: 999px; padding: .3rem .7rem; cursor: pointer; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.first { font-size: .8rem; color: var(--muted); margin-left: .3rem; display: inline-flex; gap: .3rem; align-items: center; cursor: pointer; }
.pubs-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: .4rem 1.4rem 1rem; }
.year { font-size: .8rem; letter-spacing: .08em; color: var(--muted); margin: 1.4rem 0 0; font-weight: 600; }
.pubs { list-style: none; margin: 0; padding: 0; }
.pub { padding: .9rem 0; border-bottom: 1px solid var(--line); }
.pub:last-child { border-bottom: 0; }
.pub-title { font-weight: 600; line-height: 1.35; margin: .15rem 0 .25rem; overflow-wrap: anywhere; }
.pub-title a { color: var(--ink); text-decoration: none; }
.pub-title a:hover { color: var(--accent); text-decoration: underline; }
.pub-authors { font-size: .88rem; color: var(--muted); line-height: 1.45; }
.pub-authors strong { color: var(--ink); }
.pub-meta { font-size: .85rem; margin-top: .3rem; display: flex; flex-wrap: wrap; gap: .35rem .8rem; align-items: center; }
.venue { font-style: italic; }
.plinks { display: inline-flex; gap: .4rem; flex-wrap: wrap; }
.plink { font-size: .75rem; font-weight: 600; text-decoration: none; border: 1px solid var(--line); border-radius: 4px; padding: .12rem .45rem; }
.plink:hover { border-color: var(--accent); }
.more-btn { font: inherit; font-size: .78rem; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; }
.empty { color: var(--muted); }
.note { font-size: .78rem; color: var(--muted); margin: .6rem 0 0; }

.tag { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .01em; line-height: 1; padding: .28em .55em;
  border-radius: 999px; border: 1px solid currentColor; margin: 0 .3em .3em 0; white-space: nowrap; }
.tag-Speech { color: var(--t-Speech); background: var(--t-Speech-bg); }
.tag-Brain { color: var(--t-Brain); background: var(--t-Brain-bg); }
.tag-Articulatory { color: var(--t-Articulatory); background: var(--t-Articulatory-bg); }
.tag-Biosignal { color: var(--t-Biosignal); background: var(--t-Biosignal-bg); }
.tag-Streaming { color: var(--t-Streaming); background: var(--t-Streaming-bg); }
.tag-Music { color: var(--t-Music); background: var(--t-Music-bg); }
.tag-Award { color: var(--t-Award); background: var(--t-Award-bg); }

/* ---------- demos ---------- */
.demos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.demo { border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem; background: var(--card); }
.demo h3 { margin: .3rem 0; font-size: 1.05rem; }
.demo p { margin: 0 0 .7rem; font-size: .88rem; color: var(--muted); line-height: 1.45; }
.demo-links { display: flex; flex-wrap: wrap; gap: .6rem; font-size: .82rem; font-weight: 600; }
.demo-links a { text-decoration: none; }
.soon { color: var(--muted); font-weight: 500; }

footer { color: var(--muted); font-size: .8rem; padding: 48px 0 60px; }

/* ---------- small screens ---------- */
.hero-grid > *, .two > * { min-width: 0; }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 24px; }
  .profile { order: -1; flex-direction: row; align-items: center; }
  .hero img { width: 110px; height: 110px; flex: none; }
  .themes { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: 2.3rem; }
  .two { grid-template-columns: 1fr; gap: 0; }
  .site-nav a:not(.cv-btn) { display: none; }
}
@media (max-width: 600px) {
  .news li, .timeline li { grid-template-columns: 1fr; gap: 0; }
  .pubs-card { padding: .2rem 1rem .8rem; }
  .themes { grid-template-columns: repeat(2, 1fr); }
}
