/* ================================================================
   Hyunjin Seo — site redesign
   Loaded after beautifuljekyll.css; overrides where needed.
   ================================================================ */

:root {
  --r-bg: #ffffff;
  --r-bg-soft: #f7fafc;
  --r-text: #1a202c;
  --r-text-soft: #4a5568;
  --r-text-faint: #718096;
  --r-accent: #2b6cb0;
  --r-accent-soft: rgba(43, 108, 176, 0.12);
  --r-border: #e2e8f0;
  --r-hero-grad: linear-gradient(180deg, #f3f8fc 0%, #ffffff 70%);
  --r-content-w: 780px;
}

/* ---------- Base typography overrides ---------- */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--r-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main a {
  color: var(--r-accent);
  text-decoration: none;
  transition: color 0.15s ease;
}
main a:hover {
  color: var(--r-accent);
  text-decoration: underline;
}

/* ---------- Navbar (override Beautiful Jekyll) ---------- */
.navbar-custom {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--r-border) !important;
  box-shadow: none !important;
}
.navbar-custom .navbar-brand {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--r-text) !important;
}
.navbar-custom .nav-link {
  font-family: 'Inter', sans-serif;
  font-size: 0.86em;
  color: var(--r-text-soft) !important;
  transition: color 0.15s;
}
.navbar-custom .nav-link:hover {
  color: var(--r-accent) !important;
}

/* ---------- Page-level wrapper ---------- */
main {
  background: var(--r-bg);
}

/* ---------- Section block ---------- */
.r-block {
  max-width: var(--r-content-w);
  margin: 0 auto;
  padding: 72px 24px;
}
.r-section-title {
  text-align: center;
  margin: 0 0 48px;
}
.r-section-title span {
  font-family: 'Inter', sans-serif;
  font-size: 0.78em;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--r-accent);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--r-accent-soft);
  display: inline-block;
}

/* ---------- Hero ---------- */
.r-hero {
  position: relative;
  background: var(--r-hero-grad);
  padding: 110px 24px 80px;
  overflow: hidden;
}
.r-hero-inner {
  position: relative;
  max-width: var(--r-content-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: center;
}
.r-profile {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  overflow: hidden;
  background: #d0e0ec;
  border: 4px solid white;
  box-shadow: 0 8px 32px rgba(43, 108, 176, 0.15);
}
.r-profile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.r-hero h1 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-weight: 700;
  font-size: 2.5em;
  line-height: 1.1;
  margin: 0 0 12px;
  letter-spacing: -0.025em;
  color: var(--r-text);
}
.r-hero .r-role {
  font-size: 0.95em;
  color: var(--r-text-soft);
  margin-bottom: 16px;
}
.r-hero .r-bio {
  color: var(--r-text-soft);
  font-size: 0.95em;
  margin: 0 0 22px;
}
.r-hero .r-bio b {
  color: var(--r-text);
  font-weight: 600;
}
.r-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.r-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border: 1px solid var(--r-border);
  border-radius: 999px;
  font-size: 0.84em;
  color: var(--r-text-soft) !important;
  background: white;
  transition: all 0.15s;
}
.r-links a:hover {
  color: var(--r-accent) !important;
  border-color: var(--r-accent);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ---------- Timeline (News) ---------- */
.r-timeline {
  position: relative;
  padding-left: 24px;
}
.r-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--r-border);
}
.r-timeline-item {
  position: relative;
  display: flex;
  gap: 18px;
  padding: 10px 0;
  align-items: baseline;
}
.r-timeline-item::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--r-accent);
}
.r-timeline-item.r-recent::before {
  background: var(--r-accent);
}
.r-timeline-date {
  flex: 0 0 90px;
  font-size: 0.82em;
  color: var(--r-text-faint);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.r-timeline-text {
  flex: 1;
  font-size: 0.94em;
  color: var(--r-text-soft);
}
.r-timeline-text i {
  color: var(--r-accent);
  margin-right: 6px;
  opacity: 0.7;
}
.r-news-toggle {
  margin-top: 18px;
  text-align: center;
}
.r-news-toggle button {
  background: none;
  border: 1px solid var(--r-border);
  color: var(--r-text-soft);
  padding: 6px 16px;
  font-size: 0.82em;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.r-news-toggle button:hover {
  color: var(--r-accent);
  border-color: var(--r-accent);
}
.r-timeline-item.r-older {
  display: none;
}
.r-timeline.r-expanded .r-timeline-item.r-older {
  display: flex;
}

/* ---------- Pub tab toggle ---------- */
.r-tab-toggle {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0 0 32px;
}
.r-tab {
  background: none;
  border: 1px solid var(--r-border);
  color: var(--r-text-soft);
  padding: 6px 18px;
  font-size: 0.85em;
  font-weight: 500;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  letter-spacing: 0.01em;
}
.r-tab:hover {
  color: var(--r-accent);
  border-color: var(--r-accent);
}
.r-tab.r-tab-active {
  background: var(--r-accent);
  color: white !important;
  border-color: var(--r-accent);
}
.r-pub-list { display: none; }
.r-pub-list.r-pub-list-active { display: block; }

/* ---------- Publications ---------- */
.r-pub {
  display: flex;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--r-border);
  position: relative;
  transition: background 0.15s;
}
.r-pub:last-child {
  border-bottom: none;
}
.r-pub::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 0;
  background: var(--r-accent);
  transition: height 0.2s ease;
}
.r-pub:hover::before {
  height: 70%;
}
.r-pub-thumb {
  flex: 0 0 200px;
  width: 200px;
  height: 130px;
  border-radius: 6px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-weight: 600;
  color: var(--r-accent);
  font-size: 0.9em;
  border: 1px solid var(--r-border);
  overflow: hidden;
  padding: 6px;
}
.r-pub-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.r-pub-thumb.r-alt2 { background: linear-gradient(135deg, #f0e8f8, #d8d0ec); color: #6a4ba8; }
.r-pub-thumb.r-alt3 { background: linear-gradient(135deg, #f8efe5, #ecd9c2); color: #a8602b; }
.r-pub-thumb.r-alt4 { background: linear-gradient(135deg, #e5f8ec, #c4e6d2); color: #2b8b58; }
.r-pub-thumb.r-alt5 { background: linear-gradient(135deg, #f8e5e5, #e6c4c4); color: #a83d3d; }

.r-pub-body {
  flex: 1;
  min-width: 0;
}
.r-pub-title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.02em;
  margin: 0 0 4px;
  line-height: 1.35;
  letter-spacing: -0.005em;
  color: var(--r-text);
}
.r-pub-authors {
  font-size: 0.84em;
  color: var(--r-text-soft);
  margin-bottom: 6px;
  line-height: 1.5;
}
.r-pub-authors .r-me {
  font-weight: 700;
  color: var(--r-text);
}
.r-pub-authors .r-eq {
  font-size: 0.92em;
  color: var(--r-text-faint);
  font-style: italic;
}
.r-pub-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 0.82em;
}
.r-venue {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 4px;
  font-size: 0.78em;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.r-venue-iclr { background: #e7efff; color: #1d4ed8; }
.r-venue-aaai { background: #f0e7ff; color: #6d28d9; }
.r-venue-iccv { background: #fff0e0; color: #c2410c; }
.r-venue-preprint { background: #f0f0f3; color: #4a5568; }
.r-venue-kcc { background: #e5f6ec; color: #15803d; }
.r-venue-hclt { background: #fde8f0; color: #be185d; }

.r-pub-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border: 1px solid var(--r-border);
  border-radius: 4px;
  color: var(--r-text-soft) !important;
  font-size: 0.78em;
  transition: 0.15s;
}
.r-pub-link:hover {
  background: var(--r-accent-soft);
  color: var(--r-accent) !important;
  border-color: var(--r-accent);
  text-decoration: none;
}
.r-pub-award {
  color: #de6177;
  font-weight: 600;
  font-size: 0.82em;
}

/* ---------- Org cards (Education / Experience) ---------- */
.r-org {
  display: flex;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--r-border);
}
.r-org:last-child {
  border-bottom: none;
}
.r-org-logo {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: var(--r-bg-soft);
  border: 1px solid var(--r-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-weight: 600;
  color: var(--r-accent);
  font-size: 0.95em;
  overflow: hidden;
}
.r-org-logo img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}
.r-org-body {
  flex: 1;
  min-width: 0;
}
.r-org-title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-weight: 600;
  font-size: 1em;
  margin: 0 0 2px;
  letter-spacing: -0.005em;
  color: var(--r-text);
}
.r-org-date {
  font-size: 0.82em;
  color: var(--r-text-faint);
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}
.r-org-desc {
  font-size: 0.92em;
  color: var(--r-text-soft);
  margin: 0;
}
.r-org-desc ul {
  margin: 4px 0;
  padding-left: 20px;
}
.r-org-desc li {
  margin-bottom: 3px;
}

/* ---------- Compact list (Projects / Awards) ---------- */
.r-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--r-border);
}
.r-item:last-child {
  border-bottom: none;
}
.r-item-title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.98em;
  margin: 0 0 4px;
  letter-spacing: -0.005em;
  color: var(--r-text);
}
.r-item-meta {
  font-size: 0.82em;
  color: var(--r-text-faint);
  margin-bottom: 4px;
}
.r-item-org {
  font-size: 0.9em;
  color: var(--r-text-soft);
}

/* ---------- Footer override ---------- */
footer {
  border-top: 1px solid var(--r-border);
  background: white;
}
footer .beautiful-jekyll-footer {
  color: var(--r-text-faint);
  font-size: 0.82em;
  text-align: center;
}

/* ---------- Reveal on scroll ---------- */
.r-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.r-reveal.r-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .r-hero {
    padding: 90px 20px 60px;
  }
  .r-hero-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    text-align: left;
  }
  .r-profile {
    width: 160px;
    height: 160px;
  }
  .r-hero h1 {
    font-size: 1.9em;
  }
  .r-block {
    padding: 56px 20px;
  }
  .r-pub {
    gap: 14px;
  }
  .r-pub-thumb {
    flex: 0 0 120px;
    width: 120px;
    height: 80px;
    font-size: 0.78em;
    padding: 4px;
  }
  .r-org-logo {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    font-size: 0.85em;
  }
  .r-timeline-date {
    flex: 0 0 72px;
    font-size: 0.78em;
  }
}
