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

:root {
    --primary-color: #1a365d;
    --primary-light: #2c5282;
    --secondary-color: #c9a227;
    --accent-color: #f7f3e9;
    --text-color: #2d3748;
    --text-light: #718096;
    --light-color: #fafaf9;
    --dark-color: #1a202c;
    --card-bg: #ffffff;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', '맑은 고딕', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Header */
header {
    background: var(--dark-color);
    padding: 1.2rem 5%;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
}

.logo a {
    color: white;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.logo a:hover {
    opacity: 0.8;
}

/* Hero Section */
.hero {
    background: linear-gradient(180deg, var(--dark-color) 0%, var(--primary-color) 40%, var(--accent-color) 100%);
    color: white;
    text-align: center;
    padding: 100px 5%;
    position: relative;
    overflow: hidden;
}

.hero-bg-text {
    position: absolute;
    bottom: -20px;
    right: -10px;
    font-size: 12rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.05);
    letter-spacing: -5px;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: 2px;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.85;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* People List (Main Page) */
.people-list {
    padding: 60px 5%;
    background: linear-gradient(180deg, var(--accent-color) 0%, var(--light-color) 100%);
}

.people-list .people-grid {
    max-width: 1200px;
    margin: 0 auto;
}

.people-list h2 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 50px;
    color: var(--text-color);
    font-weight: 600;
    letter-spacing: 1px;
}

.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.person-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.person-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.person-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.person-card-info {
    padding: 20px;
}

.person-card-info h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.person-card-info p {
    color: #666;
    font-size: 0.95rem;
}

.person-card-info .dates {
    margin-top: 10px;
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Who is next card */
.who-is-next {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 330px;
    background: linear-gradient(135deg, rgba(232, 228, 219, 0.7) 0%, rgba(212, 207, 196, 0.7) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: default;
}

.who-is-next:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.who-is-next-content {
    text-align: center;
    color: var(--text-light);
}

.who-is-next-content .question-mark {
    display: block;
    font-size: 5rem;
    font-weight: 700;
    opacity: 0.3;
    margin-bottom: 10px;
}

.who-is-next-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Admin Message Section */
.admin-message-section {
    background: linear-gradient(180deg, var(--accent-color) 0%, #e8dcc8 100%);
    padding: 50px 5%;
}

.admin-message-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 40px;
}

.admin-message {
    font-size: 1.1rem;
    color: var(--text-color);
    line-height: 1.9;
    white-space: pre-line;
}

/* Poster + Messages Section */
.poster-messages-section {
    padding: 60px 5%;
    background: var(--light-color);
}

.poster-messages-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 60px;
    align-items: start;
}

.poster-wrapper {
    position: sticky;
    top: 80px;
}

.poster-image {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.messages-wrapper h2 {
    font-size: 1.4rem;
    margin-bottom: 30px;
    color: var(--text-color);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Profile Section (Person Page) */
.profile-section {
    background: linear-gradient(180deg, var(--dark-color) 0%, var(--primary-color) 40%, var(--accent-color) 100%);
    padding: 80px 5%;
    position: relative;
    overflow: hidden;
}

.profile-bg-text {
    position: absolute;
    bottom: -20px;
    right: -10px;
    font-size: 12rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.05);
    letter-spacing: -5px;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.profile-card {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    gap: 40px;
    align-items: center;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 40px;
}

.profile-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.3);
}

.profile-info h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.title-role {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

.tenure {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 8px;
    font-weight: 500;
}

.dates {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 15px;
}

.github-link {
    display: inline-block;
    background: rgba(201, 162, 39, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: white;
    padding: 10px 24px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
    transition: all 0.3s ease;
}

.github-link:hover {
    background: rgba(212, 168, 50, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(201, 162, 39, 0.4);
}

/* Messages List */
.messages-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.message-item {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    border-left: 3px solid var(--secondary-color);
}

.message-text {
    font-size: 1.1rem;
    color: #444;
    margin-bottom: 10px;
    white-space: pre-line;
}

.message-author {
    text-align: right;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.9rem;
}

/* Gallery Section */
.gallery-section {
    padding: 60px 5%;
    background: var(--dark-color);
}

.gallery-section h2 {
    text-align: center;
    font-size: 1.4rem;
    margin-bottom: 40px;
    color: white;
    font-weight: 600;
    letter-spacing: 1px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-item:hover {
    opacity: 0.9;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    cursor: pointer;
    animation: fadeIn 0.3s ease;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--dark-color) 0%, #1e293b 100%);
    color: white;
    text-align: center;
    padding: 30px;
}

footer p {
    opacity: 0.8;
}

footer p::before {
    content: '💼 ';
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive */
@media (max-width: 900px) {
    .poster-messages-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .poster-wrapper {
        position: static;
        display: flex;
        justify-content: center;
    }

    .poster-image {
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-bg-text {
        font-size: 5rem;
        right: 5px;
        bottom: -10px;
    }

    .profile-bg-text {
        font-size: 5rem;
        right: 5px;
        bottom: -10px;
    }

    .profile-card {
        flex-direction: column;
        text-align: center;
    }

    .profile-image {
        width: 150px;
        height: 150px;
    }

    .profile-info h1 {
        font-size: 1.8rem;
    }
}
