/* ---------------------------------------------------------
   Risa Shinoda — personal site
   Palette matches the academic-homepage convention this site
   follows: white ground, near-black nav, teal accent.
--------------------------------------------------------- */
:root {
  --bg: #ffffff;
  --ink: #212529;
  --muted: #868e96;
  --line: #e9ecef;
  --accent: #279dcc;
  --nav-bg: #212529;
  --nav-link: #bdbebf;
  --btn-bg: #f8f9fa;
  --btn-border: #dee2e6;
  --tag-highlight: #b8641f;
  --tag-highlight-bg: #fbeee0;

  --font-heading: "Open Sans", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
}

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

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

img { max-width: 100%; display: block; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  z-index: 200;
}
.skip-link:focus { left: 16px; top: 16px; }

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

h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; margin: 0; }

/* ---------------------------------------------------------
   Header / nav
--------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}

.brand {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
}
.brand:hover { text-decoration: none; color: var(--accent); }

.site-nav { display: flex; gap: 28px; }
.site-nav a {
  color: var(--nav-link);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.site-nav a:hover { color: var(--accent); text-decoration: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: #fff; border-radius: 1px; }

@media (max-width: 700px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 58px;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .site-nav.open { max-height: 320px; }
  .site-nav a { padding: 14px 24px; border-top: 1px solid rgba(255,255,255,.08); }
}

/* ---------------------------------------------------------
   About
--------------------------------------------------------- */
.about { padding-block: 56px 40px; }

.about-grid {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 48px;
}

.about-side { text-align: center; }

.avatar {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2.7;
  border-radius: 1em;
  overflow: hidden;
  background: var(--btn-bg);
  margin-bottom: 16px;
  border: 1px solid var(--line);
}
.avatar-photo { width: 100%; height: 100%; object-fit: cover; object-position: 68% 5%; }
.avatar-fallback {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--accent);
}

.role { margin: 0; font-weight: 600; }
.affil { margin: 4px 0; color: var(--ink); line-height: 1.4; }
.affil a { color: var(--accent); }
.mail { margin: 0 0 14px; font-size: .92rem; }
.at { font-size: .85em; }

.social-icons { display: flex; justify-content: center; gap: 6px; }
.social-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--nav-bg);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.social-icon svg { width: 13px; height: 13px; fill: #fff; }
.social-icon:hover { background: var(--accent); text-decoration: none; }
.social-icon-text { font-size: .62rem; font-weight: 700; }

.about-main h1 {
  font-size: clamp(1.7rem, 3.4vw, 2.1rem);
  margin-bottom: 18px;
}
.jp { font-size: .6em; color: var(--muted); font-weight: 400; margin-left: 8px; }

.about-main p { max-width: 66ch; margin: 0 0 16px; text-align: justify; }

.inline-heading {
  font-size: 1rem;
  margin: 20px 0 8px;
}
.disc-list { margin: 0 0 8px; padding-left: 1.3em; }
.disc-list li { margin-bottom: 4px; }

@media (max-width: 700px) {
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .about-side { max-width: 240px; margin: 0 auto; }
  .about-main p { text-align: left; }
}

/* ---------------------------------------------------------
   Big section dividers (rule / SECTION TITLE / rule)
--------------------------------------------------------- */
.rule {
  max-width: 1040px;
  margin: 0 auto;
  border: none;
  border-top: 3px solid var(--ink);
}
.rule + .section-title { margin-top: 6px; }
.section-title + .rule { margin-top: 6px; }

.section-title {
  text-align: center;
  text-transform: uppercase;
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  letter-spacing: .02em;
  padding-block: 6px;
}

.section { padding-block: 40px; }

.sub-heading {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 32px 0 14px;
}
.sub-heading:first-child { margin-top: 0; }

/* ---------------------------------------------------------
   News
--------------------------------------------------------- */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  padding-block: 11px;
  border-top: 1px solid var(--line);
}
.news-list li:first-child { border-top: none; }
.news-list time { font-size: .85rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 560px) {
  .news-list li { grid-template-columns: 1fr; gap: 3px; }
}

/* ---------------------------------------------------------
   Publications
--------------------------------------------------------- */
.pub-filter {
  display: flex;
  justify-content: center;
  gap: 3px;
  margin: 14px auto 16px;
  padding: 5px;
  width: fit-content;
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .04);
}
.pub-filter-btn {
  background: none;
  border: none;
  border-radius: 999px;
  padding: 8px 24px;
  font-family: var(--font-heading);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.pub-filter-btn:hover { color: var(--ink); }
.pub-filter-btn.is-active {
  color: #fff;
  background: var(--tag-highlight);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}
.pub-filter-btn.is-active:hover { color: #fff; }
.pub-list.filter-featured .not-featured { display: none; }

.pub-list { list-style: none; margin: 0 0 8px; padding: 0; }
.pub {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 24px;
  padding-block: 22px;
}
.pub-no-thumb { grid-template-columns: 1fr; }

.pub-thumb { display: flex; flex-direction: column; align-self: start; }
.pub-thumb img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: .5em;
  display: block;
}

.pub-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 6px;
}
.pub-authors { margin: 0 0 6px; font-size: .93rem; font-style: italic; color: var(--ink); }
.me { text-decoration: underline; font-style: normal; font-weight: 700; }
.eq { font-size: .85em; font-style: normal; color: var(--muted); }

.pub-venue { margin: 0 0 10px; font-size: .9rem; font-weight: 700; color: var(--ink); }

.tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 9px;
  border-radius: .4em;
  font-size: .72rem;
  font-weight: 700;
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  color: var(--ink);
  vertical-align: middle;
}
.tag-highlight { background: var(--tag-highlight-bg); color: var(--tag-highlight); border-color: transparent; }
.tag-quiet { color: var(--muted); font-weight: 600; }

.pub-links { margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.pub-links a,
.link-btn {
  display: inline-block;
  padding: 5px 14px;
  border-radius: .5em;
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  color: var(--ink);
  font-size: .82rem;
  font-weight: 600;
}
.pub-links a:hover,
.link-btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.plain-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.link-btn { margin-left: auto; flex-shrink: 0; }

@media (max-width: 600px) {
  .pub { grid-template-columns: 1fr; }
  .pub-thumb { max-width: 280px; }
}

/* ---------------------------------------------------------
   Two-column: experience / education / awards / service
--------------------------------------------------------- */
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 8px;
}
.stack-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-bottom: 8px;
}
@media (max-width: 700px) {
  .two-col-grid { grid-template-columns: 1fr; gap: 8px; }
}

.timeline { list-style: none; margin: 0 0 8px; padding: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding-block: 11px;
  border-top: 1px solid var(--line);
  font-size: .93rem;
}
.timeline li:first-child { border-top: none; }
.tl-date { font-size: .82rem; color: var(--muted); }
@media (max-width: 560px) {
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
}

.plain-list { list-style: none; margin: 0 0 8px; padding: 0; font-size: .93rem; }
.plain-list li { padding-block: 9px; border-top: 1px solid var(--line); }
.plain-list li:first-child { border-top: none; }
.amt { float: right; font-size: .85rem; color: var(--muted); }

/* ---------------------------------------------------------
   Footer
--------------------------------------------------------- */
.site-footer {
  border-top: 3px solid var(--ink);
  padding-block: 36px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.footer-name { font-family: var(--font-heading); font-weight: 700; margin: 0 0 4px; }
.footer-mail { font-size: .88rem; color: var(--muted); margin: 0; }
.link-list-row { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; flex-wrap: wrap; }
.link-list-row a { font-size: .9rem; font-weight: 600; }
