/* Shared styles for hongjooryoo.com */

:root {
  --bg: #fbfaf7;
  --ink: #1c1c1e;
  --muted: #6a6862;
  --rule: #e3e0d8;
  --link: #cf6a2e;
  --link-underline: rgba(207, 106, 46, .35);
  --phys: #2f5d9e;
  --phil: #b4532a;
  --mind: #2f7d5b;
  --blend: multiply;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  /* One typeface everywhere; --sans is kept as a name for the small-label style. */
  --sans: var(--serif);
  /* Always light, regardless of the visitor's system dark mode. */
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: underline; text-decoration-color: var(--link-underline); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: text-decoration-color .15s; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3 { font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 2.2rem; margin: 0 0 .4em; }
h2 { font-size: 1.35rem; margin: 2.2em 0 .6em; }
h3 { font-size: 1.1rem; margin: 1.6em 0 .4em; }
p { margin: 0 0 1em; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 18px; flex-wrap: wrap; }
.brand { font-size: 1.55rem; color: var(--ink); text-decoration: none; letter-spacing: 0.01em; }
.site-header nav { display: flex; gap: 24px; font-size: 1rem; }
.site-header nav a { text-decoration: none; color: var(--muted); }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--ink); }

/* main also carries .wrap, whose padding shorthand would otherwise zero these out */
main.wrap { padding-top: 72px; padding-bottom: 72px; }

/* Small sans labels */
.eyebrow { font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.muted { color: var(--muted); }

/* Home */
.top { display: grid; grid-template-columns: 1.1fr 1fr; gap: 44px; align-items: center; }
.hero { margin: 0; }
.hero img { width: 100%; border-radius: 2px; }
.intro .lede { font-size: 1.2rem; }
.intro p:last-child { margin-bottom: 0; }

/* Features and profiles strip on the home page */
.marks { margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 28px 72px; }
.marks-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 30px; }
/* Each mark takes a readable version of its site's own brand color */
.mark { display: inline-flex; align-items: center; gap: 8px; color: var(--c, var(--link)); font-size: 1.1rem; white-space: nowrap; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 4px; transition: text-decoration-color .15s; }
.mark:hover { text-decoration-color: currentColor; }
.mark-berkeley-phys { --c: #3a6ea5; }   /* Berkeley Blue, lightened */
.mark-berkeley-ah { --c: #c0392b; }
.mark-scholar { --c: #3b78dc; }         /* Google Scholar blue */
.mark-inspire { --c: #0a8fa3; }         /* INSPIRE cyan, deepened */
.mark-philpeople { --c: #7a5c99; }
.mark-orcid { --c: #6f9a1f; }           /* ORCID green, deepened */
.mark svg { width: 22px; height: 22px; fill: currentColor; flex: none; }
.wm-main { font-weight: 600; letter-spacing: .01em; }
.wm-sub { font-style: italic; }

.explore { margin-top: 64px; padding-top: 36px; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 430px 1fr; gap: 52px; align-items: start; }
.venn { display: block; width: 100%; max-width: 430px; user-select: none; -webkit-user-select: none; }
.venn .focus { cursor: pointer; outline: none; transition: transform .55s cubic-bezier(.2,.7,.2,1); }
.venn .focus circle { transition: fill-opacity .3s; fill-opacity: .06; stroke-width: 1.2; mix-blend-mode: var(--blend); }
.venn .focus[aria-pressed="true"] circle { fill-opacity: .5; }
.venn .focus:hover circle { fill-opacity: .16; }
.venn .focus[aria-pressed="true"]:hover circle { fill-opacity: .56; }
.venn .focus:focus-visible circle { stroke-width: 2.5; }
.venn .focus text { font-family: var(--serif); font-size: 16.3px; text-anchor: middle; dominant-baseline: central; fill: var(--ink); pointer-events: none; }
.venn .hints { pointer-events: none; }
.venn .cue { font-family: var(--serif); font-size: 11px; font-style: italic; fill: var(--muted); text-anchor: middle; dominant-baseline: central; animation: fadein .5s .35s both; }
.venn .cue-arrow { fill: none; stroke: var(--ink); stroke-opacity: .65; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 200; stroke-dashoffset: 200; animation: draw .6s .4s ease-out forwards; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.venn [data-focus="phys"] circle { fill: var(--phys); stroke: var(--phys); }
.venn [data-focus="phil"] circle { fill: var(--phil); stroke: var(--phil); }
.venn [data-focus="mind"] circle { fill: var(--mind); stroke: var(--mind); }
.venn-hint { font-size: 0.9rem; font-style: italic; color: var(--muted); margin-top: -8px; text-align: center; }
.venn-hint button { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }

.reading { min-height: 280px; }
.reading .placeholder { font-size: 1.62rem; line-height: 1.45; padding-top: 6px; }
.arrow { display: block; fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.arrow path { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.1s .3s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
/* Right end sits under the center of the text; the tip reaches left toward the circles. */
.arrow-curve { width: 340px; height: 150px; margin: 4px 0 0 calc(50% - 340px); }
.arrow-up { display: none; }
.explore.explore-first { margin-top: 28px; padding-top: 0; border-top: 0; }
.all-areas { margin-top: 64px; padding-top: 36px; border-top: 1px solid var(--rule); }

/* Gentle staggered pulse until the first click, so the circles read as clickable */
.venn.idle .focus circle { animation: breathe 3.6s ease-in-out infinite; }
.venn.idle [data-focus="phil"] circle { animation-delay: 1.2s; }
.venn.idle [data-focus="mind"] circle { animation-delay: 2.4s; }
.venn .focus.beckon circle { animation: breathe 2.4s ease-in-out infinite; }
.venn.idle .focus:hover circle, .venn .focus.beckon:hover circle { animation: none; }
@keyframes breathe { 0%, 100% { fill-opacity: .06; } 50% { fill-opacity: .26; } }
.reading article { animation: rise .45s cubic-bezier(.2,.7,.2,1); }
.reading h2 { margin-top: 0; }
.dots { display: inline-flex; gap: 5px; margin-right: 10px; vertical-align: middle; position: relative; top: -2px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.dots .phys { background: var(--phys); }
.dots .phil { background: var(--phil); }
.dots .mind { background: var(--mind); }
.areas { font-family: var(--sans); font-size: 0.85rem; margin: 18px 0 6px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .venn .focus, .venn .focus circle { transition: none; }
  .venn.idle .focus circle, .venn .focus.beckon circle { animation: none; }
  .arrow path { animation: none; stroke-dashoffset: 0; }
  .venn .cue { animation: none; }
  .venn .cue-arrow { animation: none; stroke-dashoffset: 0; }
  .reading article { animation: none; }
}

/* Works lists */
.works { list-style: none; padding: 0; margin: 10px 0 0; }
.works li { padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 0.95rem; line-height: 1.45; }
.works li:first-child { border-top: 1px solid var(--rule); }
.works .venue { color: var(--muted); }

/* Publications: one running number across all paper sections */
.pubs { counter-reset: pub; }
.pubs ol { list-style: none; padding: 0; margin: 0; }
.pubs ol li { counter-increment: pub; position: relative; padding: 10px 0 10px 3em; border-bottom: 1px solid var(--rule); font-size: 0.95rem; line-height: 1.5; }
.pubs ol li::before { content: "[" counter(pub) "]"; position: absolute; left: 0; top: 10px; font-family: var(--sans); font-size: 0.78rem; color: var(--muted); line-height: 1.9; }
.pubs ul { padding-left: 1.2em; }
.pubs ul li { padding: 4px 0; font-size: 0.95rem; }

/* Generic page content */
.page-figure { margin: 8px 0 32px; }
.page-figure img { border-radius: 2px; }
.page-figure.small img { max-width: 340px; }
.link-list { list-style: none; padding: 0; font-family: var(--sans); font-size: 0.88rem; }
.link-list li { padding: 5px 0; }
.content ul { padding-left: 1.2em; }
.content li { margin: 4px 0; }
.crumb { font-family: var(--sans); font-size: 0.8rem; color: var(--muted); margin-bottom: 18px; }
.crumb a { color: var(--muted); }

.research-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 24px; }
.research-groups h2 { margin-top: 0; font-size: 1.1rem; }
.research-groups ul { list-style: none; padding: 0; margin: 0; }
.research-groups li { padding: 6px 0; border-bottom: 1px solid var(--rule); }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); padding: 28px 0 40px; font-family: var(--sans); font-size: 0.85rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 22px; }

@media (max-width: 960px) {
  .explore { grid-template-columns: 1fr; gap: 24px; }
  .venn { margin: 0 auto; }
  .arrow-curve { display: none; }
  .arrow-up { display: block; width: 24px; height: 44px; margin: 0 auto 12px; }
  .reading .placeholder { text-align: center; }
}

@media (max-width: 760px) {
  body { font-size: 17px; }
  .wrap { padding: 0 16px; }
  h1 { font-size: 1.8rem; }
  main.wrap { padding-top: 56px; }
  .top { grid-template-columns: 1fr; gap: 24px; }
  .venn { margin: 0 auto; max-width: 340px; }
  .research-groups { grid-template-columns: 1fr; gap: 8px; }
  .site-header nav { gap: 16px; }
}
