:root {
  --bg: #f4f8ff;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #dbeafe;
  --maxw: 1100px;
  --radius: 14px;
  --shadow: 0 10px 28px rgba(37, 99, 235, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, #f8fbff 0%, #f4f8ff 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR",
               "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
  line-height: 1.6;
}

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

.container {
  width: min(var(--maxw), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  z-index: 10;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}

.brand {
  font-weight: 700;
  color: var(--text);
}
.brand:hover { text-decoration: none; }

.nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 10px;
  transition: background .15s ease, color .15s ease;
}

.nav a:hover {
  background: #eff6ff;
  color: var(--text);
  text-decoration: none;
}

.nav a.active {
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 600;
}

.page {
  padding: 24px 0 40px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: 240px 1fr; /* 왼쪽 칼럼 살짝 여유 */
  gap: 34px;                        /* 좌우 간격 증가 */
  align-items: start;
}

.hero-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-right: 10px; /* 세로선과 왼쪽 내용 간격 추가 */
}

.profile-image {
  width: 180px;
  height: 180px;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 14px;
  border: 2px solid #bfdbfe;
  background: #f3f4f6;
}

.contact-block {
  width: 100%;
  max-width: 220px;   /* SNS 박스 폭과 맞춤 */
  margin: 14px 0 14px;
}

.contact-block p {
  margin: 6px 0;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-block i {
  color: var(--accent);
  width: 16px;
  text-align: center;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 18px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.social-links a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

.social-links .ai,
.social-links .fab,
.social-links .fa-solid,
.social-links .fa-regular {
  font-size: 1rem;
  line-height: 1;
}

.hero-right {
  border-left: 1px solid var(--line); /* 구분선 */
  padding-left: 34px;                 /* 선과 텍스트 간격 */
}

.hero-right h1 {
  margin: 2px 0 6px;
  font-size: 30px;
  line-height: 1.2;
}

.subtitle {
  margin: 0 0 14px;
  color: var(--muted);
}

h1, h2, h3 { color: #0f172a; }

h2 {
  margin-top: 22px;
  margin-bottom: 8px;
  font-size: 20px;
  position: relative;
  padding-bottom: 8px;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 48px;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
}

.clean-list {
  padding-left: 18px;
  margin-top: 8px;
  margin-bottom: 0;
}
.clean-list li { margin: 4px 0; }

.section-desc {
  color: var(--muted);
  margin-top: -4px;
  margin-bottom: 16px;
}

.pub-list {
  display: grid;
  gap: 32px;
}

.pub-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
}

.pub-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.pub-authors {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 3px;
}

.pub-meta {
  color: #374151;
  font-size: 14px;
}

.pub-links {
  margin-top: 8px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
}

.more-link { margin-top: 12px; }

.cv-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.btn {
  display: inline-block;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  font-weight: 500;
}
.btn:hover {
  text-decoration: none;
  filter: brightness(0.98);
}

.btn-outline {
  background: white;
  color: var(--accent);
}

.cv-embed {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.site-footer {
  padding: 10px 0 28px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--line);
}
.site-footer p { margin: 0; }

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .hero-left {
    max-width: 340px;
    margin: 0 auto;
    padding-right: 0; /* 모바일에서는 오른쪽 여백 제거 */
  }

  .hero-right {
    border-left: none;
    padding-left: 0;
    padding-top: 10px;
    border-top: 1px solid var(--line); /* 모바일에서만 가로선 */
    margin-top: 6px;
  }

  .hero-right h1 {
    font-size: 26px;
  }
}

/* 소셜 버튼 세로 배치 (GitHub / ORCID / Google Scholar 한 줄씩) */
.social-links-stack {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px;
  width: 100%;
  max-width: 220px;
}

.social-links-stack a {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;

  width: 100%;
  min-height: 42px;
  padding: 8px 14px;

  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;

  transition: all 0.2s ease;
}

.social-links-stack a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

.social-links-stack .ai,
.social-links-stack .fab {
  width: 18px;
  text-align: center;
  font-size: 1rem;
  line-height: 1;
}

/* 논문 카드끼리 간격 추가 */
.pub-item + .pub-item {
  margin-top: 16px;
}

/* Publications 페이지: 카테고리/연도 스타일 */
.pub-category {
  margin-top: 28px;
}

.pub-year {
  margin: 18px 0 10px;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.pub-year + .pub-list {
  margin-bottom: 10px;
}

/* publication type marker (Journal / Conference) */
.pub-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.pub-type::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* Journal = blue */
.pub-type.journal {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}
.pub-type.journal::before {
  background: #2563eb;
}

/* Conference = red */
.pub-type.conference {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}
.pub-type.conference::before {
  background: #ef4444;
}

/* 내 이름 강조 표시 */
.author-me {
  font-weight: 700;
  color: #0f172a;
  background: linear-gradient(transparent 60%, #dbeafe 60%);
  padding: 0 2px;
  border-radius: 3px;
}

