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

:root {
    --primary-bg: #0a0a0a;
    --secondary-bg: #1a1a1a;
    --accent-color: #00ff88;
    --accent-secondary: #ff6b6b;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animated background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.1;
}

.bg-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, #667eea 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, #764ba2 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

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

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

nav.scrolled {
    background: rgba(10, 10, 10, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

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

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.2;
    word-break: keep-all;
    text-align: center;
    max-width: 100%;
    overflow-wrap: normal;
    hyphens: none;
}



.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    display: inline-block;
}

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

.btn-primary:hover {
    background: #00cc6a;
    transform: translateY(-2px);
}

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

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





/* Sections */
.section {
    padding: 5rem 0;
    position: relative;
    z-index: 10;
    background: var(--primary-bg);
}

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

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-color);
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    border-radius: 20px;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

.about-image:hover img {
    filter: grayscale(0%);
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.about-text h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.skill-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.skill-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.skill-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.skill-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Projects Section - 3D Carousel */
.project-carousel {
    position: relative;
    margin-top: 3rem;
    perspective: 1000px;
    min-height: 600px;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
}

.project-card-3d {
    position: absolute;
    width: 800px;
    height: 450px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    overflow: hidden;
    transform-style: preserve-3d;
    /* 초기 상태 - JavaScript에서 관리 */
    opacity: 0;
    transform: translateX(0) translateZ(-500px) scale(0.3);
    z-index: 1;
}

.card-content {
    display: flex;
    width: 100%;
    height: 100%;
    padding: 0;
}

.card-image {
    flex: 1;
    overflow: hidden;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card-3d:hover .card-image img {
    transform: scale(1.05);
}

.card-info {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-details {
    flex: 1;
}

.card-title {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.card-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.card-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    background: rgba(0, 255, 136, 0.1);
    color: var(--accent-color);
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    font-size: 0.8rem;
    border: 1px solid rgba(0, 255, 136, 0.3);
    transition: all 0.2s ease;
}

.tech-tag:hover {
    background: rgba(0, 255, 136, 0.15);
}

/* 라이트 모드에서 tech-tag 스타일을 동적으로 업데이트하기 위한 클래스 */
[data-theme="light"] .tech-tag {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

[data-theme="light"] .tech-tag:hover {
    background: rgba(139, 92, 246, 0.15);
}

.card-links {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.card-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--accent-color);
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.card-link:hover {
    background: var(--accent-color);
    color: var(--primary-bg);
    transform: translateY(-2px);
}

/* Navigation Buttons */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 20;
}

.nav-btn {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--accent-color);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: var(--accent-color);
    color: var(--primary-bg);
    transform: translateY(-2px);
}

/* Carousel Indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.indicator.active {
    background: var(--accent-color);
    opacity: 1;
    transform: scale(1.2);
}

/* Contact Section */
.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1rem;
}

.contact-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.contact-link {
    color: var(--accent-color);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.contact-link:hover {
    transform: translateY(-3px);
    color: var(--text-primary);
}

/* Footer */
footer {
    background: var(--secondary-bg);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero-title {
        font-size: clamp(1.5rem, 5vw, 2rem);
        line-height: 1.1;
    }

    .hero-content {
        max-width: 90%;
        padding: 0 1rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .project-carousel {
        min-height: 400px;
    }
    
    .carousel-container {
        height: 350px;
    }
    
    .project-card-3d {
        width: 600px;
        height: 350px;
    }
    
    /* 모바일 전용 위치는 JavaScript에서 처리 */
    
    .card-content {
        flex-direction: column;
    }
    
    .card-image {
        flex: 0 0 200px;
        border-radius: 20px 20px 0 0;
    }
    
    .card-info {
        padding: 1.5rem;
    }
    
    .card-title {
        font-size: 1.4rem;
    }
    
    .card-description {
        font-size: 0.9rem;
    }
    
    .carousel-nav {
        padding: 0 1rem;
    }
    
    .nav-btn {
        width: 50px;
        height: 50px;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(1.2rem, 4vw, 1.8rem);
        line-height: 1.0;
    }
    
    .hero-content {
        max-width: 95%;
        padding: 0 0.5rem;
    }
    
    .project-card-3d {
        width: 350px;
        height: 300px;
    }
    
    /* 소형 모바일 전용 위치는 JavaScript에서 처리 */
    
    .card-info {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1.2rem;
    }
    
    .card-description {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }
    
    .card-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .card-link {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
}

/* Scroll indicator */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(0, 255, 136, 0.3);
    z-index: 1001;
}

.scroll-progress {
    height: 100%;
    background: var(--accent-color);
    width: 0%;
    transition: width 0.1s ease;
}

/* Active navigation link styles */
.nav-links a.active {
    color: var(--accent-color) !important;
}

.nav-links a.active::after {
    width: 100% !important;
}

/* Skill bars */
.skill-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 1rem;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--accent-color);
    width: 0%;
    transition: width 1.5s ease-out;
    border-radius: 2px;
}

.skill-card.animate .skill-progress {
    animation: fillBar 1.5s ease-out forwards;
}

@keyframes fillBar {
    to {
        width: var(--progress, 85%);
    }
}

/* Accessibility */
.keyboard-navigation *:focus {
    outline: 2px solid var(--accent-color) !important;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
} 