/* ============================================================
   Taeseong Yoon — Academic Homepage
   Aesthetic: al-folio inspired · classic academic · deep-blue accent
   Type: Roboto Slab (display) + Roboto (body) + Source Code Pro (mono)
   ============================================================ */

:root {
  --bg:           #ffffff;
  --bg-alt:       #f7f8fa;
  --bg-soft:      #fafbfc;

  --text:         #1f2230;
  --text-2:       #333542;
  --muted:        #6b7280;
  --muted-2:      #9ca3af;

  --line:         #e5e8ed;
  --line-soft:    #eef0f4;

  /* Deep blue accent palette */
  --primary:      #1e3a8a;     /* deep navy-blue */
  --primary-dark: #172554;     /* darker hover */
  --primary-bright: #1e40af;   /* slightly brighter for vivid moments */
  --primary-soft: #dbeafe;     /* soft tint for backgrounds */

  --serif: "Roboto Slab", "Source Serif Pro", Georgia, serif;
  --sans:  "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Helvetica Neue", Arial, sans-serif;
  --mono:  "Source Code Pro", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --max:    980px;
  --gutter: clamp(20px, 4vw, 36px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}
a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

::selection { background: var(--primary); color: white; }

strong { font-weight: 700; color: var(--text); }
em     { font-style: italic; }

.skip-link {
  position: absolute; left: -9999px;
}
.skip-link:focus {
  left: 16px; top: 16px;
  background: var(--text); color: white;
  padding: 8px 14px; border-radius: 4px; z-index: 1000;
}

/* ============== Top bar ============== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.005em;
  color: var(--text);
}
.brand:hover { color: var(--primary); text-decoration: none; }

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  display: inline-block;
  padding: 8px 12px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  border-radius: 4px;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.nav-links a:hover {
  color: var(--primary);
  text-decoration: none;
  background: var(--primary-soft);
}
.nav-links a.active {
  color: var(--primary);
  font-weight: 500;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  width: 36px; height: 36px;
  padding: 0;
  position: relative;
}
.nav-toggle span {
  display: block;
  position: absolute;
  left: 8px; right: 8px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease), top 0.25s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 11px; }
.nav-toggle span:nth-child(2) { top: 17px; }
.nav-toggle span:nth-child(3) { top: 23px; }
.nav-toggle.is-open span:nth-child(1) { top: 17px; transform: rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { top: 17px; transform: rotate(-45deg); }

/* ============== Layout ============== */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) 80px;
}

/* ============== Hero / About ============== */
.hero {
  padding: 56px 0 24px;
}

.hero-head {
  margin-bottom: 36px;
}

.display {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  letter-spacing: -0.025em;
  color: var(--text);
  line-height: 1.05;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 300;
}
.subtitle a {
  color: var(--muted);
  border-bottom: 1px dotted var(--muted-2);
}
.subtitle a:hover { color: var(--primary); border-color: var(--primary); text-decoration: none; }

.hero-body {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

/* Profile (left column) */
.profile {
  text-align: center;
}

.profile-photo {
  width: 220px;
  height: 220px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 28%, rgba(30, 64, 175, 0.28), transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(31, 34, 48, 0.16), transparent 60%),
    var(--bg-alt);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 22px rgba(31, 34, 48, 0.08);
}
.profile-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.photo-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 4rem;
  color: var(--primary);
  letter-spacing: -0.04em;
}

.contact-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  text-align: left;
  font-size: 0.88rem;
  color: var(--muted);
}
.contact-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 4px 0;
  line-height: 1.5;
}
.contact-list .icon {
  font-size: 0.92em;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}
.contact-list a {
  color: var(--text-2);
  word-break: break-all;
}
.contact-list a:hover { color: var(--primary); }

.socials {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.socials a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: var(--bg-alt);
  transition: color 0.18s var(--ease), background 0.18s var(--ease), transform 0.18s var(--ease);
}
.socials a:hover {
  color: white;
  background: var(--primary);
  transform: translateY(-2px);
  text-decoration: none;
}
.socials svg { display: block; }

/* Bio (right column) */
.bio p {
  margin: 0 0 16px;
  font-size: 1.02rem;
  line-height: 1.72;
  color: var(--text-2);
}
.bio p:last-child { margin-bottom: 0; }
/* bio inherits global strong/em rules */
.bio em { color: var(--text-2); font-style: italic; }

.open-to {
  margin-top: 22px !important;
  padding: 14px 18px;
  background: var(--bg-alt);
  border-left: 3px solid var(--primary);
  border-radius: 4px;
  font-size: 0.94rem !important;
  color: var(--muted) !important;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.open-to .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  position: relative;
  top: 2px;
  box-shadow: 0 0 0 0 rgba(30, 58, 138, 0.45);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(30, 58, 138, 0.45); }
  50%      { box-shadow: 0 0 0 7px rgba(30, 58, 138, 0); }
}
.open-to em { color: var(--text-2); font-style: italic; }

/* ============== Block / Section ============== */
.block {
  padding: 48px 0 16px;
  border-top: 1px solid var(--line);
  margin-top: 16px;
}

.block-title {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.7rem;
  color: var(--text);
  letter-spacing: -0.01em;
  text-transform: lowercase;
  position: relative;
  display: inline-block;
}
.block-title::after {
  content: "";
  display: block;
  width: 32px;
  height: 2px;
  background: var(--primary);
  margin-top: 10px;
  border-radius: 2px;
}

.block-sub {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 0.95rem;
}
.block-sub .self-mark { color: var(--text); font-weight: 700; }
.muted { color: var(--muted-2); }
.muted-inline { color: var(--muted); font-weight: 400; }

.see-all {
  display: inline-block;
  margin-top: 24px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--primary);
}
.see-all:hover { transform: translateX(2px); }

/* ============== News ============== */
.news-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}
.news-list li {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 24px;
  padding: 14px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 0.97rem;
  align-items: baseline;
}
.news-list li:first-child { border-top: 0; padding-top: 6px; }
.news-list time {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.news-list p {
  margin: 0;
  color: var(--text-2);
  line-height: 1.55;
}
.news-list strong { color: var(--text); }
.news-list em {
  font-style: italic;
  color: var(--text);
}

.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-right: 6px;
  vertical-align: 1px;
}
.badge-new {
  background: var(--primary);
  color: white;
}

/* ============== Publications ============== */
.year-tag {
  margin: 32px 0 18px;
  padding-bottom: 6px;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--primary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px dashed var(--line);
}

.paper {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: start;
}
.paper:last-of-type { border-bottom: 0; }

.paper-thumb {
  width: 130px;
  height: 100px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: var(--serif);
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 4px 12px rgba(31, 34, 48, 0.10);
}
.paper-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 25% 20%, rgba(255,255,255,0.18), transparent 55%),
    radial-gradient(circle at 80% 95%, rgba(0,0,0,0.18), transparent 55%);
  z-index: -1;
}
.thumb-venue {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}
.thumb-year {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0.92;
}
.thumb-sub {
  margin-top: 4px;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  opacity: 0.95;
}

/* Thumbnail gradients (each venue gets a distinct look) */
.thumb-icml-2026 { background: linear-gradient(135deg, #1e3a8a, #3b82f6); }   /* deep blue (featured) */
.thumb-neurips   { background: linear-gradient(135deg, #1f2937, #0f172a); }   /* charcoal */
.thumb-icml      { background: linear-gradient(135deg, #115e59, #14b8a6); }   /* teal */
.thumb-tase      { background: linear-gradient(135deg, #92400e, #d97706); }   /* amber/journal */
.thumb-preprint  { background: linear-gradient(135deg, #6b7280, #4b5563); }   /* grey */
.thumb-preprint .thumb-venue { font-size: 1.15rem; }

.paper-body {
  min-width: 0;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

/* Venue tags (publication venue) */
.venue {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: white;
}
.venue-icml    { background: var(--primary-bright); }    /* deep blue */
.venue-neurips { background: #1f2937; }                  /* charcoal */
.venue-iclr    { background: #0f766e; }                  /* teal */
.venue-arxiv   { background: #6b7280; }                  /* grey */
.venue-journal { background: #b45309; }                  /* amber */

/* Topic tags — three core research areas */
.topic {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.topic-uncertainty { color: #1e3a8a; border-color: #bfdbfe; background: #eff6ff; }   /* blue family — matches accent */
.topic-robust      { color: #92400e; border-color: #fde68a; background: #fffbeb; }   /* amber */
.topic-timeseries  { color: #6b21a8; border-color: #ddd6fe; background: #f5f3ff; }   /* violet */

/* Status tags */
.status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.status.accepted { background: var(--primary); color: white; }
.status.review   { background: #f3f4f6; color: var(--muted); border: 1px solid var(--line); }

.paper-body h4 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.13rem;
  line-height: 1.32;
  letter-spacing: -0.005em;
  color: var(--text);
}

.authors {
  margin: 0 0 4px;
  font-size: 0.92rem;
  color: var(--text-2);
}
.authors strong {
  color: var(--primary);
  font-weight: 700;
}

.venue-line {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.88rem;
}
.venue-line em { font-style: italic; color: var(--text-2); }

.abstract {
  margin: 8px 0 0;
  color: var(--text-2);
  font-size: 0.94rem;
  line-height: 1.62;
  max-width: 60ch;
}

.links {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.82rem;
}
.links a {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text-2);
  background: white;
  font-weight: 500;
  transition: all 0.15s var(--ease);
}
.links a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  text-decoration: none;
}

.paper.compact { padding: 16px 0; }
.paper.compact .paper-thumb { height: 80px; }

/* ============== Research interests ============== */
.research-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* Per-area accent colours, matching the topic tags in publications */
.research-grid article {
  padding: 24px 22px 22px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-top: 3px solid var(--ri-color, var(--primary));
  border-radius: 4px;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
  position: relative;
}
.research-grid article:nth-child(1) { --ri-color: #1e3a8a; --ri-bg: #eff6ff; --ri-icon-color: #1e40af; }  /* blue — UQ */
.research-grid article:nth-child(2) { --ri-color: #92400e; --ri-bg: #fffbeb; --ri-icon-color: #b45309; }  /* amber — Robust DL */
.research-grid article:nth-child(3) { --ri-color: #6b21a8; --ri-bg: #f5f3ff; --ri-icon-color: #7c3aed; }  /* violet — Time Series */

.research-grid article:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(31, 34, 48, 0.09);
}

/* Icon badge */
.research-grid .ri-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--ri-bg);
  margin-bottom: 14px;
  font-size: 1.1rem;
  line-height: 1;
}

.research-grid h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.06rem;
  letter-spacing: -0.01em;
  color: var(--ri-color, var(--text));
}
.research-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* ============== Talks / entry list ============== */
.entry-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}
.entry-list li {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--line-soft);
  align-items: start;
}
.entry-list li:first-child { border-top: 0; padding-top: 4px; }
.entry-list time {
  font-family: var(--mono);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--primary);
  letter-spacing: 0.02em;
  padding-top: 3px;
}
.entry-list h4 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.02rem;
  letter-spacing: -0.005em;
  color: var(--text);
  line-height: 1.35;
}
.entry-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* ============== CV (compact) ============== */
.cv-row {
  margin-top: 30px;
}
.cv-row-title {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--primary);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.plain-list li {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 20px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 0.94rem;
  color: var(--text-2);
  align-items: baseline;
}
.plain-list li:last-child { border-bottom: 0; }
.plain-list time {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.experience-list li { padding: 14px 0; align-items: start; }
.small-note {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ============== Footer ============== */
.footer {
  margin-top: 60px;
  padding: 28px var(--gutter);
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--muted);
}
.footer-inner p { margin: 0; }
.heart { color: var(--primary); }

/* ============== Responsive ============== */
@media (max-width: 880px) {
  .hero-body {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
  .profile { max-width: 280px; margin: 0 auto; }
  .profile-photo { width: 180px; height: 180px; }
  .photo-fallback { font-size: 3.4rem; }
  .contact-list { text-align: center; }
  .contact-list li { justify-content: center; }
  .bio { text-align: left; }
  .bio p { text-align: left; }
  .open-to { text-align: left; }

  .research-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 14px 14px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 10px 12px;
  }

  .display { font-size: 2.2rem; }
  .subtitle { font-size: 0.96rem; }

  .block { padding: 40px 0 8px; }
  .block-title { font-size: 1.45rem; }

  .news-list li,
  .entry-list li,
  .plain-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .research-grid { grid-template-columns: 1fr; }

  .paper {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .paper-thumb {
    width: 100%;
    height: 64px;
    flex-direction: row;
    gap: 12px;
  }
  .thumb-venue { font-size: 1.1rem; }
  .thumb-year { margin-top: 0; }
  .thumb-sub  { margin-top: 0; }
}
