/* 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --navy: #89a7ff;
    --dark-navy: #6d8fe8;
    --white: #0b1220; /* page background in dark theme */
    --light-gray: #0f1724; /* alternating section bg */
    --text-color: #e6eef8;
    --text-light: #aab3bf;
    --border-color: #1f2937;
    --shadow-sm: 0 2px 8px rgba(2, 6, 23, 0.6);
    --shadow-md: 0 4px 16px rgba(2, 6, 23, 0.65);
    --shadow-lg: 0 8px 32px rgba(2, 6, 23, 0.7);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
    font-weight: 400;
}

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

/* 네비게이션 바 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.nav-logo a {
    font-size: 20px;
    font-weight: 700;
    color: var(--navy);
    text-decoration: none;
    transition: var(--transition);
    letter-spacing: -0.5px;
}

.nav-logo a:hover {
    color: var(--dark-navy);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 35px;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--navy);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--navy);
    transition: var(--transition);
}

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

/* 히어로 섹션 */
.hero {
    background: var(--white);
    color: var(--navy);
    padding-top: 60px;
    padding-bottom: 80px;
    text-align: center;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    max-width: 700px;
}

.profile-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 40px;
    border: 3px solid var(--navy);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

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

/* 취미 이미지 크기 조정 (dog.png, record.png) */
.hobby-image {
    width: 220px;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 12px auto;
    object-fit: cover;
    transition: var(--transition);
}

@media (max-width: 768px) {
    .hobby-image {
        width: 160px;
    }
}

@media (max-width: 480px) {
    .hobby-image {
        width: 130px;
    }
}

.hero-title {
    font-size: 54px;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 28px;
    margin-bottom: 16px;
    font-weight: 600;
    color: var(--navy);
}

.hero-description {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.8;
}

/* 섹션 공통 스타일 */
section {
    padding: 80px 0;
}

section:nth-child(even) {
    background-color: var(--light-gray);
}

.section-title {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 60px;
    text-align: center;
    color: var(--navy);
    position: relative;
    padding-bottom: 16px;
    letter-spacing: -0.5px;
}

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

/* 소개 섹션 */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.8;
}

.about-content p {
    margin-bottom: 24px;
    text-align: center;
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.9;
}

/* 기술 스택 섹션 */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.skill-card {
    background: var(--white);
    padding: 35px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--navy);
}

.skill-card h3 {
    color: var(--navy);
    margin-bottom: 22px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid var(--navy);
    padding-bottom: 12px;
}

.skill-card ul {
    list-style: none;
}

.skill-card li {
    padding: 10px 0;
    padding-left: 24px;
    position: relative;
    color: var(--text-light);
    font-size: 14px;
    transition: var(--transition);
}

.skill-card li:hover {
    color: var(--navy);
    padding-left: 28px;
}

.skill-card li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--navy);
    font-weight: 600;
}

/* 포트폴리오 섹션 */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.project-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--navy);
}

.project-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eef7 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy);
    font-size: 14px;
    transition: var(--transition);
}

.project-card:hover .project-image {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--white);
}

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

.project-info {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-info h3 {
    color: var(--navy);
    margin-bottom: 14px;
    font-size: 18px;
    font-weight: 600;
}

.project-description {
    color: var(--text-light);
    margin-bottom: 18px;
    font-size: 14px;
    line-height: 1.7;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.tech-tag {
    background: var(--light-gray);
    color: var(--navy);
    padding: 5px 11px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.project-card:hover .tech-tag {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

.project-link {
    display: inline-block;
    color: var(--navy);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.project-link:hover {
    border-bottom-color: var(--navy);
    color: var(--dark-navy);
}

/* 연락처 섹션 */
.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-intro {
    font-size: 16px;
    margin-bottom: 50px;
    color: var(--text-light);
    line-height: 1.8;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 20px 24px;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
    font-weight: 500;
    font-size: 14px;
}

.contact-link:hover {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.contact-icon {
    font-size: 20px;
}

/* 푸터 */
.footer {
    background: var(--navy);
    color: var(--white);
    text-align: center;
    padding: 35px 40px;
}

.footer p {
    margin: 0;
    font-size: 14px;
    opacity: 0.8;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    /* 네비게이션 - 모바일에서 세로 배치 */
    .navbar {
        position: relative;
    }

    .nav-container {
        padding: 0 20px;
        height: auto;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .nav-logo {
        width: 100%;
        padding: 12px 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 0;
        padding: 12px 0;
    }

    .nav-link {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
    }

    .nav-link::after {
        display: none;
    }

    .nav-link:hover::after {
        display: none;
    }

    /* 히어로 섹션 */
    .hero {
        padding-top: 100px;
        padding-bottom: 50px;
        min-height: auto;
    }

    .hero-title {
        font-size: 36px;
        margin-bottom: 8px;
    }

    .hero-subtitle {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .hero-description {
        font-size: 14px;
    }

    .profile-image {
        width: 130px;
        height: 130px;
        margin-bottom: 25px;
    }

    /* 섹션 */
    .section-title {
        font-size: 28px;
        margin-bottom: 35px;
    }

    /* 카드 레이아웃 */
    .portfolio-grid,
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* 기술 카드 */
    .skill-card {
        padding: 25px;
    }

    /* 포트폴리오 카드 */
    .project-info {
        padding: 20px;
    }

    .project-description {
        font-size: 13px;
    }

    /* 섹션 패딩 */
    section {
        padding: 50px 0;
    }

    /* 연락처 */
    .contact-intro {
        font-size: 14px;
        margin-bottom: 35px;
    }

    .contact-link {
        padding: 16px 20px;
        font-size: 13px;
    }

    /* 푸터 */
    .footer {
        padding: 25px 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    /* 네비게이션 */
    .nav-container {
        padding: 0 16px;
    }

    .nav-logo a {
        font-size: 16px;
    }

    .nav-link {
        font-size: 13px;
        padding: 10px 0;
    }

    /* 히어로 섹션 */
    .hero {
        padding-top: 80px;
        padding-bottom: 40px;
    }

    .hero-title {
        font-size: 28px;
        margin-bottom: 6px;
    }

    .hero-subtitle {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .hero-description {
        font-size: 13px;
        line-height: 1.6;
    }

    .profile-image {
        width: 110px;
        height: 110px;
        margin-bottom: 20px;
    }

    /* 섹션 */
    .section-title {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .section-title::after {
        width: 40px;
    }

    /* 기술 카드 */
    .skill-card {
        padding: 20px;
        border-radius: 6px;
    }

    .skill-card h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .skill-card li {
        font-size: 13px;
        padding: 8px 0;
        padding-left: 20px;
    }

    /* 포트폴리오 카드 */
    .project-card {
        border-radius: 6px;
    }

    .project-image {
        height: 180px;
    }

    .project-info {
        padding: 18px;
    }

    .project-info h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .project-description {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .tech-tag {
        padding: 4px 10px;
        font-size: 11px;
    }

    .project-link {
        font-size: 13px;
    }

    /* 소개 섹션 */
    .about-content p {
        font-size: 14px;
        margin-bottom: 16px;
    }

    /* 연락처 */
    .contact-intro {
        font-size: 13px;
        margin-bottom: 30px;
    }

    .contact-links {
        gap: 12px;
    }

    .contact-link {
        padding: 14px 16px;
        font-size: 12px;
        gap: 10px;
    }

    .contact-icon {
        font-size: 18px;
    }

    /* 섹션 패딩 */
    section {
        padding: 45px 0;
    }

    /* 푸터 */
    .footer {
        padding: 20px 16px;
        font-size: 12px;
    }
}