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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

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

/* Top Bar */
.top-bar {
    background-color: #f5f5f5;
    padding: 10px 0;
    text-align: center;
    font-size: 14px;
}

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

/* Navigation */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.nav-brand {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-logo {
    height: 30px;
    width: auto;
    display: block;
}

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

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #666;
}

.dropdown {
    position: relative;
}

.dropdown .arrow {
    font-size: 10px;
    margin-left: 5px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    list-style: none;
    min-width: 150px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
}

.dropdown-menu a:hover {
    background-color: #f5f5f5;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Contact Section */
.contact-section {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.contact-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 32px;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: start;
}

.location-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.contact-info {
    background-color: #fff;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    flex: 1;
}

.contact-info p {
    margin-bottom: 15px;
    font-size: 16px;
}

.map-container {
    width: 80%;
    max-width: 900px;
    height: 400px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 0 auto;
}

.map-container iframe {
    width: 100%;
    height: 100%;
}

/* Page Sections */
.page-section {
    padding: 60px 0;
    min-height: 60vh;
}

.page-section h1 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 40px;
    color: #333;
}

.content-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin-top: 30px;
}

.content-image {
    width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.text-content {
    font-size: 16px;
    line-height: 1.8;
}

.text-content h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #333;
}

.text-content h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #555;
}

.text-content p {
    margin-bottom: 15px;
}

.text-content ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.text-content li {
    margin-bottom: 8px;
}

/* CEO Content */
.ceo-content {
    display: flex;
    flex-direction: row;
    gap: 80px;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
}

.ceo-text {
    font-size: 16px;
    line-height: 2;
    color: #333;
    flex: 1;
    padding: 40px 50px 0 50px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    text-align: justify;
}

.ceo-text p {
    margin-bottom: 0;
}

.ceo-text p:not(:last-child) {
    margin-bottom: 0.3em;
}

.signature-img {
    height: 1.2em;
    width: auto;
    vertical-align: baseline;
    margin-left: 8px;
    display: inline-block;
}

.ceo-image {
    flex: 0 0 350px;
    max-width: 350px;
}

.ceo-image img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

/* History Content */
.history-content {
    max-width: 900px;
    margin: 0 auto;
}

.history-content h2 {
    font-size: 28px;
    margin-bottom: 40px;
    text-align: center;
    color: #333;
}

.wave {
    text-align: center;
    font-size: 24px;
    margin-top: 60px;
    color: #666;
}

/* Projects List */
.projects-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.project-item {
    background-color: #fff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.project-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.project-item p {
    padding: 20px;
    color: #333;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}

/* Project Popup */
.project-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.project-popup.active {
    opacity: 1;
    visibility: visible;
}

.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    cursor: pointer;
}

.popup-content {
    position: relative;
    background-color: #fff;
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    border-radius: 0;
    box-shadow: none;
    z-index: 10001;
    display: flex;
    flex-direction: column;
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
    color: #000;
}

.popup-close:hover {
    opacity: 0.6;
}

.popup-content-wrapper {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 0;
    flex: 1;
    padding: 40px 40px;
    align-items: stretch;
}

@media (max-width: 1000px) {
    .popup-content-wrapper {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .popup-image-container {
        min-height: 350px;
        max-height: 450px;
        height: auto !important;
        width: 100% !important;
        order: 1;
    }

    .popup-info {
        padding: 30px 25px;
        order: 2;
        width: 100% !important;
    }
}

.popup-image-container {
    width: calc(100% - 40px);
    height: calc(100% - 40px);
    max-height: 500px;
    overflow: hidden;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin: 20px;
    align-self: center;
}

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

.popup-info {
    padding: 40px;
    display: flex;
    flex-direction: column;
    background: #fff;
    margin: 20px;
    align-self: center;
    height: fit-content;
}

.popup-info h2 {
    font-size: 24px;
    margin-bottom: 25px;
    color: #333;
    line-height: 1.4;
}

.popup-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popup-details p {
    margin: 0;
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.popup-details strong {
    display: inline-block;
    min-width: 100px;
    color: #555;
}

.popup-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 48px;
    color: #333;
    cursor: pointer;
    transition: opacity 0.3s;
    padding: 20px;
    line-height: 1;
    z-index: 10003;
}

.popup-nav-btn.prev {
    left: 10px;
}

.popup-nav-btn.next {
    right: 10px;
}

.popup-nav-btn:hover {
    opacity: 0.6;
}

.popup-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Projects Grid (old style - keeping for compatibility) */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.projects-grid .project-item h3 {
    padding: 20px 20px 10px;
    font-size: 20px;
    color: #333;
}

.projects-grid .project-item p {
    padding: 0 20px 20px;
    color: #666;
    font-size: 14px;
}

/* Timeline */
.timeline {
    margin-top: 30px;
}

.timeline-item {
    padding: 20px;
    margin-bottom: 20px;
    background-color: #f9f9f9;
    border-left: 4px solid #333;
    border-radius: 5px;
}

.timeline-item h3 {
    color: #333;
    margin-bottom: 10px;
}

/* Info Content */
.info-content {
    max-width: 1000px;
    margin: 0 auto;
}

.info-section {
    margin-bottom: 50px;
}

.info-section h2 {
    font-size: 28px;
    margin-bottom: 25px;
    color: #333;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}

.awards-list p {
    font-size: 16px;
    line-height: 2;
    margin-bottom: 10px;
    color: #333;
}

.recruitment-info {
    font-size: 16px;
    line-height: 2;
}

.recruitment-info p {
    margin-bottom: 10px;
    color: #333;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
    align-items: center;
}

.contact-form input,
.contact-form textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    font-family: inherit;
    width: 100%;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #333;
}

.contact-form button {
    padding: 12px 30px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: auto;
    min-width: 120px;
}

.contact-form button:hover {
    background-color: #555;
}

.thank-you {
    margin-top: 20px;
    font-size: 18px;
    color: #666;
    font-weight: bold;
}

/* Info Grid (old style - keeping for compatibility) */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

.info-item {
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 5px;
}

.info-item h3 {
    margin-bottom: 15px;
    color: #333;
}

.info-item ul {
    list-style: none;
    margin-left: 0;
}

.info-item li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

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

/* More Sections */
.more-sections {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

.more-item {
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 5px;
    text-align: center;
}

.more-item h3 {
    margin-bottom: 15px;
    color: #333;
}

/* Footer */
.footer {
    background-color: #fff;
    color: #333;
    text-align: center;
    padding: 20px 0;
    font-size: 14px;
}

.dark-mode-toggle:hover {
    background-color: #f5f5f5;
}

/* Dark Mode Styles */
body.dark-mode {
    background-color: #1a1a1a;
    color: #ffffff;
}

body.dark-mode .navbar {
    background-color: #2a2a2a;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

body.dark-mode .nav-menu a {
    color: #ffffff;
}

body.dark-mode .nav-menu a:hover {
    color: #cccccc;
}

body.dark-mode .nav-brand {
    color: #ffffff;
}

body.dark-mode .mobile-menu-toggle span {
    background-color: #ffffff;
}

body.dark-mode .dropdown-menu {
    background-color: #2a2a2a;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

body.dark-mode .dropdown-menu a:hover {
    background-color: #3a3a3a;
}

body.dark-mode .page-section {
    background-color: #1a1a1a;
}

/* 지도는 다크모드에서도 원래 스타일 유지 */
body.dark-mode .map-container,
body.dark-mode #map {
    filter: none !important;
    background-color: transparent !important;
}

body.dark-mode .page-section h1 {
    color: #ffffff;
}

body.dark-mode .text-content {
    color: #ffffff;
}

body.dark-mode .text-content h2 {
    color: #ffffff;
}

body.dark-mode .text-content h3 {
    color: #cccccc;
}

body.dark-mode .text-content p {
    color: #ffffff;
}

body.dark-mode .content-box {
    color: #ffffff;
}

body.dark-mode .contact-section {
    background-color: #2a2a2a;
}

body.dark-mode .contact-section h1,
body.dark-mode .contact-section h2 {
    color: #ffffff;
}

body.dark-mode .contact-info {
    background-color: #2a2a2a;
    color: #ffffff;
}

body.dark-mode .contact-info p {
    color: #ffffff;
}

body.dark-mode .ceo-text {
    color: #ffffff;
}

body.dark-mode .history-content h2 {
    color: #ffffff;
}

body.dark-mode .wave {
    color: #cccccc;
}

body.dark-mode .project-item {
    background-color: #2a2a2a;
}

body.dark-mode .project-item p {
    color: #ffffff;
}

body.dark-mode .popup-content {
    background-color: #1a1a1a;
}

body.dark-mode .popup-info {
    background-color: #1a1a1a;
}

body.dark-mode .popup-info h2 {
    color: #ffffff;
}

body.dark-mode .popup-details p {
    color: #ffffff;
}

body.dark-mode .popup-details strong {
    color: #cccccc;
}

body.dark-mode .popup-close {
    color: #ffffff;
}

body.dark-mode .popup-nav-btn {
    color: #ffffff;
}

body.dark-mode .timeline-item {
    background-color: #2a2a2a;
    border-left-color: #ffffff;
}

body.dark-mode .timeline-item h3 {
    color: #ffffff;
}

body.dark-mode .info-section h2 {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

body.dark-mode .awards-list p {
    color: #ffffff;
}

body.dark-mode .recruitment-info p {
    color: #ffffff;
}

body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea {
    background-color: #2a2a2a;
    color: #ffffff;
    border-color: #555;
}

body.dark-mode .contact-form input:focus,
body.dark-mode .contact-form textarea:focus {
    border-color: #ffffff;
}

body.dark-mode .contact-form button {
    background-color: #ffffff;
    color: #1a1a1a;
}

body.dark-mode .contact-form button:hover {
    background-color: #cccccc;
}

body.dark-mode .thank-you {
    color: #cccccc;
}

body.dark-mode .info-item {
    background-color: #2a2a2a;
}

body.dark-mode .info-item h3 {
    color: #ffffff;
}

body.dark-mode .info-item li {
    border-bottom-color: #444;
    color: #ffffff;
}

body.dark-mode .more-item {
    background-color: #2a2a2a;
}

body.dark-mode .more-item h3 {
    color: #ffffff;
}

body.dark-mode .footer {
    background-color: #2a2a2a;
    color: #ffffff;
}

body.dark-mode .dark-mode-toggle:hover {
    background-color: #3a3a3a;
}

@media (max-width: 768px) {
    body.dark-mode .nav-menu {
        background-color: #2a2a2a;
    }
    
    body.dark-mode .nav-menu li {
        border-bottom-color: #444;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        flex-direction: column;
        background-color: #fff;
        width: 100%;
        height: calc(100vh - 60px);
        padding: 20px;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
        transition: left 0.3s;
        gap: 0;
        align-items: flex-start;
    }

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

    .nav-menu li {
        width: 100%;
        padding: 15px 0;
        border-bottom: 1px solid #eee;
    }

    .nav-menu a {
        display: block;
        width: 100%;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 20px;
        margin-top: 10px;
    }

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

    .map-container {
        height: 300px;
    }

    .top-bar .container {
        flex-direction: column;
        gap: 5px;
    }

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

    .projects-list {
        grid-template-columns: 1fr;
    }

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

    .ceo-content {
        flex-direction: column;
    }

    .ceo-image {
        max-width: 100%;
    }

    .more-sections {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .contact-section {
        padding: 40px 0;
    }

    .contact-section h2 {
        font-size: 24px;
    }

    .page-section h1 {
        font-size: 28px;
    }

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

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

    .projects-list {
        grid-template-columns: 1fr;
    }

    .popup-content {
        width: 100%;
    }

    .popup-content-wrapper {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .popup-image-container {
        min-height: 300px;
        max-height: 400px;
        height: auto !important;
        width: 100% !important;
        order: 1;
    }

    .popup-info {
        padding: 30px 25px;
        order: 2;
        width: 100% !important;
    }

    .popup-info h2 {
        font-size: 20px;
    }

    .popup-nav-btn {
        font-size: 36px;
        padding: 15px;
    }

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

    .more-sections {
        grid-template-columns: 1fr;
    }
}

/* Completed projects editorial gallery */
.projects-page {
    --projects-paper: #f5f4f0;
    --projects-card: #fffdf9;
    --projects-ink: #292725;
    --projects-muted: #716b64;
    --projects-line: #d8d0c6;
    --projects-accent: #a45e43;
    background-color: var(--projects-paper);
    color: var(--projects-ink);
    font-family: 'Pretendard', 'Noto Sans KR', 'Malgun Gothic', Arial, sans-serif;
}

.projects-page .projects-section {
    padding: 52px 0 96px;
    background-color: var(--projects-paper);
}

.projects-page [hidden] {
    display: none !important;
}

.projects-page .projects-intro {
    max-width: 760px;
    margin-bottom: 32px;
}

.projects-page .projects-intro .projects-kicker {
    margin: 0;
    color: var(--projects-accent);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    line-height: 1.4;
    text-align: left;
}

.projects-page .projects-lead {
    max-width: 680px;
    margin: 0 0 12px;
    color: var(--projects-ink);
    font-size: 17px;
    line-height: 1.8;
}

.projects-page .projects-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0 20px;
    margin-bottom: 32px;
    border-top: 1px solid var(--projects-line);
    border-bottom: 1px solid var(--projects-line);
}

.projects-page .project-region-tabs {
    display: flex;
    gap: 26px;
    overflow-x: auto;
    padding: 0 0 1px;
    scrollbar-width: thin;
}

.projects-page .project-region-tab {
    flex: 0 0 auto;
    padding: 17px 0 14px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--projects-muted);
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    white-space: nowrap;
}

.projects-page .project-region-tab:hover,
.projects-page .project-region-tab:focus-visible,
.projects-page .project-region-tab.is-active {
    color: var(--projects-ink);
}

.projects-page .project-region-tab.is-active {
    border-bottom-color: var(--projects-accent);
    font-weight: 700;
}

.projects-page .project-autoplay-toggle {
    padding: 10px 12px;
    margin: 8px 0;
    border: 1px solid var(--projects-line);
    border-radius: 4px;
    background: var(--projects-paper);
    color: var(--projects-ink);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
}

.projects-page .project-autoplay-toggle:disabled {
    cursor: default;
    opacity: 0.65;
}

.projects-page .popup-image-container > .project-autoplay-toggle {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 2;
    margin: 0;
}

.projects-page .project-region-tab:focus-visible,
.projects-page .project-autoplay-toggle:focus-visible,
.projects-page .project-card-open:focus-visible::after,
.projects-page .popup-close:focus-visible,
.projects-page .popup-nav-btn:focus-visible,
.projects-page .popup-image-btn:focus-visible {
    outline: 2px solid var(--projects-accent);
    outline-offset: 3px;
}

.projects-page .projects-state {
    margin: 24px 0;
    padding: 26px;
    border: 1px dashed var(--projects-line);
    color: var(--projects-muted);
    font-size: 15px;
    text-align: center;
}

.projects-page .projects-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 42px 28px;
    margin-top: 0;
}

.projects-page .project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    padding: 0;
    appearance: none;
    border: 1px solid var(--projects-line);
    border-radius: 0;
    background: var(--projects-card);
    color: var(--projects-ink);
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.projects-page .project-card:hover {
    border-color: var(--projects-ink);
}

.projects-page .project-card-open {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: inherit;
    cursor: pointer;
}

.projects-page .project-card-open::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.projects-page .project-card-open:focus-visible {
    outline: none;
}

.projects-page .project-card-media {
    position: relative;
    display: flex;
    width: 100%;
    aspect-ratio: 4 / 3;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #ece7df;
}

.projects-page .project-card-media img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 700ms cubic-bezier(0.2, 0.65, 0.25, 1);
}

.projects-page .project-image-outgoing {
    pointer-events: none;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .projects-page .project-card:hover .project-card-media img {
        transform: scale(1.035);
    }
}

.projects-page .project-card:focus-within .project-card-media img {
    transform: scale(1.035);
}

@media (prefers-reduced-motion: reduce) {
    .projects-page .project-card:focus-within .project-card-media img {
        transform: none;
    }
}

.projects-page .project-image-placeholder,
.projects-page .popup-image-placeholder {
    padding: 18px;
    color: var(--projects-muted);
    font-size: 13px;
    letter-spacing: 0.03em;
    text-align: center;
}

.projects-page .project-card-body {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 22px 22px;
}

.projects-page .project-card-title {
    display: block;
    width: 100%;
    overflow-wrap: anywhere;
    font-family: inherit;
    font-size: 22px;
    line-height: 1.35;
}

.projects-page .project-card-meta {
    display: grid;
    width: 100%;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    margin-top: 18px;
    color: var(--projects-muted);
    font-size: 13px;
    line-height: 1.5;
}

.projects-page .project-card-meta span:last-child {
    overflow-wrap: anywhere;
    text-align: right;
}

.projects-page .project-popup[hidden] {
    display: none;
}

.projects-page .project-popup {
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(35, 31, 27, 0.72);
}

.projects-page .popup-overlay {
    background: transparent;
}

.projects-page .popup-content {
    width: min(1160px, 100%);
    height: min(760px, calc(100vh - 32px));
    max-height: calc(100vh - 32px);
    border: 1px solid var(--projects-line);
    border-radius: 0;
    background: var(--projects-card);
    color: var(--projects-ink);
    box-shadow: 0 24px 70px rgba(26, 22, 18, 0.3);
}

.projects-page .popup-close {
    top: 12px;
    right: 12px;
    width: 42px;
    height: 42px;
    color: var(--projects-ink);
    font-size: 30px;
}

.projects-page .popup-content-wrapper {
    display: grid;
    height: 100%;
    min-height: 0;
    grid-template-columns: minmax(0, 1.25fr) minmax(310px, 0.75fr);
    grid-template-rows: minmax(0, 1fr);
    padding: 0;
}

.projects-page .popup-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: none;
    min-height: 0;
    align-self: stretch;
    margin: 0;
    background: #ece7df;
}

.projects-page .popup-image-container img {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.projects-page .project-image-count {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 2;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
    letter-spacing: 0.06em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75), 0 0 2px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

.projects-page .popup-image-controls {
    position: absolute;
    right: 2px;
    top: 50%;
    left: 2px;
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    pointer-events: none;
}

.projects-page .popup-image-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 92px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    pointer-events: auto;
}

.projects-page .popup-image-btn svg {
    width: 28px;
    height: 60px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 1px rgba(0, 0, 0, 0.8));
    stroke-linecap: round;
    stroke-linejoin: round;
}


.projects-page .popup-info {
    min-width: 0;
    margin: 0;
    padding: 78px 46px 42px;
    overflow-y: auto;
    background: var(--projects-card);
}

.projects-page .popup-completion {
    margin: 0 0 13px;
    color: var(--projects-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.projects-page .popup-info h2 {
    margin: 0 0 30px;
    color: var(--projects-ink);
    font-family: inherit;
    font-size: clamp(25px, 3vw, 36px);
    font-weight: 400;
    line-height: 1.3;
}

.projects-page .popup-details {
    gap: 0;
}

.projects-page .popup-details p {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 16px;
    margin: 0;
    padding: 11px 0;
    border-top: 1px solid var(--projects-line);
    color: var(--projects-ink);
    font-size: 14px;
    line-height: 1.55;
}

.projects-page .popup-details strong {
    min-width: 0;
    color: var(--projects-muted);
    font-size: 12px;
    font-weight: 700;
}

.projects-page .popup-details span {
    overflow-wrap: anywhere;
}

.projects-page .popup-project-controls {
    position: absolute;
    bottom: 17px;
    right: 21px;
    display: flex;
    gap: 12px;
    z-index: 3;
    background: var(--projects-card);
}

.projects-page .popup-nav-btn {
    position: static;
    width: auto;
    height: 42px;
    padding: 0 12px;
    color: var(--projects-ink);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    transform: none;
}

.projects-page .popup-nav-btn:disabled {
    opacity: 0.25;
}

body.projects-page.dark-mode {
    --projects-paper: #1b1a18;
    --projects-card: #252321;
    --projects-ink: #f4f0e9;
    --projects-muted: #b6aea3;
    --projects-line: #4a443d;
    --projects-accent: #d19272;
}

body.projects-page.dark-mode .projects-section {
    background-color: var(--projects-paper);
}

body.projects-page.dark-mode .project-card-media,
body.projects-page.dark-mode .popup-image-container {
    background: #302d29;
}

body.projects-page.dark-mode .project-card:hover {
    border-color: var(--projects-ink);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}


@media (max-width: 768px) {
    .projects-page .projects-section {
        padding: 52px 0 68px;
    }

    .projects-page .projects-intro {
        margin-bottom: 36px;
    }

    .projects-page .projects-lead {
        font-size: 15px;
    }

    .projects-page .projects-list {
        grid-template-columns: 1fr;
        gap: 28px;
    }

}

@media (max-width: 1000px) {
    .projects-page .popup-content {
        height: calc(100vh - 20px);
        max-height: calc(100vh - 20px);
    }

    .projects-page .popup-content-wrapper {
        display: flex !important;
        flex-direction: column;
        overflow-y: auto;
    }

    .projects-page .popup-image-container {
        width: 100%;
        height: clamp(260px, 43vh, 440px) !important;
        min-height: 0;
        max-height: none;
        flex: 0 0 clamp(260px, 43vh, 440px);
    }

    .projects-page .popup-info {
        width: 100%;
        padding: 42px 26px 88px;
        flex: 0 0 auto;
        overflow: visible;
    }


    .projects-page .popup-project-controls {
        bottom: 14px;
    }
}

@media (max-width: 480px) {
    .projects-page .project-card-title {
        font-size: 20px;
    }
}

/* Shared visual language for the architecture portfolio. */
:root {
    --site-paper: #f5f4f0;
    --site-surface: #fffdf9;
    --site-ink: #242725;
    --site-muted: #6b706b;
    --site-line: #d8d9d2;
    --site-accent: #8c624b;
    --header-height: 82px;
}

body {
    font-family: 'Pretendard', 'Noto Sans KR', 'Malgun Gothic', Arial, sans-serif;
    color: var(--site-ink);
    background: var(--site-paper);
    -webkit-font-smoothing: antialiased;
}

body.dark-mode {
    --site-paper: #191c1a;
    --site-surface: #222622;
    --site-ink: #efeee8;
    --site-muted: #adafa6;
    --site-line: #41463e;
    --site-accent: #d3ad8e;
    color: var(--site-ink);
    background: var(--site-paper);
}

[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 2px solid var(--site-accent);
    outline-offset: 5px;
}

.container {
    width: calc(100% - 80px);
    max-width: 1280px;
    padding: 0;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 20px;
    padding: 10px 18px;
    z-index: 4000;
    color: var(--site-ink);
    background: var(--site-surface);
    transform: translateY(-180%);
}

.skip-link:focus {
    transform: translateY(0);
}

.navbar,
body.dark-mode .navbar {
    background: var(--site-paper);
    border-bottom: 1px solid var(--site-line);
    box-shadow: none;
}

.navbar .container {
    height: var(--header-height);
    padding: 0;
}

.nav-brand {
    gap: 14px;
}

.nav-logo {
    height: 28px;
}

.brand-caption {
    padding-left: 14px;
    border-left: 1px solid var(--site-line);
    color: var(--site-muted);
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 0.16em;
    line-height: 1.5;
}

.nav-menu {
    gap: 34px;
}

.nav-menu a,
.about-toggle,
body.dark-mode .nav-menu a {
    color: var(--site-ink);
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.045em;
    text-decoration: none;
}

.nav-menu a[aria-current="page"],
.about-toggle.is-current {
    color: var(--site-accent);
}

.about-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.about-toggle svg {
    width: 10px;
    height: 10px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    transition: transform 180ms ease;
}

.about-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.dropdown-menu,
body.dark-mode .dropdown-menu {
    min-width: 180px;
    padding: 10px;
    border: 1px solid var(--site-line);
    background: var(--site-surface);
    box-shadow: 0 14px 32px rgba(20, 24, 20, 0.07);
}

.dropdown.is-open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.dropdown-menu a,
body.dark-mode .dropdown-menu a {
    padding: 12px 14px;
    font-size: 12px;
}

.dropdown-menu a:hover,
body.dark-mode .dropdown-menu a:hover {
    background: var(--site-paper);
    color: var(--site-accent);
}

.dark-mode-toggle,
.dark-mode-toggle.active {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 8px;
    border: 1px solid var(--site-line);
    border-radius: 50%;
    background: none;
    background-image: none;
    color: var(--site-ink);
    cursor: pointer;
}

.dark-mode-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
    stroke-linecap: round;
}

.theme-sun,
body.dark-mode .theme-moon {
    display: none;
}

body.dark-mode .theme-sun {
    display: block;
}

.mobile-menu-toggle {
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle span,
body.dark-mode .mobile-menu-toggle span {
    height: 1px;
    margin: 3px 0;
    background: var(--site-ink);
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.footer,
body.dark-mode .footer {
    padding: 54px 0 24px;
    border-top: 1px solid var(--site-line);
    background: var(--site-paper);
    color: var(--site-muted);
    text-align: left;
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding-bottom: 44px;
}

.footer-brand {
    color: var(--site-ink);
    font-size: 27px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-decoration: none;
}

.footer-office {
    margin-top: 14px;
    font-size: 12px;
    line-height: 1.9;
}

.footer-links {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px 28px;
}

.footer a:not(.footer-brand) {
    color: var(--site-ink);
    font-size: 12px;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
    text-underline-offset: 5px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid var(--site-line);
    font-size: 11px;
}

.map-unavailable {
    display: grid;
    place-items: center;
    padding: 30px;
    color: var(--site-muted);
    text-align: center;
}

@media (max-width: 900px) {
    :root {
        --header-height: 72px;
    }

    .container {
        width: calc(100% - 40px);
    }

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

    .nav-menu,
    body.dark-mode .nav-menu {
        position: absolute;
        display: none;
        top: var(--header-height);
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        max-height: calc(100dvh - var(--header-height));
        overflow-y: auto;
        padding: 12px 24px 24px;
        background: var(--site-paper);
        border-bottom: 1px solid var(--site-line);
        box-shadow: none;
        transition: none;
        align-items: stretch;
        gap: 0;
    }

    .nav-menu.active,
    body.dark-mode .nav-menu.active {
        display: flex;
        flex-direction: column;
    }

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

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

    .nav-menu a,
    .about-toggle {
        display: flex;
        width: 100%;
        padding: 8px 0;
        font-size: 14px;
    }

    .about-toggle {
        justify-content: space-between;
    }

    .dropdown-menu,
    body.dark-mode .dropdown-menu {
        position: static;
        padding: 0 0 0 18px;
        margin-top: 8px;
        border: none;
        background: transparent;
        box-shadow: none;
    }

    .dropdown-menu li {
        border: none;
        padding: 4px 0;
    }

    .footer-top {
        grid-template-columns: 1fr;
        padding-bottom: 28px;
    }

    .footer-links {
        justify-content: flex-start;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

