/* 기본 스타일 초기화 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', 'Noto Sans KR', sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: #333;
    transition: color 0.2s;
}

a:hover {
    color: #c97b8e;
}

/* 헤더 (상단 로고 & 메뉴) */
.site-header {
    background-color: #fff;
    border-bottom: 1px solid #e1e4e8;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-wrap {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    flex-wrap: wrap;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #4a4a4a;
    letter-spacing: -1.5px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

.main-nav li {
    margin-left: 20px;
    margin-top: 5px;
}

.main-nav a {
    font-size: 18px;
    font-weight: 500;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover {
    border-bottom: 2px solid #c97b8e;
}

/* 메인 컨텐츠 래퍼 */
.content-wrap {
    max-width: 1600px;
    margin: 40px auto;
    padding: 0 20px;
}

/* 본문 영역 */
.main-content {
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.main-content h1 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #2c3e50;
}

.main-content h3 {
    font-size: 20px;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #34495e;
}

.main-content p {
    margin-bottom: 15px;
}

/* === Members 드롭다운 메뉴 디자인 === */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    font-size: 18px;
    font-weight: 500;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    font-size: 16px;
    border-bottom: 1px solid #f1f1f1;
}

.dropdown-content a:hover {
    background-color: #fafafa;
    color: #c97b8e;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown:hover .dropbtn {
    border-bottom: 2px solid #c97b8e;
}

/* === index.html 이미지만 크게 가운데 정렬 === */
.main-content-image-only {
    text-align: center;
    padding: 20px;
}

.main-content-image-only img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* === Intro 페이지 전용 디자인 === */
.intro-main-title {
    font-size: 28px; 
    font-weight: bold;
    margin-bottom: 30px;
    color: #2c3e50;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    text-align: center;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.intro-top-text {
    text-align: center;
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 100px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.research-field {
    text-align: center; 
    font-size: 18px;
    line-height: 1.8;
    max-width: 1200px;
    margin: 0 auto;
}

.research-field h3 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 30px;
    color: #2c3e50;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.field-title {
    font-size: 18px;
    font-weight: bold;
    color: #34495e;
    margin-top: 25px;
    margin-bottom: 10px;
}

.research-field ul {
    list-style: none;
    padding-left: 0;
}

.research-field li {
    margin-bottom: 5px;
    color: #555;
}

.intro-image {
    width: 100%;
    max-width: 1200px;
    height: auto;
    display: block;
    margin: 50px auto 60px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* === PI 이력서 디자인 추가 === */
.pi-photo img {
    width: 350px; 
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.pi-contact {
    list-style: none;
    padding: 0;
    margin-top: 20px;
    margin-bottom: 70px; 
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.cv-section-title {
    font-size: 20px;
    margin-top: 100px; 
    margin-bottom: 0px;
    color: #2c3e50;
    border-left: 4px solid #c97b8e;
    padding-left: 10px;
    line-height: 1.2; 
    padding-top: 4px; 
    padding-bottom: 4px; 
}

.cv-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 50px; 
    margin-top: 30px; 
}

.cv-list li {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #555;
}

.cv-date {
    display: inline-block;
    width: 180px; 
    font-weight: bold;
    color: #333;
    margin-right: 10px;
}

.dissertation {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    font-size: 15px;
    margin-top: 10px;
    line-height: 1.8;
    color: #555;
}

/* 푸터 */
.site-footer {
    padding: 30px 0;
    text-align: center; 
    border-top: 1px solid #e1e4e8;
    margin-top: 60px;
    font-size: 14px;
    color: #777;
}

/* === Teaching 페이지 디자인 추가 === */
.teaching-layout {
    max-width: 1000px;
    margin: 0 auto;
    text-align: left;
}

.teaching-main-title {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 50px;
    text-align: center;
}

.semester-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    border-left: 4px solid #c97b8e;
    padding-left: 10px;
    margin-top: 60px;
    margin-bottom: 70px;
    line-height: 1.2;
    padding-top: 4px;
    padding-bottom: 4px;
}

.course-item {
    margin-bottom: 20px; 
    padding-bottom: 15px; 
    border-bottom: 1px solid #eee;
}

.course-item:last-child {
    border-bottom: none;
}

.course-name {
    font-size: 16px; 
    font-weight: 700; 
    color: #34495e;
    margin-bottom: 15px;
}

.course-desc {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 15px;
}

.course-desc-en {
    font-size: 15px;
    line-height: 1.8;
    color: #888;
    font-style: italic;
}

/* === Research Paper 페이지 디자인 === */
.paper-list {
    list-style: none; 
    padding: 0;
}

.paper-item {
    position: relative; 
    margin-bottom: 30px;
    padding-bottom: 20px;
    padding-left: 25px; 
    border-bottom: 1px solid #eee;
    line-height: 1.8;
    color: #555;
    font-size: 16px;
}

.paper-item::before {
    content: "•"; 
    position: absolute;
    left: 0;
    top: 0;
    color: #c97b8e; 
    font-size: 24px; 
    line-height: 1.2;
}

.paper-item:last-child {
    border-bottom: none;
}

/* === Presentation 탭 디자인 === */
.tab-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    border-bottom: 2px solid #eee;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    font-size: 18px;
    cursor: pointer;
    color: #777;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-family: 'Arial', sans-serif;
}

.tab-btn.active {
    color: #c97b8e;
    border-bottom: 2px solid #c97b8e;
    font-weight: bold;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* === 프레젠테이션/특허 리스트 디자인 === */
.presentation-list {
    list-style: none;
    padding: 0;
}

.presentation-item {
    position: relative;
    margin-bottom: 30px;
    padding-bottom: 20px;
    padding-left: 25px;
    border-bottom: 1px solid #eee;
    line-height: 1.8;
    color: #555;
    font-size: 16px;
}

.presentation-item::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
    color: #c97b8e;
    font-size: 24px;
    line-height: 1.2;
}

/* 하단 페이지 번호 버튼 디자인 */
.pagination {
    text-align: center;
    margin-top: 50px;
}

.pagination button {
    background-color: #fff;
    border: 1px solid #ddd;
    color: #333;
    padding: 8px 16px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 16px;
    transition: all 0.2s;
}

.pagination button:hover {
    background-color: #f1f1f1;
}

.pagination button.active {
    background-color: #c97b8e;
    color: white;
    border-color: #c97b8e;
}

/* === Research 페이지 Funded Projects 리스트 디자인 === */
.funded-list {
    list-style: none;
    padding: 0;
}

.funded-item {
    position: relative;
    margin-bottom: 30px;
    padding-bottom: 20px;
    padding-left: 25px;
    border-bottom: 1px solid #eee;
    line-height: 1.8;
    color: #555;
    font-size: 16px;
}

.funded-item::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
    color: #c97b8e;
    font-size: 24px;
    line-height: 1.2;
}

.funded-item:last-child {
    border-bottom: none;
}

/* === Research Projects 9칸 격자 디자인 === */
.project-grid-9 {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 25px; 
    margin-top: 25px;
}

.project-card-9 {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s;
    background: #fff;
}

.project-card-9:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.project-card-9 img {
    width: 100%;
    aspect-ratio: 4/3; 
    object-fit: cover;
    display: block;
}

.project-info-9 {
    padding: 15px;
    text-align: center;
    background: #fff;
}

.project-info-9 h3 {
    font-size: 16px;
    color: #34495e;
    margin: 0;
}

@media (max-width: 768px) {
    .project-grid-9 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .project-grid-9 {
        grid-template-columns: 1fr;
    }
}

/* === 프로젝트 팝업창(Modal) 디자인 === */
.modal {
    display: none; 
    position: fixed;
    z-index: 10000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6); 
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex; 
}

.modal-content {
    background-color: #fff;
    padding: 40px;
    border-radius: 12px;
    width: 80%;
    max-width: 1200px; 
    max-height: 80vh; 
    overflow-y: auto; 
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: modalFadeIn 0.3s; 
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 30px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close-btn:hover {
    color: #c97b8e; 
}

.modal-content h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #2c3e50;
}

.modal-content p {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 15px;
}

.hidden-content {
    display: none;
}

/* === Student Researchers 페이지 디자인 === */
.student-section-title {
    font-size: 24px;
    margin-top: 60px;
    margin-bottom: 30px;
    color: #2c3e50;
    border-left: 4px solid #c97b8e;
    padding-left: 10px;
    line-height: 1.2;
    padding-top: 4px;
    padding-bottom: 4px;
}

.student-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.student-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.student-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.student-card img {
    width: 100%;
    aspect-ratio: 3/4; 
    object-fit: cover; 
    display: block;  
}

.student-info {
    padding: 20px;
}

.student-info h3 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 5px;
}

.student-info p {
    font-size: 16px;
    color: #888;
}

/* === 팝업창 메인 사진 크기 살짝 줄이기 === */
#modal-body > img {
    width: 80% !important; 
    margin: 0 auto 20px auto !important; 
    display: block !important;
}

/* === 팝업창 내 추가 사진 갤러리 디자인 (가로/세로 대응) === */
.modal-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 기본 2열 정렬 (세로 사진용) */
    gap: 50px 20px; /* <--- 위아래 50px, 좌우 20px로 변경! */
    margin-top: 30px;
    max-width: 80%; /* 전체 갤러리 크기 제한 */
    margin-left: auto;
    margin-right: auto;
}

.modal-gallery img {
    width: 100%;
    height: auto; /* 원본 비율 유지 (짤리지 않음) */
    border-radius: 8px;
    display: block;
    margin-bottom: 10px;
}

/* 가로로 긴 사진은 무조건 한 줄 전체를 차지하도록 설정 */
.modal-gallery img.wide {
    grid-column: 1 / -1; 
}

/* ========================================
   Special Collection Popup
======================================== */

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: rgba(0, 0, 0, 0.45);

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 9999;

    padding: 20px;
    box-sizing: border-box;
}

.popup-box {
    width: 950px;
    max-width: 95vw;

    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;

    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.30);
}
/* desktop에서만 조금 더 크게 */
@media (min-width: 1024px) {
    .popup-box {
        width: 1020px;
    }
}
.popup-image-link {
    display: block;
}

.popup-image {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
}

.popup-buttons {
    height: 48px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;

    padding: 0 22px;
    background: #ffffff;
    border-top: 1px solid #e5e5e5;

    font-size: 14px;
}

.popup-buttons button {
    background: none;
    border: none;
    padding: 5px 8px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
}

.popup-buttons button:hover {
    color: #005aa9;
}

.popup-divider {
    color: #cccccc;
}

@media (max-width: 768px) {
    .popup-overlay {
        padding: 12px;
    }

    .popup-box {
        width: 100%;
        max-width: 100%;
    }

    .popup-buttons {
        height: 45px;
        padding: 0 12px;
        font-size: 13px;
    }

    .popup-buttons button {
        font-size: 13px;
        padding: 5px 6px;
    }
}

/* === Home 메인 이미지 === */

.home-main {
    width: 100%;
    display: flex;
    justify-content: center;
    background: #fff;
}

.main-image {
    width: 100%;
    height: auto;
    display: block;
}
