/* ========================
 * 📦 전역 변수
 * ======================= */
:root {
    /* 색상 */
    --primary-color: #266cb2;
    --secondary-color: #1e5687;
    --text-dark: #333;
    --text-medium: #444;
    --text-light: #7a7a7a;
    --background-light: #f4f6f8;
    --background-gray: #e8ecef;
    --white: #fff;
    --hero-overlay-opacity: 0.35;

    /* 섹션 박스 스타일을 위한 변수 */
    --section-box-background: #fbfbfc;
    --section-box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    --section-box-border-radius: 20px;

    /* 그림자 */
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-dark: rgba(0, 0, 0, 0.25);
    --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-btn: 0 6px 12px rgba(0, 0, 0, 0.15);
    --shadow-btn-hover: 0 10px 25px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.2);
    --shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.3);

    /* 폰트 크기 */
    --fs-sm: 0.9rem;
    --fs-base: 1rem;
    --fs-md: 1.2rem;
    --fs-lg: 1.4rem;
    --fs-xl: 2rem;
    --fs-xxl: 3rem;

    /* 전환 효과 */
    --transition-fast: all 0.25s ease-out;
    --transition-medium: all 0.35s ease-out;
    --transition-slow: all 0.5s ease-out;
    --transition-underline: width 0.3s ease;
    --transition-springy: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    /* 간격 (Spacing) */
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;

    /* 테두리 반경 */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 15px;

    --primary-color-rgb: 38, 108, 178;
    --primary-dark: #1a4d7a;
    --dark-background: #121212;
}

/* ========================
 * 📦 초기화 및 기본 스타일
 * ======================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Noto Sans KR', 'Apple SD Gothic Neo', Roboto, 'Malgun Gothic', sans-serif;
    line-height: 1.6;
    font-size: var(--fs-base);
    color: var(--text-dark);
    background-color: var(--background-light);
    font-display: swap;
}

/* 모든 섹션의 기본 스타일 유지 */
.section {
    padding: clamp(2.5rem, 5vw, 6.25rem) 1.25rem;
    max-width: 60rem;
    margin-inline: auto;
    scroll-margin-top: 80px;
}

/* ========================
 * 📦 내비게이션 바
 * ======================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
    position: fixed;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    height: 60px;
}

.nav-logo {
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--text-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    margin-left: -10px;
}

.nav-logo .logo-image {
    height: 35px;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 1.25rem;
}

.nav-menu li a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
    padding-bottom: 5px;
    line-height: 35px;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    transition: var(--transition-underline);
}

.nav-menu a:hover::after,
.nav-menu a:focus::after {
    width: 100%;
}

.nav-menu a:hover,
.nav-menu a:focus {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 1.5625rem;
    height: 0.1875rem;
    background: var(--text-dark);
    margin-bottom: 0.3125rem;
}

/* ========================
 * 🛠️ Hero 섹션 (프로필 사진형)
 * ======================== */
.hero {
    height: 400px; /* 높이 유지 */
    margin-top: 60px;
    padding: 0 1rem;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-position: center;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

/* 글래스 카드 컨테이너 */
.glass-profile-card {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 2.5rem 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 850px; /* 너비 살짝 증가 */
    width: 100%;
    animation: fadeInUp 0.8s ease-out;
}

/* 내부 레이아웃 (좌:사진 / 우:정보) */
.profile-layout {
    display: flex;
    align-items: center;
    gap: 2.5rem; /* 사진과 텍스트 사이 간격 */
    text-align: left; /* 텍스트 좌측 정렬 */
}

/* 프로필 사진 스타일 */
.profile-image-wrapper {
    flex-shrink: 0; /* 사진 크기 줄어들지 않게 */
}

.profile-img {
    width: 140px;
    height: 140px;
    border-radius: 50%; /* 원형 */
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* 텍스트 정보 스타일 */
.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 0.2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.profile-role {
    display: block;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    margin-bottom: 1rem;
}

.profile-bio {
    font-size: 1rem;    
    color: rgba(255, 255, 255, 0.85) !important;   
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* 액션 버튼들 */
.profile-actions {
    display: flex;
    gap: 1rem;
}

.action-icon {
    color: var(--white);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.action-icon:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* 모바일 대응 (세로 배치) */
@media (max-width: 768px) {
    .hero { height: auto; padding: 6rem 1rem 2rem; } /* 상단 여백 확보 */
    
    .profile-layout {
        flex-direction: column; /* 세로로 쌓기 */
        text-align: center;
        gap: 1.5rem;
    }

    .profile-img {
        width: 120px;
        height: 120px;
    }

    .profile-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* ========================
 * 📦 섹션 제목 및 텍스트
 * ======================= */
.section h2 {
    text-align: left; /* 좌측 정렬 */
    margin-bottom: 2rem;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color); /* 제목에 포인트 컬러 사용 */
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0; /* 섹션 전체를 가로지르는 선 */
    position: relative;
}

.section h2::after {
    display: none; 
}

.section p {
    text-align: left;
    color: var(--text-medium);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

/* About 섹션 링크 버튼 스타일 */
.about-content {
    text-align: left;
    max-width: 100%; /* 너비 제한 해제 (박스 꽉 차게) */
}

.about-links {
    justify-content: flex-start; /* 버튼들도 좌측 정렬 */
}

.link-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: transform 0.2s, background-color 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.link-btn:hover {
    transform: translateY(-2px);
    background-color: var(--secondary-color);
}

/* 깃허브 링크 스타일 */
.github-link {
    color: #58baff;
    text-decoration: none;
    font-weight: 500;
}

.github-link:hover {
    color: #2389f0;
    text-decoration: underline;
}

/* ========================
 * 📦 '소개' 이하 섹션 박스 스타일
 * ======================= */
#about,
#education,
#certification,
#projects,
#skills,
#contact,
#gallery {
    background: var(--section-box-background);
    border-radius: var(--section-box-border-radius);
    box-shadow: var(--section-box-shadow);
    margin-bottom: 2.5rem;
    padding: 3.5rem 3rem;
}

/* 자격증 섹션 */
.certification-list p {
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cert-item {
    display: inline-block;
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
    transition: all 0.3s ease;
}

.cert-item::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.cert-item:hover {
    color: var(--secondary-color);
    transform: translateY(-2px);
    text-shadow: 0 2px 5px rgba(var(--primary-color-rgb, 38, 108, 178), 0.2);
}

.cert-item:hover::after {
    width: 100%;
}

/* ====================================
 * 📂 프로젝트 리스트 (고도화: 좌측 정보 + 우측 상단 GitHub)
 * ==================================== */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-row {
    display: flex;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-card);
    overflow: visible; 
    border: 1px solid rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    position: relative; /* z-index 적용을 위해 */
}

.project-row:hover {
    transform: translateY(0px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(0,0,0,0.1);
    z-index: 10; 
}

/* --- [좌측 컬럼] 이미지 + 메타정보 --- */
.project-left-col {
    flex: 0 0 240px; /* 너비 고정 */
    display: flex;
    flex-direction: column;
    background-color: #f9f9f9;
    border-right: 1px solid rgba(0,0,0,0.05);
    border-top-left-radius: var(--border-radius-lg);
    border-bottom-left-radius: var(--border-radius-lg);    
    overflow: hidden; 
}

/* 정사각형 이미지 박스 */
.project-img-box {
    width: 100%;
    height: 240px; /* 정사각형 유지 */
    overflow: hidden;
}

.project-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

/* ✨ [수정] 호버 시 이미지 확대 비율 축소 (가독성 개선) */
.project-row:hover .project-img-box img {
    transform: scale(1.005); /* 1.02 -> 1.01로 아주 미세하게 변경 */
}

/* 하단 메타 정보 (기간, 인원) */
.project-meta-info {
    padding: 0.8rem 1rem; 
    display: flex;
    flex-direction: column;
    gap: 0.4em;
    justify-content: center;
    flex-grow: 1;
    font-size: 1.0rem;
    color: var(--text-medium);
    border-top: 1px solid rgba(0,0,0,0.05);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.meta-icon {
    font-size: 1.1rem;
}

.meta-text {
    font-weight: 500;
}

/* --- [우측 컬럼] 콘텐츠 --- */
.project-content {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

/* 헤더 영역 (제목 + GitHub 아이콘) */
.project-header {
    display: flex;
    justify-content: space-between; /* 양끝 정렬 */
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.project-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-dark);
    margin-right: 15px;
    line-height: 1.3;
    flex: 1; /* 제목이 남은 공간 차지 */
}

/* 아이콘 버튼 그룹 */
.header-icons {
    display: flex;
    gap: 8px; /* 아이콘 간 간격 */
    flex-shrink: 0; /* 줄어들지 않게 */
    margin-top: -4px; /* 시각적 높이 보정 */
}

/* 공통 아이콘 버튼 스타일 */
.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: transparent;
    border: 1px solid rgba(0,0,0,0.1);
    color: #666;
    transition: all 0.2s ease;
    cursor: pointer;
    padding: 0;
}

.icon-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor; /* GitHub 아이콘용 */
}

/* 아키텍처 아이콘은 stroke 기반이라 fill 제거 */
.btn-arch svg {
    fill: none; 
    stroke: currentColor;
}

/* 호버 효과 */
.icon-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* GitHub 버튼 호버 */
.btn-github:hover {
    background-color: #24292e;
    color: #fff;
    border-color: #24292e;
}

/* 아키텍처 버튼 호버 */
.btn-arch:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* 🌙 다크모드 대응 */
body[data-theme="dark"] .icon-btn {
    border-color: rgba(255,255,255,0.2);
    color: #aaa;
}

body[data-theme="dark"] .btn-github:hover {
    background-color: #fff;
    color: #24292e;
}

body[data-theme="dark"] .btn-arch:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* 우측 상단 GitHub 아이콘 스타일 */
.github-corner-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999; /* 기본은 연한 회색 */
    transition: all 0.2s ease;
    padding: 6px;
    border-radius: 50%;
    margin-top: -5px; /* 시각적 보정 */
}

.github-corner-icon svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
}

.github-corner-icon:hover {
    color: #24292e; /* 호버 시 GitHub 색상 */
    background-color: rgba(0,0,0,0.08);
    transform: scale(1.1);
}

/* 기술 스택 태그 */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

.tech-tag {
    font-size: 0.85rem;
    background-color: var(--background-gray);
    color: var(--text-medium);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-weight: 600;
    border: 1px solid rgba(0,0,0,0.05);
}

.project-desc {
    font-size: 1rem;
    color: var(--text-medium);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    text-align: left !important;
}

.project-links {
    display: flex;
    gap: 10px;
    margin-top: auto;
    align-items: center;
}

/* 링크 버튼 스타일 */
.btn-small {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background-color: var(--white);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-small:hover {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: var(--shadow-btn);
}

/* ========================
 * 📦 스킬
 * ======================= */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem; /* 간격 조정 */
    justify-content: center;
    list-style: none;
}

.skills-list li {
    background: var(--background-gray);
    padding: 0.5rem 1.2rem; /* 크기는 조금 더 크게 */
    border-radius: 8px;     /* 둥근 사각형 */
    font-size: var(--fs-base);
    font-weight: 600;
    color: var(--text-medium);
    border: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition-fast);
    cursor: default; /* 커서 모양 */
}

.skills-list li:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(var(--primary-color-rgb), 0.3);
}

/* ========================
 * 📦 연락처 양식
 * ======================= */
#contact-form {
    display: grid;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
    padding: 0;
}

#contact-form input,
#contact-form textarea {
    padding: 0.8rem;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    font-size: var(--fs-base);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

#contact-form input:focus,
#contact-form textarea:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(38, 108, 178, 0.2);
}

#contact-form button {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.8rem;
    border-radius: 8px;
    box-shadow: var(--shadow-btn);
    transition: var(--transition-medium);
    border: none;
    cursor: pointer;
}

#contact-form button:hover,
#contact-form button:focus {
    transform: translateY(-3px);
    box-shadow: var(--shadow-btn-hover);
}

/* ========================
 * 📦 푸터
 * ======================= */
footer {
    text-align: center;
    padding: 1.5rem;
    background: var(--background-light);
    color: var(--text-light);
    font-size: var(--fs-sm);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.03);
}

/* ========================
 * 📦 갤러리 및 기타 스타일
 * ======================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 1.5rem;
    background: #fafafa;
    border-radius: 16px;
    box-shadow: var(--shadow-light);
}

.section.gallery {
    padding-top: 100px;
    padding-bottom: 2rem;
    min-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-item {
    position: relative;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    transition: var(--transition-medium);
    overflow: hidden;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.gallery-grid img {
    width: 100%;
    height: 350px;
    object-fit: contain;
    padding: 12px;
    display: block;
}

/* ========================
 * 📦 모달 및 유틸리티
 * ======================= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--white);
    padding: var(--spacing-xxl) var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 600px;
    position: relative;
    transform: translateY(-50px);
    transition: transform var(--transition-slow) cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modal-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-md);
}

.modal-overlay.show .modal-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-lg);
    background: none;
    border: none;
    font-size: var(--fs-xl);
    color: var(--text-light);
    cursor: pointer;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.close-btn:hover {
    color: #555;
    transform: rotate(90deg);
}

/* 스크롤바 커스텀 */
::-webkit-scrollbar {
    width: 10px;
    background-color: var(--background-gray);
}

::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 5px;
    border: 2px solid var(--background-gray);
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-dark);
}

/* Typing Effect 링크 스타일 */
#typing-effect a {
  text-decoration: underline;
  font-weight: 600;
  color: #c7def8;
  transition: color 0.3s ease;
}

#typing-effect a:hover {
  color: #2275d4;
}

/* 다크모드 스위치 */
.dark-toggle-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0; width: 0; height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
}

.slider::before {
    position: absolute;
    content: "☀️";
    height: 26px; width: 26px;
    left: 4px; bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2em;
    color: #FFD700;
}

.switch input:checked+.slider {
    background-color: var(--primary-color);
}

.switch input:checked+.slider::before {
    transform: translateX(26px);
    background-color: #000;
    content: "🌙";
    color: #F0E68C;
}

/* ========================
 * 📱 통합 반응형 디자인 (768px 이하)
 * ======================= */
@media (max-width: 768px) {
    .nav-menu {
        position: absolute;
        top: 60px;
        right: 0;
        width: 100%;
        max-width: 124px;
        padding: 0;
        align-items: center;
        gap: 0.7rem;
        background: var(--white);
        border-radius: 15px;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
        display: flex;
        flex-direction: column;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        pointer-events: none;
        transition: max-height 0.4s ease-out, opacity 0.4s ease-out, padding 0.4s ease-out;
    }

    .nav-menu.active {
        max-height: 350px;
        opacity: 1;
        pointer-events: auto;
        padding: 1rem 1.2rem;
    }

    .hamburger {
        display: flex;
        justify-content: space-between;
        width: 30px;
        height: 24px;
    }

    .hamburger span {
        width: 100%;
        height: 3px;
        background: var(--text-dark);
        border-radius: 5px;
        transition: all 0.4s ease;
        margin-bottom: 0;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(10px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-10px) rotate(-45deg);
    }

    .hero h1 { font-size: var(--fs-xl); }
    .hero p { font-size: var(--fs-base); }

    .section {
        padding: var(--spacing-xxl) var(--spacing-md);
    }

    /* 프로젝트 리스트 모바일 대응 */
    .project-row {
        flex-direction: column;
    }

    .project-left-col {
        flex: none;
        width: 100%;
        flex-direction: row; /* 모바일: 이미지 옆에 메타정보 */
        align-items: center;
        border-right: none;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    }

    .project-img-box {
        width: 100px;
        height: 100px;
    }

    .project-meta-info {
        border-top: none;
        padding: 0 1rem;
        font-size: 0.85rem;
    }
    
    .project-content {
        padding: 1.5rem;
    }
}

/* ========================
 * 🌙 다크모드 스타일 통합
 * ======================= */
body[data-theme="dark"] {
    --primary-color: #90caf9;
    --secondary-color: #42a5f5;
    --text-dark: #eeeeee;
    --text-medium: #bbbbbb;
    --text-light: #999999;
    --background-light: #121212;
    --background-gray: #1e1e1e;
    --section-box-background: #1c1c1c;
    --white: #ffffff;
    --primary-color-rgb: 144, 202, 249;
    --primary-dark: #64b5f6;
    --dark-background: #121212;

    background-color: #121212;
    color: #e0e0e0;
}

/* 다크모드 네비게이션 */
body[data-theme="dark"] .navbar {
    background: rgba(0, 0, 0, 0.95);
    box-shadow: 0 3px 12px rgba(255, 255, 255, 0.1);
}
body[data-theme="dark"] .nav-logo,
body[data-theme="dark"] .nav-menu a { color: var(--white) !important; }
body[data-theme="dark"] .hamburger span { background: var(--white); }
body[data-theme="dark"] .nav-menu.active { background: #333; }

/* 다크모드 프로젝트 카드 */
body[data-theme="dark"] .project-row {
    background-color: #2a2a2a;
    border: 1px solid #444;
}
body[data-theme="dark"] .project-left-col {
    background-color: #222;
    border-color: #444;
}
body[data-theme="dark"] .project-meta-info { border-top-color: #444; }
body[data-theme="dark"] .project-title { color: var(--white); }
body[data-theme="dark"] .project-desc { color: #bbb; }

/* ✨ [수정] 다크모드 태그 가독성 개선 */
body[data-theme="dark"] .tech-tag {
    background-color: rgba(144, 202, 249, 0.15); /* 반투명 Primary Color */
    color: var(--primary-color);
    border: 1px solid var(--primary-color);       
}

/* 다크모드 버튼 & 아이콘 */
body[data-theme="dark"] .github-corner-icon { color: #888; }
body[data-theme="dark"] .github-corner-icon:hover {
    color: #fff;
    background-color: rgba(255,255,255,0.15);
}
body[data-theme="dark"] .btn-small {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}
body[data-theme="dark"] .btn-small:hover {
    background-color: var(--primary-color);
    color: #121212;
}

/* ✨ [수정] 다크모드 스킬 리스트 (태그와 동일 스타일) */
body[data-theme="dark"] .skills-list li {
    background-color: rgba(144, 202, 249, 0.15);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}
body[data-theme="dark"] .skills-list li:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* 다크모드 기타 요소 */
body[data-theme="dark"] .link-btn { background-color: #fff; color: #333; }
body[data-theme="dark"] #contact-form input,
body[data-theme="dark"] #contact-form textarea {
    background: #2a2a2a; border-color: #555; color: var(--text-dark);
}
body[data-theme="dark"] footer { background: #0d0d0d; }
body[data-theme="dark"] .modal-content { background-color: var(--background-gray); }
body[data-theme="dark"] .close-btn { color: #bbb; }
body[data-theme="dark"] .close-btn:hover { color: #eee; }

/* 다크모드 스크롤바 */
body[data-theme="dark"] ::-webkit-scrollbar { background-color: var(--dark-background); }
body[data-theme="dark"] ::-webkit-scrollbar-thumb { border: 2px solid var(--dark-background); }


/* 이력서형 리스트 스타일 (교육/경력 등) */
.resume-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.resume-item {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.resume-date {
    flex: 0 0 160px; /* 날짜 영역 고정 너비 */
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.95rem;
    padding-top: 4px; /* 시각적 높이 보정 */
}

.resume-content h3 {
    margin: 0 0 0.3rem 0;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.resume-content p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-medium);
}

/* 자격증 리스트 스타일 */
.cert-list-styled {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* 반응형 그리드 */
    gap: 1rem;
}

.cert-list-styled li {
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.05);
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    cursor: pointer; 
}

.cert-list-styled li:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
    border-color: var(--primary-color);
}

.cert-name {
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.cert-issuer {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .resume-item {
        flex-direction: column;
        gap: 0.5rem;
    }
    .resume-date {
        flex: none;
        color: var(--primary-color);
    }
}

/* 다크모드 대응 */
body[data-theme="dark"] .cert-list-styled li {
    background: #2a2a2a;
    border-color: #444;
}
body[data-theme="dark"] .cert-name { color: var(--white); }

/* ====================================
 * 📸 갤러리 전용 스타일 (관리자/업로드/삭제) - 복구됨
 * ==================================== */

/* 1. 업로드 플로팅 버튼 (FAB) */
.upload-fab {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 65px;
    height: 65px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 40px;
    line-height: 60px;
    text-align: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1000;
}

.upload-fab:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: var(--shadow-hover);
}

/* 2. 관리자 로그인 컨테이너 */
.admin-login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 18px 25px;
    background: var(--section-box-background);
    border-radius: var(--section-box-border-radius);
    box-shadow: var(--section-box-shadow);
    max-width: 480px;
    margin: 40px auto 20px;
    transition: all 0.3s ease;
}

.admin-login-container input {
    padding: 12px 16px;
    border: 1px solid #d0d0d0;
    border-radius: 10px;
    outline: none;
}

.admin-login-container button {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    font-weight: 600;
}

/* 3. 삭제 버튼 (이미지 위) */
.delete-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.gallery-item:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    background-color: #dc3545;
    transform: scale(1.1);
}

/* 4. 다중 선택 체크박스 */
.gallery-item .select-checkbox {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    appearance: none;
    background-color: rgba(255, 255, 255, 0.85);
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    transition: opacity 0.2s ease;
}

.gallery-item:hover .select-checkbox,
.gallery-item .select-checkbox:checked {
    opacity: 1;
}

.gallery-item .select-checkbox:checked {
    background-color: var(--primary-color);
}

.gallery-item .select-checkbox:checked::after {
    content: '✔️';
    color: white;
    font-size: 18px;
    display: block;
    text-align: center;
    line-height: 24px;
}

/* 5. 업로드 폼 (모달 내부) */
.file-input-label {
    background-color: #ecf0f1;
    color: #34495e;
    padding: 1.2rem 2.5rem;
    border-radius: 8px;
    cursor: pointer;
    display: inline-block;
    width: 100%;
    text-align: center;
    border: 2px solid transparent;
}

.file-input-label:hover {
    background-color: #bdc3c7;
}

#upload-form button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 3rem;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    margin-top: 1rem;
    font-weight: bold;
}

/* 🌙 다크모드 대응 (갤러리 관리 기능) */
body[data-theme="dark"] .upload-fab {
    box-shadow: 0 6px 18px rgba(255, 255, 255, 0.25);
}

body[data-theme="dark"] .admin-login-container {
    background-color: #242424;
    border: 1px solid #333;
}

body[data-theme="dark"] .admin-login-container input {
    background-color: #383838;
    border-color: #555;
    color: var(--white);
}

body[data-theme="dark"] .file-input-label {
    background-color: #333;
    color: var(--white);
}

/* ====================================
 * 📸 갤러리 추가 스타일 (이미지 확대 & 다크모드 보강)
 * ==================================== */

/* 1. 이미지 확대 모달 */
.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9); /* 배경을 아주 어둡게 */
    z-index: 3000; /* 다른 요소보다 위에 */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
    animation: fadeIn 0.3s forwards;
}

.image-overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    object-fit: contain;
}

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

/* 2. 갤러리 다크모드 디테일 보강 */
body[data-theme="dark"] .gallery-grid {
    background: #1c1c1c; /* 섹션 박스와 동일한 배경색 */
    border: 1px solid #333;
}

body[data-theme="dark"] .gallery-item {
    background: #2a2a2a;
    border-color: #444;
}

body[data-theme="dark"] .gallery-controls {
    color: var(--text-dark);
}

/* 관리자 로그인 박스 다크모드 */
body[data-theme="dark"] .admin-login-container {
    background-color: #1c1c1c;
    border: 1px solid #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

body[data-theme="dark"] .admin-login-container input {
    background-color: #2a2a2a;
    border-color: #444;
    color: #fff;
}

/* 업로드 모달 다크모드 */
body[data-theme="dark"] .modal-content {
    background-color: #1c1c1c;
    color: #e0e0e0;
}

body[data-theme="dark"] .file-input-label {
    background-color: #2a2a2a;
    color: #ccc;
    border: 1px solid #444;
}

body[data-theme="dark"] .file-input-label:hover {
    background-color: #333;
}

/* ====================================
 * 🏗️ 아키텍처 슬라이더 모달 스타일 
 * ==================================== */
.arch-modal-content {
    width: 95vw;           /* 화면 너비의 95% */
    max-width: 1400px;     /* 최대 너비 제한 */
    height: 90vh;          /* 화면 높이의 90% */
    padding: 2rem;
    display: flex;
    flex-direction: column;
    background-color: var(--white);
}

.arch-slider-container {
    flex: 1;               /* 남은 높이 모두 차지 */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
    position: relative;
    overflow: hidden;
}

/* 이미지 래퍼 */
.arch-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;          /* 부모 높이 꽉 채움 */
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.arch-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;   /* 비율 유지하며 전체 보이기 */
    transition: transform 0.3s ease;
}

/* 슬라이더 버튼 (화살표) */
.slider-btn {
    background: rgba(0, 0, 0, 0.1);
    border: none;
    font-size: 2rem;
    color: var(--text-medium);
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 50%;
    transition: all 0.2s;
    user-select: none;
    z-index: 5;
}

.slider-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* 페이지 카운터 */
.slider-counter {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    z-index: 10;
}

/* 다크모드 대응 */
body[data-theme="dark"] .arch-image-wrapper {
    background: #222;
}
body[data-theme="dark"] .slider-btn {
    color: #ccc;
    background: rgba(255, 255, 255, 0.1);
}
body[data-theme="dark"] .slider-btn:hover {
    background: var(--primary-color);
    color: white;
}


/* ====================================
 * 아키텍처 버튼 상단 넛지 
 * ==================================== */

/* 툴팁 컨테이너 (버튼) */
.btn-arch {
    position: relative; /* 툴팁 위치 기준점 */
}

/* 툴팁 본체 */
.arch-tooltip {
    position: absolute;
    bottom: 100%; /* 버튼 바로 위 */
    left: 50%;
    transform: translateX(-50%) translateY(10px); /* 초기 위치 (약간 아래) */
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: bold;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none; /* 클릭 방해 금지 */
    z-index: 10;
}

/* 말풍선 꼬리 */
.arch-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--primary-color) transparent transparent transparent;
}

/* 툴팁 활성화 클래스 */
.arch-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-8px); /* 위로 떠오르는 효과 */
    animation: bounceTooltip 2s ease-in-out forwards; /* 2초 후 사라짐 */
}

/* 2초 후 사라지는 애니메이션 */
@keyframes bounceTooltip {
    0%, 80% { opacity: 1; transform: translateX(-50%) translateY(-8px); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-15px); }
}
