/* 전체 공통 */
html {
    min-width: 320px;
}

body {
    font-family: 'SUIT', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', sans-serif;
    color: #333;
    background-color: #fff;
    min-width: 320px;
}

section {
    transition: background-color 0.3s ease;
}

/* 헤더 */
header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 240px;
    background-color: #fff;
    height: 100vh;
    padding: 40px 30px;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

header.scrolled {
    box-shadow: 2px 0 25px rgba(0, 0, 0, 0.12);
}

body.dark-mode header {
    background-color: #252525;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
}

body.dark-mode header.scrolled {
    box-shadow: 2px 0 25px rgba(0, 0, 0, 0.5);
}

header .thumb {
    width: 130px;
    height: 130px;
    margin-bottom: 50px;
    border: 10px solid #f8f8f8;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    transition: border-color 0.3s ease;
}

.dark-mode header .thumb {
    border: 10px solid #353535;
}

header .thumb a {
    display: block;
    transition: transform 0.3s ease;
}

header .thumb a:hover {
    transform: scale(1.05);
}

header .thumb a img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

header nav {
    width: 100%;
    display: flex;
    flex-flow: column;
    justify-content: space-between;
    height: 100%;
}

header nav .menu_list {
    list-style: none;
}

header nav .menu_list li {
    margin-bottom: 12px;
    text-align: center;
}

header nav .menu_list li a {
    display: block;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 1px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

header nav .menu_list li a:hover,
header nav .menu_list li a.active,
header nav .menu_list li a.now {
    color: #333;
    font-weight: 500;
}

header nav .menu_list li a::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background-color: #333;
    transition: width 0.3s ease;
}

body.dark-mode header nav .menu_list li a {
    color: #b0b0b0;
}

body.dark-mode header nav .menu_list li a:hover,
body.dark-mode header nav .menu_list li a.active,
body.dark-mode header nav .menu_list li a.now {
    color: #e0e0e0;
}

body.dark-mode header nav .menu_list li a::after {
    background-color: #e0e0e0;
}

header nav .menu_list li a:hover::after,
header nav .menu_list li a.active::after,
header nav .menu_list li a.now::after {
    width: 60%;
}

header nav .sns_list {display: flex; justify-content: center; gap: 10px;}
header nav .sns_list li {width: 30px; height: 30px; opacity: 0.8; transition: opacity 0.3s ease;}
header nav .sns_list li:hover {opacity: 0.5;}
header nav .sns_list li a {display: block; width: 100%; height: 100%; padding: 5px;}
header nav .sns_list li a img {width: 100%; height: 100%; object-fit: contain;}

.dark-mode header nav .sns_list li a img {filter: invert(1);}

/* 퀵버튼 */
.quick_buttons {
    position: fixed;
    bottom: 60px;
    right: 40px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quick_btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background-color: #fff;
    opacity: 0.7;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
}

.quick_btn:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
    opacity: 1;
}

.dark_mode_toggle .toggle_icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.dark_mode_toggle .toggle_icon img {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
    object-fit: contain;
}

.dark_mode_toggle:hover .toggle_icon img {
    transform: rotate(10deg);
}

body.dark-mode .quick_btn {
    border-color: #e0e0e0;
    background-color: #252525;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

body.dark-mode .quick_btn:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

body.dark-mode .quick_btn img {filter: invert(1);}

/* 메인 */
main {
    width: calc(100% - 240px);
    margin-left: 240px;
}

main section {
    padding: 120px 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 히어로 섹션 */
.hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 0;
    transition: background 0.3s ease;
}

body.dark-mode .hero {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
}

.hero_content {
    width: 100%;
    margin: 0 auto;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    overflow: hidden;
}

.hero_image {
    width: 100%;
    height: 100%;
    opacity: 0;
    animation: fadeInUp 1s ease 0.3s forwards;
    transition: opacity 0.3s ease;
}

.hero_image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.hero_text {
    text-align: center;
    opacity: 0;
    animation: fadeInUp 1s ease 0.6s forwards;
}

.hero_text h1 {
    font-size: 48px;
    font-weight: 300;
    letter-spacing: 12px;
    color: #333;
    margin: 0;
    transition: color 0.3s ease;
}

body.dark-mode .hero_text h1 {
    color: #e0e0e0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 0.95;
        transform: translateY(0);
    }
}

/* ABOUT 섹션 */
.about {
    background-color: #fff;
    
}

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

.about_wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.about_wrap h2 {
    font-size: 42px;
    font-weight: 300;
    letter-spacing: 8px;
    text-align: center;
    margin-bottom: 80px;
    color: #333;
    transition: color 0.3s ease;
}

body.dark-mode .about_wrap h2 {
    color: #e0e0e0;
}

.about_content {
    width: 100%;
}

.about_text {
    max-width: 900px;
    margin: 0 auto;
}

.about_text .intro {
    font-size: 18px;
    line-height: 2;
    text-align: center;
    margin-bottom: 80px;
    color: #555;
    transition: color 0.3s ease;
}

body.dark-mode .about_text .intro {
    color: #b0b0b0;
}

.work_info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.info_item h3 {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 20px;
    color: #333;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
    transition: color 0.3s ease, border-color 0.3s ease;
}

body.dark-mode .info_item h3 {
    color: #e0e0e0;
    border-bottom-color: #444;
}

.info_item p {
    font-size: 16px;
    line-height: 1.8;
    color: #666;
    transition: color 0.3s ease;
}

body.dark-mode .info_item p {
    color: #b0b0b0;
}

.info_item ul {
    list-style: none;
    padding: 0;
}

.info_item ul li {
    font-size: 16px;
    line-height: 2;
    color: #666;
    padding-left: 20px;
    position: relative;
    transition: color 0.3s ease;
}

body.dark-mode .info_item ul li {
    color: #b0b0b0;
}

.info_item ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #999;
}

/* PORTFOLIO 섹션 */
.portfolio {
    background-color: #f8f9fa;
    transition: background-color 0.3s ease;
}

body.dark-mode .portfolio {
    background-color: #252525;
}

.portfolio_wrap {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.portfolio_wrap h2 {
    font-size: 42px;
    font-weight: 300;
    letter-spacing: 8px;
    text-align: center;
    margin-bottom: 80px;
    color: #333;
    transition: color 0.3s ease;
}

body.dark-mode .portfolio_wrap h2 {
    color: #e0e0e0;
}

.portfolio_grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.portfolio_item {
    position: relative;
    overflow: hidden;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s ease, box-shadow 0.4s ease, background-color 0.3s ease;
    aspect-ratio: 2 / 3;
}

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

.portfolio_item:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    cursor: url('../images/icon_zoom.png'), pointer;
}

body.dark-mode .portfolio_item:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.portfolio_image {
    width: 100%; height: 100%;
    position: relative;
    overflow: hidden;
}

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

.portfolio_item:hover .portfolio_image img {
    transform: scale(1.05);
}

/* Portfolio Overlay (호버 시 설명) */
.portfolio_overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.portfolio_item:hover .portfolio_overlay {
    opacity: 1;
}

.portfolio_desc {
    color: #fff;
    font-size: 18px;
    text-align: center;
    padding: 20px;
    line-height: 1.6;
    display: none;
}

body.dark-mode .portfolio_overlay {
    background-color: rgba(0, 0, 0, 0.85);
}

/* Portfolio Modal (상세 레이어) */
.portfolio_modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio_modal.active {
    display: flex;
    opacity: 1;
}

.portfolio_modal_close {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 48px;
    color: #fff;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: transform 0.3s ease, color 0.3s ease;
    z-index: 10001;
}

.portfolio_modal_close:hover {
    transform: rotate(90deg);
    color: #ccc;
}

.portfolio_modal_content {
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    gap: 30px;
}

.portfolio_modal_image_wrap {
    position: relative;
    width: 100%;
    max-height: 90vh;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: visible;
}

.portfolio_image_container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 90vh;
    min-height: 90vh;
}

.portfolio_modal_image_wrap img {
    max-width: 100%;
    max-height: 90vh;
    min-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.1s ease-out;
    display: block;
}

.portfolio_modal_image_wrap.zoomed {
    cursor: none;
}

.portfolio_modal_image_wrap.zoomed .portfolio_image_container {
    cursor: crosshair;
}

.portfolio_magnifier {
    position: absolute;
    width: 400px;
    height: 400px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    display: none;
    pointer-events: none;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    z-index: 10003;
    background-color: transparent;
}

.portfolio_modal_image_wrap.zoomed .portfolio_magnifier {
    display: block;
}

.portfolio_magnifier::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--magnifier-bg);
    background-size: var(--magnifier-bg-size, 200% 200%);
    background-position: var(--magnifier-bg-position, -200px -200px);
    background-repeat: no-repeat;
}

.portfolio_modal_image_wrap.zoomed img {
    transform: scale(1);
}

.portfolio_modal_info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-flow: column;
    width: 0;
    margin-bottom: 20px;
}

.portfolio_modal_desc {
    text-align: center;
    color: #fff;
    font-size: 18px;
    line-height: 1.8;
    max-width: 800px;
    margin-bottom: 15px;
}
.portfolio_modal_desc #portfolioModalDesc {
    color: #fefefe;
    line-height: 1.4;
    font-size: 18px;
    font-weight: 400; display: none;
}

.portfolio_zoom_btn {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.25);
    border: 3px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10002;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.portfolio_zoom_btn:hover {
    background-color: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.portfolio_zoom_btn svg {
    width: 28px;
    height: 28px;
}

.portfolio_zoom_btn.active {
    background-color: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

body.dark-mode .portfolio_modal {
    background-color: rgba(0, 0, 0, 0.98);
}

/* GALLERY 섹션 */
.gallery {
    background-color: #fff;
}

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

.gallery_wrap {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery_wrap h2 {
    font-size: 42px;
    font-weight: 300;
    letter-spacing: 8px;
    text-align: center;
    margin-bottom: 80px;
    color: #333;
    transition: color 0.3s ease;
}

body.dark-mode .gallery_wrap h2 {
    color: #e0e0e0;
}

.gallery_grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    grid-auto-rows: 150px;
}

.gallery_item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background-color: #f0f0f0;
    cursor: pointer;
    border: 1px solid #ddd;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.dark-mode .gallery_item {
    border: 1px solid #444;
}

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

.gallery_item:hover {
    transform: scale(1.03);
}

.gallery_item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.9;
    transition: transform 0.5s ease, opacity 0.3s ease;
}

.gallery_item:hover img {
    transform: scale(1.05);
    opacity: 1;
}

/* Gallery Modal (슬라이더) */
.gallery_modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery_modal.active {
    display: flex;
    opacity: 1;
}

.gallery_modal_close {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 48px;
    color: #fff;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: transform 0.3s ease, color 0.3s ease;
    z-index: 10001;
}

.gallery_modal_close:hover {
    transform: rotate(90deg);
    color: #ccc;
}

.gallery_modal_prev,
.gallery_modal_next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    z-index: 10001;
}

.gallery_modal_prev {
    left: 30px;
}

.gallery_modal_next {
    right: 30px;
}

.gallery_modal_prev:hover,
.gallery_modal_next:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.gallery_modal_prev svg,
.gallery_modal_next svg {
    width: 24px;
    height: 24px;
}

.gallery_modal_content {
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.gallery_modal_content img {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.gallery_modal_counter {
    position: absolute;
    bottom: 30px;
    color: #fff;
    font-size: 18px;
    padding: 10px 20px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
}

.gallery_modal_counter span {color: #eee;}

/* CONTACT 섹션 */
.contact {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    transition: background 0.3s ease;
}

body.dark-mode .contact {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
}

.contact_wrap {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.contact_wrap h2 {
    font-size: 42px;
    font-weight: 300;
    letter-spacing: 8px;
    margin-bottom: 40px;
    color: #333;
    transition: color 0.3s ease;
}

body.dark-mode .contact_wrap h2 {
    color: #e0e0e0;
}

.contact_desc {
    font-size: 18px;
    line-height: 1.8;
    color: #666;
    margin-bottom: 50px;
    transition: color 0.3s ease;
    word-break: keep-all;
}

body.dark-mode .contact_desc {
    color: #b0b0b0;
}

/* Contact Form */
.contact_form {
    max-width: 800px;
    margin: 0 auto 60px;
    text-align: left;
}

.form_row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.form_group {
    margin-bottom: 30px;
}

.form_group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

body.dark-mode .form_group label {
    color: #e0e0e0;
}

.form_group input,
.form_group textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    color: #333;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: 'SUIT', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', sans-serif;
}

.dark-mode .form_group input,
.dark-mode .form_group textarea {
    background-color: #f4f4f4;
    border: 1px solid #444;
}

.form_group input:focus,
.form_group textarea:focus {
    outline: none;
    border-color: #666;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.form_group textarea {
    resize: vertical;
    min-height: 120px;
}

.form_group:has(textarea) {
    grid-column: 1 / -1;
}

.submit_btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    background-color: #333;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 20px;
}

.submit_btn:hover {
    background-color: #555;
}

.form_message {
    margin-top: 20px;
    padding: 12px;
    text-align: center;
    font-size: 14px;
    border-radius: 4px;
    display: none;
}

.form_message.success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form_message.error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.contact_info {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 60px;
    padding: 60px 0;
    border-top: 1px solid #eee;
    transition: border-color 0.3s ease;
}

.contact_info::after {
    content: ""; width: 1px; height: 50%; background-color: #ddd; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
}

.dark-mode .contact_info::after {background-color: #444;}

body.dark-mode .contact_info {
    border-top-color: #444;
}

.contact_item h3 {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 20px;
    color: #333;
    transition: color 0.3s ease;
}

body.dark-mode .contact_item h3 {
    color: #e0e0e0;
}

.contact_item p {
    font-size: 18px;
    line-height: 1.8;
    color: #666;
    transition: color 0.3s ease;
}

body.dark-mode .contact_item p {
    color: #b0b0b0;
}

.contact_email_wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.contact_email_wrap a {
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #333;
    transition: color 0.3s ease, border-color 0.3s ease;
    font-size: 18px;
}

body.dark-mode .contact_email_wrap a {
    color: #e0e0e0;
    border-bottom-color: #e0e0e0;
}

.contact_email_wrap a:hover {
    color: #666;
    border-bottom-color: #666;
}

body.dark-mode .contact_email_wrap a:hover {
    color: #b0b0b0;
    border-bottom-color: #b0b0b0;
}

.email_copy_btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.6;
}

.email_copy_btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.email_copy_btn:active {
    transform: scale(0.95);
}

.email_copy_btn img {
    width: 20px;
    height: 20px;
    display: block;
}

.dark-mode .email_copy_btn img {filter: invert(1);}

/* 토스트 팝업 */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 16px;
    z-index: 10004;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

body.dark-mode .toast {
    background-color: rgba(255, 255, 255, 0.95);
    color: #333;
}

/* FOOTER */
footer {
    text-align: right;
    padding: 10px 20px;
    border-top: 1px solid #ddd;
}
footer p {color: #333; font-size: 14px; font-weight: 400;}

.dark-mode footer {background-color: #252525; border-color: #353535;}
.dark-mode footer p {color: #ddd;}

/* 반응형 디자인 */
@media (max-width: 1400px) {
    .portfolio_grid,
    .gallery_grid {
        gap: 30px;
    }
}

@media (max-width: 1200px) {
    main section {
        padding: 100px 60px;
    }
    
    .work_info,
    .contact_info {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .form_row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .gallery_grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    header {
        width: 200px;
    }
    
    main {
        width: calc(100% - 200px);
        margin-left: 200px;
    }
    
    .portfolio_grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery_grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    .contact_info::after {display: none;}
}

@media (max-width: 768px) {
    header {
        width: 100%;
        height: auto;
        position: fixed;
        top: 0;
        left: 0;
        padding: 15px 15px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
        z-index: 1000;
    }

    header nav .menu_list li a::after {bottom: 3px;}
    
    header nav .menu_list li a:hover::after,
    header nav .menu_list li a.active::after,
    header nav .menu_list li a.now::after {
        width: 100%;
    }

    header .thumb {
        width: 70px;
        height: 70px;
        margin-bottom: 15px;
        border: 8px solid #f8f8f8;
        transition: transform 0.3s ease, opacity 0.3s ease, margin-bottom 0.3s ease, height 0.3s ease;
    }
    
    body.dark-mode header .thumb {
        border: 8px solid #353535;
    }
    
    header.compact .thumb {
        transform: translateY(-100%);
        opacity: 0;
        height: 0;
        margin-bottom: 0;
        pointer-events: none;
    }
    
    header nav {
        flex-direction: column;
        gap: 15px;
        transition: gap 0.3s ease;
    }
    
    header.compact nav {
        gap: 10px;
    }
    
    header nav .menu_list {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 15px;
    }
    
    header nav .menu_list li {
        margin-bottom: 0;
    }
    
    header nav .menu_list li a {
        font-size: 13px;
        padding: 8px 0;
    }
    
    header nav .sns_list {
        justify-content: center;
        gap: 8px;
    }
    
    header nav .sns_list li {
        width: 28px;
        height: 28px;
    }
    
    main {
        width: 100%;
        margin-left: 0;
    }
    
    main section {
        padding: 50px 20px;
        min-height: auto;
    }
    
    .hero_content {
        height: 100vh;
        min-height: 500px;
        padding-top: 80px;
    }
    
    .hero_text h1 {
        font-size: 28px;
        letter-spacing: 4px;
    }
    
    .about_wrap h2,
    .portfolio_wrap h2,
    .gallery_wrap h2,
    .contact_wrap h2 {
        font-size: 28px;
        letter-spacing: 4px;
        margin-bottom: 40px;
    }
    
    .about_text .intro {
        font-size: 16px;
        line-height: 1.8;
        margin-bottom: 50px;
        word-break: keep-all;
    }

    .about_text .intro br {display: none;}
    
    .work_info {
        gap: 40px;
    }
    
    .info_item h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .info_item p,
    .info_item ul li {
        font-size: 14px;
        line-height: 1.6;
    }
    
    .portfolio_grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .gallery_grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        grid-auto-rows: 100px;
    }
    
    .contact_desc {
        font-size: 16px;
        margin-bottom: 30px;
    }
    
    .form_group label {
        font-size: 13px;
    }
    
    .form_group input,
    .form_group textarea {
        font-size: 15px;
        padding: 12px 14px;
    }
    
    .submit_btn {
        padding: 14px;
        font-size: 15px;
    }
    
    .contact_info {
        margin-top: 40px;
        padding: 40px 0;
        gap: 30px;
    }
    
    .contact_info::after {
        display: none;
    }
    
    .contact_item h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .contact_item p {
        font-size: 16px;
    }
    
    .contact_email_wrap {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    
    .contact_email_wrap a {
        font-size: 16px;
    }
    
    .quick_buttons {
        bottom: 15px;
        right: 15px;
        gap: 10px;
    }
    
    .quick_btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    /* 모달 모바일 최적화 */
    .portfolio_modal_close,
    .gallery_modal_close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 36px;
    }
    
    .portfolio_modal_content {
        width: 100%;
        max-width: 100%;
        flex-direction: column;
        gap: 20px;
        padding: 0;
        max-height: 100vh;
        overflow-y: auto;
    }
    
    .portfolio_modal_image_wrap {
        min-height: 80vh;
        max-height: 85vh;
        width: 100%;
    }
    
    .portfolio_image_container {
        min-height: 80vh;
        max-height: 85vh;
    }
    
    .portfolio_modal_image_wrap img {
        min-height: 80vh;
        max-height: 85vh;
    }
    
    .portfolio_modal_info {
        width: 100%;
        padding: 0;
        gap: 15px;
        margin-bottom: 0;
    }
    
    .portfolio_modal_desc {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .portfolio_zoom_btn {
        display: none;
    }

    .gallery_modal_prev,
    .gallery_modal_next {
        width: 40px;
        height: 40px;
        top: auto;
        bottom: 20px;
        transform: none;
    }
    
    .gallery_modal_prev {
        left: 15px;
    }
    
    .gallery_modal_next {
        right: 15px;
    }
    
    .gallery_modal_prev svg,
    .gallery_modal_next svg {
        width: 20px;
        height: 20px;
    }
    
    .gallery_modal_content {
        width: 95%;
        padding: 0;
    }
    
    .gallery_modal_content img {
        max-height: 75vh;
    }
    
    .gallery_modal_counter {
        bottom: 15px;
        font-size: 14px;
        padding: 8px 15px;
    }
    .gallery_modal_counter span {color: #fff; font-size: 14px;}
    
    .toast {
        bottom: 20px;
        left: 50%;
        padding: 12px 20px;
        font-size: 14px;
        max-width: calc(100% - 40px);
        width: auto;
    }

    footer {
        text-align: center;
    }
}

/* 작은 모바일 (320px ~ 480px) */
@media (max-width: 480px) {
    header {
        padding: 12px 10px;
    }

    header nav .menu_list li a::after {bottom: 3px;}
    
    header nav .menu_list li a:hover::after,
    header nav .menu_list li a.active::after,
    header nav .menu_list li a.now::after {
        width: 100%;
    }
    
    header .thumb {
        width: 60px;
        height: 60px;
        margin-bottom: 12px;
        border: 6px solid #f8f8f8;
    }
    
    body.dark-mode header .thumb {
        border: 6px solid #353535;
    }
    
    header nav .menu_list {
        gap: 5px 10px;
    }
    
    header nav .menu_list li a {
        font-size: 12px;
        padding: 6px 0;
    }
    
    header nav .sns_list li {
        width: 24px;
        height: 24px;
    }
    
    main section {
        padding: 50px 15px;
    }
    
    .hero_content {
        min-height: 450px;
        padding-top: 70px;
    }
    
    .hero_text h1 {
        font-size: 24px;
        letter-spacing: 3px;
    }
    
    .about_wrap h2,
    .portfolio_wrap h2,
    .gallery_wrap h2,
    .contact_wrap h2 {
        font-size: 24px;
        letter-spacing: 3px;
        margin-bottom: 30px;
    }
    
    .about_text .intro {
        font-size: 15px;
        margin-bottom: 40px;
    }
    
    .info_item h3 {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .info_item p,
    .info_item ul li {
        font-size: 13px;
    }
    
    .portfolio_grid,
    .gallery_grid {
        gap: 10px;
    }
    
    .gallery_grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 80px;
    }
    
    .contact_desc {
        font-size: 15px;
    }
    
    .form_group input,
    .form_group textarea {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .contact_item p {
        font-size: 15px;
    }
    
    .contact_email_wrap a {
        font-size: 15px;
    }
    
    .quick_buttons {
        bottom: 45px;
        right: 12px;
    }
    
    .quick_btn {
        width: 40px;
        height: 40px;
    }
    
    .dark_mode_toggle .toggle_icon img {
        width: 20px;
        height: 20px;
    }
    
    .portfolio_modal_content {
        width: 100%;
        max-width: 100%;
        flex-direction: column;
        gap: 15px;
    }
    
    .portfolio_modal_image_wrap {
        min-height: 75vh;
        max-height: 80vh;
        width: 100%;
    }
    
    .portfolio_image_container {
        min-height: 75vh;
        max-height: 80vh;
    }
    
    .portfolio_modal_image_wrap img {
        min-height: 75vh;
        max-height: 80vh;
    }
    
    .portfolio_modal_info {
        width: 100%;
        padding: 0;
        gap: 12px;
        margin-bottom: 0;
    }
    
    .portfolio_modal_desc {
        font-size: 14px;
    }
    
    .portfolio_zoom_btn {
        display: none;
    }
    
    .gallery_modal_content img {
        max-height: 70vh;
    }
    
    .toast {
        padding: 10px 16px;
        font-size: 13px;
        max-width: calc(100% - 30px);
    }

    footer {text-align: center;}
}
