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

body {
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
    overflow: hidden;
    background-color: #000;
}

header {
    position: fixed;
    top: 40px;
    left: 40px;
    right: 40px;
    z-index: 4000;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: color 0.3s ease;
}

/* Modal Open State for Header */
body.modal-open header .icon-btn {
    color: #000;
}

body.modal-open header #category-menu ul li a {
    color: #000;
}

/* Ensure header is white when article is open (since article background is black) */
body.article-open header .icon-btn,
body.article-open header #category-menu ul li a {
    color: #fff !important;
}

body.article-open .logo {
    filter: invert(0) !important;
}

body.modal-open .logo {
    filter: invert(1); /* Invert logo if it's white, or remove this if logo is already dark */
}

.logo {
    height: 27px;
    width: auto;
    display: block;
}

.header-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.icon-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 5px;
    transition: opacity 0.3s ease;
}

#category-menu {
    position: absolute;
    top: 40px;
    left: 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
    z-index: 5000;
    padding: 10px;
}

body.modal-open.menu-active #category-menu {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px;
}

#category-menu.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Hide modal header when menu is open to prevent text overlap */
body.menu-active .archive-header {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#category-menu ul { list-style: none; }
#category-menu ul li { margin-bottom: 15px; }
#category-menu ul li a {
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: 0.1em;
}

.hero {
    width: 100vw;
    height: 100vh;
    position: relative;
}

.main-bg-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-image: url('deta/2.jpg'); /* 경로 수정 */
}

/* Modal / Overlays */
.archive-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 1000;
    overflow-y: auto;
    display: none;
    padding: 140px 40px 60px; /* Increased top padding */
}

.archive-overlay.active {
    display: block;
    animation: slideUp 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.archive-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 80px;
}

.modal-title {
    font-size: 1rem;
    letter-spacing: 0.2em;
    color: #000;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.modal-title:hover {
    opacity: 0.6;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #000;
}

/* Magazine Grid */
.magazine-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.magazine-item {
    position: relative;
    aspect-ratio: 1080 / 1350;
    background-color: #f0f0f0;
    cursor: pointer;
    overflow: hidden;
}

.magazine-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mag-info {
    position: absolute;
    bottom: 30px;
    left: 30px;
    color: #000;
}

/* Archive Grid */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.archive-item img {
    width: 100%;
    aspect-ratio: 1080 / 1350;
    object-fit: cover;
    display: block;
}

/* About Us */
.about-container {
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 100px;
}

.about-content { text-align: left; color: #000; }
.about-title { font-size: 3.5rem; font-weight: 700; margin-bottom: 60px; }
.about-text p { font-size: 1.2rem; line-height: 1.7; margin-bottom: 35px; color: #333; }
.about-links { margin-top: 80px; display: flex; gap: 40px; }
.about-links a { font-size: 1rem; color: #000; text-decoration: none; font-weight: 600; border-bottom: 1px solid #000; padding-bottom: 5px; }

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.95);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
}
.lightbox.active { display: flex; }
#lightbox-img { max-width: 90%; max-height: 90%; transform: scale(0.8); transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1); }
.lightbox.active #lightbox-img { transform: scale(1); }

/* Article Viewer */
.article-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    color: #fff;
    z-index: 3000;
    display: none;
    overflow-y: auto;
    padding: 100px 40px;
}
.article-overlay.active { display: block; }
.article-content { max-width: 800px; margin: 0 auto; }
.article-content h1 { font-size: 3rem; margin-bottom: 50px; }
.article-content p { font-size: 1.2rem; line-height: 1.8; white-space: pre-line; }
.close-btn-white { position: fixed; top: 40px; right: 40px; background: none; border: none; color: #fff; font-size: 3rem; cursor: pointer; }

.hidden { display: block; }