/* ============================================
   Oddology Inc. - Portfolio Styles
   Extends main.css with portfolio-specific styles
   ============================================ */

/* ============================================
   Portfolio Hero
   ============================================ */

.portfolio-hero {
    padding: calc(var(--nav-height) + 80px) 0 60px;
    text-align: center;
}

.portfolio-hero-content {
    max-width: 700px;
    margin: 0 auto 50px;
}

.portfolio-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.portfolio-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Category Navigation */
.category-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.category-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    backdrop-filter: var(--backdrop-blur);
}

.category-link:hover {
    transform: translateY(-4px);
    border-color: var(--gradient-start);
    box-shadow: var(--shadow-md);
}

.category-icon {
    font-size: 1.5rem;
}

.category-name {
    font-weight: 600;
    font-size: 1rem;
}

/* ============================================
   Projects Section
   ============================================ */

.projects-section {
    padding: 80px 0;
}

.projects-section:nth-child(even) {
    background: var(--bg-secondary);
}

.projects-section .section-header {
    margin-bottom: 50px;
}

.section-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

/* ============================================
   Projects Grid
   ============================================ */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* ============================================
   Project Card
   ============================================ */

.project-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: all var(--transition-normal);
    backdrop-filter: var(--backdrop-blur);
    height: 100%;
    min-height: 400px;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--gradient-start);
    box-shadow: var(--shadow-lg);
}

/* Project Banner - 700x394 aspect ratio */
.project-banner {
    position: relative;
    width: 100%;
    padding-top: 56.28%;
    overflow: hidden;
}

.project-banner.has-image {
    background: var(--bg-tertiary);
}

.project-banner.no-image {
    background: var(--brand-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-banner-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-card:hover .project-banner-img {
    transform: scale(1.05);
}

/* Banner title when no image */
.project-banner-title {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
}

.project-banner-title h3 {
    color: white;
    font-size: 1.75rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    line-height: 1.3;
}

/* Project Status Badge */
.project-status {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    backdrop-filter: blur(10px);
}

.project-status.planning {
    background: rgba(59, 130, 246, 0.9);
    color: white;
}

.project-status.in-progress {
    background: rgba(245, 158, 11, 0.9);
    color: white;
}

.project-status.released {
    background: rgba(34, 197, 94, 0.9);
    color: white;
}

.project-status.maintenance {
    background: rgba(168, 85, 247, 0.9);
    color: white;
}

/* Project Details */
.project-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.project-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.project-header-text {
    flex: 1;
    min-width: 0;
}

/* Project Icon - CIRCULAR */
.project-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
}

.project-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    color: var(--text-primary);
}

.project-description {
    flex: 1;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Project Meta (platforms, languages) */
.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.project-tag {
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Project Card Footer */
.project-card-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.view-details {
    color: var(--gradient-start);
    font-weight: 600;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.project-card:hover .view-details {
    color: var(--gradient-end);
}

/* Empty State */
.projects-empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: 20px;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.6;
}

.projects-empty p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ============================================
   Project Modal
   ============================================ */

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

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

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

.modal-container {
    position: relative;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    background: var(--bg-secondary);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px) scale(0.95);
    transition: transform var(--transition-normal);
}

.project-modal.active .modal-container {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.modal-close svg {
    width: 20px;
    height: 20px;
    color: white;
}

.modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

/* Modal Header */
.modal-header {
    position: relative;
    width: 100%;
    min-height: 200px;
}

.modal-header.has-banner {
    padding-top: 56.28%;
}

.modal-header.no-banner {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-banner-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-header-gradient {
    width: 100%;
    height: 100%;
    min-height: 180px;
    background: var(--brand-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.modal-header-gradient h2 {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Modal Body */
.modal-body {
    padding: 30px;
}

.modal-project-info {
    margin-bottom: 30px;
}

.modal-icon-title {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

/* Modal Icon - CIRCULAR */
.modal-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-tertiary);
    border: 3px solid var(--border-color);
}

.modal-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-title-section {
    flex: 1;
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.modal-status {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-status.planning {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.modal-status.in-progress {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.modal-status.released {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.modal-status.maintenance {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
}

.modal-description {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 24px;
}

/* Modal Meta */
.modal-meta {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.meta-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meta-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
}

.meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.meta-tag {
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.modal-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
    flex: 1;
    justify-content: center;
    min-width: 180px;
}

.modal-btn svg {
    flex-shrink: 0;
}

.modal-btn-primary {
    background: var(--brand-gradient);
    color: white;
}

.modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 130, 165, 0.4);
}

.modal-btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.modal-btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.no-links {
    color: var(--text-tertiary);
    font-style: italic;
    text-align: center;
    width: 100%;
}

/* ============================================
   Portfolio CTA
   ============================================ */

.portfolio-cta {
    padding: 80px 0;
}

.portfolio-cta .cta-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 50px 60px;
    background: var(--brand-gradient);
    border-radius: 24px;
    color: white;
}

.portfolio-cta .cta-content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.portfolio-cta .cta-content p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.portfolio-cta .btn-primary {
    background: white;
    color: var(--gradient-end);
    padding: 16px 32px;
    font-size: 1rem;
}

.portfolio-cta .btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

/* ============================================
   Loading States
   ============================================ */

.projects-loading {
    display: flex;
    justify-content: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--gradient-start);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ============================================
   Responsive Styles
   ============================================ */

@media (max-width: 1024px) {
    .portfolio-cta .cta-card {
        flex-direction: column;
        text-align: center;
        padding: 40px;
    }
    
    .modal-container {
        width: 95%;
        max-height: 95vh;
    }
}

@media (max-width: 768px) {
    .portfolio-hero {
        padding: calc(var(--nav-height) + 60px) 0 40px;
    }
    
    .category-nav {
        gap: 12px;
    }
    
    .category-link {
        padding: 12px 20px;
    }
    
    .projects-section {
        padding: 60px 0;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-cta .cta-card {
        padding: 30px 24px;
    }
    
    .portfolio-cta .cta-content h3 {
        font-size: 1.5rem;
    }
    
    .modal-body {
        padding: 24px;
    }
    
    .modal-icon-title {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .category-nav {
        flex-direction: column;
        align-items: stretch;
    }
    
    .category-link {
        justify-content: center;
    }
    
    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .modal-header-gradient h2 {
        font-size: 1.5rem;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
}

/* ============================================
   Active Nav Link Style
   ============================================ */

.nav-link.active {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--brand-gradient);
    border-radius: 50%;
}
/* Project Title Info */
.project-title-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
