/* ==========================================================================
   CSS Variables & Theme Settings
   ========================================================================== */
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: rgba(79, 70, 229, 0.1);
    --secondary: #06b6d4;
    --accent: #f43f5e;
    
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-alt: #f1f5f9;
    --bg-header: rgba(255, 255, 255, 0.85);

    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-main: #0b0f17;
    --bg-card: #151d2a;
    --bg-alt: #1e293b;
    --bg-header: rgba(11, 15, 23, 0.85);

    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-light: #64748b;

    --border-color: #1e293b;
    --border-hover: #334155;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.7;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-subtitle {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    display: block;
    margin-bottom: 8px;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

.section-bar {
    width: 50px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: var(--radius-full);
    margin: 0 auto;
}

/* ==========================================================================
   Buttons & Badges
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 26px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #6366f1);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1.5px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-2px);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    background-color: var(--primary-light);
    border-radius: var(--radius-full);
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--bg-header);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    font-family: 'Fira Code', monospace;
}

.logo-bracket {
    color: var(--text-muted);
}

.logo-accent {
    color: var(--primary);
}

.nav-list {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
    position: relative;
    padding: 6px 0;
}

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle,
.mobile-toggle {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: var(--bg-alt);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition);
}

.theme-toggle:hover,
.mobile-toggle:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.mobile-toggle {
    display: none;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    min-height: 100vh;
    padding-top: 130px;
    padding-bottom: 70px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    align-items: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -1px;
    margin-bottom: 20px;
}

.hero-desc {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 520px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.social-links a:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Code Mock Card in Hero */
.avatar-card {
    position: relative;
}

.avatar-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.25) 0%, rgba(6, 182, 212, 0.15) 50%, transparent 70%);
    filter: blur(40px);
    z-index: 1;
}

.avatar-inner {
    position: relative;
    z-index: 2;
}

.code-editor-mock {
    background-color: #1e1e2e;
    color: #cdd6f4;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
}

.editor-header {
    background-color: #181825;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background-color: #f38ba8; }
.dot.yellow { background-color: #f9e2af; }
.dot.green { background-color: #a6e3a1; }

.editor-title {
    margin-left: 8px;
    font-size: 0.8rem;
    color: #a6adc8;
}

.editor-body {
    padding: 20px;
    line-height: 1.7;
    margin: 0;
    overflow-x: auto;
}

.keyword { color: #cba6f7; font-weight: bold; }
.prop { color: #89b4fa; }
.string { color: #a6e3a1; }
.boolean { color: #fab387; }
.function { color: #f9e2af; }

/* ==========================================================================
   About Me Section
   ========================================================================== */
.about-section {
    background-color: var(--bg-alt);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.about-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.intro-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
}

.intro-card p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.info-list li {
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-color);
    font-size: 0.95rem;
}

.info-list li:last-child {
    border-bottom: none;
}

.info-list strong {
    color: var(--text-main);
    display: inline-block;
    width: 90px;
}

.highlight-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
}

.highlight-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.highlight-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.highlight-info h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.highlight-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Skills Section
   ========================================================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.skill-category-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.skill-category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.category-icon {
    font-size: 1.5rem;
    color: var(--primary);
}

.category-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.progress-track {
    width: 100%;
    height: 8px;
    background-color: var(--bg-alt);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: var(--radius-full);
    transition: width 1s ease-in-out;
}

/* ==========================================================================
   Projects Section
   ========================================================================== */
.projects-section {
    background-color: var(--bg-alt);
}

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

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

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.project-banner {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.85);
}

.bg-gradient-1 {
    background: linear-gradient(135deg, #6366f1, #3b82f6);
}

.bg-gradient-2 {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
}

.bg-gradient-3 {
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
}

.project-placeholder-icon {
    font-size: 3.5rem;
}

.project-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    background-color: var(--bg-alt);
    color: var(--primary);
    border-radius: var(--radius-sm);
}

.project-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.project-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    flex: 1;
}

.project-links {
    display: flex;
    gap: 16px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
}

.project-link:hover {
    color: var(--primary);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 40px;
    background-color: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 48px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.contact-info-panel h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.contact-info-panel p {
    color: var(--text-muted);
    margin-bottom: 32px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.contact-item i {
    width: 46px;
    height: 46px;
    min-width: 46px;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.contact-item span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.contact-item strong {
    font-size: 0.95rem;
    color: var(--text-main);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-color);
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.btn-submit {
    align-self: flex-start;
    padding: 14px 32px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--bg-main);
    border-top: 1px solid var(--border-color);
    padding: 32px 0;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social a {
    color: var(--text-muted);
    font-size: 1.15rem;
    transition: var(--transition);
}

.footer-social a:hover {
    color: var(--primary);
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #10b981;
    color: #ffffff;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    box-shadow: var(--shadow-xl);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 2000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-desc {
        margin: 0 auto 32px auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }

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

    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .mobile-toggle {
        display: flex;
    }

    .navbar {
        position: fixed;
        top: 72px;
        left: 0;
        width: 100%;
        background-color: var(--bg-card);
        border-bottom: 1px solid var(--border-color);
        padding: 24px;
        box-shadow: var(--shadow-xl);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
    }

    .navbar.open {
        transform: translateY(0);
    }

    .nav-list {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .contact-wrapper {
        padding: 24px;
    }
}
