/* =======================================================
    IIC Lab Website Style - University & Professional Theme
   ======================================================= */

/* 1. 글로벌 스타일 및 변수 정의
------------------------------------------------------- */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
    --bg-color: #F8F9FA;
    --card-bg: #FFFFFF;
    --text-color: #212529;
    --text-muted: #495057;
    --accent-color: #0056b3; /* 신뢰감을 주는 짙은 파란색 */
    --accent-darker: #004085;
    --accent-light: #e6f0ff;
    --border-color: #DEE2E6;
    --shadow-color: rgba(0, 0, 0, 0.07);
    --font-primary: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background: linear-gradient(rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.96)), url('https://images.unsplash.com/photo-1550751827-4bd374c3f58b?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.7;
    word-break: keep-all;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

/* 2. 레이아웃
------------------------------------------------------- */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 80px;
    width: auto;
    object-fit: contain;
}

.nav-link {
    color: var(--text-muted);
    font-weight: 700;
    font-size: 1.5rem;
    margin-left: 1.75rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-color);
    background-color: var(--accent-light);
}

.main {
    padding: 4rem 0;
}

.footer {
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 4rem;
    background-color: #343a40;
    color: #adb5bd;
    font-size: 0.9rem;
    line-height: 1.8;
}
.footer strong {
    color: #f8f9fa;
}

/* 3. 섹션 공통 스타일
------------------------------------------------------- */
.section {
    padding: 4rem 0;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 3.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

/* 4. 개별 섹션 스타일
------------------------------------------------------- */

/* --- Hero Section --- */
.hero {
    padding: 6rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 3rem;
}

.auth-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.btn {
    font-weight: 600;
    display: inline-block;
    border: 1px solid transparent;
    padding: 0.8rem 1.6rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.btn-primary {
    background: var(--accent-color);
    color: #fff;
}
.btn-primary:hover {
    background-color: var(--accent-darker);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.btn-secondary {
    background-color: var(--card-bg);
    color: var(--text-muted);
    border-color: var(--border-color);
}
.btn-secondary:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.user-info .welcome-text {
    font-weight: 600;
    margin-right: 1rem;
}

/* --- About Section --- */
#about {
    background-color: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 8px 30px var(--shadow-color);
}

#about .section-title {
    text-align: left;
}
#about .section-title::after {
    left: 0;
    transform: translateX(0);
}

.about-content {
    display: flex;
    gap: 4rem;
    align-items: center;
}

.about-text {
    flex: 1.5;
    font-size: 1.1rem;
    line-height: 1.9;
}

.stats {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-item {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.stat-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

.stat-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* --- Research Section (UPDATED FOR IMAGES) --- */
.research-item {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-bottom: 4rem;
}
.research-item:last-child {
    margin-bottom: 0;
}
.research-item.reverse {
    flex-direction: row-reverse;
}

.research-text {
    flex: 1;
}

.research-text h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.research-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
}

.research-card {
    flex-shrink: 0;
    width: 280px;
    height: 200px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: all 0.3s ease;
    overflow: hidden; /* 이미지가 카드를 벗어나지 않도록 설정 */
}
.research-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: var(--accent-color);
}

.research-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 이미지가 카드 비율에 맞게 잘리면서 꽉 차도록 설정 */
    display: block;
}

/* --- News Section (UPDATED) --- */
.news-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px var(--shadow-color);
}

.news-item {
    display: flex;
    align-items: center;
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}
.news-item:last-child {
    border-bottom: none;
}
.news-item:hover {
    background-color: var(--accent-light);
    transform: translateX(8px);
}

.news-item a {
    display: flex;
    align-items: center;
}

.news-date {
    flex-shrink: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-color);
}

.news-content {
    font-weight: 500;
    padding-left: 2rem;
}

/* 5. 반응형 디자인
------------------------------------------------------- */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
    }
    .research-item, .research-item.reverse {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .section-title {
        font-size: 1.8rem;
    }
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .nav {
        display: none;
    }
    .news-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .news-content {
        padding-left: 0;
    }
