/* Components CSS */

/* Navigation Component */
.navbar {
    position: relative;
    z-index: 1000;
}

.nav-brand {
    font-weight: 700;
    font-size: var(--text-xl);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    list-style: none;
}

.nav-link {
    font-weight: 500;
    text-decoration: none;
    color: var(--text-dark);
    padding: 0.5rem 0;
    position: relative;
    transition: all 0.3s var(--ease-in-out);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s var(--ease-in-out);
}

/* Language Switcher Component */
.language-switcher {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.lang-btn {
    padding: 0.5rem 0.75rem;
    border: 2px solid transparent;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: var(--text-sm);
    font-weight: 500;
    transition: all 0.3s var(--ease-in-out);
    color: var(--text-dark);
    min-width: 60px;
    text-align: center;
}

.lang-btn:hover {
    border-color: var(--primary-color);
    background: rgba(0, 102, 204, 0.05);
}

.lang-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Card Components */
.card {
    background: white;
    border-radius: 12px;
    padding: var(--spacing-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s var(--ease-in-out);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-header {
    margin-bottom: var(--spacing-md);
}

.card-title {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.card-subtitle {
    color: #666;
    font-size: var(--text-sm);
}

/* Badge Component */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: var(--text-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: rgba(0, 102, 204, 0.1);
    color: var(--primary-color);
}

.badge-success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.badge-warning {
    background: rgba(255, 193, 7, 0.1);
    color: var(--warning);
}

.badge-error {
    background: rgba(220, 53, 69, 0.1);
    color: var(--error);
}

/* Progress Bar Component */
.progress-container {
    width: 100%;
    margin: var(--spacing-sm) 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.progress-name {
    font-weight: 500;
    color: var(--text-dark);
}

.progress-percentage {
    font-size: var(--text-sm);
    color: var(--primary-color);
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 1.5s var(--ease-in-out);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 2s infinite;
}

/* Modal Component */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s var(--ease-in-out);
    backdrop-filter: blur(4px);
    padding: 20px;
}

.modal.open {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 0;
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.8);
    transition: transform 0.3s var(--ease-in-out);
    position: relative;
}

.modal.open .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-lg) var(--spacing-xl) var(--spacing-md);
    border-bottom: 1px solid #eee;
}

.modal-title {
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--text-dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s var(--ease-in-out);
}

.modal-close:hover {
    background: #f0f0f0;
    color: var(--text-dark);
}

/* Project Modal Specific Styles */
.project-modal-content {
    display: flex;
    flex-direction: column;
}

.project-hero {
    position: relative;
    margin: 0;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    background: #f8f9fa;
}

.project-hero-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s var(--ease-in-out);
}

.project-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.project-status-badge {
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: var(--text-sm);
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.status-live {
    background: rgba(40, 167, 69, 0.95);
    color: white;
}

.status-completed {
    background: rgba(0, 102, 204, 0.95);
    color: white;
}

.status-patented {
    background: rgba(255, 107, 53, 0.95);
    color: white;
}

.project-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.project-details {
    padding: var(--spacing-xl);
}

.project-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
    font-size: var(--text-base);
}

.project-technologies,
.project-features,
.project-achievements {
    margin-bottom: var(--spacing-lg);
}

.project-technologies h4,
.project-features h4,
.project-achievements h4 {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--primary-color);
}

.feature-list,
.achievement-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li,
.achievement-list li {
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    background: rgba(0, 102, 204, 0.05);
    border-left: 3px solid var(--primary-color);
    border-radius: 4px;
    color: #555;
    line-height: 1.5;
}

.feature-list li::before,
.achievement-list li::before {
    content: '✓';
    color: var(--success);
    font-weight: bold;
    margin-right: var(--spacing-sm);
}

/* Experience Modal Specific Styles */
.modal-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
    font-size: var(--text-base);
}

.modal-technologies,
.modal-achievements,
.modal-links {
    margin-bottom: var(--spacing-lg);
}

.modal-technologies h3,
.modal-achievements h3,
.modal-links h3 {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--primary-color);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.tech-tag {
    padding: 0.375rem 0.75rem;
    background: rgba(0, 102, 204, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: var(--text-sm);
    font-weight: 500;
    border: 1px solid rgba(0, 102, 204, 0.2);
}

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

.achievements-list li {
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    background: rgba(0, 102, 204, 0.05);
    border-left: 3px solid var(--primary-color);
    border-radius: 4px;
    color: #555;
    line-height: 1.5;
}

.achievements-list li::before {
    content: '✓';
    color: var(--success);
    font-weight: bold;
    margin-right: var(--spacing-sm);
}

.links-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.links-container .btn {
    min-width: 140px;
    text-align: center;
}

/* Toast/Notification Component */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s var(--ease-in-out);
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background: var(--success);
}

.notification-error {
    background: var(--error);
}

.notification-warning {
    background: var(--warning);
    color: var(--text-dark);
}

.notification-info {
    background: var(--primary-color);
}

/* Tooltip Component */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-dark);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: var(--text-xs);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s var(--ease-in-out);
    z-index: 1000;
    margin-bottom: 5px;
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--text-dark);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s var(--ease-in-out);
}

.tooltip:hover::before,
.tooltip:hover::after {
    opacity: 1;
}

/* Loading Spinner Component */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

.loading-spinner-small {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.loading-spinner-large {
    width: 60px;
    height: 60px;
    border-width: 6px;
}

/* Accordion Component */
.accordion {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.accordion-item {
    border-bottom: 1px solid #eee;
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    padding: var(--spacing-md);
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s var(--ease-in-out);
}

.accordion-header:hover {
    background: #e9ecef;
}

.accordion-title {
    font-weight: 500;
    color: var(--text-dark);
}

.accordion-icon {
    transition: transform 0.3s var(--ease-in-out);
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s var(--ease-in-out);
}

.accordion-item.active .accordion-content {
    max-height: 500px;
}

.accordion-body {
    padding: var(--spacing-md);
    color: #666;
    line-height: 1.6;
}

/* Tab Component */
.tabs {
    border-bottom: 1px solid #eee;
    margin-bottom: var(--spacing-lg);
}

.tab-list {
    display: flex;
    gap: var(--spacing-md);
    list-style: none;
    margin: 0;
    padding: 0;
}

.tab-button {
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    background: none;
    color: #666;
    cursor: pointer;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.3s var(--ease-in-out);
}

.tab-button:hover {
    color: var(--primary-color);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeInUp 0.3s var(--ease-in-out);
}

/* Grid Component */
.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.grid-auto-fit {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-auto-fill {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

/* Flex Utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.items-end {
    align-items: flex-end;
}

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

.justify-between {
    justify-content: space-between;
}

.justify-around {
    justify-content: space-around;
}

.justify-end {
    justify-content: flex-end;
}

/* Spacing Utilities */
.m-0 { margin: 0; }
.m-1 { margin: var(--spacing-xs); }
.m-2 { margin: var(--spacing-sm); }
.m-3 { margin: var(--spacing-md); }
.m-4 { margin: var(--spacing-lg); }

.p-0 { padding: 0; }
.p-1 { padding: var(--spacing-xs); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

/* Text Utilities */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.text-accent { color: var(--accent-color); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }

/* Background Utilities */
.bg-primary { background: var(--primary-color); }
.bg-secondary { background: var(--secondary-color); }
.bg-accent { background: var(--accent-color); }
.bg-light { background: var(--bg-light); }
.bg-dark { background: var(--bg-dark); }

.bg-gradient-primary { background: var(--gradient-primary); }
.bg-gradient-secondary { background: var(--gradient-secondary); }
.bg-gradient-accent { background: var(--gradient-accent); }

/* Border Utilities */
.border { border: 1px solid #eee; }
.border-t { border-top: 1px solid #eee; }
.border-b { border-bottom: 1px solid #eee; }
.border-l { border-left: 1px solid #eee; }
.border-r { border-right: 1px solid #eee; }

.rounded { border-radius: 8px; }
.rounded-lg { border-radius: 12px; }
.rounded-xl { border-radius: 16px; }
.rounded-full { border-radius: 50%; }

/* Shadow Utilities */
.shadow-sm { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.shadow { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
.shadow-lg { box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1); }
.shadow-xl { box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); }

/* Visibility Utilities */
.visible { opacity: 1; visibility: visible; }
.invisible { opacity: 0; visibility: hidden; }
.hidden { display: none; }

/* Position Utilities */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* Z-index Utilities */
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }