/* CSS Variables - Purple & Dark Gray Theme */
:root {
    --bg-primary: #333333;
    --bg-secondary: #404040;
    --bg-card: #4a4a4a;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #888888;
    --accent-purple: #8b5cf6;
    --accent-purple-blue: #6366f1;
    --accent-green: #10b981;
    --accent-green-bright: #34d399;
    --border-color: #404040;
    --shadow: rgba(0, 0, 0, 0.3);
    --gradient-purple: linear-gradient(135deg, #8b5cf6, #6366f1);
    --gradient-card: linear-gradient(145deg, #4a4a4a, #3a3a3a);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(51, 51, 51, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.2rem;
    transition: transform 0.2s ease;
    text-decoration: none;
    color: var(--text-primary);
}

.brand:hover {
    transform: translateY(-2px);
}

.brand-badge {
    width: 40px;
    height: 40px;
    background: var(--gradient-purple);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
    font-size: 1.2rem;
    overflow: hidden;
}

.brand-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* Main content - Account for fixed header */
main {
    padding-top: 80px; /* Adjust based on header height */
}

/* Banner Section */
.banner-section {
    padding: 1rem 0;
    background: transparent;
}

.banner-image {
    width: 100%;
    text-align: center;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
}

.banner-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 16px;
}

.banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 2rem;
    text-align: left;
    border-radius: 0 0 16px 16px;
}

.banner-overlay h2 {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.banner-overlay p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.5;
    max-width: 600px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .banner-overlay {
        padding: 1.5rem;
    }
    
    .banner-overlay h2 {
        font-size: 1.5rem;
    }
    
    .banner-overlay p {
        font-size: 0.9rem;
    }
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

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

.nav-menu a:hover {
    color: var(--accent-purple);
}

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

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

.language-switcher {
    display: flex;
    gap: 8px;
    margin-left: 1rem;
}

.lang-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.lang-btn:hover,
.lang-btn.active {
    background: var(--gradient-purple);
    color: white;
    border-color: transparent;
    position: relative;
}

.lang-btn.active::after {
    content: '✓';
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-green);
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    padding: 60px 0 60px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin: 0.5rem 0 1.5rem;
    font-style: italic;
}

.hero-features {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.hero-status {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(16, 185, 129, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge {
    display: inline-block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--success);
    margin-bottom: 0.5rem;
}

.hero-status p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--gradient-purple);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

.hero-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.hero-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px var(--shadow);
}

.hero-card h3 {
    color: var(--accent-green);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.hero-card ul {
    list-style: none;
    padding: 0;
}

.hero-card li {
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.hero-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-green);
    font-weight: bold;
}

/* Sections */
.section {
    padding: 40px 0;
}

.section h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.section-lead {
    font-size: 1.2rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Grid Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Cards */
.card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px var(--shadow);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow);
    border-color: var(--accent-purple);
}

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

.card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.portfolio-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px var(--shadow);
    display: flex;
    flex-direction: column;
    min-height: 400px; /* 최소 높이 설정 */
}

.portfolio-card.featured {
    border-color: var(--accent-green);
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.2);
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow);
}

.portfolio-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.icon-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border-radius: 16px;
}

.icon-placeholder.health {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.icon-placeholder.daily {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.portfolio-content h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.portfolio-content {
    display: flex;
    flex-direction: column;
    flex: 1; /* 남은 공간을 모두 차지 */
}

.portfolio-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex: 1; /* 설명 텍스트가 남은 공간을 차지 */
}

.store-link {
    display: inline-block;
    background: var(--gradient-purple);
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.store-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.3);
    border-color: var(--accent-purple);
}

.store-link:active {
    transform: translateY(0);
}

.store-links {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.store-link.android {
    background: linear-gradient(135deg, #34d399, #10b981);
}

.store-link.ios {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.store-link.android:hover {
    box-shadow: 0 5px 15px rgba(52, 211, 153, 0.3);
}

.store-link.ios:hover {
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.3);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    margin-top: auto; /* 프로그레스 바를 카드 하단 영역으로 이동 */
}

.progress-fill {
    height: 100%;
    background: var(--gradient-purple);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--accent-green);
    font-weight: 600;
}

/* Tech Stack */
.stack-summary {
    margin-bottom: 3rem;
}

.code-block {
    background: #1e1e1e;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    overflow-x: auto;
}

.code-line {
    color: #e6e6e6;
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.stack-category {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
}

.stack-category h3 {
    color: var(--accent-purple);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.tech-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.chip {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.chip.primary {
    background: var(--gradient-purple);
    color: white;
    border-color: transparent;
}

.chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow);
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
}

.contact-form {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
}

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-group label {
    position: absolute;
    left: 16px;
    top: 12px;
    color: var(--text-muted);
    transition: all 0.3s ease;
    pointer-events: none;
}

.form-group input:focus + label,
.form-group input:valid + label,
.form-group textarea:focus + label,
.form-group textarea:valid + label {
    top: -8px;
    left: 12px;
    font-size: 0.8rem;
    color: var(--accent-purple);
    background: var(--bg-secondary);
    padding: 0 4px;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-status {
    margin-top: 1rem;
    padding: 0.5rem;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
}

.form-status.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    border: 1px solid var(--accent-green);
}

.form-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid #ef4444;
}

.contact-info {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
}

.contact-info h3 {
    color: var(--accent-purple);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.info-item {
    display: flex;
    margin-bottom: 1rem;
}

.info-label {
    color: var(--text-muted);
    min-width: 100px;
    font-weight: 500;
}

.info-value {
    color: var(--text-primary);
    font-weight: 600;
}

.info-value a {
    color: var(--accent-purple);
    text-decoration: none;
}

.info-value a:hover {
    text-decoration: underline;
}

.contact-note {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 1.5rem;
    font-style: italic;
}

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

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-left {
    color: var(--text-muted);
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-right a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-right a:hover {
    color: var(--accent-purple);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero {
        padding: 40px 0 40px;
    }
    
    .section {
        padding: 30px 0;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .hero-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-features {
        font-size: 0.9rem;
    }
    
    .hero-status {
        padding: 1rem;
    }
    
    .status-badge {
        font-size: 0.95rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .stack-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-card {
        min-height: 350px; /* 모바일에서는 조금 더 작은 최소 높이 */
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-menu {
        width: 260px !important;
        right: -260px !important;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .section h2 {
        font-size: 1.8rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .hero-card {
        padding: 1.5rem;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Smooth scrolling enhancement */
html {
    scroll-padding-top: 80px;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Focus styles for accessibility */
button:focus,
input:focus,
textarea:focus,
a:focus {
    outline: 2px solid var(--accent-purple);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #ffffff;
        --text-secondary: #e0e0e0;
        --border-color: #666666;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}/
* Legal Document Styles */
.legal-document {
    max-width: 800px;
    margin: 0 auto;
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 30px var(--shadow);
}

.legal-document h1 {
    color: var(--accent-purple);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.last-updated {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.legal-content {
    line-height: 1.8;
}

.legal-section {
    margin-bottom: 3rem;
}

.legal-section h2 {
    color: var(--accent-purple);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-purple);
}

.legal-section h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin: 1.5rem 0 0.8rem 0;
}

.legal-section p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.legal-section ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.legal-section li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.contact-info {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

.contact-info a {
    color: var(--accent-purple);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* Mobile responsiveness for legal documents */
@media (max-width: 768px) {
    .legal-document {
        padding: 2rem 1.5rem;
        margin: 0 15px;
    }
    
    .legal-document h1 {
        font-size: 2rem;
    }
    
    .legal-section h2 {
        font-size: 1.3rem;
    }
    
    .legal-section ul {
        padding-left: 1.5rem;
    }
}

/* Mobile menu styles */
@media (max-width: 768px) {
    .nav-menu {
        display: flex !important;
        position: fixed;
        top: 70px;
        right: -280px;
        width: 280px;
        height: calc(100vh - 70px);
        background: rgba(26, 26, 26, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 2rem 12px;
        transition: right 0.3s ease;
        z-index: 9999;
        border-left: 1px solid var(--border-color);
    }
    
    .nav-menu.active {
        right: 0 !important;
        display: flex !important;
    }
    
    .nav-menu a {
        margin: 1rem 0;
        font-size: 1.1rem;
        text-align: center;
        width: 100%;
        padding: 0.8rem 1rem;
        border-radius: 8px;
        transition: background-color 0.3s ease;
    }
    
    .nav-menu a:hover {
        background-color: rgba(139, 92, 246, 0.1);
    }
    
    .language-switcher {
        margin-top: 2rem;
        margin-left: 0;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .language-switcher .lang-btn {
        width: 100%;
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

/* Skip link for accessibility */
.skip-link:focus {
    position: absolute !important;
    top: 6px !important;
    left: 6px;
    background: var(--accent-purple) !important;
    color: white !important;
    padding: 8px !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    z-index: 1001 !important;
}/* Err
or Page Styles */
.error-page {
    max-width: 600px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.error-code {
    font-size: 8rem;
    font-weight: 900;
    color: var(--accent-purple);
    line-height: 1;
    margin-bottom: 1rem;
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-page h1 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.error-page p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .error-code {
        font-size: 6rem;
    }
    
    .error-page h1 {
        font-size: 2rem;
    }
    
    .error-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .error-actions .btn {
        width: 200px;
        justify-content: center;
    }
}

/* Performance optimizations */
.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy.loaded {
    opacity: 1;
}

/* 모달 내 이미지는 lazy loading 영향 받지 않도록 */
.modal .gallery-image {
    opacity: 1 !important;
}

/* Print styles */
@media print {
    .header,
    .footer,
    .nav-menu:not(.active),
    .mobile-menu-btn,
    .language-switcher,
    .btn,
    .contact-form {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .container {
        max-width: none !important;
        padding: 0 !important;
    }
}

/* Dark mode support (system preference) */
@media (prefers-color-scheme: light) {
    /* Users who prefer light mode will still see dark theme 
       as it's part of the brand identity */
}

/* Animation performance */
@media (prefers-reduced-motion: no-preference) {
    .card:hover {
        transform: translateY(-5px);
    }
    
    .btn:hover {
        transform: translateY(-2px);
    }
    
    .portfolio-card:hover {
        transform: translateY(-5px);
    }
}

/* Improved focus indicators */
.btn:focus-visible,
.lang-btn:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent-green);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

/* Loading spinner for form submission */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Smooth scrolling enhancement for Safari */
@supports (-webkit-overflow-scrolling: touch) {
    html {
        -webkit-overflow-scrolling: touch;
    }
}/* Footer 
Contact Styles */
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-center {
    flex: 1;
    text-align: center;
}

.footer-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.footer-email {
    color: var(--accent-purple);
    text-decoration: none;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.footer-email:hover {
    background: rgba(139, 92, 246, 0.1);
    text-decoration: underline;
}

/* Mobile footer adjustments */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-center {
        order: -1;
        margin-bottom: 0.5rem;
    }
    
    .footer-contact {
        flex-direction: column;
        gap: 0.25rem;
    }
}/* Weather i
con placeholder */
.icon-placeholder.weather {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}/* 
Portfolio Store Link */
.store-link {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 6px 12px;
    background: var(--accent-green);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.store-link:hover {
    background: var(--accent-green-bright);
    transform: translateY(-1px);
}

.portfolio-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px var(--shadow);
}

/* Modal Styles */
.modal {
    display: none !important;
    position: fixed !important;
    z-index: 10000 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(5px) !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-sizing: border-box !important;
}

/* Force modal to show when it has display block */
.modal[style*="display: block"] {
    display: block !important;
}

/* Ensure modal is always on top of everything */
body .modal {
    position: fixed !important;
    z-index: 10000 !important;
}

.modal-content {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 900px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.modal-header h3 {
    color: var(--accent-purple);
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    color: var(--text-muted);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.image-gallery {
    margin-bottom: 1.5rem;
}

.image-container {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
    scroll-behavior: smooth;
}

.image-container::-webkit-scrollbar {
    height: 8px;
}

.image-container::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

.image-container::-webkit-scrollbar-thumb {
    background: var(--accent-purple);
    border-radius: 4px;
}

.image-container::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple-blue);
}

.gallery-image {
    flex-shrink: 0;
    width: 200px;
    height: auto;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-image:hover {
    border-color: var(--accent-purple);
    transform: scale(1.05);
}

.gallery-image.large {
    width: 300px;
}

.modal-info p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.modal-store-link {
    display: inline-block;
    padding: 12px 24px;
    background: var(--gradient-purple);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.modal-store-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

/* Mobile Modal Adjustments */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 85vh;
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .gallery-image {
        width: 150px;
    }
    
    .gallery-image.large {
        width: 200px;
    }
    
    .image-container {
        gap: 0.5rem;
    }
}/* 
Custom Scrollbar Styles */
/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--accent-purple);
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple-blue);
}

::-webkit-scrollbar-corner {
    background: var(--bg-secondary);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-purple) var(--bg-secondary);
}

/* Modal specific scrollbar */
.modal-body {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-purple) var(--bg-secondary);
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--accent-purple);
    border-radius: 3px;
}

/* Double App Modal Layout (Cat & Dog President) */
.double-app-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.double-app-stores {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.app-store-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.app-store-group.right {
    justify-content: flex-end;
}

.store-separator {
    color: var(--text-muted);
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0 1rem;
}

/* Mobile responsive for double app layout */
@media (max-width: 768px) {
    .double-app-stores {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .store-separator {
        align-self: center;
        margin: 0.5rem 0;
    }
    
    .app-store-group {
        justify-content: center;
    }
    
    .app-store-group.right {
        justify-content: center;
    }
}

/* Image container scrollbar */
#imageContainer::-webkit-scrollbar {
    width: 6px;
}

#imageContainer::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

#imageContainer::-webkit-scrollbar-thumb {
    background: var(--accent-purple);
    border-radius: 3px;
}

#imageContainer::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple-blue);
}

/* Modal Image Grid Improvements */
.modal .image-container {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 15px !important;
    padding: 10px !important;
    justify-content: center !important;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.modal .image-container img {
    /* 기본 크기 유지 - 확대하지 않음 */
    width: auto !important;
    max-width: 350px !important; /* 최대 크기 제한 */
    min-width: 200px !important;
    height: auto !important;
    border-radius: 12px !important;
    border: 2px solid var(--border-color) !important;
    transition: all 0.3s ease !important;
    flex-shrink: 0 !important; /* 축소 방지 */
}

.modal .image-container img:hover {
    border-color: var(--accent-purple) !important;
    transform: scale(1.02) !important;
}

/* 이미지가 하나만 있을 때도 기본 크기 유지 */
.modal .image-container img:only-child {
    max-width: 350px !important;
    width: auto !important;
    flex: none !important;
}

/* Mobile responsive adjustments - 화면이 작을 때만 리사이징 */
@media (max-width: 768px) {
    .modal .image-container img {
        max-width: 100% !important;
        min-width: 150px !important;
        width: 100% !important;
    }
    
    .modal .image-container img:only-child {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .modal-content {
        width: 95% !important;
        margin: 5% auto !important;
        max-height: 90vh !important;
    }
    
    .modal-body {
        padding: 1rem !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .modal .image-container img {
        max-width: 300px !important;
    }
    
    .modal .image-container img:only-child {
        max-width: 350px !important;
    }
}

@media (min-width: 1201px) {
    .modal .image-container img {
        max-width: 350px !important;
    }
    
    .modal .image-container img:only-child {
        max-width: 350px !important;
    }
}

/* Hide scrollbar but keep functionality (alternative option) */
.hide-scrollbar {
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    scrollbar-width: none;  /* Firefox */
}

.hide-scrollbar::-webkit-scrollbar { 
    display: none;  /* Safari and Chrome */
}