/* 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(0, 212, 255, 0.5);
    transition: box-shadow 0.3s ease;
}

.glow:hover {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.8);
}

/* Sphero Inspired Tech Color Palette */
:root {
    --primary-color: #1a1f3a;
    --secondary-color: #0f172a;
    --accent-color: #00d4ff;
    --accent-green: #00ff88;
    --dark-color: #0f172a;
    --light-color: #ffffff;
    --off-white: #ffffff;
    --soft-gray: #f8fafc;
    --light-gray: #f1f5f9;
    --medium-gray: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --gradient-primary: linear-gradient(135deg, #1a1f3a 0%, #0f172a 100%);
    --gradient-secondary: linear-gradient(135deg, #00d4ff 0%, #00ff88 100%);
    --gradient-accent: linear-gradient(135deg, #00ff88 0%, #00d4ff 100%);
    --gradient-subtle: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

/* Section Background Colors with Subtle Division */
section {
    background: #ffffff !important;
    border-bottom: 1px solid rgba(26, 31, 58, 0.08) !important;
}

/* Specific Section Backgrounds with Alternating Pattern */
#about {
    background: #ffffff !important;
}

#experience {
    background: #f8f9fc !important;
}

#certificates {
    background: #ffffff !important;
}

#portfolio {
    background: #f8f9fc !important;
}

#contact {
    background: #ffffff !important;
}

/* Section spacing and borders */
section {
    padding: 4rem 0 !important;
    position: relative !important;
}

section:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(26, 31, 58, 0.1), transparent);
}

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

/* Enhanced card backgrounds for better contrast */
.card {
    background: #ffffff !important;
    border: 1px solid rgba(0, 148, 202, 0.2);
}

/* 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 with Sphero Tech Colors */
.btn-primary {
    background: var(--gradient-accent);
    border: none;
    transition: all 0.3s ease;
    color: var(--dark-color);
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--gradient-secondary);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 212, 255, 0.3);
}

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

.text-warning {
    color: var(--accent-green) !important;
}

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

/* Card Modern Styling with VERY Strong Borders */
.card {
    border: 3px solid #1a1f3a !important;
    box-shadow: 0 8px 16px rgba(26, 31, 58, 0.4) !important;
    background: white !important;
    transition: all 0.3s ease !important;
}

.card:hover {
    box-shadow: 0 12px 24px rgba(26, 31, 58, 0.6) !important;
    transform: translateY(-2px) !important;
    border: 3px solid #0f172a !important;
}

/* Hero card specific styling */
.hero .card {
    border: 3px solid #ffffff !important;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5) !important;
    background: rgba(255, 255, 255, 0.98) !important;
}

.hero .card:hover {
    border: 3px solid #ffffff !important;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.7) !important;
}

/* Portfolio cards hover effect - Clickable indication */
.portfolio-card {
    cursor: pointer;
    transition: all 0.3s ease !important;
}

.portfolio-card:hover {
    transform: scale(1.02) !important;
    box-shadow: 0 12px 24px rgba(26, 31, 58, 0.2) !important;
    border: 3px solid #0d6efd !important;
}

.portfolio-card:hover .card-title {
    color: #0d6efd !important;
}

.portfolio-card:active {
    transform: scale(0.98) !important;
}

/* Section Headers */
section h2 {
    color: var(--text-primary) !important;
    position: relative;
    font-weight: 700;
}

/* Icon Colors - Bright Standard */
i[class^="bi-"], 
.bi, 
[class*=" bi-"] {
    color: #0d6efd !important;
}

/* Specific icon color classes */
.text-danger i, 
i.text-danger,
.bi.text-danger {
    color: #dc3545 !important;
}

.text-success i,
i.text-success,
.bi.text-success {
    color: #198754 !important;
}

.text-info i,
i.text-info,
.bi.text-info {
    color: #0dcaf0 !important;
}

.text-primary i,
i.text-primary,
.bi.text-primary {
    color: #0d6efd !important;
}

.text-warning i,
i.text-warning,
.bi.text-warning {
    color: #ffc107 !important;
}

.text-secondary i,
i.text-secondary,
.bi.text-secondary {
    color: #6c757d !important;
}

.text-muted i,
i.text-muted,
.bi.text-muted {
    color: #adb5bd !important;
}

/* Dark background icons (hero section) */
.hero i[class^="bi-"],
.hero .bi,
.hero [class*=" bi-"] {
    color: #ffffff !important;
}

/* Timeline icons */
.timeline-icon i,
.timeline-icon .bi {
    color: #ffffff !important;
}

/* Badge Colors - Force Bootstrap Standards */
.badge.bg-success {
    background-color: #198754 !important;
    color: white !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
    color: white !important;
}

.badge.bg-primary {
    background-color: #0d6efd !important;
    color: white !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
    color: white !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: black !important;
}

.badge.bg-info {
    background-color: #0dcaf0 !important;
    color: black !important;
}

.badge.bg-light {
    background-color: #f8f9fa !important;
    color: black !important;
}

.badge.bg-dark {
    background-color: #212529 !important;
    color: white !important;
}
.card:hover .card-title {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Smart Text Color Based on Background */
.card-title {
    color: var(--text-primary) !important;
    font-weight: 700;
    font-size: 1.1rem;
    font-family: 'Noto Sans KR', sans-serif !important;
    transition: all 0.3s ease;
}

.card-text {
    color: var(--text-primary) !important;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.6;
    font-family: 'Noto Sans KR', sans-serif !important;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary) !important;
    font-weight: 700;
    font-family: 'Noto Sans KR', sans-serif !important;
}

/* Remove global text color overrides */
p, span, div {
    color: inherit !important;
    font-weight: 500;
    line-height: 1.6;
    font-family: 'Noto Sans KR', sans-serif !important;
}

/* Force white text for hero section - FINAL FIX */
.hero h1,
.hero h2,
.hero h3,
.hero h4,
.hero h5,
.hero h6,
.hero p,
.hero span,
.hero div,
.hero .lead,
.hero .display-3,
.hero .fw-bold,
.hero .d-block {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8) !important;
}

/* Override text-warning and text-info in hero */
.hero .text-warning {
    color: #fbbf24 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8) !important;
}

.hero .text-info {
    color: #00d4ff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8) !important;
}

/* Hero specific spans */
.hero h1 .d-block {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8) !important;
}

/* Hero buttons */
.hero .btn-light {
    color: var(--dark-color) !important;
    background: #ffffff !important;
    border-color: #ffffff !important;
}

.hero .btn-outline-light {
    background: transparent !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
}

.hero .btn-outline-light:hover {
    background: #ffffff !important;
    color: var(--dark-color) !important;
}

/* Navbar white text */
.navbar,
.navbar * {
    color: #ffffff !important;
}

.navbar-brand,
.navbar-brand span,
.navbar-brand i {
    color: #ffffff !important;
}

.navbar-nav,
.navbar-nav * {
    color: #ffffff !important;
}

.nav-link {
    color: #ffffff !important;
}

.nav-link:hover {
    color: #ffffff !important;
}
/* Dark text for light backgrounds - More specific */
section:not(.hero) h1,
section:not(.hero) h2,
section:not(.hero) h3,
section:not(.hero) h4,
section:not(.hero) h5,
section:not(.hero) h6,
section:not(.hero) p,
section:not(.hero) span,
section:not(.hero) div {
    color: var(--text-primary) !important;
}

/* Card specific dark text */
.card h1,
.card h2,
.card h3,
.card h4,
.card h5,
.card h6,
.card p,
.card span,
.card div {
    color: var(--text-primary) !important;
}

/* Timeline specific dark text */
.timeline-content h1,
.timeline-content h2,
.timeline-content h3,
.timeline-content h4,
.timeline-content h5,
.timeline-content h6,
.timeline-content p,
.timeline-content span,
.timeline-content div {
    color: var(--text-primary) !important;
}

.text-white {
    color: white !important;
}

/* High contrast for better readability */
.text-muted {
    color: var(--text-muted) !important;
    font-weight: 500;
    font-family: 'Noto Sans KR', sans-serif !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
    font-weight: 600;
    font-family: 'Noto Sans KR', sans-serif !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);
}
