/* Modern CSS Reset & Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --success: #10b981;
    --dark: #1f2937;
    --dark-secondary: #374151;
    --light: #f3f4f6;
    --white: #ffffff;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    --radius: 0.75rem;
    --radius-lg: 1rem;
    --container: 1280px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: var(--gray-900);
    background: var(--white);
    overflow-x: hidden;
}

/* Gradient Background Animations */
@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(99, 102, 241, 0.1);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header.scrolled {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.9));
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.15);
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.nav {
    max-width: var(--container);
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: padding 0.3s ease;
}

.header.scrolled .nav {
    padding: 1.2rem 2.5rem;
}

.nav__brand {
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: -0.03em;
    position: relative;
    transition: all 0.3s ease;
    display: inline-block;
}

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

.nav__brand::before {
    content: '';
    position: absolute;
    inset: -4px;
    padding: 4px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
    border-radius: 50%;
    opacity: 0;
 arrest transition: opacity 0.3s ease;
    z-index: -1;
    filter: blur(8px);
}

.nav__brand:hover::before {
    opacity: 0.5;
}

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

.nav__menu {
    display: flex;
    list-style: none;
    gap: 3rem;
    align-items: center;
}

.nav__menu a {
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 0.5rem 0;
}

.nav__menu a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav__menu a:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

.nav__menu a:hover::before {
    width: 100%;
}

/* Hamburger Menu Toggle */
.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.nav__toggle span {
    width: 25px;
    height: 3px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav__toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.nav__toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav__toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background: url('/images/hero-bg.png') center center/cover no-repeat;
    background-size: cover;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 120px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}


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

@keyframes float-bg {
    0%, 100% {
        background-position: center center;
    }
    50% {
        background-position: 30px 30px;
    }
}

/* Floating particles */
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    animation: float-particle 15s infinite ease-in-out;
    backdrop-filter: blur(10px);
}

.particle:nth-child(1) { width: 80px; height: 80px; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { width: 120px; height: 120px; left: 20%; animation-delay: 2s; }
.particle:nth-child(3) { width: 60px; height: 60px; left: 35%; animation-delay: 4s; }
.particle:nth-child(4) { width: 100px; height: 100px; left: 50%; animation-delay: 1s; }
.particle:nth-child(5) { width: 90px; height: 90px; left: 65%; animation-delay: 3s; }
.particle:nth-child(6) { width: 70px; height: 70px; left: 80%; animation-delay: 5s; }
.particle:nth-child(7) { width: 110px; height: 110px; left: 15%; animation-delay: 2.5s; }
.particle:nth-child(8) { width: 55px; height: 55px; left: 70%; animation-delay: 4.5s; }

@keyframes float-particle {
    0%, 100% {
        transform: translateY(100vh) translateX(0) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-20vh) translateX(50px) scale(1);
        opacity: 0;
    }
}

.hero__content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* Animated background image overlay */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: rotate 20s linear infinite;
}

.hero__title {
    font-size: 5rem;
    font-weight: 900;
    color: white;
    margin-bottom: 2rem;
    line-height: 1.1;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: float 3s ease-in-out infinite;
}

.hero__title br {
    display: block;
}

.hero__subtitle {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hero__text {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero__badges {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.hero__badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
}

.hero__badge:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn--primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.btn--primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.5);
}

.btn--large {
    padding: 1.5rem 3rem;
    font-size: 1.2rem;
    border-radius: 1rem;
}

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

/* Section Styles */
section {
    padding: 6rem 0;
}

.section__title {
    font-size: 3.5rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section__subtitle {
    font-size: 1.3rem;
    color: var(--gray-600);
    text-align: center;
    margin-bottom: 4rem;
}

/* Services Section */
.services {
    background: linear-gradient(to bottom, #f8fafc, white);
    position: relative;
}

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

.service-card {
    background: white;
    padding: 3rem 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transition: transform 0.3s;
}

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

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

.service-card__icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

.service-card__title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.service-card__desc {
    font-size: 1.1rem;
    color: var(--gray-600);
    line-height: 1.7;
}

/* Stats Section */
.stats {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    position: relative;
    padding: 3rem 0;
}

.stats__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 500px;
    margin: 0 auto;
}

.stat-card {
    text-align: center;
    padding: 1rem;
}

.stat-card__number {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 0.3rem;
    animation: pulse 2s ease-in-out infinite;
}

.stat-card__label {
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.95;
}

/* Portfolio Section */
.portfolio {
    background: white;
}

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

.portfolio-item {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
    cursor: pointer;
}

.portfolio-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-2xl);
}

.portfolio-item__image {
    height: 300px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    position: relative;
    overflow: hidden;
}


.portfolio-item__info {
    padding: 2rem;
}

.portfolio-item__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.portfolio-item__tags {
    color: var(--primary);
    font-weight: 600;
    font-size: 1rem;
}

/* Contact Section */
.contact {
    background: linear-gradient(to bottom, #f8fafc, white);
    position: relative;
}

.contact__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact__info h2 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact__info p {
    font-size: 1.2rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-form {
    background: white;
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-900);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

/* Footer */
.footer {
    background: var(--gray-900);
    color: white;
    padding: 4rem 0 2rem;
}

.footer__content {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer__text {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.footer__bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav__actions {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .nav__toggle {
        display: flex;
    }
    
    .nav__menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.95));
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 10px 40px rgba(99, 102, 241, 0.15);
        z-index: 999;
    }
    
    .nav__menu.active {
        transform: translateX(0);
    }
    
    .nav__menu a::before {
        display: none;
    }
    
    .hero__title {
        font-size: 2.5rem;
    }
    
    .hero__subtitle {
        font-size: 1.2rem;
    }
    
    .section__title {
        font-size: 2rem;
    }
    
    .nav {
        flex-wrap: nowrap;
    }
    
    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .contact__content {
        grid-template-columns: 1fr;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .services__grid {
        grid-template-columns: 1fr;
    }
    
    .hero__text {
        font-size: 1rem;
    }
    
    .hero__badges {
        flex-direction: column;
    }
    
    .hero__badge {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }
    
    .service-card__icon {
        font-size: 3rem;
    }
    
    .service-card__title {
        font-size: 1.4rem;
    }
    
    .service-card__desc {
        font-size: 1rem;
    }
    
    .stat-card__number {
        font-size: 2.5rem;
    }
    
    .stat-card__label {
        font-size: 1.1rem;
    }
    
    .portfolio-item__title {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 0.9rem 1.8rem;
        font-size: 1rem;
    }
    
    .btn--large {
        padding: 1.2rem 2.5rem;
        font-size: 1.1rem;
    }
    
    .footer__content {
        grid-template-columns: 1fr;
    }
    
    .footer__text, .footer__title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero__title {
        font-size: 2rem;
    }
    
    .hero__subtitle {
        font-size: 1.1rem;
    }
    
    .section__title {
        font-size: 1.8rem;
    }
    
    .nav {
        padding: 1.2rem 1rem;
        flex-wrap: wrap;
        gap: 0.8rem;
    }
    
    .nav__brand {
        font-size: 1.5rem;
        letter-spacing: 0;
        flex: 0 0 auto;
    }
    
    .nav__toggle {
        display: flex;
    }
    
    .nav__menu {
        top: 70px;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .hero__content {
        padding: 2rem 1rem;
    }
    
    .service-card {
        padding: 2rem 1.5rem;
    }
    
    .contact-form {
        padding: 2rem 1.5rem;
    }
}

/* Page Title */
.page-title {
    font-size: 4rem;
    font-weight: 900;
    text-align: center;
    margin: 2rem 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.hero__content > * {
    animation: slideInUp 0.6s ease-out backwards;
}

.hero__content > *:nth-child(2) {
    animation-delay: 0.1s;
}

.hero__content > *:nth-child(3) {
    animation-delay: 0.2s;
}

.hero__content > *:nth-child(4) {
    animation-delay: 0.3s;
}

.hero__content > *:nth-child(5) {
    animation-delay: 0.4s;
}
