:root {
    --primary-color: #a51417;
    --header-footer-color: #3d3d3d;
    --text-color: #333;
    --bg-color: #fff;
    --border-color: #e0e0e0;
    --link-color: #a51417;
    --link-hover: #7a0e11;
    --sidebar-bg: #f8f8f8;
    --card-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
}

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

/* Header Styles */
.main-header {
    background-color: var(--header-footer-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

.logo {
    color: #fff;
    text-decoration: none;
    font-size: 24px;
    font-weight: 600;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
    position: relative;
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
}

.mobile-menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: #fff;
    transition: all 0.3s;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 15px;
    padding: 10px 25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    position: relative;
    font-weight: 500;
    border-radius: 5px;
    border: 2px solid transparent;
}

.nav-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-2px);
}

.nav-menu a.active {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 15px rgba(165, 20, 23, 0.3);
}

.nav-menu a.active:hover {
    background-color: #8a1114;
    transform: translateY(-2px) scale(1.02);
}

/* Main Content Layout */
.main-content {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

.content-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

/* Sidebar Styles */
.sidebar {
    background-color: var(--sidebar-bg);
    padding: 25px;
    border-radius: 8px;
    height: fit-content;
}

.profile-section {
    text-align: center;
    margin-bottom: 30px;
}

.profile-image {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-size: 22px;
    color: var(--text-color);
    margin-bottom: 5px;
}

.profile-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
}

.profile-department {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.4;
}

.contact-info {
    text-align: left;
    font-size: 14px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    margin-top: 15px;
}

.contact-info p {
    margin-bottom: 8px;
}

.contact-info strong {
    color: var(--text-color);
}

/* Search Section */
.search-section {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.search-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-input {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-button {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.search-button:hover {
    background-color: var(--link-hover);
}

/* Main Area Content */
.main-area {
    background-color: #fff;
}

/* Mobile Profile Card (hidden by default) */
.mobile-profile-card {
    display: none;
}

.welcome-section h1 {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.welcome-section p {
    margin-bottom: 20px;
    text-align: justify;
    line-height: 1.8;
}

/* Social Links Section */
.social-links-section {
    display: flex;
    gap: 12px;
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, #f9f9f9 0%, #ffffff 100%);
    border-radius: 16px;
    justify-content: center;
    flex-wrap: wrap;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s;
    padding: 15px;
    border-radius: 8px;
    min-width: 100px;
}

.social-link:hover {
    background-color: #f5f5f5;
    transform: translateY(-3px);
    color: var(--primary-color);
}

.social-link i {
    font-size: 32px;
    margin-bottom: 8px;
    color: var(--primary-color);
    transition: all 0.3s;
}

.social-link:hover i {
    transform: scale(1.1) rotate(5deg);
}

.social-link span {
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}

.welcome-section a {
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 1px dotted var(--link-color);
}

.welcome-section a:hover {
    color: var(--link-hover);
    border-bottom-style: solid;
}

.research-interests {
    margin-top: 30px;
}

.research-interests ol {
    margin: 20px 0 20px 40px;
}

.research-interests li {
    margin-bottom: 15px;
    line-height: 1.8;
}

/* Recent News Section */
.recent-news {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.recent-news h2 {
    font-size: 28px;
    color: var(--text-color);
    margin-bottom: 25px;
}

/* News Accordion */
.news-accordion {
    margin-bottom: 20px;
}

.year-section {
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.year-header {
    width: 100%;
    padding: 15px 20px;
    background-color: #f8f8f8;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    transition: all 0.3s;
}

.year-header:hover {
    background-color: #f0f0f0;
}

.year-header.active {
    background-color: var(--primary-color);
    color: #fff;
}

.year-header .arrow {
    transition: transform 0.3s;
    font-size: 14px;
}

.year-header.active .arrow {
    transform: rotate(180deg);
}

.year-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: #fff;
    padding: 0 20px;
}

.year-content.show {
    max-height: 2000px;
    padding: 20px;
}

.news-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.news-date {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.news-item h3 {
    margin: 10px 0;
    font-size: 18px;
}

.news-item h3 a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.news-item h3 a:hover {
    color: var(--primary-color);
}

.news-item p {
    color: #666;
    font-size: 15px;
    line-height: 1.6;
}

.more-news-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 10px 25px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.more-news-btn:hover {
    background-color: var(--link-hover);
}

/* Footer */
.main-footer {
    background-color: var(--header-footer-color);
    color: #fff;
    padding: 30px 0;
    margin-top: 60px;
    text-align: center;
}

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

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: #fff;
    font-size: 20px;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 250px 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .main-header {
        padding: 12px 0;
    }

    .logo {
        font-size: 20px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(61, 61, 61, 0.98);
        flex-direction: column;
        padding: 0;
        gap: 0;
        z-index: 999;
        overflow-y: auto;
        animation: slideDown 0.3s ease;
    }

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

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
        animation: fadeIn 0.4s ease forwards;
        opacity: 0;
    }

    .nav-menu li:nth-child(1) { animation-delay: 0.1s; }
    .nav-menu li:nth-child(2) { animation-delay: 0.2s; }
    .nav-menu li:nth-child(3) { animation-delay: 0.3s; }
    .nav-menu li:nth-child(4) { animation-delay: 0.4s; }
    .nav-menu li:nth-child(5) { animation-delay: 0.5s; }

    @keyframes fadeIn {
        to {
            opacity: 1;
        }
    }

    .nav-menu a {
        padding: 20px 25px;
        font-size: 18px;
        text-align: center;
    }

    .nav-menu a.active::after {
        display: none;
    }

    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .sidebar {
        display: none;
    }

    /* Mobile Profile Card */
    .mobile-profile-card {
        display: flex;
        background: linear-gradient(135deg, #f8f8f8 0%, #ffffff 100%);
        padding: 25px;
        border-radius: 16px;
        margin-bottom: 35px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        align-items: center;
        gap: 25px;
    }

    .mobile-profile-image {
        width: 100px;
        height: 100px;
        border-radius: 50%;
        overflow: hidden;
        border: 4px solid var(--primary-color);
        flex-shrink: 0;
    }

    .mobile-profile-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .mobile-profile-info h2 {
        font-size: 22px;
        color: var(--text-color);
        margin-bottom: 5px;
        font-weight: 700;
    }

    .mobile-title {
        color: var(--primary-color);
        font-weight: 600;
        font-size: 16px;
        margin-bottom: 5px;
    }

    .mobile-department {
        font-size: 14px;
        color: #666;
        line-height: 1.5;
        margin-bottom: 10px;
    }

    .mobile-contact a {
        color: var(--primary-color);
        text-decoration: none;
        font-size: 15px;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-weight: 500;
    }

    .mobile-contact i {
        font-size: 14px;
    }

    .main-area {
        padding: 0 10px;
    }

    .welcome-section h1 {
        font-size: 28px;
        text-align: center;
    }

    .social-links-section {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 20px;
    }

    .social-link {
        padding: 20px 10px;
        min-width: auto;
        width: 100%;
    }

    .social-link i {
        font-size: 28px;
        margin-bottom: 10px;
    }

    .social-link span {
        font-size: 12px;
        font-weight: 600;
    }

    .recent-news {
        margin-top: 30px;
        padding-top: 20px;
    }

    .recent-news h2 {
        font-size: 24px;
        text-align: center;
    }

    .news-item h3 {
        font-size: 16px;
    }

    .news-item p {
        font-size: 14px;
    }

    .more-news-btn {
        display: block;
        text-align: center;
        width: 100%;
    }

    .main-footer {
        padding: 20px 0;
        margin-top: 40px;
    }

    .main-footer .container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .main-footer p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .main-header {
        padding: 10px 0;
    }

    .logo {
        font-size: 18px;
    }

    .nav-menu a {
        padding: 18px 20px;
        font-size: 16px;
    }

    .container {
        padding: 0 15px;
    }

    .main-content {
        padding: 20px 0;
    }

    .mobile-profile-card {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }

    .mobile-profile-image {
        width: 120px;
        height: 120px;
        border-width: 5px;
    }

    .mobile-profile-info h2 {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .mobile-title {
        font-size: 17px;
    }

    .mobile-department {
        font-size: 15px;
    }

    .mobile-contact a {
        font-size: 16px;
    }

    .welcome-section h1 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .welcome-section p {
        font-size: 15px;
        text-align: left;
        line-height: 1.7;
    }

    .research-interests ol {
        margin-left: 25px;
    }

    .research-interests li {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .social-links-section {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 15px;
    }

    .social-link {
        padding: 15px 8px;
        min-width: auto;
        width: 100%;
    }

    .social-link:last-child:nth-child(odd) {
        grid-column: span 2;
        max-width: 50%;
        margin: 0 auto;
    }

    .social-link i {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .social-link span {
        font-size: 11px;
        line-height: 1.2;
        font-weight: 600;
    }

    .recent-news {
        margin-top: 25px;
        padding-top: 15px;
    }

    .recent-news h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .year-section {
        margin-bottom: 8px;
    }

    .year-header {
        padding: 12px 15px;
        font-size: 16px;
    }

    .year-content.show {
        padding: 15px;
    }

    .news-item {
        padding: 15px 0;
    }

    .news-date {
        font-size: 11px;
        padding: 2px 8px;
    }

    .news-item h3 {
        font-size: 15px;
        margin: 8px 0;
    }

    .news-item p {
        font-size: 13px;
        line-height: 1.5;
    }

    .more-news-btn {
        padding: 12px 20px;
        font-size: 14px;
        margin-top: 15px;
    }

    .main-footer {
        padding: 15px 0;
        margin-top: 30px;
    }

    .main-footer p {
        font-size: 12px;
    }

    .social-links a {
        font-size: 18px;
    }
}

/* 이미지 컨테이너 스타일 */
.image-container {
  /* 이미지를 중앙으로 정렬 */
  text-align: center;
  
  /* 위아래 여백 추가 */
  margin: 20px 0;
}

.image-container img {
  /* 이미지의 최대 너비를 700px로 제한합니다. */
  max-width: 700px;
  
  /* 부모 요소에 맞춰 너비를 100%로 설정하되,
     위 max-width가 더 큰 영향을 줍니다. */
  width: 100%;
  
  display: block;
  margin-left: auto;
  margin-right: auto;
}
