/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #999;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
    max-width: 100vw;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 20px;
    gap: 0.5rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.nav-brand a {
    min-width: 0;
}

.nav-brand h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    white-space: nowrap;          /* Force 1 line on desktop */
    overflow: hidden;             /* Hide overflow */
    text-overflow: ellipsis;      /* Show ... if too long */
    max-width: 600px;             /* Prevent excessive width */
}

/* Desktop에서 br 숨김 */
.nav-brand h2 .mobile-break {
    display: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.nav-link:hover,
.nav-link.active {
    color: #666;
}

.nav-link i {
    font-size: 0.8rem;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: var(--shadow);
    border-radius: 8px;
    min-width: 180px;
    padding: 0.5rem 0;
    list-style: none;
    margin-top: 0;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
    display: block;
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.7rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background: var(--light-bg);
    color: var(--secondary-color);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* Sections */
.section {
    display: none;
    padding: 4rem 0;
    min-height: calc(100vh - 200px);
}

.section.active {
    display: block;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
}

/* Home Section - New Layout */
.home-section {
    padding: 0 !important;
}

/* Hero Banner with Background */
.home-hero-banner {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    background-size: cover;
    background-position: center;
    margin-bottom: 3rem;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    padding: 4rem 2rem;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content .intro-content {
    max-width: 800px;
    margin: 0 auto 2rem;
    font-size: 1.2rem;
    line-height: 1.8;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.intro-content p {
    margin-bottom: 0;
}

/* Admission Banner in Hero */
.admission-banner-hero {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--secondary-color);
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    font-weight: 600;
    font-size: 1.05rem;
}

.admission-banner-hero:hover {
    background: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.admission-banner-hero i {
    font-size: 1.3rem;
}

/* Two Column Layout */
.home-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.section-header-home {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.section-header-home h2 {
    font-size: 1.8rem;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.section-header-home i {
    color: #999;
}

.view-all-link {
    color: #999;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.view-all-link:hover {
    color: #666;
    transform: translateX(5px);
}

/* Home News List */
.home-news-section {
    display: flex;
    flex-direction: column;
}

.home-news-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    min-height: 400px;
}

.home-news-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--white);
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.home-news-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-hover);
}

.home-news-thumbnail {
    width: 100px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}

.home-news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-news-content {
    flex: 1;
}

.home-news-content h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.home-news-date {
    font-size: 0.85rem;
    color: #999;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Home Featured Image */
/* Featured Image Slider */
.home-featured-slider {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
}

.slider-container {
    position: relative;
    width: 100%;
    aspect-ratio: 6 / 4;
    overflow: hidden;
    background-color: #f5f5f5;
}

.slider-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #f5f5f5;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slider-image.active {
    opacity: 1;
}

.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.3s ease;
    border: 2px solid white;
}

.dot.active {
    background: white;
}

.dot:hover {
    background: rgba(255,255,255,0.8);
}

/* Latest Publications Bottom */
.home-publications-bottom {
    margin-bottom: 3rem;
}

.admission-banner-compact i.fa-graduation-cap {
    font-size: 1.5rem;
}

.admission-banner-compact i.fa-arrow-right {
    font-size: 0.9rem;
    opacity: 0.9;
}

.admission-banner-compact .banner-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.admission-banner-compact .banner-text strong {
    font-size: 1rem;
    font-weight: 600;
}

.admission-banner-compact .banner-text span {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Old Admission Banner (keeping for reference, not used) */
.admission-banner {
    background: linear-gradient(135deg, var(--secondary-color), #5dade2);
    border-radius: 12px;
    padding: 2rem;
    margin: 3rem 0;
    box-shadow: var(--shadow);
    display: none; /* Hidden by default */
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    color: var(--white);
}

.banner-content i {
    font-size: 3rem;
}

.banner-content h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.banner-content p {
    margin-bottom: 1rem;
    opacity: 0.95;
}

.btn-contact {
    display: inline-block;
    background: var(--white);
    color: var(--secondary-color);
    padding: 0.7rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.btn-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Publications Grid */
.home-publications {
    margin: 4rem 0;
}

.home-publications h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
}

.publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    grid-auto-rows: 1fr; /* All rows same height */
}

.publication-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.publication-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.pub-thumbnail {
    width: 100%;
    aspect-ratio: 6 / 4;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--light-bg);
}

.pub-content {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.pub-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pub-authors {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.pub-journal {
    font-size: 0.8rem;
    color: #999;
    font-style: italic;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 상단 면담 신청 배너 (얇고 눈에 띄게) */
.consultation-banner-top {
    margin: 2rem 0 2.5rem 0;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.4);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(255, 107, 107, 0.4);
    }
    50% {
        box-shadow: 0 6px 30px rgba(255, 107, 107, 0.6);
    }
}

.consultation-content-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1rem 2rem;
    color: white;
}

.consultation-banner-top .fa-calendar-check {
    font-size: 1.8rem;
    animation: bounce-icon 1s ease-in-out infinite;
}

@keyframes bounce-icon {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.consultation-text-top {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.consultation-btn-top {
    padding: 0.7rem 1.8rem;
    background: white;
    color: #ff6b6b;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.consultation-btn-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
    background: #fff5f5;
}

.consultation-btn-top:active {
    transform: translateY(-1px);
}

/* 기존 면담신청 배너 (하단용 - 삭제 예정) */
.consultation-banner {
    margin: 3rem 0 2rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.consultation-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    color: white;
}

.consultation-banner .fa-calendar-check {
    font-size: 3rem;
    opacity: 0.9;
}

.consultation-text {
    flex: 1;
}

.consultation-text h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.consultation-text p {
    margin: 0;
    opacity: 0.95;
    font-size: 1rem;
}

.consultation-btn {
    padding: 1rem 2rem;
    background: white;
    color: #667eea;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.consultation-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    /* 상단 배너 모바일 */
    .consultation-banner-top {
        margin: 1.5rem 0 2rem 0;
    }

    .consultation-content-top {
        flex-direction: column;
        gap: 1rem;
        padding: 1.2rem 1rem;
    }

    .consultation-text-top {
        font-size: 1rem;
        text-align: center;
    }

    .consultation-btn-top {
        width: 100%;
        justify-content: center;
        padding: 0.8rem 1.5rem;
    }

    /* 기존 배너 모바일 */
    .consultation-banner {
        padding: 2rem 1.5rem;
    }
    
    .consultation-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .consultation-banner .fa-calendar-check {
        font-size: 2.5rem;
    }
    
    .consultation-text h3 {
        font-size: 1.3rem;
    }
    
    .consultation-text p {
        font-size: 0.9rem;
    }
    
    .consultation-btn {
        width: 100%;
        justify-content: center;
    }
}

.pub-links {
    display: flex;
    gap: 1rem;
}

.pub-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.pub-link:hover {
    color: var(--primary-color);
}

.btn-more {
    display: inline-block;
    margin: 0 auto;
    padding: 0.8rem 2rem;
    background: var(--secondary-color);
    color: var(--white);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    text-align: center;
    display: block;
    width: fit-content;
}

.btn-more:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

/* Research Section */
.research-item {
    margin-bottom: 4rem;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.research-item:hover {
    box-shadow: var(--shadow-hover);
}

.research-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.research-content {
    padding: 2rem;
}

.research-content h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.research-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

/* Members Section */
.member-category {
    margin-bottom: 4rem;
}

.category-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--secondary-color);
}

/* PI Layout (Professor + Introduction) */
.pi-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 3rem;
    align-items: start;
}

.pi-introduction {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--secondary-color);
}

.pi-introduction h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.pi-introduction p {
    font-size: 1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 1rem;
    white-space: pre-wrap;
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 3rem;
}

.member-card {
    text-align: center;
    transition: var(--transition);
}

.member-card:hover {
    transform: translateY(-5px);
}

.member-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.5rem;
    border: 4px solid var(--secondary-color);
    box-shadow: var(--shadow);
}

.member-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.member-position {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1rem;
}

.member-bio {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    text-align: left;
}

.member-bio p {
    margin-bottom: 0.5rem;
}

.member-email {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-top: 0.5rem;
}

/* Publications List */
.publications-list {
    max-width: 900px;
    margin: 0 auto;
}

/* ── Publications Filter Bar ── */
.pub-filter-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto 2rem auto;
    flex-wrap: wrap;
}

.pub-year-select-wrap {
    flex-shrink: 0;
}

.pub-year-select {
    padding: 0.55rem 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #333;
    background: #fff;
    cursor: pointer;
    min-width: 130px;
    appearance: auto;
}

.pub-year-select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(52,152,219,0.15);
}

.pub-search-wrap {
    flex: 1;
    min-width: 220px;
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.pub-search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.55rem 1rem;
    font-size: 0.95rem;
    color: #333;
    background: transparent;
}

.pub-search-btn {
    background: none;
    border: none;
    padding: 0.55rem 0.9rem;
    cursor: pointer;
    color: #888;
    font-size: 1rem;
    transition: color 0.2s;
}

.pub-search-btn:hover { color: var(--secondary-color); }

.publication-item {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.publication-item:hover {
    box-shadow: var(--shadow-hover);
}

/* Publication Layout with Thumbnail */
.pub-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.pub-thumbnail-container {
    flex-shrink: 0;
    width: 200px;
    aspect-ratio: 6 / 4;
}

.pub-thumbnail-large {
    width: 100%;
    aspect-ratio: 6 / 4;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    object-fit: contain;
    background-color: #f5f5f5;
}

.pub-thumbnail-img {
    width: 100%;
    aspect-ratio: 6 / 4;
    object-fit: contain;
    border-radius: 8px;
    background-color: #f5f5f5;
    display: block;
}

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

.pub-details .pub-title {
    margin-bottom: 0.8rem;
}

.pub-details .pub-authors {
    margin-bottom: 0.5rem;
}

.pub-details .pub-journal {
    margin-bottom: 1rem;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    background: #f5f5f5;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-hover);
}

.gallery-image {
    width: 100%;
    aspect-ratio: 6 / 4;
    object-fit: contain;
    display: block;
    background-color: #f5f5f5;
}

.gallery-caption {
    padding: 1rem;
    background: var(--white);
    font-size: 0.95rem;
    color: #555;
}

/* Equipment Grid - 3열 */
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.equipment-grid .gallery-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-hover);
}

/* ============================================================
   Position Section
   ============================================================ */

/* 카테고리 헤더 */
.position-category-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 2.5rem 0 1.2rem 0;
    padding: 0.75rem 1.4rem;
    background: linear-gradient(135deg, #2c3e50 0%, #3d5166 100%);
    border-radius: 8px;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(44,62,80,0.25);
}

.position-category-header span {
    color: #000;
}

.position-category-header i {
    font-size: 1.1rem;
}

/* 개별 카드 */
.position-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.09);
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border-left: 4px solid #3498db; /* JS에서 color로 override */
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.position-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.13);
    transform: translateY(-2px);
}

/* 카드 내부 레이아웃 */
.position-card-flex {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.position-card-img-wrap {
    flex: 0 0 260px;
    width: 260px;
    align-self: flex-start;
}

.position-card-text {
    flex: 1;
    min-width: 0;
}

.position-card-title {
    margin: 0 0 0.85rem 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.35;
}

.position-card-desc {
    font-size: 0.97rem;
    line-height: 1.75;
    color: #444;
    word-break: break-word;
}

.position-card-desc ul,
.position-card-desc ol {
    padding-left: 1.4rem;
    margin: 0.5rem 0;
}

.position-card-desc li {
    margin-bottom: 0.35rem;
}

/* Position 섹션 전용 */
.position-section #positionContent {
    max-width: 900px;
    margin: 0 auto;
}

/* 카드 desc 내부 표 스타일 */
.position-card-desc table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: 0.93rem;
}

.position-card-desc table th,
.position-card-desc table td {
    border: 1px solid #ddd;
    padding: 0.5rem 0.75rem;
    text-align: left;
}

.position-card-desc table th {
    background: #f0f4f8;
    font-weight: 600;
}

/* 모바일 */
@media (max-width: 768px) {
    .position-card-img-wrap {
        flex: 0 0 100%;
        width: 100%;
    }

    .position-card-img-wrap img {
        max-height: 200px;
    }

    .position-category-header {
        font-size: 1.05rem;
        padding: 0.65rem 1rem;
    }

    .position-section #positionContent {
        max-width: 100%;
    }
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-top: 0.2rem;
}

.info-item p {
    font-size: 1rem;
    line-height: 1.8;
}

.contact-map {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* Lab Culture Content */
.lab-culture-content {
    margin-top: 0.5rem;
    font-size: 1rem;
    line-height: 1.85;
    color: #444;
    white-space: pre-line;
}

.lab-culture-content ul,
.lab-culture-content ol {
    padding-left: 1.4rem;
    margin: 0.4rem 0;
}

.lab-culture-content li {
    margin-bottom: 0.3rem;
}

/* Admin Section */
.admin-login {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 0;
}

.login-box {
    background: var(--white);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: var(--shadow);
    max-width: 400px;
    width: 100%;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 0.9rem;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.btn-secondary {
    padding: 0.7rem 1.5rem;
    background: var(--accent-color);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: #c0392b;
}

.admin-note {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #888;
}

/* Admin Dashboard */
.admin-dashboard {
    margin-top: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.8rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    color: var(--secondary-color);
}

.tab-btn.active {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

.admin-content {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.admin-form {
    max-width: 800px;
}

.btn-add {
    margin-bottom: 2rem;
    padding: 0.8rem 1.5rem;
    background: #27ae60;
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-add:hover {
    background: #229954;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--light-bg);
    font-weight: 600;
    color: var(--primary-color);
}

.data-table tr:hover {
    background: var(--light-bg);
}

.btn-edit,
.btn-delete {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    margin-right: 0.5rem;
}

.btn-edit {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-edit:hover {
    background: var(--primary-color);
}

.btn-delete {
    background: var(--accent-color);
    color: var(--white);
}

.btn-delete:hover {
    background: #c0392b;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer p {
    margin-bottom: 0.5rem;
}

/* ==================== NEWS SECTION ==================== */

/* News Table */
.news-table-container {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-top: 2rem;
}

.news-table {
    width: 100%;
    border-collapse: collapse;
}

.news-table thead {
    background: var(--primary-color);
    color: var(--white);
}

.news-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
}

.news-table th.text-center,
.news-table td.text-center {
    text-align: center;
}

.news-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.news-table tbody tr:hover {
    background: #f8f9fa;
}

.news-table tbody tr:last-child {
    border-bottom: none;
}

.news-table td {
    padding: 1rem;
    font-size: 0.95rem;
    color: #333;
}

.news-title-cell {
    font-weight: 500;
    color: var(--primary-color);
}

.news-title-cell:hover {
    color: var(--secondary-color);
}

/* Home News Table */
.home-news-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    min-height: 350px;
}

.home-news-table thead {
    display: none;
}

.home-news-table th {
    padding: 0.8rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
}

.home-news-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: var(--transition);
}

.home-news-table tbody tr:hover {
    background: #f9f9f9;
}

.home-news-table tbody tr:last-child {
    border-bottom: none;
}

.home-news-table td {
    padding: 1rem;
    font-size: 1.1rem;
    color: #333;
    border: none;
    line-height: 1.6;
}

.home-news-row td:nth-child(1) {
    width: 40px;
    color: #999;
    font-weight: 500;
}

.home-news-row td:nth-child(2) {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.15rem;
}

.home-news-row td:nth-child(3) {
    width: 100px;
    color: #999;
    text-align: right;
}

.home-news-row:hover td:nth-child(2) {
    color: #666;
}

/* News Detail */
.back-button {
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.back-button:hover {
    background: #2980b9;
}

.news-detail-content {
    background: var(--white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.news-detail-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    color: #666;
    font-size: 0.95rem;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.news-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.news-detail-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.news-detail-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.news-detail-body p {
    margin-bottom: 1.5rem;
}

.news-detail-body h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.news-detail-body h3 {
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    color: var(--primary-color);
}

.news-detail-body ul, .news-detail-body ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.news-detail-body li {
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 968px) {
    /* 모바일에서 네비게이션을 가로로 원복 */
    .navbar .container {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 15px;
        min-height: 60px;
        gap: 0;
    }
    
    .nav-brand {
        display: flex;
        flex-direction: row;
        border-bottom: none;
        padding-bottom: 0;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: left;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 1rem 0;
        gap: 0;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        padding: 0;
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-link {
        display: block;
        padding: 1rem 1.5rem;
        width: 100%;
        text-align: left;
    }

    .admin-link .nav-link {
        color: var(--secondary-color);
    }

    .mobile-toggle {
        display: block;
    }

    .dropdown {
        position: relative;
    }
    
    .dropdown-menu {
        position: static;
        width: 100%;
        display: none;
        box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
        background: #f5f5f5;
        margin: 0;
        padding: 0.5rem 0;
        z-index: 1002;
        overflow-y: auto;
        border-radius: 0;
        border-left: 0;
    }

    .dropdown.active .dropdown-menu {
        display: block;
    }

    .dropdown-menu li {
        border-bottom: 1px solid #e0e0e0;
        padding-left: 0;
    }

    .dropdown-menu li:last-child {
        border-bottom: none;
    }

    .dropdown-menu a {
        padding: 0.8rem 1rem 0.8rem 2rem;
        display: block;
        color: var(--primary-color);
        font-size: 0.9rem;
        transition: background 0.2s ease;
    }
    
    .dropdown-menu a:hover {
        background: #e8e8e8;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .banner-content {
        flex-direction: column;
        text-align: center;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .section {
        padding: 2rem 0;
    }

    .hero {
        padding: 2rem 0;
    }

    .container {
        padding: 0 1rem;
    }

    /* Compact Banner Mobile Adjustments */
    .admission-banner-compact {
        font-size: 0.9rem;
        padding: 0.7rem 1.2rem;
        gap: 0.6rem;
    }

    .admission-banner-compact i.fa-graduation-cap {
        font-size: 1.3rem;
    }

    .admission-banner-compact .banner-text strong {
        font-size: 0.95rem;
    }

    .admission-banner-compact .banner-text span {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    /* Mobile Navigation */
    .navbar .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 15px;
        min-height: 60px;
    }
    
    .mobile-toggle {
        display: block;
        flex-shrink: 0;
    }
    
    /* Nav Brand - 로고와 타이틀 나란히 */
    .nav-brand {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0;
        padding: 0;
        flex: 1;
        margin-right: 1rem;
    }
    
    /* Logo 왼쪽 */
    #navLogoLink {
        flex-shrink: 0;
    }
    
    #navLogoImage {
        max-height: 40px !important;
        max-width: 60px !important;
    }
    
    /* Title 오른쪽 2줄 */
    .nav-brand h2 {
        font-size: 0.75rem;
        line-height: 1.3;
        font-weight: 600;
        white-space: normal;
        word-wrap: break-word;
        margin: 0;
        padding: 0;
        text-align: left;
        max-width: calc(100% - 70px);
    }
    
    /* 모바일에서 br 보이기 */
    .nav-brand h2 .mobile-break {
        display: inline;
    }
    
    /* PI Layout - Mobile */
    .pi-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .pi-introduction {
        padding: 1.5rem;
    }
    
    .publications-grid {
        grid-template-columns: 1fr;
    }

    .members-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .equipment-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    /* Publication Layout Mobile */
    .pub-layout {
        flex-direction: column;
        gap: 1.5rem;
    }

    .pub-thumbnail-container {
        width: 100%;
    }

    .pub-thumbnail-large {
        width: 100%;
        aspect-ratio: 6 / 4;
        object-fit: contain;
    }

    .publication-item {
        padding: 1.5rem;
    }

    /* Home Publication Cards - 모바일 */
    .publication-card {
        margin-bottom: 1rem;
    }
    
    .pub-thumbnail {
        aspect-ratio: 6 / 4;
    }
    
    .pub-content {
        padding: 1rem;
    }
    
    .pub-title {
        font-size: 0.9rem;
        line-height: 1.3;
    }

    .pub-authors {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .pub-journal {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    /* Research 모바일 최적화 */
    .research-item {
        margin-bottom: 2rem;
    }
    
    .research-image {
        height: 200px;
    }
    
    .research-content {
        padding: 1.5rem;
    }
    
    .research-content h2 {
        font-size: 1.3rem;
        margin-bottom: 0.75rem;
    }
    
    .research-content p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    /* News Table 모바일 - 제목과 날짜만 */
    .news-table th:nth-child(2),
    .news-table td:nth-child(2) {
        display: none;  /* Author 열 숨김 */
    }
    
    .news-table th,
    .news-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .news-table th:first-child,
    .news-table td:first-child {
        width: 70%;  /* 제목 넓게 */
    }
    
    .news-table th:last-child,
    .news-table td:last-child {
        width: 30%;  /* 날짜 좁게 */
        text-align: center;
    }
    
    /* Home News Table 모바일 */
    .home-news-table th:nth-child(2),
    .home-news-table td:nth-child(2) {
        display: none;  /* Author 열 숨김 */
    }
    
    .home-news-table th,
    .home-news-table td {
        padding: 0.6rem 0.5rem;
        font-size: 0.8rem;
    }

    /* Mobile Publication Layout */
    .pub-layout-container {
        flex-direction: column !important;
        align-items: center;
    }

    .pub-thumbnail-section {
        flex: 0 0 auto !important;
        width: 100% !important;
        max-width: 320px;
        text-align: center;
    }

    .pub-thumbnail-img {
        width: 100% !important;
        max-width: 320px !important;
        height: auto !important;
        aspect-ratio: 6 / 4 !important;
        object-fit: contain !important;
        background-color: #f5f5f5;
    }

    .pub-details-section {
        width: 100% !important;
        min-width: auto !important;
        flex: 1 !important;
    }

    /* Mobile button adjustments */
    .publication-item button,
    .publication-item a {
        font-size: 0.85rem !important;
        padding: 0.7rem 1rem !important;
        width: auto;
        min-width: 120px;
        text-align: center;
        white-space: nowrap;
    }

    /* Ensure buttons are touchable on mobile */
    .publication-item button {
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
        touch-action: manipulation;
        user-select: none;
        -webkit-user-select: none;
    }

    /* Home page publication cards mobile */
    .publications-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
        padding: 0 0.5rem;
        grid-auto-rows: auto;
    }

    .publication-card {
        max-width: 100%;
        margin: 0 auto;
        height: 520px !important; /* Fixed height for all cards */
        min-height: 520px !important;
    }

    .pub-content {
        padding: 1.2rem !important;
        min-height: 260px !important;
        height: 260px !important; /* Fixed height */
    }

    .pub-thumbnail {
        height: 220px !important;
        flex-shrink: 0 !important;
    }

    /* Force fixed heights on mobile for consistency */
    .pub-title {
        min-height: 2.8em !important;
        max-height: 2.8em !important;
    }

    .pub-authors {
        min-height: 2.8em !important;
        max-height: 2.8em !important;
    }

    .pub-journal {
        min-height: 2.8em !important;
        max-height: 2.8em !important;
    }

    /* PDF Badge Mobile */
    .pdf-badge {
        font-size: 1rem;
        padding: 0.8rem 1.2rem;
    }

    .pdf-badge i {
        font-size: 1.5rem;
    }

    .pdf-badge span {
        font-size: 0.9rem;
    }

    .admin-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .tab-btn {
        font-size: 0.9rem;
        padding: 0.7rem 1.2rem;
    }

    .admin-form {
        padding: 1rem;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .data-table {
        font-size: 0.85rem;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem;
        white-space: nowrap;
    }

    .btn-edit,
    .btn-delete {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }

    .login-box {
        padding: 2rem 1.5rem;
    }

    .admin-content {
        padding: 1rem;
    }

    .file-upload-area {
        padding: 1rem;
    }

    .admin-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .admin-header button {
        width: 100%;
    }

    /* News Mobile - 카드 형식 */
    .news-table-container {
        overflow-x: visible;
    }

    .news-table {
        display: block;
        width: 100%;
    }
    
    .news-table thead {
        display: none;
    }
    
    .news-table tbody {
        display: block;
    }
    
    .news-table tbody tr {
        display: block;
        background: white;
        margin-bottom: 1rem;
        padding: 1rem;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        border: none;
    }
    
    .news-table tbody td {
        display: block;
        padding: 0.3rem 0;
        border: none;
        text-align: left;
        white-space: normal;
        word-wrap: break-word;
    }
    
    .news-table tbody td:first-child {
        font-size: 0.95rem;
        font-weight: 600;
        color: var(--primary-color);
        margin-bottom: 0.5rem;
        line-height: 1.4;
        overflow: visible;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .news-table tbody td:first-child a {
        color: var(--primary-color);
        text-decoration: none;
        display: block;
    }
    
    .news-table tbody td:nth-child(2) {
        display: none;
    }
    
    .news-table tbody td:last-child {
        font-size: 0.85rem;
        color: #666;
    }
/* News Mobile Card UI */
.news-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.news-mobile-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fff;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-mobile-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.news-mobile-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
}

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

.news-mobile-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.4;
    margin-bottom: 0.35rem;
    word-break: break-word;
    overflow-wrap: break-word;
}

.news-mobile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
    font-size: 0.78rem;
    color: #666;
}

.news-mobile-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.news-mobile-arrow {
    flex-shrink: 0;
    color: #999;
    font-size: 0.9rem;
}
    /* Home News Table - 카드 형식 */
    .home-news-table {
        display: block;
        width: 100%;
    }

    .home-news-list {
        width: 100%;
        overflow: visible;
    }
    
    .home-news-table thead {
        display: none;
    }
    
    .home-news-table tbody {
        display: block;
    }
    
    .home-news-table tbody tr {
        display: block;
        background: white;
        margin-bottom: 0.5rem;
        padding: 0.6rem 0.8rem;
        border-radius: 6px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        border: none;
    }
    
    .home-news-table tbody td {
        display: block;
        padding: 0.2rem 0;
        border: none;
        text-align: left;
        white-space: normal;
        word-wrap: break-word;
    }
    
    /* No. (첫 번째 열) 숨김 */
    .home-news-table tbody td:first-child {
        display: none;
    }
    
    /* Title (두 번째 열) */
    .home-news-table tbody td:nth-child(2) {
        display: block;
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--primary-color);
        line-height: 1.4;
        margin-bottom: 0.3rem;
        overflow: visible;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Date (세 번째 열) - 작게 표시 */
    .home-news-table tbody td:last-child {
        display: block;
        font-size: 0.75rem;
        color: #999;
    }

    .home-news-table th:last-child,
    .home-news-table td:last-child {
        padding-right: 0.8rem;
    }

    .news-detail-content {
        padding: 1.5rem;
    }

    .news-detail-title {
        font-size: 1.8rem;
    }

    .news-meta {
        flex-direction: column;
        gap: 0.8rem;
    }

    .news-detail-body {
        font-size: 1rem;
    }

    /* Home Layout Mobile */
    .home-hero-banner {
        min-height: 400px;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content .intro-content {
        font-size: 1rem;
    }

    .admission-banner-hero {
        font-size: 0.8rem;
        padding: 0.6rem 1.2rem;
        gap: 0.5rem;
        flex-direction: row;
        text-align: center;
    }
    
    .admission-banner-hero i {
        font-size: 1rem;
    }

    /* ============================================
       모바일 홈 - 완전히 새로 작성
       News, Featured Image, Publications 모두 같은 가로 길이
       ============================================ */
    
    /* 컨테이너 패딩 조정 */
    .home-section > .container {
        padding: 0 15px;
    }
    
    /* Two Columns → 단일 컬럼 */
    .home-two-columns {
        display: block;
        padding: 0;
    }
    
    /* ===== News Section ===== */
    .home-news-section {
        width: 100%;
        margin-bottom: 2rem;
        padding: 0;
    }
    
    /* Section Header - 제목 왼쪽, View All 오른쪽 */
    .section-header-home {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1rem;
        padding: 0;
        padding-bottom: 0.5rem;
        border-bottom: 2px solid var(--secondary-color);
    }
    
    .section-header-home h2 {
        font-size: 1rem;
        gap: 0.5rem;
        white-space: nowrap;
        margin: 0;
    }
    
    .section-header-home h2 i {
        font-size: 0.9rem;
    }
    
    .view-all-link {
        font-size: 0.85rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .home-news-list {
        width: 100%;
        padding: 0;
        margin: 0;
        overflow-x: visible;
    }
    
    .home-news-table {
        width: 100%;
        table-layout: auto;
        border-collapse: collapse;
    }
    
    .home-news-table th,
    .home-news-table td {
        font-size: 0.8rem;
        padding: 0.6rem 0.3rem;
        word-wrap: break-word;
    }
    
    /* ===== Featured Image ===== */
    .home-featured-section {
        width: 100%;
        margin-bottom: 2rem;
        padding: 0;
    }
    
    .home-featured-image {
        width: 100%;
        height: 250px;
        border-radius: 8px;
        overflow: hidden;
        background: var(--light-bg);
    }
    
    .home-featured-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        background-color: #f5f5f5;
        display: block;
    }
    
    /* ===== Publications Bottom ===== */
    .home-publications-bottom {
        width: 100%;
        padding: 0;
        margin-top: 2rem;
    }
    
    .publications-grid {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .publication-card {
        width: 100%;
        display: flex;
        flex-direction: column;
        margin: 0;
    }
    
    .pub-thumbnail {
        width: 100%;
        height: 200px;
        flex-shrink: 0;
    }
    
    .pub-content {
        padding: 1rem;
        flex: 1;
    }
    
    .pub-title {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
    
    .pub-authors {
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
    }
    
    .pub-journal {
        font-size: 0.8rem;
    }

    /* Upload Badge Mobile */
    .upload-badge-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem;
    }

    .upload-badge {
        width: 100%;
        padding: 1.2rem 1.5rem;
        min-width: auto;
    }

    .upload-badge i {
        font-size: 1.8rem;
    }

    .file-name-display {
        font-size: 0.85rem;
        text-align: center;
    }
}

/* Extra Small Devices */
@media (max-width: 480px) {
    /* Navigation 초소형 - 더 작게 */
    .navbar .container {
        padding: 0.6rem 10px;
        min-height: 50px;
    }
    
    .nav-brand {
        gap: 3px;
    }
    
    .nav-brand h2 {
        font-size: 0.68rem;
        line-height: 1.25;
    }
    
    #navLogoImage {
        max-height: 30px !important;
        max-width: 60px !important;
    }
    
    /* Research 초소형 */
    .research-image {
        height: 180px;
    }
    
    .research-content {
        padding: 1rem;
    }
    
    .research-content h2 {
        font-size: 1.1rem;
    }
    
    .research-content p {
        font-size: 0.9rem;
    }
    
    /* News Table 초소형 */
    .news-table th,
    .news-table td {
        padding: 0.6rem 0.4rem;
        font-size: 0.75rem;
    }
    
    .home-news-table th,
    .home-news-table td {
        padding: 0.5rem 0.4rem;
        font-size: 0.7rem;
    }
    
    /* Hero Banner */
    .home-hero-banner {
        min-height: 300px;
    }
    
    .hero-content h1 {
        font-size: 1.3rem;
    }
    
    .hero-content .intro-content {
        font-size: 0.85rem;
    }
    
    /* Featured Image 더 작게 */
    .home-featured-image {
        height: 200px;
    }
    
    /* Section 제목 더 작게 */
    .section-header-home h2 {
        font-size: 0.85rem;
    }
    
    .section-header-home h2 i {
        font-size: 0.8rem;
    }
    
    .view-all-link {
        font-size: 0.75rem;
    }
    
    /* Publications 카드 */
    .pub-thumbnail {
        height: 180px;
    }
    
    .pub-content {
        padding: 0.8rem;
    }
    
    .pub-title {
        font-size: 0.9rem;
    }
    
    .pub-authors {
        font-size: 0.8rem;
    }
    
    .pub-journal {
        font-size: 0.75rem;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    /* News Table */
    .home-news-table th,
    .home-news-table td {
        font-size: 0.75rem;
        padding: 0.4rem 0.2rem;
    }
}
    
    .home-news-table th,
    .home-news-table td {
        font-size: 0.75rem;
        padding: 0.5rem 0.4rem;
    }
}

/* File Upload Styles */
.file-upload-area {
    background: var(--light-bg);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}

.file-upload-area:hover {
    border-color: var(--secondary-color);
    background: #f0f7ff;
}

.file-input {
    display: none;
}

.file-label {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--secondary-color);
    color: var(--white);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.file-label:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.file-label i {
    margin-right: 0.5rem;
}

/* Upload Badge */
.upload-badge-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.upload-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: var(--white);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    min-width: 180px;
}

.upload-badge:hover {
    background: linear-gradient(135deg, #2980b9, #2471a3);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);
}

.upload-badge:active {
    transform: translateY(0);
}

.upload-badge i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.upload-badge span {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.upload-badge small {
    font-size: 0.75rem;
    opacity: 0.9;
    font-weight: 400;
}

.file-name-display {
    color: #27ae60;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-name-display i {
    font-size: 1.2rem;
}

.file-help-text {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.photo-preview,
.pdf-preview {
    margin-top: 1rem;
}

.current-photo,
.current-file {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--white);
    border-radius: 8px;
}

/* PDF Badge for Publications */
.pdf-badge-container {
    margin-top: 1rem;
    text-align: center;
}

.pdf-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: var(--white);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    width: 100%;
}

.pdf-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #c0392b, #a93226);
}

.pdf-badge i {
    font-size: 2rem;
}

.pdf-badge span {
    font-size: 1rem;
    letter-spacing: 1px;
}

/* PDF Badge for Home Page Cards */
.pub-card-image-container {
    position: relative;
}

.pdf-badge-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 1rem;
    text-align: center;
}

.pdf-badge-small {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    background: #e74c3c;
    color: var(--white);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.pdf-badge-small:hover {
    background: #c0392b;
    transform: scale(1.05);
}

.pdf-badge-small i {
    font-size: 1rem;
}

/* Download Banner (Legacy - kept for compatibility) */
.download-banner {
    margin: 1rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-radius: 8px;
    text-align: center;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    background: var(--white);
    color: #e74c3c;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    background: #fff5f5;
}

.btn-download i {
    font-size: 1.1rem;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* ================================================
   Drag and Drop Styles (SortableJS)
   ================================================ */

/* Ghost element - appears while dragging */
.sortable-ghost {
    opacity: 0.4;
    background: #e3f2fd !important;
    border: 2px dashed var(--secondary-color) !important;
}

/* Drag handle default styles */
.drag-handle {
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Drag handle hover effect */
.drag-handle:hover {
    color: var(--secondary-color) !important;
    cursor: grab;
    transform: scale(1.1);
}

/* Drag handle active (grabbing) effect */
.drag-handle:active {
    cursor: grabbing !important;
    color: var(--primary-color) !important;
}

/* Row being dragged */
.data-table tbody tr.sortable-drag {
    background: #f0f7ff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 1 !important;
    transform: rotate(2deg);
}

/* Draggable rows cursor hint */
.data-table tbody tr[data-id] {
    transition: background-color 0.2s ease;
}

.data-table tbody tr[data-id]:hover {
    background-color: #fafafa;
}

/* Chosen element - the element being moved */
.sortable-chosen {
    cursor: grabbing !important;
}

/* ================================================
   Loading Skeleton Styles
   ================================================ */

/* Skeleton base animation */
@keyframes skeleton-loading {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #e0e0e0 20%,
        #f0f0f0 40%,
        #f0f0f0 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

/* Skeleton text lines */
.skeleton-text {
    height: 16px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.skeleton-text.large {
    height: 24px;
}

.skeleton-text.small {
    height: 12px;
}

/* Skeleton for cards */
.skeleton-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.skeleton-card .skeleton-image {
    width: 100%;
    height: 200px;
    margin-bottom: 1rem;
    border-radius: 8px;
}

.skeleton-card .skeleton-title {
    height: 24px;
    width: 70%;
    margin-bottom: 1rem;
}

.skeleton-card .skeleton-text {
    height: 14px;
    margin-bottom: 0.5rem;
}

.skeleton-card .skeleton-text:last-child {
    width: 80%;
}

/* Skeleton for news list */
.skeleton-news-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.skeleton-news-item .skeleton-date {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 8px;
}

.skeleton-news-item .skeleton-content {
    flex: 1;
}

.skeleton-news-item .skeleton-title {
    height: 20px;
    width: 80%;
    margin-bottom: 0.5rem;
}

.skeleton-news-item .skeleton-excerpt {
    height: 14px;
    width: 100%;
    margin-bottom: 0.3rem;
}

/* Skeleton for gallery grid */
.skeleton-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.skeleton-gallery-item {
    aspect-ratio: 4/3;
    border-radius: 12px;
}

/* Skeleton for publications */
.skeleton-publication {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.skeleton-publication .skeleton-title {
    height: 20px;
    width: 90%;
    margin-bottom: 0.8rem;
}

.skeleton-publication .skeleton-authors {
    height: 14px;
    width: 70%;
    margin-bottom: 0.5rem;
}

.skeleton-publication .skeleton-journal {
    height: 14px;
    width: 50%;
}

/* Skeleton for members grid */
.skeleton-members {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skeleton-member-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.skeleton-member-card .skeleton-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 1rem;
}

.skeleton-member-card .skeleton-name {
    height: 20px;
    width: 60%;
    margin: 0 auto 0.8rem;
}

.skeleton-member-card .skeleton-role {
    height: 14px;
    width: 40%;
    margin: 0 auto 0.5rem;
}

.skeleton-member-card .skeleton-bio {
    height: 12px;
    width: 100%;
    margin-bottom: 0.3rem;
}

/* Hide content while loading */
.loading-hidden {
    opacity: 0;
    visibility: hidden;
    height: 0;
    overflow: hidden;
}

/* Fade-in animation when content is ready */
@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-loaded {
    animation: fadeInContent 0.5s ease-out forwards;
}

/* Skeleton container */
.skeleton-container {
    padding: 2rem 0;
}

/* Responsive skeleton adjustments */
@media (max-width: 768px) {
    .skeleton-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .skeleton-members {
        grid-template-columns: 1fr;
    }
    
    .skeleton-member-card .skeleton-avatar {
        width: 120px;
        height: 120px;
    }
}


/* ===== Added for Publications filters, Equipment grid, Contact lab culture, Position ===== */
.pub-filter-bar {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin: 1.25rem 0 2rem;
}
.pub-year-select, .pub-search-input, #position_category, #position_is_active {
    padding: 0.8rem 1rem;
    border: 1px solid #d9dfe7;
    border-radius: 10px;
    font-size: 0.95rem;
    min-height: 44px;
}
.pub-search-wrap {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.pub-search-input {
    min-width: 260px;
}
.pub-search-btn {
    min-height: 44px;
    padding: 0 1rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}
.gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.lab-culture-content {
    line-height: 1.7;
    color: #374151;
}
.position-category-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 2rem 0 1rem;
    padding: 0.9rem 1.1rem;
    border-radius: 12px;
    background: #f4f7fb;
    font-weight: 700;
    font-size: 1.05rem;
}
.position-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
    padding: 1.2rem;
    margin-bottom: 1rem;
}
.position-card-flex {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    flex-wrap: wrap;
}
.position-card-img-wrap {
    flex: 0 0 280px;
    max-width: 280px;
}
.position-card-text {
    flex: 1 1 320px;
    min-width: 0;
}
.position-card-title {
    margin: 0 0 0.8rem;
    font-size: 1.15rem;
    font-weight: 700;
}
.position-card-desc {
    line-height: 1.75;
    color: #374151;
}
@media (max-width: 900px) {
    .equipment-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 768px) {
    .gallery-grid, .equipment-grid {
        grid-template-columns: 1fr;
    }
    .pub-search-input {
        min-width: 0;
        width: 100%;
    }
    .pub-search-wrap, .pub-year-select-wrap {
        width: 100%;
    }
    .position-card-img-wrap {
        flex-basis: 100%;
        max-width: 100%;
    }
}
/* ============================================================
   AI Advisor Section
   ============================================================ */

/* 네비게이션 AI 링크 강조 */
.ai-advisor-nav > a {
    color: #667eea !important;
    font-weight: 600;
}

/* 헤더 */
.ai-advisor-section {
    background: linear-gradient(180deg, #f0f4ff 0%, #fff 30%);
}

.ai-advisor-header {
    margin-bottom: 2rem;
}

.ai-advisor-title-wrap {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.ai-advisor-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(102,126,234,0.4);
}

.ai-advisor-title {
    font-size: 2rem;
    color: #2c3e50;
    margin: 0 0 0.3rem 0;
}

.ai-advisor-subtitle {
    color: #666;
    font-size: 1rem;
    margin: 0;
}

/* 사용자 유형 토글 */
.ai-user-type-toggle {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.ai-type-btn {
    flex: 1;
    min-width: 200px;
    padding: 1rem 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: #555;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    transition: all 0.2s ease;
}

.ai-type-btn i {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.ai-type-btn .ai-type-desc {
    font-size: 0.8rem;
    font-weight: 400;
    color: #888;
}

.ai-type-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.ai-type-btn.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(102,126,234,0.35);
}

.ai-type-btn.active .ai-type-desc {
    color: rgba(255,255,255,0.8);
}

/* 입력 영역 */
.ai-input-area {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
    border: 1px solid #e8ecf4;
}

.ai-input-context {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    background: #f0f4ff;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
}

.ai-input-context i {
    color: #667eea;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.ai-textarea {
    width: 100%;
    border: 1.5px solid #dde3f0;
    border-radius: 10px;
    padding: 1rem;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.ai-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}

.ai-input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
}

.ai-char-count {
    font-size: 0.82rem;
    color: #aaa;
}

.ai-send-btn {
    padding: 0.75rem 1.8rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(102,126,234,0.35);
}

.ai-send-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102,126,234,0.5);
}

.ai-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 로딩 */
.ai-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem;
    gap: 1rem;
    color: #667;
}

.ai-loading p {
    font-size: 0.95rem;
    color: #777;
}

.ai-loading-dots {
    display: flex;
    gap: 0.4rem;
}

.ai-loading-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #667eea;
    animation: aiDotBounce 1.2s infinite ease-in-out;
}

.ai-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes aiDotBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40%           { transform: scale(1.1); opacity: 1; }
}

/* 출력 영역 */
.ai-output-area {
    background: white;
    border-radius: 16px;
    padding: 1.5rem 2rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
    border: 1px solid #e8ecf4;
    margin-top: 1.5rem;
}

.ai-output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.ai-output-badge {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.badge-student {
    background: #e8f4fd;
    color: #2980b9;
}

.badge-industry {
    background: #eafaf1;
    color: #27ae60;
}

.ai-copy-btn {
    padding: 0.4rem 0.9rem;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s;
}

.ai-copy-btn:hover {
    background: #eee;
}

/* 마크다운 렌더링 */
.ai-answer-content {
    line-height: 1.8;
    color: #2c3e50;
    font-size: 1rem;
}

.ai-answer-content h1,
.ai-answer-content h2 {
    color: #2c3e50;
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #e8ecf4;
}

.ai-answer-content h3 {
    color: #3d5166;
    margin: 1.2rem 0 0.5rem;
}

.ai-answer-content p {
    margin: 0.75rem 0;
}

.ai-answer-content ul {
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}

.ai-answer-content li {
    margin-bottom: 0.4rem;
}

.ai-answer-content strong {
    color: #2c3e50;
}

.ai-answer-content code {
    background: #f4f4f8;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    color: #e74c3c;
}

.ai-answer-content pre {
    background: #f4f4f8;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
}

.ai-answer-content a {
    color: #3498db;
    text-decoration: none;
}

.ai-answer-content a:hover {
    text-decoration: underline;
}

.ai-answer-content hr {
    border: none;
    border-top: 1px solid #e8ecf4;
    margin: 1.5rem 0;
}

/* 참조 문서 */
.ai-references {
    margin-top: 1.5rem;
    padding: 1rem 1.5rem;
    background: #f8f9ff;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.ai-references h4 {
    color: #667eea;
    margin: 0 0 0.75rem 0;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.ai-references ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ai-references li {
    padding: 0.35rem 0;
    font-size: 0.9rem;
    color: #444;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.ai-references li i {
    color: #667eea;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.ai-references a {
    color: #3498db;
    text-decoration: none;
}

.ai-references a:hover {
    text-decoration: underline;
}

/* API Key 미설정 안내 */
.ai-no-key {
    text-align: center;
    padding: 3rem;
    color: #888;
    background: #fff8ee;
    border-radius: 12px;
    border: 2px dashed #f0c070;
    margin-top: 1.5rem;
}

.ai-no-key i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #f0a030;
    display: block;
}

.ai-no-key h3 {
    color: #c0803a;
    margin-bottom: 0.5rem;
}

/* ── Admin AI 스타일 ── */
.ai-admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0.5rem;
    flex-wrap: wrap;
}

.ai-admin-tab-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px 8px 0 0;
    background: #f5f5f5;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s;
}

.ai-admin-tab-btn.active {
    background: #667eea;
    color: white;
}

.ai-admin-panel {
    padding: 0.5rem 0;
}

/* API Key 제공사 배지 */
.ai-provider-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 600;
}

.ai-provider-gemini  { background: #e8f0fe; color: #1a73e8; }
.ai-provider-openai  { background: #eafaf1; color: #27ae60; }
.ai-provider-claude  { background: #fef3e2; color: #e67e22; }

/* 토글 스위치 */
.ai-toggle-label {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    vertical-align: middle;
}

.ai-toggle-label input { opacity: 0; width: 0; height: 0; }

.ai-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #ccc;
    border-radius: 22px;
    transition: 0.3s;
}

.ai-toggle-slider:before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.ai-toggle-label input:checked + .ai-toggle-slider {
    background: #27ae60;
}

.ai-toggle-label input:checked + .ai-toggle-slider:before {
    transform: translateX(18px);
}

/* KB 통계 */
.ai-kb-stat-grid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.ai-kb-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: white;
    border-radius: 10px;
    border: 1px solid #e0e8ff;
    min-width: 80px;
}

.ai-kb-stat-num {
    font-size: 1.8rem;
    font-weight: 700;
    color: #667eea;
    line-height: 1;
}

.ai-kb-stat span:last-child {
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.25rem;
}

/* 모바일 */
@media (max-width: 768px) {
    .ai-advisor-title-wrap { gap: 0.8rem; }
    .ai-advisor-icon { width: 48px; height: 48px; font-size: 1.3rem; border-radius: 12px; }
    .ai-advisor-title { font-size: 1.4rem; }
    .ai-advisor-subtitle { font-size: 0.85rem; }

    .ai-user-type-toggle { flex-direction: column; }
    .ai-type-btn { flex-direction: row; align-items: center; gap: 0.6rem; }
    .ai-type-btn .ai-type-desc { display: none; }

    .ai-input-area { padding: 1rem; border-radius: 12px; }
    .ai-output-area { padding: 1rem; }
    .ai-output-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }

    .ai-admin-tabs { gap: 0.3rem; }
    .ai-admin-tab-btn { padding: 0.5rem 0.8rem; font-size: 0.82rem; }

    .ai-kb-stat-grid { gap: 0.5rem; }
    .ai-kb-stat { padding: 0.5rem 1rem; min-width: 60px; }
    .ai-kb-stat-num { font-size: 1.4rem; }
}


.skeleton-member-card .skeleton-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 1rem;
}

.skeleton-member-card .skeleton-name {
    height: 20px;
    width: 60%;
    margin: 0 auto 0.8rem;
}

.skeleton-member-card .skeleton-role {
    height: 14px;
    width: 40%;
    margin: 0 auto 0.5rem;
}

.skeleton-member-card .skeleton-bio {
    height: 12px;
    width: 100%;
    margin-bottom: 0.3rem;
}

/* Hide content while loading */
.loading-hidden {
    opacity: 0;
    visibility: hidden;
    height: 0;
    overflow: hidden;
}

/* Fade-in animation when content is ready */
@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-loaded {
    animation: fadeInContent 0.5s ease-out forwards;
}

/* Skeleton container */
.skeleton-container {
    padding: 2rem 0;
}

/* Responsive skeleton adjustments */
@media (max-width: 768px) {
    .skeleton-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .skeleton-members {
        grid-template-columns: 1fr;
    }
    
    .skeleton-member-card .skeleton-avatar {
        width: 120px;
        height: 120px;
    }
}
