/* ============================================================
   Academic Personal Website — style.css
   ------------------------------------------------------------
   EDIT: 사이트 전체 색상은 아래 :root 변수만 바꾸면 됩니다.
   (To change site colors, edit the variables below.)
   ============================================================ */

:root {
  --accent: #1a56a0;          /* 포인트 컬러 (calm blue) */
  --text: #222222;            /* 본문 텍스트 */
  --secondary-text: #666666;  /* 보조 텍스트 */
  --border: #e6e6e6;          /* 옅은 구분선 */
  --bg: #ffffff;              /* 배경색 */
  --max-width: 1000px;        /* 본문 최대 너비 */
}

/* ---------- Base ---------- */

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Layout ---------- */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

main.container {
  padding-top: 2.5rem;
  padding-bottom: 1rem;
}

/* ---------- Skip link (keyboard accessibility) ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--accent);
  color: #ffffff;
  padding: 0.5rem 0.9rem;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  left: 0.75rem;
  top: 0.75rem;
}

/* ---------- Header / Navigation ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1.5rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.site-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.site-name:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  padding: 0.15rem 0;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover {
  color: var(--accent);
}

/* 현재 페이지 표시: 굵기 + 밑줄 */
.nav-links a[aria-current="page"] {
  font-weight: 600;
  border-bottom-color: var(--accent);
}

/* ---------- Profile / Introduction ---------- */

.profile {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
}

.profile-photo {
  flex: 0 0 auto;
  width: 180px;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.profile-info {
  flex: 1 1 0;
  min-width: 0;
}

.profile-info h1 {
  margin: 0 0 0.35rem;
  font-size: 1.85rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.profile-role {
  margin: 0 0 1.1rem;
  color: var(--secondary-text);
  line-height: 1.5;
}

.profile-intro {
  margin: 0 0 1.1rem;
}

.profile-label {
  margin: 0 0 0.3rem;
  font-weight: 600;
}

.interest-list {
  margin: 0 0 1.1rem;
  padding-left: 1.25rem;
}

.interest-list li {
  margin: 0.1rem 0;
}

.profile-contact {
  margin: 0 0 0.35rem;
}

.profile-links {
  margin: 0;
}

/* ---------- Sections (About / Education / ...) ---------- */

.section {
  margin-top: 3rem;
}

.section > h2 {
  margin: 0 0 1.1rem;
  padding-bottom: 0.4rem;
  font-size: 1.35rem;
  line-height: 1.3;
  border-bottom: 1px solid var(--border);
}

.section > p {
  margin: 0 0 1rem;
}

/* ---------- Education / Experience (CV-style rows) ---------- */

.cv-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 0.25rem 1.5rem;
  padding: 0.5rem 0;
}

.cv-period {
  color: var(--secondary-text);
  font-size: 0.95rem;
  padding-top: 0.05rem;
}

.cv-title {
  font-weight: 600;
}

.cv-org {
  color: var(--secondary-text);
  font-size: 0.95rem;
}

/* ---------- Publications ---------- */

.publication {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}

.pub-list .publication:first-child {
  padding-top: 0.35rem;
}

.pub-list .publication:last-child {
  border-bottom: 0;
}

.pub-title {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
}

.pub-authors {
  margin: 0;
  font-size: 0.93rem;
  color: var(--secondary-text);
}

/* 본인 이름 강조 */
.pub-authors strong {
  color: var(--text);
  font-weight: 600;
}

.pub-venue {
  margin: 0.1rem 0 0;
  font-size: 0.93rem;
  color: var(--secondary-text);
  font-style: italic;
}

/* 논문 종류 표시 (Journal Article / Conference Paper / ...) */
.pub-type {
  font-style: normal;
  font-size: 0.85rem;
}

/* Equal contribution 등 각주 */
.pub-note {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: var(--secondary-text);
}

.pub-links {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
}

.pub-links a {
  margin-right: 1rem;
  text-decoration: none;
}

.pub-links a::before {
  content: "[";
}

.pub-links a::after {
  content: "]";
}

.pub-links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 논문 대표 이미지 (썸네일) */
.publication {
  display: flex;
  gap: 1.1rem;
  align-items: center;
}

.pub-thumb {
  flex: 0 0 150px;
  display: block;
}

.pub-thumb img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.pub-thumb:hover img {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

.pub-body {
  flex: 1;
  min-width: 0;
}

.pub-compact .pub-thumb {
  flex-basis: 125px;
}

@media (max-width: 480px) {
  .pub-thumb {
    flex-basis: 100px;
  }
}

/* 라이트박스 (이미지 클릭 시 원본 확대) */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.82);
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: zoom-out;
}

.lightbox-overlay.is-open {
  display: flex;
}

.lightbox-image {
  max-width: 95vw;
  max-height: 92vh;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  border: 0;
  background: none;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.lightbox-close:hover {
  opacity: 0.7;
}

/* 홈 화면 Selected Publications 축소 표시 */
.pub-compact .pub-title {
  font-size: 0.95rem;
}

.pub-compact .pub-authors,
.pub-compact .pub-venue {
  font-size: 0.85rem;
}

.pub-compact .pub-links {
  font-size: 0.82rem;
}

/* "View all publications" 링크 */
.view-all {
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
}

/* ---------- Publications 페이지 ---------- */

.page-title {
  margin: 0 0 0.5rem;
  font-size: 1.7rem;
  line-height: 1.25;
}

.pub-year {
  margin: 2.4rem 0 0.4rem;
  padding-bottom: 0.35rem;
  font-size: 1.2rem;
  border-bottom: 1px solid var(--border);
}

.page-title + .pub-year {
  margin-top: 1.25rem;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 4rem;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--border);
  color: var(--secondary-text);
  font-size: 0.875rem;
  text-align: center;
}

/* ---------- Responsive (mobile / tablet) ---------- */

@media (max-width: 720px) {
  main.container {
    padding-top: 1.75rem;
  }

  .profile {
    flex-direction: column;
    gap: 1.5rem;
  }

  .profile-photo {
    width: 150px;
  }

  .profile-info h1 {
    font-size: 1.6rem;
  }

  .cv-item {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0.65rem 0;
  }

  .cv-period {
    font-size: 0.875rem;
  }
}
