/* ==========================================
   KM Works Website - Main Stylesheet
   Dark Theme with Glassmorphism
   ========================================== */

/* CSS Variables */
:root {
    /* Main Colors */
    --primary: #02238c;
    --primary-light: #3958b6;
    --primary-dark: #011654;
    --accent: #00d4ff;
    --accent-glow: rgba(0, 212, 255, 0.2);

    /* Gradients */
    --gradient-start: #0a0a1a;
    --gradient-mid: #02238c;
    --gradient-end: #0066ff;
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    --gradient-bg: linear-gradient(135deg, #0a0a1a 0%, #111128 50%, #0a0a1a 100%);

    /* Dark Theme Backgrounds */
    --bg-primary: #0a0a1a;
    --bg-secondary: #111128;
    --bg-card: #1a1a2e;
    --bg-card-hover: #252545;

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #b0b0c0;
    --text-muted: #6a6a8a;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-bg-hover: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: rgba(0, 0, 0, 0.3);

    /* Spacing */
    --section-padding: 120px;
    --container-width: 1200px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
}

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

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

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

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

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

/* Section */
.section {
    padding: var(--section-padding) 0;
    position: relative;
}

.section-dark {
    background: var(--bg-secondary);
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--accent-glow);
    border: 1px solid var(--accent);
    border-radius: 50px;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.section-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px var(--glass-shadow);
    transition: all var(--transition-normal);
}

.glass-card:hover {
    background: var(--glass-bg-hover);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--glass-shadow);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    outline: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-primary i {
    transition: transform var(--transition-fast);
}

.btn-primary:hover i {
    transform: translateX(5px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--glass-border);
}

.btn-outline:hover {
    background: var(--glass-bg);
    border-color: var(--accent);
    color: var(--accent);
}

.btn-full {
    width: 100%;
}

/* ==========================================
   Preloader
   ========================================== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 60px;
    height: 60px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-inner {
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.5s linear infinite reverse;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================
   Header
   ========================================== */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: all var(--transition-normal);
}

#header.scrolled {
    padding: 10px 0;
    background: rgba(10, 10, 26, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.navbar {
    width: 100%;
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    height: 40px;
    transition: transform var(--transition-fast);
}

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

.nav-menu {
    display: flex;
    align-items: center;
    gap: 40px;
}

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

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

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

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

.nav-cta {
    padding: 10px 24px;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    color: white !important;
}

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

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--accent-glow);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.bar {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-fast);
}

.hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 26, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: right var(--transition-normal);
}

.mobile-menu.active {
    right: 0;
}

.mobile-nav {
    text-align: center;
}

.mobile-nav li {
    margin: 30px 0;
}

.mobile-nav a {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

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

/* ==========================================
   Hero Section
   ========================================== */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(2, 35, 140, 0.3) 0%, rgba(10, 10, 26, 0.9) 70%);
}

#particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    padding: 0 20px;
}

.hero-badge {
    display: inline-block;
    padding: 10px 25px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 30px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.typed-wrapper {
    font-size: 1.5rem;
    margin-bottom: 20px;
    min-height: 40px;
}

.typed-prefix {
    color: var(--text-secondary);
}

#typed {
    color: var(--accent);
    font-weight: 600;
}

.typed-cursor {
    color: var(--accent);
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Hero Mobile Projects - hidden by default (shown only on mobile via responsive.css) */
.hero-mobile-projects {
    display: none;
}

/* Hero Side Elements (Desktop/Tablet only) */
.hero-side {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    display: none;
}

.hero-side-left {
    left: 30px;
}

.hero-side-right {
    right: 30px;
}

/* Left: Tech Stack Radial */
.hero-tech-radial {
    position: relative;
    width: 200px;
    height: 200px;
}

.tech-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 50%;
}

.tech-orbit-1 {
    width: 180px;
    height: 180px;
    animation: orbit-rotate 30s linear infinite;
}

.tech-orbit-2 {
    width: 120px;
    height: 120px;
    animation: orbit-rotate 25s linear infinite reverse;
}

.tech-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--accent);
    opacity: 0.4;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%) rotate(var(--angle)) translate(90px) rotate(calc(-1 * var(--angle)));
}

.tech-orbit-2 .tech-icon {
    transform: translate(-50%, -50%) rotate(var(--angle)) translate(60px) rotate(calc(-1 * var(--angle)));
}

.tech-icon:hover {
    opacity: 0.8;
    transform: translate(-50%, -50%) rotate(var(--angle)) translate(90px) rotate(calc(-1 * var(--angle))) scale(1.2);
    background: rgba(0, 212, 255, 0.15);
}

.tech-orbit-2 .tech-icon:hover {
    transform: translate(-50%, -50%) rotate(var(--angle)) translate(60px) rotate(calc(-1 * var(--angle))) scale(1.2);
}

.tech-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--accent);
    opacity: 0.6;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 50%;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes orbit-rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
        opacity: 0.6;
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 212, 255, 0.4);
        opacity: 0.8;
    }
}

/* Right: Projects List */
.hero-projects-list {
    text-align: right;
}

.projects-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    opacity: 0.6;
    margin-bottom: 15px;
}

.projects-titles {
    list-style: none;
    padding: 0;
    margin: 0;
}

.projects-titles li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.35;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.projects-titles li:last-child {
    border-bottom: none;
}

.projects-titles li:hover {
    opacity: 0.7;
    color: var(--accent);
    padding-right: 10px;
}

/* Show on tablet and desktop */
@media (min-width: 992px) {
    .hero-side {
        display: block;
    }

    .hero-side-left {
        left: 20px;
    }

    .hero-side-right {
        right: 20px;
    }

    .hero-tech-radial {
        width: 160px;
        height: 160px;
    }

    .tech-orbit-1 {
        width: 150px;
        height: 150px;
    }

    .tech-orbit-2 {
        width: 100px;
        height: 100px;
    }

    .tech-icon {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .tech-orbit-1 .tech-icon {
        transform: translate(-50%, -50%) rotate(var(--angle)) translate(75px) rotate(calc(-1 * var(--angle)));
    }

    .tech-orbit-2 .tech-icon {
        transform: translate(-50%, -50%) rotate(var(--angle)) translate(50px) rotate(calc(-1 * var(--angle)));
    }

    .tech-center {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .projects-titles li {
        font-size: 0.75rem;
        padding: 6px 0;
    }
}

@media (min-width: 1200px) {
    .hero-side-left {
        left: 50px;
    }

    .hero-side-right {
        right: 50px;
    }

    .hero-tech-radial {
        width: 220px;
        height: 220px;
    }

    .tech-orbit-1 {
        width: 200px;
        height: 200px;
    }

    .tech-orbit-2 {
        width: 140px;
        height: 140px;
    }

    .tech-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .tech-orbit-1 .tech-icon {
        transform: translate(-50%, -50%) rotate(var(--angle)) translate(100px) rotate(calc(-1 * var(--angle)));
    }

    .tech-orbit-2 .tech-icon {
        transform: translate(-50%, -50%) rotate(var(--angle)) translate(70px) rotate(calc(-1 * var(--angle)));
    }

    .tech-center {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }

    .projects-titles li {
        font-size: 0.85rem;
        padding: 8px 0;
    }
}

@media (min-width: 1400px) {
    .hero-side-left {
        left: 80px;
    }

    .hero-side-right {
        right: 80px;
    }

    .hero-tech-radial {
        width: 280px;
        height: 280px;
    }

    .tech-orbit-1 {
        width: 260px;
        height: 260px;
    }

    .tech-orbit-2 {
        width: 180px;
        height: 180px;
    }

    .tech-icon {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }

    .tech-orbit-1 .tech-icon {
        transform: translate(-50%, -50%) rotate(var(--angle)) translate(130px) rotate(calc(-1 * var(--angle)));
    }

    .tech-orbit-2 .tech-icon {
        transform: translate(-50%, -50%) rotate(var(--angle)) translate(90px) rotate(calc(-1 * var(--angle)));
    }

    .projects-titles li {
        font-size: 0.9rem;
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.85rem;
    animation: bounce 2s infinite;
}

.scroll-line {
    width: 1px;
    height: 30px;
    background: linear-gradient(to bottom, var(--accent), transparent);
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ==========================================
   About Section - Stats
   ========================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 80px;
}

.stat-card {
    padding: 40px 30px;
    text-align: center;
}

.stat-card i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    display: inline;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-suffix {
    font-size: 1.5rem;
    color: var(--accent);
    font-weight: 600;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 10px;
}

/* Core Values */
.values-section {
    margin-top: 40px;
}

.values-title {
    text-align: center;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 40px;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.value-card {
    padding: 40px 25px;
    text-align: center;
}

.value-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border-radius: 50%;
    transition: all var(--transition-normal);
}

.value-icon i {
    font-size: 2rem;
    color: var(--accent);
}

.value-card:hover .value-icon {
    background: var(--accent);
}

.value-card:hover .value-icon i {
    color: var(--bg-primary);
}

.value-card h4 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.value-kr {
    display: block;
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 15px;
}

.value-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* ==========================================
   SmartSuite Section
   ========================================== */
.smartsuite-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.smartsuite-content {
    padding-right: 40px;
}

.smartsuite-content .section-title {
    text-align: left;
    margin-top: 15px;
}

.smartsuite-content .section-badge {
    margin-bottom: 0;
}

.smartsuite-tagline {
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.smartsuite-description {
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.8;
}

.smartsuite-features {
    margin-bottom: 30px;
}

.smartsuite-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.smartsuite-features i {
    color: var(--accent);
    font-size: 1.1rem;
}

.smartsuite-image {
    display: flex;
    justify-content: center;
}

.patent-card {
    position: relative;
    padding: 20px;
    max-width: 400px;
}

.patent-card img {
    border-radius: var(--radius-md);
}

.patent-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: 0 5px 20px var(--accent-glow);
}

.patent-badge i {
    font-size: 1.1rem;
}

/* ==========================================
   Solutions Section
   ========================================== */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.solution-card {
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.solution-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.solution-card:hover::before {
    transform: scaleX(1);
}

.solution-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.solution-icon i {
    font-size: 2rem;
    color: var(--accent);
}

.solution-card:hover .solution-icon {
    background: var(--accent);
    transform: scale(1.1);
}

.solution-card:hover .solution-icon i {
    color: var(--bg-primary);
}

.solution-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.solution-subtitle {
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 15px;
}

.solution-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.solution-features {
    text-align: left;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.solution-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.solution-features i {
    color: var(--accent);
    font-size: 0.7rem;
}

/* Solutions Swiper (Mobile) */
.solutions-swiper {
    display: none;
    padding-bottom: 50px;
}

.solutions-swiper .swiper-pagination-bullet {
    background: var(--text-muted);
}

.solutions-swiper .swiper-pagination-bullet-active {
    background: var(--accent);
}

/* ==========================================
   Portfolio Section
   ========================================== */
.portfolio-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.95rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.portfolio-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(2, 35, 140, 0.3), rgba(10, 10, 26, 0.5));
    border: 1px solid rgba(0, 212, 255, 0.15);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(2, 35, 140, 0.95) 0%, rgba(10, 10, 26, 0.6) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 25px;
    opacity: 1;
    transition: background var(--transition-normal);
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-item:hover .portfolio-overlay {
    background: linear-gradient(to top, rgba(2, 35, 140, 0.98) 0%, rgba(10, 10, 26, 0.85) 60%, rgba(10, 10, 26, 0.7) 100%);
}

.portfolio-year {
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 8px;
}

.portfolio-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.portfolio-client {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.portfolio-item.hidden {
    display: none;
}

.load-more-wrapper {
    text-align: center;
    margin-top: 50px;
}

#loadMoreBtn.hidden {
    display: none;
}

/* Portfolio Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
    padding: 30px;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 1;
}

.modal-close:hover {
    background: var(--accent);
    color: var(--bg-primary);
}

.modal-image {
    margin-bottom: 25px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.modal-image img {
    width: 100%;
    height: auto;
}

.modal-year {
    display: inline-block;
    padding: 5px 15px;
    background: var(--accent-glow);
    border-radius: var(--radius-xl);
    color: var(--accent);
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.modal-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.modal-client {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.modal-description {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.modal-tag {
    padding: 5px 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ==========================================
   Tech Stack Section
   ========================================== */
.tech-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.tech-category {
    padding: 30px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.tech-category h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: var(--accent);
}

.tech-category h3 i {
    font-size: 1.3rem;
}

.tech-items {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.tech-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.tech-item i {
    font-size: 1.2rem;
    color: var(--accent);
}

.tech-icon-img {
    width: 1.2rem;
    height: 1.2rem;
    object-fit: contain;
}

.tech-item span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ==========================================
   History Section (Timeline)
   ========================================== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--glass-border);
}

.timeline-item {
    display: flex;
    margin-bottom: 50px;
    position: relative;
}

.timeline-item:nth-child(odd) {
    justify-content: flex-start;
    padding-right: calc(50% + 40px);
}

.timeline-item:nth-child(even) {
    justify-content: flex-end;
    padding-left: calc(50% + 40px);
}

.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--bg-primary);
    border: 3px solid var(--accent);
    border-radius: 50%;
    z-index: 1;
}

.timeline-content {
    padding: 25px;
    max-width: 350px;
}

.timeline-year {
    display: inline-block;
    padding: 5px 15px;
    background: var(--accent);
    color: var(--bg-primary);
    border-radius: var(--radius-xl);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.timeline-content h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.timeline-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* ==========================================
   Contact Section
   ========================================== */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-card {
    padding: 40px;
}

.contact-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 1.3rem;
    color: var(--accent);
}

.contact-text h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.contact-text p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.contact-text a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.contact-text a:hover {
    color: var(--accent);
}

.kakao-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    margin-top: 30px;
    background: #FEE500;
    color: #3C1E1E;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all var(--transition-fast);
}

.kakao-btn:hover {
    background: #F6DC00;
    transform: translateY(-2px);
}

/* Contact Form */
.contact-form {
    padding: 40px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23b0b0c0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.form-group select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

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

/* File Upload */
.file-upload-wrapper {
    position: relative;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    background: var(--bg-card);
    border: 2px dashed var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.file-upload-label:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.file-upload-label i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 10px;
}

.file-upload-label span {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.file-upload-label small {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.file-list {
    margin-top: 15px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.file-item:last-child {
    margin-bottom: 0;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-info i {
    color: var(--accent);
}

.file-info span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.file-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    transition: color var(--transition-fast);
}

.file-remove:hover {
    color: #ff4757;
}

/* ==========================================
   Footer
   ========================================== */
#footer {
    background: var(--bg-secondary);
    padding: 80px 0 30px;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 50px;
    margin-bottom: 50px;
}

.footer-logo {
    height: 35px;
    margin-bottom: 15px;
}

.footer-company {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.footer-tagline {
    color: var(--accent);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.footer-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-content h4 {
    font-size: 1rem;
    margin-bottom: 25px;
    color: var(--text-primary);
}

.footer-links ul li,
.footer-solutions ul li {
    margin-bottom: 12px;
}

.footer-links a,
.footer-solutions a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover,
.footer-solutions a:hover {
    color: var(--accent);
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.footer-contact i {
    color: var(--accent);
    width: 20px;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: #FEE500;
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background: rgba(0, 212, 255, 0.2);
    color: #FEE500;
    border-color: rgba(0, 212, 255, 0.5);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
}

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

/* ==========================================
   Back to Top Button
   ========================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 100;
    box-shadow: 0 5px 20px var(--accent-glow);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
}

/* ==========================================
   Selection & Scrollbar
   ========================================== */
::selection {
    background: var(--accent);
    color: var(--bg-primary);
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}
