/* =============== 기본 설정 =============== */
:root {
    --main-bg: linear-gradient(135deg, #cde6fa 0%, #7bb6fc 100%);
    --main-card-bg: #fff;
    --main-profile-circle-bg: linear-gradient(135deg, #7bb6fc 0%, #4596e4 100%);
    --main-border: #e6ecf2;
    --main-text-color: #244171;
    --accent: #4596e4;
    --accent-bg: #e8f4fe;
    --section-bg-skills: linear-gradient(135deg, #ecf6ff 0%, #cde6fa 100%);
    --section-bg-projects: linear-gradient(120deg, #ecf6ff 0%, #bee5fc 100%);
    --footer-bg: #244171;
    --footer-text: #fff;
}

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

body, html {
    min-height: 100vh;
    height: 100%;
}

body {
    font-family: 'Noto Sans KR', 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--main-text-color);
    background: var(--main-bg);
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* =============== 네비게이션 =============== */
.cover-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    height: 72px;
    border-bottom: 1px solid var(--main-border);
}

.nav-brand {
    position: absolute;
    left: 32px;
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: 2px;
    color: var(--main-text-color);
}

.cover-nav-menu {
    display: flex;
    gap: 50px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    font-size: 19px;
    color: var(--main-text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
    padding-bottom: 8px;
}

.nav-link.active,
.nav-link:hover {
    color: var(--accent);
}

.nav-link::after {
    content: '';
    display: block;
    position: absolute;
    left: 0; bottom: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

.nav-link.active::after, .nav-link:hover::after {
    width: 100%;
}

/* =============== 섹션 공통 설정 =============== */
section {
    min-height: 100vh;
    height: 100vh;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding-top: 72px;
    box-sizing: border-box;
}

/* =============== 섹션 배경색만 수정 =============== */

/* 표지는 하늘색 그라데이션 유지 */
.cover-page {
    background: linear-gradient(135deg, #cde6fa 0%, #7bb6fc 100%);
}

/* 메인 섹션 - 흰색 배경 */
.main-section {
    background: #ffffff;
}

/* 기술 섹션 - 연한 회색 배경 */
.skills {
    background: #f8f9fa;
    padding: 0;
    min-height: 100vh;
    display: flex; 
    align-items: center; 
    justify-content: center;
}

/* 프로젝트 섹션 - 흰색 배경 */
.projects {
    background: #ffffff;
    padding: 0;
    min-height: 100vh;
    display: flex; 
    align-items: center; 
    justify-content: center;
}

/* 푸터 - 어두운 색 유지 */
.footer {
    min-height: 220px;
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 36px 0 10px 0;
    text-align: center;
    width: 100%;
}


/* =============== 표지 페이지 =============== */
.cover-content {
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    height: calc(100vh - 72px);
}

.cover-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100vw;
    gap: 36px;
}

.hero-text .main-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(68px, 9vw, 140px);
    font-weight: 800;
    color: #fff;
    text-align: center;
    word-spacing: 10px;
    letter-spacing: 8px;
    margin-bottom: 50px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.09);
}

/* 배경 원 */
.bg-elements { 
    position: absolute; 
    top:0; left:0; right:0; bottom:0; 
    z-index:0;
}

.floating-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    box-shadow: 0 4px 18px rgba(127,182,252,0.16);
    filter: blur(2px);
}

.circle-1 { 
    width: 220px; height: 220px; 
    top: 18%; left: 11%;
    animation: float 6s ease-in-out infinite;
}

.circle-2 { 
    width: 130px; height: 130px; 
    top: 68%; right: 9%;
    animation: float 8s ease-in-out infinite reverse;
}

.circle-3 { 
    width: 80px; height: 80px; 
    bottom: 14%; left: 25%;
    animation: float 7s ease-in-out infinite;
}

@keyframes float {
    0%,100% {transform: translateY(0);}
    50%{transform: translateY(-20px);}
}

/* 스크롤 인디케이터 */
.scroll-indicator {
    position: absolute;
    bottom: 45px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-down-btn { 
    color: #fff; 
    opacity: 0.9; 
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s;
}

.scroll-text { 
    font-size: 13px; 
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.scroll-arrow {
    width: 38px; height: 38px;
    border: 2px solid #fff; 
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center;
}

.scroll-arrow i { 
    font-size: 17px; 
    animation: bounce 2s infinite;
}

@keyframes bounce { 
    0%,20%,50%,80%,100%{transform:translateY(0);} 
    40%{transform:translateY(-8px);} 
    60%{transform:translateY(-4px);} 
}

.scroll-down-btn:hover { 
    opacity:1;
    transform: translateY(-5px);
}

.scroll-down-btn:hover .scroll-arrow { 
    background: rgba(69, 150, 228, 0.2); 
    border-color: var(--accent);
}

/* =============== 메인 섹션 =============== */
.main-content {
    width: 1200px;
    max-width: 98vw;
    margin: 0 auto;
    display: flex;
    align-items: center; 
    justify-content: center;
}

.profile-section {
    display: flex;
    gap: 54px;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.profile-image {
    flex: 0.90;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-circle {
    width: 230px; 
    height: 230px;
    background: var(--main-profile-circle-bg);
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 5.5rem;
    color: #fff;
    box-shadow: 0 12px 32px rgba(50,148,232,0.13);
    position: relative;
    transition: transform 0.3s ease;
}

.profile-circle:hover {
    transform: scale(1.05);
}

.profile-circle::after {
    content: '';
    position: absolute;
    left: 50%; top: 50%;
    width: 240px; height: 240px;
    transform: translate(-50%,-50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(127,182,252,0.16) 0%, rgba(255,255,255,0.01) 65%);
    z-index: -1;
}

.profile-text {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 15px;
    min-width: 380px;
}

.profile-text h2 {
    font-size: 2.7rem;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--main-text-color);
}

.profile-text .highlight {
    color: var(--accent);
    font-weight: 800;
}

.main-subtitle {
    color: #577dbd;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    font-weight: 500;
    margin-bottom: 8px;
}

.main-description {
    margin: 20px 0 4px 0;
    font-size: 1rem;
    color: #42619e;
}

.main-description h4 {
    display: inline-block; 
    margin-right: 10px; 
    font-size: 16px; 
    color: var(--accent); 
    font-weight: 700; 
    margin-bottom: 0;
}

.main-description p { 
    font-size: 1rem; 
    color: #3b567e; 
    margin-bottom: 7px;
}

.main-stats {
    display: flex;
    gap: 48px;
    margin: 30px 0 12px 0;
}

.stat-item {
    display: flex;
    align-items: flex-start;
    gap: 13px;
}

.stat-item i {
    color: var(--accent);
    font-size: 1.3rem;
    min-width: 22px;
    margin-top: 5px;
}

.stat-content h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--main-text-color);
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-content p {
    font-size: 13px;
    color: #42619e;
    margin-bottom: 3px;
}

.stat-content span {
    font-size: 12px;
    color: #888;
}

.main-buttons { 
    display: flex; 
    gap: 18px; 
    margin-top: 22px;
}

.btn {
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: background 0.3s, color 0.3s, border 0.3s;
    display: inline-flex; 
    align-items: center; 
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: #377fcc;
}

.btn-secondary {
    background: #fff;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-secondary:hover {
    background: var(--accent-bg);
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: white;
}

/* =============== Skills 섹션 =============== */
.skills {
    padding: 0;
    min-height: 100vh;
    display: flex; 
    align-items: center; 
    justify-content: center;
}

.skills-container {
    width: 1200px;
    max-width: 96vw;
    margin: 0 auto;
    padding: 0;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 2.2rem;
    color: var(--main-text-color);
    letter-spacing: -0.02em;
    position: relative;
}

.section-title::after {
    content: '';
    width: 48px;
    height: 3px;
    background: var(--accent);
    display: block;
    position: absolute;
    left: 50%;
    bottom: -7px;
    transform: translateX(-50%);
    border-radius: 2px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(312px, 1fr));
    gap: 32px;
}

.skill-category {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(127,182,252,0.05);
    padding: 2rem 1.5rem;
    border: 1px solid var(--main-border);
    transition: box-shadow 0.22s, transform 0.22s;
}

.skill-category:hover {
    box-shadow: 0 15px 35px rgba(127,182,252,0.14);
    transform: translateY(-5px);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 13px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-bg);
}

.category-header i {
    font-size: 22px;
    color: var(--accent);
}

.category-header h3 {
    font-size: 1.07rem;
    color: var(--main-text-color);
    font-weight: 700;
    margin: 0;
}

.skill-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.5rem;
}

.skill-item {
    background: #f4f9fd;
    padding: 1.1rem 0.7rem;
    border-radius: 9px;
    text-align: center;
    transition: background 0.19s, border-color 0.19s;
    border: 1.5px solid transparent;
}

.skill-item:hover {
    background: #ecf6fe;
    border-color: var(--accent);
}

.skill-item i {
    font-size: 1.6rem; 
    margin-bottom: 0.4rem; 
    color: var(--accent);
}

.skill-item span { 
    display: block; 
    font-size: 1rem; 
    color: #42619e; 
    font-weight: 500;
}

/* =============== Projects 섹션 =============== */
.projects {
    padding: 0;
    min-height: 100vh;
    display: flex; 
    align-items: center; 
    justify-content: center;
}

.projects-container {
    width: 900px;
    max-width: 90vw;
    margin: 0 auto;
    padding: 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.3rem;
}

.project-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(113,169,247,0.08);
    transition: box-shadow 0.3s, transform 0.3s;
    width: 100%;
    margin: 0 auto;
}

.project-card:hover {
    box-shadow: 0 15px 35px rgba(127,182,252,0.18);
    transform: translateY(-8px);
}

.project-image {
    height: 180px;
    background: linear-gradient(135deg, #7bb6fc 0%, #4596e4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-placeholder { 
    font-size: 3rem; 
    color: #fff;
}

.project-content { 
    padding: 1.15rem 1.3rem;
}

.project-content h3 {
    font-size: 1.13rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #244171;
}

.project-content p {
    color: #42619e;
    line-height: 1.56;
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap; 
    gap: 0.5rem;
    margin-bottom: 0.7rem;
}

.project-tech span {
    background: #ecf6fe;
    color: #4596e4;
    padding: 0.25rem 0.7rem;
    border-radius: 18px;
    font-size: 0.85rem;
    font-weight: 500;
}

.project-links { 
    display: flex; 
    gap: 0.5rem;
}

/* =============== 푸터 =============== */
.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 30px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: #fff;
    font-size: 1.36rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #4596e4;
}

/* =============== 반응형 디자인 =============== */
@media (max-width: 1200px) {
    .main-content, .skills-container, .projects-container { 
        width: 96vw; 
        max-width: 100vw;
    }
}

@media (max-width: 880px) {
    .profile-section { 
        flex-direction: column; 
        gap: 32px;
    }
    .profile-image { 
        margin-bottom: 8px;
    }
    .profile-text { 
        min-width: 250px; 
        align-items: center;
        text-align: center;
    }
    .projects-container { 
        width: 94vw;
    }
    .skills-container { 
        width: 98vw;
    }
}

@media (max-width: 768px) {
    .nav-brand { 
        left: 8px; 
        font-size: 1.15rem;
    }
    .cover-nav-menu { 
        gap: 15px;
    }
    .nav-link { 
        font-size: 14px;
    }
    section {
        padding: 72px 0 0 0;
    }
}

@media (max-width: 600px) {
    .cover-content, section { 
        padding-top: 60px;
    }
    .main-title { 
        font-size: 32px; 
        word-spacing: 4px;
    }
    .profile-circle { 
        width: 120px; 
        height: 120px; 
        font-size: 3.5rem;
    }
    .profile-text h2 { 
        font-size: 2rem;
    }
    .main-stats { 
        gap: 18px; 
        flex-direction: column;
    }
    .btn { 
        font-size: 15px; 
        padding: 7px 14px;
    }
}

@media (max-width: 800px) {
    section {
        min-height: 100vh;
        height: 100vh;
        padding: 72px 0 0 0;
    }
    .main-section, .cover-page, .skills, .projects {
        padding: 72px 10px 0 10px;
    }
}

/* 이메일, 깃허브 한 줄 표시 스타일 */
.main-description {
    margin: 20px 0 4px 0;
}

.main-description p {
    font-size: 1rem;
    color: #3b567e;
    margin: 0;
    line-height: 1.5;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.contact-label {
    font-weight: 700;
    color: var(--accent);
    margin-right: 8px;
}

.contact-value {
    color: #3b567e;
    font-weight: 500;
    word-break: break-all;
}

.contact-separator {
    width: 20px;
    display: inline-block;
}

/* 반응형: 모바일에서는 줄바꿈 허용 */
@media (max-width: 600px) {
    .main-description p {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .contact-separator {
        display: none;
    }
    
    .contact-value {
        font-size: 0.9rem;
    }
}

/* =============== Project Section =============== */
.project {
    background: #ffffff;
    padding: 0;
    min-height: 100vh;
    display: flex; 
    align-items: center; 
    justify-content: center;
}

.projects-container {
    width: 1200px;
    max-width: 95vw;
    margin: 0 auto;
    padding: 0;
}

/* 상단 프로젝트 제목 */
.project-header-top {
    text-align: center;
    margin-bottom: 40px;
}

.project-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--main-text-color);
    margin-bottom: 10px;
    letter-spacing: -0.5px;
    line-height: 1.2;
    display: inline;
    margin-right: 20px;
}

.project-subtitle {
    font-size: 1.1rem;
    color: #4596e4;
    font-weight: 600;
    letter-spacing: 0.02em;
    display: inline;
}

/* 메인 컨테이너: 왼쪽 이미지, 오른쪽 테이블 */
.project-main-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 12px 38px rgba(60,155,232,0.09);
    padding: 45px;
    align-items: flex-start;
    width: 100%;
    margin: 0 auto;
}

/* =============== 왼쪽: 이미지 갤러리 =============== */
.project-media {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: stretch;
}

.project-gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 15px;
    width: 100%;
}

.project-image-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(60,155,232,0.12);
    background: #ffffff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
}

.project-image-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(60,155,232,0.18);
}

.project-image {
    width: 100%;
    height: 140px;
    object-fit: contain;
    object-position: center;
    border: none;
    display: block;
    transition: transform 0.3s ease;
    background: #ffffff;
}

.project-image:hover {
    transform: scale(1.02);
}

/* 프로젝트 액션 버튼 */
.project-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    font-size: 0.95rem;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(69,150,228,0.10);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: #377fcc;
    box-shadow: 0 6px 20px rgba(69,150,228,0.25);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #fff;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-secondary:hover {
    background: var(--accent-bg);
    color: #2c3e50;
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* =============== 오른쪽: 프로젝트 정보 테이블 =============== */
.project-info {
    display: flex;
    flex-direction: column;
}

.project-details-table {
    border: 1px solid var(--main-border);
    border-radius: 12px;
    overflow: hidden;
    background: #f9fbff;
    box-shadow: 0 4px 20px rgba(102,126,234,0.06);
    height: fit-content;
}

.detail-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    border-bottom: 1px solid var(--main-border);
    min-height: 50px;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    background: #eef6ff;
    padding: 15px 16px;
    font-weight: 700;
    color: #4596e4;
    font-size: 0.95rem;
    border-right: 1px solid #e2e8f4;
    letter-spacing: 0.02em;
    display: flex;
    align-items: flex-start;
}

.detail-value {
    padding: 15px 18px;
    font-size: 0.95rem;
    color: #354d69;
    line-height: 1.6;
    background: #fff;
}

.role-item {
    margin-bottom: 6px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.role-item:last-child {
    margin-bottom: 0;
}

/* =============== 반응형 디자인 =============== */
@media (max-width: 1024px) {
    .project-main-container {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 35px 30px;
    }
    
    .project-gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .project-image {
        height: 120px;
    }
    
    .project-title {
        font-size: 1.6rem;
    }
    
    .project-subtitle {
        font-size: 1rem;
        display: block;
        margin-top: 10px;
    }
}

@media (max-width: 768px) {
    .project-main-container {
        padding: 30px 25px;
        gap: 35px;
    }
    
    .project-gallery-grid {
        gap: 10px;
    }
    
    .project-image {
        height: 100px;
    }
    
    .detail-row {
        grid-template-columns: 80px 1fr;
    }
    
    .detail-label {
        font-size: 0.85rem;
        padding: 12px 14px;
    }
    
    .detail-value {
        font-size: 0.9rem;
        padding: 12px 16px;
    }
    
    .project-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 600px) {
    .project-gallery-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .project-image {
        height: 140px;
    }
    
    .project-title {
        font-size: 1.2rem;
        display: block;
        margin-bottom: 10px;
        margin-right: 0;
    }
    
    .project-subtitle {
        font-size: 0.9rem;
        display: block;
    }
}

@media (max-width: 480px) {
    .project-image {
        height: 120px;
    }
    
    .project-main-container {
        padding: 25px 20px;
    }
    
    .project-title {
        font-size: 1.1rem;
    }
}
