/* 기본 초기화 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    width: 85%;
    max-width: 1200px;
    margin: 0 auto;
}

/* 헤더 스타일 */
header {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 로고 영역 레이아웃 */
.logo-area {
    display: flex;
    align-items: center;
    text-decoration: none; /* 링크 밑줄 제거 */
    gap: 15px; /* 로고와 텍스트 사이 간격 */
}

.logo-img {
    height: 45px; /* 로고 크기 살짝 조정 */
    width: auto;
}

.lab-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #003366; /* JBNU 상징색 혹은 네이비 톤 */
    letter-spacing: -0.5px;
}

/* 메뉴 항목 간격 조정 */
.nav-links {
    list-style: none;
    display: flex;
    gap: 25px; /* 메뉴 사이 간격 */
}

.nav-links a {
    text-decoration: none;
    color: #444;
    font-size: 1.15rem;
    font-weight: 500;
    /* text-transform: uppercase; 메뉴를 깔끔하게 대문자로 표기 */
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #200066;
}


/* 히어로 섹션 스타일 */
.hero {
    background: linear-gradient(145deg, #021027 0%, #051937 100%);
    padding: 50px 0;
    text-align: center;
    color: #ffffff;
    margin-bottom: 30px;
}

.hero h1 {
    font-size: 3.2rem;   /* <--- 이 수치를 키우거나 줄이세요 (예: 3.5rem, 4.0rem) */
    font-weight: 700;
    margin-bottom: 10px;
}

.univ-tag {
    font-size: 1.2rem;   /* <--- 이 수치를 수정하세요 (예: 1.1rem, 1.4rem) */
    font-weight: 400;
    color: #ffffff;      /* 이전에 설정한 포인트 컬러 */
    letter-spacing: 1px;
}

.description-container {
    /* max-width: 1000px; */
    margin: 0 auto;
    padding: 35px 25px 0;
    border-top: 1px solid rgba(100, 255, 218, 0.2); /* 포인트 컬러 투명도 조절 */
}

.hero-description {
    font-size: 1.4rem;
    line-height: 1.9; /* 가독성을 위해 줄 간격 소폭 확대 */
    color: #ccd6f6;
    font-weight: 300;
    
    /* 핵심: 양쪽 끝 정렬 및 마지막 줄 중앙 정렬 */
    text-align: justify;
    text-justify: inter-word; /* 단어 사이 간격을 조절해 끝선을 맞춤 */
    text-align-last: center;   /* 마지막 줄만 중앙으로 */
    
    /* 단어 단위로 줄바꿈하여 한 단어가 잘리는 현상 방지 */
    word-break: keep-all; 
}

/* 강조 텍스트(strong) 스타일 세련되게 수정 */
.hero-description strong {
    color: #ffffff; /* 포인트 컬러로 강조 */
    font-weight: 500;
    text-decoration: none; /* 밑줄 대신 부드러운 배경 강조 효과 */
    /* background: rgba(100, 255, 218, 0.1);  */
    /* padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.3s ease; */
}

.hero-description strong:hover {
    background: rgba(100, 255, 218, 0.2);
    color: #ffffff;
}

/* 뉴스 섹션 스타일 */
.news {
    padding: 50px 0;
}

.news h2 {
    border-bottom: 2px solid #003366;
    display: inline-block;
    margin-bottom: 20px;
}

.news ul {
    list-style: none;
}

.news li {
    font-size: 1.2rem; 
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #ddd;
}

.research-summary p {
    margin-bottom: 30px;
    font-size: 1.2rem; 
    line-height: 1.6;
    color: #333;
    font-weight: 400;
    word-break: keep-all;
}

.research-pillars h2 {
    border-bottom: 2px solid #003366;
    display: inline-block;
    margin-bottom: 20px;    
}

.research-pillars {
    padding: 0px 0;
    margin-bottom: -20px;    
}

.research-summary strong {
    color: #003366; /* DAS Lab 메인 컬러 */
    font-weight: 700;
}


/* Home  */
.pillar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    /* margin-top: 30px; */
}

.pillar-card {
    text-align: left; /* 요약은 중앙 정렬이지만 카드는 좌측 정렬이 가독성에 좋습니다 */
    background: #fff;
    padding: 40px 30px;
    border-radius: 12px;
    border: 1px solid #eee;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.pillar-card:hover {
    transform: translateY(-10px);
    border-color: #003366;
}

.pillar-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.pillar-card h3 {
    color: #003366;
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.sub-pillar {
    margin-bottom: 20px;
}

.ai-security-card {
    text-align: left; /* 리스트 가독성을 위해 좌측 정렬 추천 */
}

.pillar-image {
    width: 100%;
    /* 원하는 높이로 고정합니다. 이 값을 조절해서 맞춰보세요. */
    height: 250px; 
    
    /* 이미지가 이 영역 밖으로 나가는 것을 방지합니다 */
    overflow: hidden; 
    
    /* 이미지와 텍스트 사이 경계선 (선택사항) */
    border-bottom: 1px solid #eee; 

    /* 이미지를 가운데 정렬하기 위한 Flex 설정 */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9; /* 이미지가 작을 때 보일 배경색 */
}

.pillar-image img {
    width: 100%;
    height: 100%;
    
    /* 핵심: 비율을 유지하면서 박스 안에 모두 보이게 맞춤 */
    object-fit: contain; 
    
    /* 만약 이미지를 꽉 채우고 넘치는 부분은 잘라도 된다면 아래 주석을 해제하고 위를 주석 처리하세요 */
    /* object-fit: cover; */
}

.sub-pillar h4 {
    color: #003366;
    font-size: 1.2rem;
    margin: 15px 0 8px 0;
    border-left: 3px solid #003366;
    padding-left: 10px;
}

.detail-list {
    list-style: none;
    padding-left: 15px;
}

.detail-list li {
    font-size: 1.2rem;
    color: #555;
    position: relative;
    margin-bottom: 5px;
}

.detail-list li::before {
    content: "•";
    color: #003366;
    font-weight: bold;
    display: inline-block; 
    width: 1em;
    margin-left: -1em;
}

/* News List Styling */
.news-list {
    list-style: none;
    padding: 0;
}

.news-list li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.news-list .date {
    font-weight: 700;
    color: #003366;
    margin-right: 15px;
}
/* ============================================================
   TEAM PAGE STYLES (교수님 및 팀원 섹션)
   ============================================================ */


/* 섹션 타이틀 */
.section-title {
    font-size: 2.3em;
    font-weight: bold;
    color: #000000;
}


/* 교수님 카드 레이아웃 (가로 정렬) */
.pi-card {
    background: #fff;
    padding: 40px;
    border: 1px solid #eee;
    border-radius: 12px;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.pi-header {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    padding-bottom: 30px;
    /* border-bottom: 1px solid #f5f5f5;  */
    margin-bottom: px;
}

/* 경력/학력 제목 강조 */
.pi-details h4 {
    color: #003366;
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-left: 4px solid #003366;
    padding-left: 10px;
}

/* 교수님 사진 크기 조절 */
.pi-image img {
    width: 300px;       /* 사진 너비 고정 */
    height: auto;
    border-radius: 8px; /* 살짝 둥근 모서리 */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* 교수님 정보 텍스트 영역 */
.pi-info {
    flex: 1;
}

.pi-info h3 {
    font-size: 1.8rem;
    color: #002442;
    margin-bottom: 5px;
}

.pi-info h4 {
    color: #003366;
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-left: 4px solid #003366;
    padding-left: 10px;
}

.pi-title {
    font-size: 1.3em;
    font-weight: bold;
    color: #000000;
}

.pi-dept {
    color: #440055;
    font-weight: bold;
    margin-bottom: 15px;
}

.pi-email {
    color: #000000;
    font-weight: bold;
    /* margin-bottom: 15px; */
}

.pi-phone {
    color: #000000;
    font-weight: bold;
    margin-bottom: 15px;
}



/* 학력 리스트 스타일 */
.education-list {
    list-style: none;
    padding-left: 0;
}

.education-list li {
    position: relative;
    padding-left: 15px;
    margin-bottom: 10px;
    font-size: 1rem;
}

.education-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #003366;
}


.divider {
    margin: 50px 0;
    border: 0;
    border-top: 1px solid #eee;
}

/* Join Us Section 스타일 */
.join-us {
    /* padding: 60px 0; */
    text-align: center;
}

.join-box {
    background-color: #f8faff; /* 아주 연한 파란색 배경 */
    padding: 20px 20px;
    border-radius: 15px;
    border: 1px dashed #003366; /* 연구실 테마 컬러 점선 */
    /* max-width: 1000px; */
    margin: 0 auto;
    margin-bottom: 25px;
}

.join-box h2 {
    margin-bottom: 20px;
    color: #003366;
    border-bottom: none; /* 상단 타이틀과 차별화 */
}

.join-text {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 15px;
    word-break: keep-all;
}

.contact-info {
    font-size: 1.1rem;
    color: #555;
}

.email-link {
    color: #003366;
    font-weight: 700;
    text-decoration: underline;
    transition: color 0.3s;
}

.email-link:hover {
    color: #0055aa;
}

/* ============================================================
   STUDENTS SECTION STYLES
   ============================================================ */

/* 학위 과정 타이틀 (Ph.D., Master 등) */
.degree-title {
    font-size: 1.4rem;
    color: #003366;
    border-left: 4px solid #003366; /* 왼쪽에 강조선 */
    padding-left: 12px;
    margin: 40px 0 20px 0;
    font-weight: 700;
}

/* 학생들을 가로로 정렬하는 그리드 */
.student-grid {
    display: grid;
    /* 최소 200px 너비를 유지하며 남은 공간을 채움 (반응형) */
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px; /* 아이템 사이 간격 */
    margin-bottom: 20px;
}

/* 학생 개별 아이템 카드 */
.student-item {
    text-align: center; /* 텍스트 중앙 정렬 */
    background: #fff;
    padding: 20px;
    transition: transform 0.3s ease; /* 마우스 올렸을 때 효과 */
}

.student-item:hover {
    transform: translateY(-5px); /* 살짝 위로 올라가는 효과 */
}

/* 학생 사진 스타일 (원형) */
.student-item img {
    width: 150px;
    height: 150px;
    border-radius: 50%; /* 완전한 원형 */
    object-fit: cover; /* 사진이 일그러지지 않게 꽉 채움 */
    border: 3px solid #f0f0f0;
    margin-bottom: 15px;
}

/* 학생 이름 */
.student-info .name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

/* 관심 분야 */
.student-info .interest {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 3px;
    word-break: keep-all; /* 단어 단위 줄바꿈 */
}

/* 학생 이메일 */
.student-info .email {
    font-size: 0.8rem;
    color: #003366;
    text-decoration: none;
}


.professor-title {
    /* border-left: 4px solid #4a6212;  */
    font-size: 2rem;     /* 기존 1.4rem보다 크게 설정 */
    margin-top: 20px;    /* 상단 여백 조절 */
    color: #000000;      /* 색상을 조금 더 진하게 할 수도 있습니다 */
}

/* ============================================================
   PUBLICATION SECTION STYLES
   ============================================================ */

.pub-list {
    margin-bottom: 40px;
}

.pub-item {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.pub-item:hover {
    background-color: #fcfcfc;
}

.pub-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 5px;
}

.pub-authors {
    font-size: 1rem;
    color: #444;
}

.pub-authors strong {
    color: #003366; /* 본인 이름 강조 */
    text-decoration: underline;
}

.pub-venue {
    font-style: italic;
    color: #666;
    margin-top: 5px;
}

.pub-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 12px;
    background: #003366;
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 4px;
}

.pub-btn:hover {
    background: #0055aa;
}

.pub-desc {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
}

/* 저자 강조 스타일 */
.pub-authors strong {
    color: #003366;
    text-decoration: none;
    border-bottom: 2px solid #003366; /* 밑줄 대신 강조 포인트 */
}

.scholar-link {
    margin: 20px 0 30px 0;
    padding: 15px;
    background-color: #f0f7ff;
    border-radius: 8px;
    font-size: 1rem;
}

.scholar-link a {
    color: #003366;
    font-weight: 700;
    text-decoration: underline;
}

/* Gallery Page Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.gallery-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover; /* 사진 비율 유지하며 꽉 채움 */
    display: block;
}

.gallery-caption {
    padding: 12px;
    font-size: 0.9rem;
    text-align: center;
    color: #444;
    font-weight: 500;
}

/* 행사 날짜 헤더 스타일 */
.event-date-header {
    margin: 30px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.event-date-header h4 {
    color: #003366;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.event-date-header p {
    color: #777;
    font-size: 0.95rem;
}

/* Projects Page Styles */
.project-item {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
    align-items: flex-start;
    padding-bottom: 40px;
    border-bottom: 1px solid #eee;
}

.project-image {
    flex: 1;
    max-width: 450px;
}

.project-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid #eee;
}

.project-info {
    flex: 1.5;
}

.project-tag {
    display: inline-block;
    padding: 4px 10px;
    background-color: #003366;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 4px;
    margin-bottom: 5px;
}

.project-info h3 {
    font-size: 1.5rem;
    color: #111;
    margin-bottom: 15px;
    line-height: 1.3;
}

.project-meta {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.6;
}

.project-desc {
    font-size: 1rem;
    color: #444;
    line-height: 1.7;
    word-break: keep-all;
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .project-item {
        flex-direction: column;
    }
    .project-image {
        max-width: 100%;
    }
}

/* ============================================================
   RESPONSIVE STYLES (모바일 최적화)
   ============================================================ */

@media (max-width: 768px) {
    /* 1. 네비게이션 전체 정렬 */
    nav {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    /* 2. 메뉴 리스트를 격자(Grid) 형태로 변경 */
    .nav-links {
        display: grid;
        /* 화면을 가로로 3등분하여 꽉 채움 */
        grid-template-columns: repeat(3, 1fr); 
        width: 100%; /* 부모 너비에 맞춤 */
        gap: 10px;
        padding: 0;
        list-style: none;
    }

    .nav-links li {
        margin: 0;
        text-align: center; /* 텍스트 중앙 정렬 */
    }

    .nav-links a {
        display: block;
        padding: 10px 0;
        background: #f8f9fa; /* 버튼 같은 느낌을 주려면 배경 추가 (선택사항) */
        border-radius: 5px;
        font-size: 0.9rem;
        width: 100%;
    }

    .lab-name {
        display: block;
        text-align: center;
        line-height: 1.4;
        font-size: 1.1rem;
    }


    /* 3. 교수님(PI) 카드 (가로 -> 세로 정렬) */
    .pi-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
    }

    .pi-header {
        flex-direction: column; /* 사진과 글을 세로로 배치 */
        align-items: center;    /* 중앙 정렬 */
        text-align: center;
    }

    .pi-image img {
        width: 200px !important; /* 사진 크기를 시원하게 키움 */
        height: auto;
        margin-bottom: 20px;     /* 아래 글자와의 간격 */
    }

    /* 2. 히어로 섹션 띄어쓰기 문제 해결 (index.html) */
    .hero-description {
        /* 모바일에서는 양쪽 정렬(justify)을 해제해야 띄어쓰기가 안 깨집니다 */
        text-align: center !important; 
        text-justify: none !important;
        text-align-last: center !important;
        
        font-size: 1.1rem; /* 모바일 환경에 맞는 글자 크기 조정 */
        line-height: 1.6;
        word-break: keep-all; /* 단어 단위 줄바꿈 유지 */
    }

    /* 네이비 박스 안의 텍스트도 중앙 정렬 */
    .description-container {
        padding: 20px 15px;
    }
    
    .pi-info h3 {
        font-size: 1.5rem;
    }

    /* 4. 학생 그리드 (한 줄에 1~2명씩) */
    .student-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }

    .student-item img {
        width: 120px;
        height: 120px;
    }

    /* 5. 타이틀 크기 조정 */
    .section-title {
        font-size: 2rem;
    }

    /* 6. 논문 목록: 텍스트 줄바꿈 허용 */
    .pub-item {
        padding: 15px 0;
    }

    .pub-title {
        font-size: 1rem;
    }
}