/* Bootstrap Custom Styles */

/* Enhanced Animations with Tailwind CSS */

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

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

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

/* Enhanced Hover Effects */
.portfolio-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.portfolio-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2) !important;
}

/* Button Hover Effects */
.btn-primary {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

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

/* Navbar Hover Effect */
.navbar-nav .nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: white;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

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

/* Parallax Effect */
.parallax {
    transform: translateZ(0);
    will-change: transform;
}

/* Stagger Animation */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }

/* Floating Animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.floating {
    animation: float 3s ease-in-out infinite;
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Glow Effect */
.glow {
    box-shadow: 0 0 5px rgba(13, 110, 253, 0.5);
    transition: box-shadow 0.3s ease;
}

.glow:hover {
    box-shadow: 0 0 20px rgba(13, 110, 253, 0.8);
}

/* Modern Color Palette */
:root {
    --primary-color: #2563eb;
    --secondary-color: #7c3aed;
    --accent-color: #ec4899;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --gradient-secondary: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
}

/* Hero Section Background */
.hero {
    background: var(--gradient-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    color: white;
}

/* Animate Bounce */
@keyframes animate-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40%, 60% {
        transform: translateX(-50%) translateY(-20px);
    }
}

.animate-bounce {
    animation: animate-bounce 2s infinite;
}

/* Scroll-triggered animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced portfolio card animations */
.portfolio-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.portfolio-card:hover {
    transform: translateY(-15px) rotateX(2deg) rotateY(2deg);
    box-shadow: 0 25px 50px rgba(0,0,0,0.25) !important;
}

.portfolio-card:hover img {
    transform: scale(1.05);
    transition: transform 0.4s ease;
}

/* Timeline animations */
.timeline-item {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.timeline-item.active {
    opacity: 1;
    transform: translateX(0);
}

/* Button animations */
.btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Navbar animations */
.navbar {
    backdrop-filter: blur(10px);
    background: var(--primary-color) !important;
    z-index: 1030;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    display: block !important;
    height: auto !important;
    padding: 1rem 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.navbar * {
    visibility: visible !important;
    opacity: 1 !important;
}

.navbar-brand:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* Section animations */
section {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
    scroll-margin-top: 100px; /* Offset for fixed navbar */
}

section:first-of-type {
    padding-top: 80px; /* Add padding to first section */
}

section:nth-child(2) { animation-delay: 0.2s; }
section:nth-child(3) { animation-delay: 0.4s; }
section:nth-child(4) { animation-delay: 0.6s; }
section:nth-child(5) { animation-delay: 0.8s; }
section:nth-child(6) { animation-delay: 1.0s; }
section:nth-child(7) { animation-delay: 1.2s; }
section:nth-child(8) { animation-delay: 1.4s; }

.animate-bounce {
    animation: animate-bounce 2s infinite;
}

/* Modern Enhanced Styles */
.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-warning {
    color: #fbbf24 !important;
}

/* Card Modern Styling */
.card {
    border: 1px solid rgba(37, 99, 235, 0.1);
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.1);
}

.card:hover {
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.15);
}

/* Section Headers */
section h2 {
    color: var(--dark-color);
    position: relative;
}

/* Modern Icon Colors */
.text-danger { color: #ef4444 !important; }
.text-success { color: #10b981 !important; }
.text-info { color: #06b6d4 !important; }
.text-secondary { color: #64748b !important; }
.company-logo {
    height: 30px;
    width: auto;
    max-width: 80px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.company-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* Portfolio Card Hover Effect */
.portfolio-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
}

.portfolio-card img {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

/* Card Image Container */
.card-img-container {
    height: 200px;
}

.card-img-container .row {
    height: 100%;
}

.card-img-container .col-4 {
    padding: 0;
    height: 100%;
}

/* Fix for card image aspect ratio */
.card-img-top {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
}

/* Ensure all portfolio images have consistent height */
.portfolio-card .card-img-top,
.portfolio-card .card-img-container {
    height: 200px;
    overflow: hidden;
}

/* Force all images to maintain aspect ratio and not be cropped */
.portfolio-card img {
    max-height: 200px;
    width: 100%;
    object-fit: contain;
    object-position: center;
}

/* Override for multi-image container */
.card-img-container img {
    height: 100%;
    object-fit: cover;
}

/* Special handling for 네이버강연.png to show face clearly */
.portfolio-card img[alt="네이버강연"] {
    object-fit: cover;
    object-position: top center;
}

/* Navigation Active Link */
.navbar-nav .nav-link.active {
    color: #fff !important;
    font-weight: 600;
}

/* Section Spacing */
section {
    scroll-margin-top: 80px; /* Offset for fixed navbar */
}

/* Form Styles */
.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Card Hover Effects */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1) !important;
}

/* Timeline Styles */
.timeline-item {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Success/Error Messages */
.success-message {
    background: #10b981 !important;
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: center;
    animation: slideIn 0.5s ease;
}

.error-message {
    background: #ef4444 !important;
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: center;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem !important;
    }
    
    .display-4 {
        font-size: 2rem !important;
    }
    
    .company-logo {
        height: 25px;
        max-width: 60px;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading Animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
