:root {
  --primary: #2962ff;
  --primary-dark: #0039cb;
  --bg: #ffffff;
  --text: #212529;
  --heading: #212529;
  --muted: #6c757d;
  --card: #ffffff;
  --border: #e0e0e0;
  --nav: rgba(255, 255, 255, 0.96);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --link: #2962ff;
  --chip: #f5f7fb;
}

html.dark {
  color-scheme: dark;
  --bg: #191a1c;
  --text: #e4e4e4;
  --heading: #f5f5f5;
  --muted: #a8a8a8;
  --card: #24262b;
  --border: #3a3d44;
  --nav: rgba(25, 26, 28, 0.96);
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  --chip: #2c2f36;
}

html {
  scroll-behavior: smooth;
}

section {
  scroll-margin-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Roboto, "Noto Sans KR", sans-serif;
  font-size: 1.02rem;
  line-height: 1.65;
  padding-top: 70px;
}

h1, h2, h3, h4, .navbar-brand, .nav-link {
  font-family: Montserrat, "Noto Sans KR", sans-serif;
}

h1, h2, h3, h4 {
  color: var(--heading);
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

html.dark a:hover {
  color: #8eabff;
}

.home-section {
  padding: 3.25rem 0;
}

.section-heading h1,
#about h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

#about .bio {
  margin-bottom: 0;
}

#about .about-sub {
  margin-top: 2.75rem;
}

#about .about-sub h3 {
  font-size: 1.12rem;
  font-weight: 600;
  margin-bottom: 0.7rem;
}

#about .institution {
  margin-top: 0.55rem;
}

#navbar-main {
  background: var(--nav);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(8px);
  min-height: 70px;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--heading) !important;
}

.navbar-light .navbar-nav .nav-link {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.6rem 0.85rem;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
  color: var(--primary);
}

.nav-icons .nav-link {
  font-size: 1.05rem;
  color: var(--muted) !important;
}

.navbar-toggler {
  border: 0;
  color: var(--heading);
  font-size: 1.25rem;
}

.dropdown-menu {
  background: var(--card);
  border-color: var(--border);
}

.dropdown-item {
  color: var(--text);
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: var(--chip);
  color: var(--primary);
}

#profile {
  text-align: center;
  margin-bottom: 1.5rem;
}

.avatar-circle {
  width: 220px;
  height: 220px;
  max-width: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--chip);
  box-shadow: var(--shadow);
}

.portrait-title h2 {
  margin: 1rem 0 0.25rem;
  font-size: 1.7rem;
  font-weight: 700;
}

.portrait-title h3 {
  margin: 0.15rem 0;
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--muted);
}

.portrait-title h3 a {
  color: var(--primary);
  font-weight: 700;
}

.network-icon {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  list-style: none;
  padding: 0.8rem 0 0;
  margin: 0;
}

.network-icon a {
  color: var(--primary);
  font-size: 1.65rem;
  line-height: 1;
}

.network-icon a:hover {
  opacity: 0.75;
}

.ul-interests {
  padding-left: 1.15rem;
  margin-bottom: 0;
}

.ul-interests li {
  margin-bottom: 0.35rem;
}

.ul-edu {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.ul-edu li {
  display: flex;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}

.ul-edu i {
  color: var(--primary);
  margin-top: 0.25rem;
}

.ul-edu .course {
  margin: 0;
  font-weight: 700;
}

.ul-edu .institution {
  margin: 0;
  color: var(--muted);
}

.timeline-rail {
  width: 2.2rem;
  position: relative;
  align-items: center;
  justify-content: center;
}

.timeline-rail::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.experience:first-child .timeline-rail::before {
  top: 50%;
}

.experience:last-child .timeline-rail::before {
  top: 0;
  bottom: 50%;
  height: auto;
}

.experience:not(:last-child) .timeline-rail::before {
  bottom: -1px;
}

.experience:only-child .timeline-rail::before {
  display: none;
}

.timeline-dot {
  width: 0.85rem;
  height: 0.85rem;
  margin-top: 0;
  border: 2px solid var(--primary);
  border-radius: 50%;
  background: var(--bg);
  position: relative;
  z-index: 1;
  flex: none;
}

#awards.home-section {
  padding-top: 1.25rem;
  padding-bottom: 1.5rem;
}

#awards .section-heading h1 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

#awards .card {
  box-shadow: none;
}

#awards .card-body {
  padding: 0.45rem 0.75rem;
}

#awards .exp-title {
  font-size: 0.9rem;
  font-weight: 500;
}

#awards .exp-company {
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.35;
}

#awards .exp-meta {
  font-size: 0.82rem;
}

#awards .py-2 {
  padding-top: 0.2rem !important;
  padding-bottom: 0.2rem !important;
}

#awards .timeline-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-width: 1.5px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.35rem;
  box-shadow: var(--shadow);
}

.exp-title,
.exp-company {
  font-size: 1.02rem;
  font-weight: 700;
}

.text-muted {
  color: var(--muted) !important;
}

.card-text {
  margin-top: 0.75rem;
}

.card-text ul {
  margin-bottom: 0.4rem;
  padding-left: 1.15rem;
}

.middot-divider::before {
  content: "\00B7";
  padding: 0 0.45rem;
}

.pub-list-item {
  padding: 1.15rem 0 1.35rem;
  border-bottom: 1px solid var(--border);
}

.pub-list-item:first-child {
  padding-top: 0;
}

.article-title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.35rem;
}

.article-title a {
  color: var(--primary);
}

.article-style {
  color: var(--text);
  margin-bottom: 0.35rem;
}

.article-metadata {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 0.55rem;
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
  background: transparent;
}

.btn-outline-primary:hover {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.btn-links .btn {
  margin: 0.35rem 0.4rem 0 0;
}

.pub-banner img {
  width: 150px;
  max-width: 100%;
  height: auto;
  border-radius: 3px;
  background: var(--chip);
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 1.05rem;
}

.contact-list li {
  display: flex;
  gap: 0.7rem;
  margin-bottom: 0.7rem;
}

.contact-list i {
  color: var(--primary);
  width: 1.2rem;
  margin-top: 0.3rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.4rem 0 1.8rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.search-results {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--bg);
  overflow: auto;
  padding: 2rem 0 3rem;
}

.search-results.open {
  display: block;
}

#search-query {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border);
  height: 3rem;
  font-size: 1.05rem;
}

.search-hit {
  display: block;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.search-hit strong {
  color: var(--primary);
  display: block;
}

.search-hit span {
  color: var(--muted);
}

@media (max-width: 767.98px) {
  #about .about-edu {
    margin-top: 1.85rem;
  }
}

@media (max-width: 991.98px) {
  .section-heading {
    margin-bottom: 0.5rem;
  }

  .avatar-circle {
    width: 180px;
    height: 180px;
  }
}

@media (max-width: 575.98px) {
  .home-section {
    padding: 2.25rem 0;
  }

  .section-heading h1,
  #about h1 {
    font-size: 1.7rem;
  }

  .pub-banner {
    margin-top: 0.8rem;
  }
}
