:root {
    /* 라이트 모드 색상 */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-accent: rgba(255, 255, 255, 0.7);
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --text-accent: #4b5563;
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.15);

    /* 그라데이션 색상 */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-warm: linear-gradient(135deg, #fa709a 0%, #fee140 100%);

    /* 투명도 */
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.3);

    /* 간격 */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* 애니메이션 */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

[data-theme="dark"] {
    /* 다크 모드 색상 */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-accent: rgba(30, 41, 59, 0.7);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-accent: #cbd5e1;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-lg: rgba(0, 0, 0, 0.5);

    /* 투명도 */
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(148, 163, 184, 0.1);
}

/* 리셋 및 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Noto Sans KR', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background var(--transition-normal), color var(--transition-normal);
}

/* 컨테이너 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* 테마 전환 버튼 */
.theme-toggle {
    position: fixed;
    top: 4.5rem;
    right: 1.5rem;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 6px var(--shadow);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 8px 12px var(--shadow-lg);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
    transition: all var(--transition-normal);
}

.moon-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: none;
}

[data-theme="dark"] .moon-icon {
    display: block;
}

/* 네비게이션 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: all var(--transition-normal);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: all var(--transition-normal);
}

.logo:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-normal);
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-normal);
}

/* 히어로 섹션 */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl) 0;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    bottom: -10%;
    right: -10%;
    animation-delay: 5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    top: 40%;
    right: 20%;
    animation-delay: 10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
}

.profile-image-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
}

.profile-image-ring {
    position: absolute;
    inset: -10px;
    background: var(--gradient-primary);
    border-radius: 50%;
    animation: pulse-ring 3s infinite;
}

@keyframes pulse-ring {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
}

.profile-image {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--bg-primary);
    box-shadow: 0 10px 30px var(--shadow-lg);
    transition: transform var(--transition-normal);
}

.profile-image:hover {
    transform: scale(1.05);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-accent);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all var(--transition-normal);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--glass-bg);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--shadow-lg);
}

.btn-full {
    width: 100%;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all var(--transition-normal);
}

.social-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow-lg);
    background: var(--gradient-primary);
    color: white;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-bottom: 2px solid var(--text-secondary);
    border-right: 2px solid var(--text-secondary);
    transform: rotate(45deg);
}

/* 섹션 공통 스타일 */
section {
    padding: var(--spacing-xl) 0;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: var(--spacing-lg);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* 글래스 카드 */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    transition: all var(--transition-normal);
    box-shadow: 0 8px 32px var(--shadow);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px var(--shadow-lg);
}

/* 소개 섹션 */
.about {
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.about-card {
    text-align: center;
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.about-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.about-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.about-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.about-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* 기술 섹션 */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    padding: 2.5rem;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-name {
    font-weight: 600;
    color: var(--text-primary);
}

.skill-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 10px;
    width: 0;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* 프로젝트 섹션 */
.projects {
    background: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.project-card {
    overflow: hidden;
    cursor: pointer;
}

.project-image {
    width: 100%;
    height: 200px;
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border: 2px solid white;
    border-radius: 50px;
    transition: all var(--transition-normal);
}

.project-link:hover {
    background: white;
    color: #000;
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* 타임라인 섹션 */
.timeline-section {
    margin-top: var(--spacing-lg);
}

.timeline-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-lg);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.3;
}

.timeline-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 2rem;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gradient-primary);
    z-index: 1;
    box-shadow: 0 0 0 4px var(--bg-primary);
}

.timeline-item:nth-child(odd) .timeline-date {
    text-align: right;
}

.timeline-item:nth-child(odd) .timeline-content {
    grid-column: 2;
}

.timeline-item:nth-child(even) {
    direction: rtl;
}

.timeline-item:nth-child(even)>* {
    direction: ltr;
}

.timeline-date {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.timeline-item:nth-child(even) .timeline-date {
    justify-content: flex-start;
}

.timeline-content {
    padding: 0.5rem;
}

.timeline-content h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.timeline-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.timeline-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: all var(--transition-fast);
}

.timeline-link:hover {
    gap: 0.6rem;
    color: #764ba2;
}

.timeline-item.highlight {
    position: relative;
}

.timeline-item.highlight::after {
    content: '';
    position: absolute;
    inset: -10px;
    background: var(--gradient-primary);
    opacity: 0.1;
    border-radius: 20px;
    z-index: -1;
}

/* 연락처 섹션 */
.contact-info {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-info h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 500px;
    margin: 0 auto;
}

.contact-method {
    display: flex;
    gap: 1rem;
    align-items: center;
    text-align: left;
}

.method-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border-radius: 15px;
    flex-shrink: 0;
}

.method-details h4 {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.method-details p,
.method-details a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.method-details a:hover {
    color: var(--text-primary);
}

/* 푸터 */
.footer {
    background: var(--bg-secondary);
    padding: var(--spacing-lg) 0 var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-info h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-info p {
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* 반응형 */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        width: 100%;
        padding: 2rem;
        transition: left var(--transition-normal);
        border-bottom: 1px solid var(--glass-border);
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .about-details {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    /* 타임라인 반응형 */
    .timeline::before {
        left: 2rem;
    }

    .timeline-item {
        grid-template-columns: auto 1fr;
        gap: 1rem;
        padding-left: 3rem;
    }

    .timeline-item::before {
        left: 2rem;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        grid-column: 2;
    }

    .timeline-item:nth-child(even) {
        direction: ltr;
    }

    .timeline-date {
        writing-mode: vertical-rl;
        text-align: center;
        padding: 0.5rem;
        font-size: 1rem;
    }

    .timeline-item:nth-child(odd) .timeline-date,
    .timeline-item:nth-child(even) .timeline-date {
        justify-content: center;
        text-align: center;
    }
}

/* 스크롤 애니메이션 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 커스텀 스크롤바 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-secondary);
}