/* =============================
   style.css - 신상원 교수 소개 페이지 전용
   ============================= */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

body {
  font-family: 'Noto Sans KR', sans-serif;
  margin: 0;
  background: linear-gradient(
  to bottom,
  #004a98 0%,
  #004a98 20%,
  #f9f5e7 70%,
  #007b6e 100%
  );
  color: #222;
  line-height: 1.6;
}

header {
  text-align: center;
  background: rgba(0, 74, 152, 0.95);
  color: white;
  padding: 2.5rem 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

header h1 {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 700;
}

header p {
  margin: 0.4rem 0;
  font-weight: 400;
  font-size: 0.85rem;
}

.eng {
  font-size: 0.7rem;
}

section {
  max-width: 960px;
  margin: 1.2rem auto 2rem auto;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

section h2 {
  color: #004a98;
  border-left: 6px solid #007b6e;
  padding-left: 10px;
  font-size: 1.4rem;
  margin-top: 0;
  margin-bottom: 1rem;
}

p {
  margin: 0.5rem 0;
  font-size: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.95rem;
  background-color: #fff;
}

td {
  border: 1px solid #ccc;
  padding: 0.7rem;
  text-align: left;
  vertical-align: top;
}

th {
  border: 1px solid #ccc;
  padding: 0.7rem;
  text-align: center;
  vertical-align: center;
  background-color: #004a98;
  color: #fff;
  font-weight: 600;
}

tr:nth-child(even) {
  background-color: #f6f6f6;
}

table td a {
  color: #3a75ce;
  text-decoration: none;
}

table td a:hover {
  color: #145fce;
  font-weight: bold;
  text-decoration: none;
}

.view-icon {
  margin-left: 6px;
  font-size: 0.85em;
  font-weight: 1000;
  color: #004a98;
}

a {
  color: #e8e8e8;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

footer {
  text-align: center;
  background-color: #007b6e;
  color: white;
  padding: 1.5rem 1rem;
  margin-top: 3rem;
  letter-spacing: 0.5px;
}

footer p {
  color: white;          /* 밝은 회색 계열 (흰색에 가까움) */
  text-decoration: none;
  font-size: 0.8rem;
}

footer a {
  color: #e8e8e8;          /* 밝은 회색 계열 (흰색에 가까움) */
  text-decoration: none;
}

footer a:hover {
  color: #ffffff;           /* 마우스 올렸을 때 완전 흰색 */
  text-decoration: underline;
}

/* ---------- 교수 소개 사진 스타일 추가 ---------- */
.photo-box {
  text-align: center;
  flex: 0 0 200px;
}

.photo-box img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;         /* 동그랗게 */
  border: 4px solid #004a98;  /* 부산대 파란색 테두리 */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  margin-bottom: 1rem;
}

/* ---------- 소개 섹션 레이아웃 (데스크톱: 오른쪽, 모바일: 상단) ---------- */
.intro-container {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.photo-box {
  flex: 0 0 180px;
  order: 2;                 /* 데스크톱에서는 오른쪽 */
  text-align: center;
}

.intro-text {
  flex: 1;
  order: 1;
  min-width: 250px;
}

/* ---------- 모바일 반응형 (사진 상단 배치) ---------- */
@media screen and (max-width: 768px) {
  .intro-container {
    flex-direction: column;
    align-items: center;
  }
  .photo-box {
    order: 1;               /* 모바일에서는 위로 */
    margin-bottom: 1rem;
    text-align: center;
  }
  .intro-text {
    order: 2;
  }

  /* 기존 반응형 내용도 그대로 유지 */
  body {
    font-size: 0.95rem;
  }
  header h1 {
    font-size: 1.5rem;
  }
  section {
    margin: 1rem;
    padding: 1.2rem;
  }
  table, th, td {
    font-size: 0.85rem;
  }
  th, td {
    padding: 0.5rem;
  }
}

.teaching table {
  font-size: 0.9rem;
  word-break: keep-all;
}

/* =======================================
   Navigation Bar (Soft Blue Card + Tabs)
   ======================================= */
/* 네비바 전용 */
.nav-section {
  background: transparent;
  margin: 0;
  padding: 0.6rem 0 0.5rem 0;
  display: flex;
  justify-content: center;   /* 중앙정렬 */
}

/* nav-wrapper → 너비를 section과 같은 중앙 기준으로 */
.nav-wrapper {
  width: 100%;
  max-width: 960px;          /* ⚡ section과 동일한 중앙 폭 */
  margin: 0 auto;            /* 가운데 배치 */
  padding: 2px;                       /* ★ 버튼 외곽 2px 여백 */
  background: #ffffff;                /* ★ 흰색 테두리처럼 보이게 하는 핵심 */
  border-radius: 6px;                 /* 자연스러운 카드 느낌 */
  box-shadow: 0 3px 12px rgba(0,0,0,0.18);  /* ★ 은은한 그림자 */
  display: flex;
  justify-content: center;
}

/* Navigation Bar (Grid) */
.top-nav {
  background: #e9f3ff;
  width: 100%;                /* 부모(960px) 기준으로 꽉 채움 */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  border-radius: 4px;
  padding: 0;
  margin: 0;
  overflow: hidden;
}

/* 버튼 스타일 */
.top-nav .nav-item {
  background: #78aeea;
  color: white;
  padding: 0.7rem 0;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 0;
  text-decoration: none;
  border-right: 1px solid rgba(255,255,255,0.4);
}

.top-nav .nav-item:last-child {
  border-right: none;
}

/* 활성 탭 */
.top-nav .nav-item.active {
  background: #007b6e;
}

/* Hover */
.top-nav .nav-item:hover {
  background: #5d95d3;
}

/* 모바일 */
@media (max-width: 600px) {
  .top-nav {
    grid-template-columns: 1fr 1fr; /* 작은 화면은 2열 */
  }
  .top-nav .nav-item:nth-child(1),
  .top-nav .nav-item:nth-child(2) {
    border-bottom: 1px solid rgba(255,255,255,0.5);
  }
}

@media (max-width: 400px) {
  .top-nav {
    grid-template-columns: 1fr; /* 매우 좁으면 1열 */
  }
}


/* 연구과정 소속 연구자 테이블 열 너비 & 정렬*/
.researcher table th:nth-child(1),
.researcher table td:nth-child(1) {
  width: 80px;              /* 이름 */
  text-align: center;
  white-space: nowrap;
}

.researcher table th:nth-child(2),
.researcher table td:nth-child(2) {
  width: 50px;              /* 기수 */
  text-align: center;
  white-space: nowrap;
}

.researcher table th:nth-child(3),
.researcher table td:nth-child(3) {
  width: 70px;              /* 시작연도 */
  text-align: center;
  white-space: nowrap;
}

.researcher table th:nth-child(4),
.researcher table td:nth-child(4) {
  text-align: center;       /* 연구주제 가운데 정렬 */
  word-break: keep-all;
  line-height: 1.4;
}

.researcher table th:nth-child(5),
.researcher table td:nth-child(5) {
  width: 80px;              /* 현황 */
  text-align: center;
  white-space: nowrap;
}

.researcher table th:nth-child(6),
.researcher table td:nth-child(6) {
  width: 80px;              /* 논문 */
  text-align: center;
}

.researcher table td:nth-child(6) a {
  display: block;            /* 줄바꿈 강제 */
  margin-top: 4px;
}


/* ===== 연구자 테이블 모바일 최적화 ===== */
@media (max-width: 600px) {

  /* 고정 폭 제거 */
  .researcher table th,
  .researcher table td {
    width: auto !important;
    white-space: normal !important;
  }

  /* 테이블이 넘치면 가로 스크롤 허용 */
  .researcher table {
    display: block;
    overflow-x: auto;
  }

  /* 연구주제는 모바일에서는 좌측 정렬이 가독성 좋음 */
  .researcher table td:nth-child(4) {
    text-align: left !important;
    word-break: break-word;
    white-space: normal;
  }

  /* '현황', '기수', '이름' 등은 가운데 정렬 유지 */
  .researcher table td:nth-child(1),
  .researcher table td:nth-child(2),
  .researcher table td:nth-child(3),
  .researcher table td:nth-child(5),
  .researcher table td:nth-child(6) {
    text-align: center;
  }
}


.research table td {
  text-align: center;
  white-space: normal;
  word-break: break-word;  /* 긴 단어/묶음도 강제로 줄바꿈 */
  hyphens: auto;
}

.thesis-section table td {
  text-align: center;
  white-space: normal;
  word-break: break-word;  /* 긴 단어/묶음도 강제로 줄바꿈 */
  hyphens: auto;
}

/* ============================
   의서습독살롱 독립 섹션 스타일
   ============================ */
.salon {
  max-width: 960px;
  margin: 2rem auto;
  padding: 2rem 1.5rem;
  background: rgba(255,255,255,0.75);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.salon h2 {
  text-align: left;
  color: #004a98;
  border-left: 6px solid #007b6e;
  padding-left: 12px;
  margin-bottom: 1.5rem;
  font-size: 1.35rem;
}

.salon-poster-box {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.salon-poster-box img {
  width: 100%;
  max-width: 600px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  object-fit: cover;
}
